diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
commit | 7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch) | |
tree | c76702a7f6310fbe9d437e347535422e836e94e9 /tdeui/tests/tdemainwindowrestoretest.cpp | |
parent | a2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff) | |
parent | 27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff) | |
download | tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'tdeui/tests/tdemainwindowrestoretest.cpp')
-rw-r--r-- | tdeui/tests/tdemainwindowrestoretest.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tdeui/tests/tdemainwindowrestoretest.cpp b/tdeui/tests/tdemainwindowrestoretest.cpp new file mode 100644 index 000000000..559348ec0 --- /dev/null +++ b/tdeui/tests/tdemainwindowrestoretest.cpp @@ -0,0 +1,41 @@ + +#include "tdemainwindowrestoretest.h" + +#include <tdeapplication.h> + +#include <tqlabel.h> + +#define MAKE_WINDOW( kind, title ) do { \ + MainWin##kind * m = new MainWin##kind; \ + m->setCaption( title ); \ + m->setCentralWidget( new TQLabel( title, m ) ); \ + m->show(); \ +} while ( false ) + +int main( int argc, char * argv[] ) { + + TDEApplication app( argc, argv, "tdemainwindowrestoretest" ); + + if ( kapp->isRestored() ) { + kRestoreMainWindows< MainWin1, MainWin2, MainWin3 >(); + kRestoreMainWindows< MainWin4, MainWin5 >(); + RESTORE(MainWin6); + //kRestoreMainWindows< MainWin6 >(); // should be equivalent to RESTORE() + } else { + MAKE_WINDOW( 1, "First 1" ); + MAKE_WINDOW( 1, "Second 1" ); + MAKE_WINDOW( 2, "Only 2" ); + MAKE_WINDOW( 3, "First 3" ); + MAKE_WINDOW( 4, "First 4" ); + MAKE_WINDOW( 4, "Second 4" ); + MAKE_WINDOW( 3, "Second 3" ); + MAKE_WINDOW( 4, "Third 4" ); + MAKE_WINDOW( 5, "First 5" ); + MAKE_WINDOW( 5, "Second 5" ); + MAKE_WINDOW( 1, "Only 6" ); + } + + return app.exec(); +} + +#include "tdemainwindowrestoretest.moc" |