diff options
Diffstat (limited to 'plugingui/tests')
-rw-r--r-- | plugingui/tests/filebrowsertest.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plugingui/tests/filebrowsertest.cc b/plugingui/tests/filebrowsertest.cc index cfe5aa2..c558fab 100644 --- a/plugingui/tests/filebrowsertest.cc +++ b/plugingui/tests/filebrowsertest.cc @@ -53,6 +53,14 @@ public: CONNECT(file_browser.eventHandler(), closeNotifier, this, &TestWindow::dialogCloseEventHandler); + + CONNECT(&file_browser, fileSelectNotifier, + this, &TestWindow::fileSelected); + + CONNECT(&file_browser, fileSelectCancelNotifier, + this, &TestWindow::fileCanceled); + + button.move(0, 0); button.resize(120, 30); button.setText("Browse..."); @@ -65,6 +73,16 @@ public: this, &TestWindow::dialogShow); } + void fileSelected(const std::string& filename) + { + label.setText(filename); + } + + void fileCanceled() + { + label.setText("[Canceled]"); + } + void closeEventHandler() { closing = true; @@ -78,7 +96,7 @@ public: void dialogShow() { file_browser.show(); - //file_browser.resize(300, 300); + file_browser.resize(300, 300); } bool processEvents() |