summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
Unidiff
Diffstat (limited to 'libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
index 0d8bc9f..754a744 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
+++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
@@ -4,74 +4,72 @@
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14***********************************************************************/ 14***********************************************************************/
15 15
16// Qt 16// Qt
17 17
18#include <qcolor.h> 18#include <qcolor.h>
19#include <qpopupmenu.h> 19#include <qpopupmenu.h>
20#include <qmenubar.h> 20#include <qmenubar.h>
21#include <qmessagebox.h> 21#include <qmessagebox.h>
22#include <qvbox.h> 22#include <qvbox.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qstringlist.h> 24#include <qstringlist.h>
25 25
26// Qtopia 26// Qtopia
27 27
28#ifdef QWS
29#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
30#include <qpe/global.h> 29#include <qpe/global.h>
31#endif
32 30
33// Opie 31// Opie
34 32
35#ifdef QWS
36#include <opie2/odevice.h> 33#include <opie2/odevice.h>
37using namespace Opie;
38#endif
39 34
40#include <opie2/ocompletionbox.h> 35#include <opie2/ocompletionbox.h>
41#include <opie2/olineedit.h> 36#include <opie2/olineedit.h>
42#include <opie2/ocombobox.h> 37#include <opie2/ocombobox.h>
43#include <opie2/oeditlistbox.h> 38#include <opie2/oeditlistbox.h>
44#include <opie2/oselector.h> 39#include <opie2/oselector.h>
45#include <opie2/opopupmenu.h> 40#include <opie2/opopupmenu.h>
46 41
47#include <qtabwidget.h> 42#include <qtabwidget.h>
48#include "oversatileviewdemo.h" 43#include "oversatileviewdemo.h"
49 44
50// Local 45// Local
51 46
52#include "opieuidemo.h" 47#include "opieuidemo.h"
53 48
49using namespace Opie::Core;
50using namespace Opie::Ui;
51
54enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector }; 52enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector };
55 53
56OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl ) 54OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl )
57 : QMainWindow( parent, name, fl ) 55 : QMainWindow( parent, name, fl )
58{ 56{
59 57
60 QMenuBar* mbar = this->menuBar(); 58 QMenuBar* mbar = this->menuBar();
61 OPopupMenu* demo = new OPopupMenu( this ); 59 OPopupMenu* demo = new OPopupMenu( this );
62 demo->setTitle( "Title" ); 60 demo->setTitle( "Title" );
63 demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox ); 61 demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox );
64 demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit ); 62 demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit );
65 demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox ); 63 demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox );
66 demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox ); 64 demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox );
67 demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector ); 65 demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector );
68 mbar->insertItem( "Demonstrate", demo ); 66 mbar->insertItem( "Demonstrate", demo );
69 67
70 build(); 68 build();
71 69
72} 70}
73 71
74OpieUIDemo::~OpieUIDemo() 72OpieUIDemo::~OpieUIDemo()
75{ 73{
76} 74}
77 75