author | mickeyl <mickeyl> | 2005-01-29 14:18:51 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-29 14:18:51 (UTC) |
commit | 555b999359a5aad999eaaf48632ce85f25125b85 (patch) (unidiff) | |
tree | 7414362241e49e06f49486e93a8f504113961b1c /examples/opieui/oversatileviewdemo | |
parent | 7b06e36fe27adc6a4fde2004eac13aaf8c0f0f02 (diff) | |
download | opie-555b999359a5aad999eaaf48632ce85f25125b85.zip opie-555b999359a5aad999eaaf48632ce85f25125b85.tar.gz opie-555b999359a5aad999eaaf48632ce85f25125b85.tar.bz2 |
examples appear here
Diffstat (limited to 'examples/opieui/oversatileviewdemo') (more/less context) (ignore whitespace changes)
24 files changed, 549 insertions, 0 deletions
diff --git a/examples/opieui/oversatileviewdemo/1.png b/examples/opieui/oversatileviewdemo/1.png new file mode 100644 index 0000000..0e2e41b --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/1.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/1small.png b/examples/opieui/oversatileviewdemo/1small.png new file mode 100644 index 0000000..ce6b262 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/1small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/2.png b/examples/opieui/oversatileviewdemo/2.png new file mode 100644 index 0000000..8a0181d --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/2.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/2small.png b/examples/opieui/oversatileviewdemo/2small.png new file mode 100644 index 0000000..82a4431 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/2small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/3.png b/examples/opieui/oversatileviewdemo/3.png new file mode 100644 index 0000000..8a58d6c --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/3.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/3small.png b/examples/opieui/oversatileviewdemo/3small.png new file mode 100644 index 0000000..073ba55 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/3small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/4.png b/examples/opieui/oversatileviewdemo/4.png new file mode 100644 index 0000000..198891b --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/4.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/4small.png b/examples/opieui/oversatileviewdemo/4small.png new file mode 100644 index 0000000..7f1cc01 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/4small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/5.png b/examples/opieui/oversatileviewdemo/5.png new file mode 100644 index 0000000..ee7344a --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/5.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/5small.png b/examples/opieui/oversatileviewdemo/5small.png new file mode 100644 index 0000000..105b038 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/5small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/6.png b/examples/opieui/oversatileviewdemo/6.png new file mode 100644 index 0000000..72c3692 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/6.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/6small.png b/examples/opieui/oversatileviewdemo/6small.png new file mode 100644 index 0000000..1db2a30 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/6small.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/folder_closed.png b/examples/opieui/oversatileviewdemo/folder_closed.png new file mode 100644 index 0000000..4157333 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/folder_closed.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/folder_closed32.png b/examples/opieui/oversatileviewdemo/folder_closed32.png new file mode 100644 index 0000000..acc992c --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/folder_closed32.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/folder_opened.png b/examples/opieui/oversatileviewdemo/folder_opened.png new file mode 100644 index 0000000..5e7e37e --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/folder_opened.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/folder_opened32.png b/examples/opieui/oversatileviewdemo/folder_opened32.png new file mode 100644 index 0000000..acd3265 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/folder_opened32.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/leaf.png b/examples/opieui/oversatileviewdemo/leaf.png new file mode 100644 index 0000000..c8435ec --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/leaf.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/leaf32.png b/examples/opieui/oversatileviewdemo/leaf32.png new file mode 100644 index 0000000..5e90ead --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/leaf32.png | |||
Binary files differ | |||
diff --git a/examples/opieui/oversatileviewdemo/main.cpp b/examples/opieui/oversatileviewdemo/main.cpp new file mode 100644 index 0000000..e48395a --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/main.cpp | |||
@@ -0,0 +1,32 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | #include "opieuidemo.h" | ||
17 | |||
18 | #include <opie2/oapplication.h> | ||
19 | |||
20 | using namespace Opie::Core; | ||
21 | using namespace Opie::Ui; | ||
22 | |||
23 | int main( int argc, char **argv ) | ||
24 | { | ||
25 | OApplication a( argc, argv, "Opie UI Demo" ); | ||
26 | odebug << "." << oendl; | ||
27 | OpieUIDemo e; | ||
28 | odebug << "." << oendl; | ||
29 | a.showMainWidget(&e); | ||
30 | odebug << "." << oendl; | ||
31 | return a.exec(); | ||
32 | } | ||
diff --git a/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/examples/opieui/oversatileviewdemo/opieuidemo.cpp new file mode 100644 index 0000000..a2cdd5a --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/opieuidemo.cpp | |||
@@ -0,0 +1,203 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ***********************************************************************/ | ||
15 | |||
16 | // Qt | ||
17 | |||
18 | #include <qcolor.h> | ||
19 | #include <qpopupmenu.h> | ||
20 | #include <qmenubar.h> | ||
21 | #include <qmessagebox.h> | ||
22 | #include <qvbox.h> | ||
23 | #include <qstring.h> | ||
24 | #include <qstringlist.h> | ||
25 | |||
26 | // Qtopia | ||
27 | |||
28 | #include <qpe/qpeapplication.h> | ||
29 | #include <qpe/global.h> | ||
30 | |||
31 | // Opie | ||
32 | |||
33 | #include <opie2/odevice.h> | ||
34 | |||
35 | #include <opie2/ocompletionbox.h> | ||
36 | #include <opie2/olineedit.h> | ||
37 | #include <opie2/ocombobox.h> | ||
38 | #include <opie2/oeditlistbox.h> | ||
39 | #include <opie2/oselector.h> | ||
40 | #include <opie2/opopupmenu.h> | ||
41 | |||
42 | #include <qtabwidget.h> | ||
43 | #include "oversatileviewdemo.h" | ||
44 | |||
45 | // Local | ||
46 | |||
47 | #include "opieuidemo.h" | ||
48 | |||
49 | using namespace Opie::Core; | ||
50 | using namespace Opie::Ui; | ||
51 | |||
52 | enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector }; | ||
53 | |||
54 | OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl ) | ||
55 | : QMainWindow( parent, name, fl ) | ||
56 | { | ||
57 | |||
58 | QMenuBar* mbar = this->menuBar(); | ||
59 | OPopupMenu* demo = new OPopupMenu( this ); | ||
60 | demo->setTitle( "Title" ); | ||
61 | demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox ); | ||
62 | demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit ); | ||
63 | demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox ); | ||
64 | demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox ); | ||
65 | demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector ); | ||
66 | mbar->insertItem( "Demonstrate", demo ); | ||
67 | |||
68 | build(); | ||
69 | |||
70 | } | ||
71 | |||
72 | OpieUIDemo::~OpieUIDemo() | ||
73 | { | ||
74 | } | ||
75 | |||
76 | void OpieUIDemo::build() | ||
77 | { | ||
78 | main = new QTabWidget( this, "tabwidget" ); | ||
79 | setCentralWidget( main ); | ||
80 | main->show(); | ||
81 | |||
82 | main->addTab( new OVersatileViewDemo( main ), "VersatileView" ); | ||
83 | } | ||
84 | |||
85 | |||
86 | void OpieUIDemo::demo( int d ) | ||
87 | { | ||
88 | switch (d) | ||
89 | { | ||
90 | case ocompletionbox: demoOCompletionBox(); break; | ||
91 | case olineedit: demoOLineEdit(); break; | ||
92 | case ocombobox: demoOComboBox(); break; | ||
93 | case oeditlistbox: demoOEditListBox(); break; | ||
94 | case oselector: demoOSelector(); break; | ||
95 | |||
96 | } | ||
97 | |||
98 | } | ||
99 | |||
100 | void OpieUIDemo::demoOCompletionBox() | ||
101 | { | ||
102 | odebug << "ocompletionbox" << oendl; | ||
103 | |||
104 | OCompletionBox* box = new OCompletionBox( 0 ); | ||
105 | box->insertItem( "This CompletionBox" ); | ||
106 | box->insertItem( "Says 'Hello World'" ); | ||
107 | box->insertItem( "Here are some" ); | ||
108 | box->insertItem( "Additional Items" ); | ||
109 | box->insertItem( "Complete Completion Box" ); | ||
110 | |||
111 | connect( box, SIGNAL( activated(const QString&) ), this, SLOT( messageBox(const QString&) ) ); | ||
112 | box->popup(); | ||
113 | |||
114 | } | ||
115 | |||
116 | void OpieUIDemo::demoOLineEdit() | ||
117 | { | ||
118 | odebug << "olineedit" << oendl; | ||
119 | |||
120 | OLineEdit *edit = new OLineEdit( 0, "lineedit" ); | ||
121 | |||
122 | edit->setCompletionMode( OGlobalSettings::CompletionPopup ); | ||
123 | OCompletion* comp = edit->completionObject(); | ||
124 | |||
125 | QStringList list; | ||
126 | list << "mickeyl@handhelds.org"; | ||
127 | list << "mickey@tm.informatik.uni-frankfurt.de"; | ||
128 | list << "mickey@vanille.de"; | ||
129 | |||
130 | comp->setItems( list ); | ||
131 | |||
132 | edit->show(); | ||
133 | |||
134 | } | ||
135 | |||
136 | void OpieUIDemo::demoOComboBox() | ||
137 | { | ||
138 | odebug << "ocombobox" << oendl; | ||
139 | |||
140 | OComboBox *combo = new OComboBox( true, 0, "combobox" ); | ||
141 | |||
142 | combo->setCompletionMode( OGlobalSettings::CompletionPopup ); | ||
143 | OCompletion* comp = combo->completionObject(); | ||
144 | |||
145 | QStringList ilist; | ||
146 | ilist << "kergoth@handhelds.org"; | ||
147 | ilist << "harlekin@handhelds.org"; | ||
148 | ilist << "groucho@handhelds.org"; | ||
149 | combo->insertStringList( ilist ); | ||
150 | |||
151 | QStringList clist; | ||
152 | clist << "mickeyl@handhelds.org"; | ||
153 | clist << "mickey@tm.informatik.uni-frankfurt.de"; | ||
154 | clist << "mickey@vanille.de"; | ||
155 | comp->setItems( clist ); | ||
156 | |||
157 | combo->show(); | ||
158 | |||
159 | } | ||
160 | |||
161 | void OpieUIDemo::demoOEditListBox() | ||
162 | { | ||
163 | odebug << "oeditlistbox" << oendl; | ||
164 | |||
165 | OEditListBox* edit = new OEditListBox( "OEditListBox", 0, "editlistbox" ); | ||
166 | |||
167 | edit->lineEdit()->setCompletionMode( OGlobalSettings::CompletionPopup ); | ||
168 | OCompletion* comp = edit->lineEdit()->completionObject(); | ||
169 | QStringList clist; | ||
170 | clist << "Completion everywhere"; | ||
171 | clist << "Cool Completion everywhere"; | ||
172 | clist << "History History History"; | ||
173 | comp->setItems( clist ); | ||
174 | |||
175 | QStringList list; | ||
176 | list << "kergoth@handhelds.org"; | ||
177 | list << "harlekin@handhelds.org"; | ||
178 | list << "groucho@handhelds.org"; | ||
179 | list << "mickeyl@handhelds.org"; | ||
180 | edit->insertStringList( list ); | ||
181 | |||
182 | edit->show(); | ||
183 | |||
184 | } | ||
185 | |||
186 | void OpieUIDemo::demoOSelector() | ||
187 | { | ||
188 | odebug << "oselector" << oendl; | ||
189 | |||
190 | OHSSelector* sel = new OHSSelector( 0, "gradientselector" ); | ||
191 | //#sel->resize( QSize( 200, 30 ) ); | ||
192 | //#sel->setColors( QColor( 90, 190, 60 ), QColor( 200, 55, 255 ) ); | ||
193 | //#sel->setText( "Dark", "Light" ); | ||
194 | |||
195 | sel->show(); | ||
196 | } | ||
197 | |||
198 | void OpieUIDemo::messageBox( const QString& text ) | ||
199 | { | ||
200 | QString info; | ||
201 | info = "You have selected '" + text + "'"; | ||
202 | QMessageBox::information( this, "OpieUIDemo", info ); | ||
203 | } | ||
diff --git a/examples/opieui/oversatileviewdemo/opieuidemo.h b/examples/opieui/oversatileviewdemo/opieuidemo.h new file mode 100644 index 0000000..382885f --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/opieuidemo.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Opie Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | #ifndef OPIEUIDEMO_H | ||
17 | #define OPIEUIDEMO_H | ||
18 | |||
19 | #include <qmainwindow.h> | ||
20 | |||
21 | namespace Opie { | ||
22 | namespace Ui { | ||
23 | class OVersatileView; | ||
24 | } | ||
25 | } | ||
26 | class QTabWidget; | ||
27 | class QVBox; | ||
28 | |||
29 | class OpieUIDemo : public QMainWindow { | ||
30 | Q_OBJECT | ||
31 | |||
32 | public: | ||
33 | |||
34 | OpieUIDemo( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel ); | ||
35 | ~OpieUIDemo(); | ||
36 | |||
37 | void demoOCompletionBox(); | ||
38 | void demoOLineEdit(); | ||
39 | void demoOComboBox(); | ||
40 | void demoOEditListBox(); | ||
41 | void demoOSelector(); | ||
42 | |||
43 | public slots: | ||
44 | void demo( int ); | ||
45 | void messageBox( const QString& text ); | ||
46 | |||
47 | protected: | ||
48 | void build(); | ||
49 | void buildVV( QVBox* b ); | ||
50 | |||
51 | private: | ||
52 | QTabWidget* main; | ||
53 | |||
54 | Opie::Ui::OVersatileView* vv; | ||
55 | |||
56 | }; | ||
57 | |||
58 | |||
59 | |||
60 | #endif | ||
diff --git a/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp new file mode 100644 index 0000000..e8bbdb1 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp | |||
@@ -0,0 +1,160 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Michael 'Mickey' Lauer | ||
5 | <mickey@tm.informatik.uni-frankfurt.de> | ||
6 | =. | ||
7 | .=l. | ||
8 | .>+-= | ||
9 | _;:, .> :=|. This program is free software; you can | ||
10 | .> <`_, > . <= redistribute it and/or modify it under | ||
11 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
12 | .="- .-=="i, .._ License as published by the Free Software | ||
13 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
14 | ._= =} : or (at your option) any later version. | ||
15 | .%`+i> _;_. | ||
16 | .i_,=:_. -<s. This program is distributed in the hope that | ||
17 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
18 | : .. .:, . . . without even the implied warranty of | ||
19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
21 | ..}^=.= = ; Library General Public License for more | ||
22 | ++= -. .` .: details. | ||
23 | : = ...= . :.=- | ||
24 | -. .:....=;==+<; You should have received a copy of the GNU | ||
25 | -_. . . )=. = Library General Public License along with | ||
26 | -- :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
29 | Boston, MA 02111-1307, USA. | ||
30 | |||
31 | */ | ||
32 | |||
33 | #include "oversatileviewdemo.h" | ||
34 | #include <opie2/oversatileview.h> | ||
35 | #include <opie2/oversatileviewitem.h> | ||
36 | |||
37 | #include <qstring.h> | ||
38 | #include <qpixmap.h> | ||
39 | #include <qlistview.h> | ||
40 | |||
41 | using namespace Opie::Ui; | ||
42 | |||
43 | OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f ) | ||
44 | :QVBox( parent, name, f ) | ||
45 | { | ||
46 | vv = new OVersatileView( this ); | ||
47 | |||
48 | vv->addColumn( "First" ); | ||
49 | vv->addColumn( "2nd" ); | ||
50 | vv->addColumn( "IIIrd" ); | ||
51 | |||
52 | QString counter; | ||
53 | |||
54 | QPixmap leaf( "leaf.png" ); | ||
55 | QPixmap opened( "folder_opened.png" ); | ||
56 | QPixmap closed( "folder_closed.png" ); | ||
57 | |||
58 | QPixmap leaf32( "leaf32.png" ); | ||
59 | QPixmap opened32( "folder_opened32.png" ); | ||
60 | QPixmap closed32( "folder_closed32.png" ); | ||
61 | |||
62 | vv->setDefaultPixmaps( OVersatileView::Tree, leaf, opened, closed ); | ||
63 | vv->setDefaultPixmaps( OVersatileView::Icons, leaf32, opened32, closed32 ); | ||
64 | |||
65 | OVersatileViewItem* item; | ||
66 | OVersatileViewItem* item2; | ||
67 | |||
68 | for ( int i = 0; i < 5; ++i ) | ||
69 | { | ||
70 | counter.sprintf( "%d", i ); | ||
71 | item = new OVersatileViewItem( vv, "Item", "Text", "Some more", counter ); | ||
72 | item->setRenameEnabled( true ); | ||
73 | item2 = new OVersatileViewItem( item, "OSubitem", "123", "...", counter ); | ||
74 | item2->setRenameEnabled( true ); | ||
75 | |||
76 | } | ||
77 | |||
78 | connect( vv, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) ); | ||
79 | connect( vv, SIGNAL( selectionChanged(OVersatileViewItem*) ), this, SLOT( selectionChanged(OVersatileViewItem*) ) ); | ||
80 | connect( vv, SIGNAL( currentChanged(OVersatileViewItem*) ), this, SLOT( currentChanged(OVersatileViewItem*) ) ); | ||
81 | connect( vv, SIGNAL( clicked(OVersatileViewItem*) ), this, SLOT( clicked(OVersatileViewItem*) ) ); | ||
82 | connect( vv, SIGNAL( pressed(OVersatileViewItem*) ), this, SLOT( pressed(OVersatileViewItem*) ) ); | ||
83 | |||
84 | connect( vv, SIGNAL( doubleClicked(OVersatileViewItem*) ), this, SLOT( doubleClicked(OVersatileViewItem*) ) ); | ||
85 | connect( vv, SIGNAL( returnPressed(OVersatileViewItem*) ), this, SLOT( returnPressed(OVersatileViewItem*) ) ); | ||
86 | |||
87 | connect( vv, SIGNAL( onItem(OVersatileViewItem*) ), this, SLOT( onItem(OVersatileViewItem*) ) ); | ||
88 | connect( vv, SIGNAL( onViewport() ), this, SLOT( onViewport() ) ); | ||
89 | |||
90 | connect( vv, SIGNAL( expanded(OVersatileViewItem*) ), this, SLOT( expanded(OVersatileViewItem*) ) ); | ||
91 | connect( vv, SIGNAL( collapsed(OVersatileViewItem*) ), this, SLOT( collapsed(OVersatileViewItem*) ) ); | ||
92 | |||
93 | connect( vv, SIGNAL( moved() ), this, SLOT( moved() ) ); | ||
94 | |||
95 | connect( vv, SIGNAL( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ) ); | ||
96 | |||
97 | } | ||
98 | |||
99 | OVersatileViewDemo::~OVersatileViewDemo() | ||
100 | { | ||
101 | } | ||
102 | |||
103 | void OVersatileViewDemo::selectionChanged() | ||
104 | { | ||
105 | odebug << "received signal selectionChanged()" << oendl; | ||
106 | } | ||
107 | void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item ) | ||
108 | { | ||
109 | odebug << "received signal selectionChanged(OVersatileViewItem*)" << oendl; | ||
110 | } | ||
111 | void OVersatileViewDemo::currentChanged( OVersatileViewItem * item ) | ||
112 | { | ||
113 | odebug << "received signal currentChanged( OVersatileViewItem * )" << oendl; | ||
114 | } | ||
115 | void OVersatileViewDemo::clicked( OVersatileViewItem * item ) | ||
116 | { | ||
117 | odebug << "received signal clicked( OVersatileViewItem * )" << oendl; | ||
118 | } | ||
119 | void OVersatileViewDemo::pressed( OVersatileViewItem * item ) | ||
120 | { | ||
121 | odebug << "received signal pressed( OVersatileViewItem * )" << oendl; | ||
122 | } | ||
123 | |||
124 | void OVersatileViewDemo::doubleClicked( OVersatileViewItem *item ) | ||
125 | { | ||
126 | odebug << "received signal doubleClicked( OVersatileViewItem *item )" << oendl; | ||
127 | } | ||
128 | void OVersatileViewDemo::returnPressed( OVersatileViewItem *item ) | ||
129 | { | ||
130 | odebug << "received signal returnPressed( OVersatileViewItem *item )" << oendl; | ||
131 | } | ||
132 | |||
133 | void OVersatileViewDemo::onItem( OVersatileViewItem *item ) | ||
134 | { | ||
135 | odebug << "received signal onItem( OVersatileViewItem *item )" << oendl; | ||
136 | } | ||
137 | void OVersatileViewDemo::onViewport() | ||
138 | { | ||
139 | odebug << "received signal onViewport()" << oendl; | ||
140 | } | ||
141 | |||
142 | void OVersatileViewDemo::expanded( OVersatileViewItem *item ) | ||
143 | { | ||
144 | odebug << "received signal expanded( OVersatileViewItem *item )" << oendl; | ||
145 | } | ||
146 | |||
147 | void OVersatileViewDemo::collapsed( OVersatileViewItem *item ) | ||
148 | { | ||
149 | odebug << "received signal collapsed( OVersatileViewItem *item )" << oendl; | ||
150 | } | ||
151 | |||
152 | void OVersatileViewDemo::moved() | ||
153 | { | ||
154 | odebug << "received signal moved( OVersatileViewItem *item )" << oendl; | ||
155 | } | ||
156 | |||
157 | void OVersatileViewDemo::contextMenuRequested( OVersatileViewItem *item, const QPoint& pos, int col ) | ||
158 | { | ||
159 | odebug << "received signal contextMenuRequested( OVersatileViewItem *item )" << oendl; | ||
160 | } | ||
diff --git a/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/examples/opieui/oversatileviewdemo/oversatileviewdemo.h new file mode 100644 index 0000000..35e2c3c --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/oversatileviewdemo.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | |||
30 | */ | ||
31 | |||
32 | #ifndef OVERSATILEVIEWDEMO_H | ||
33 | #define OVERSATILEVIEWDEMO_H | ||
34 | |||
35 | #include <qvbox.h> | ||
36 | |||
37 | namespace Opie { | ||
38 | namespace Ui { | ||
39 | class OVersatileView; | ||
40 | class OVersatileViewItem; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | class OVersatileViewDemo: public QVBox | ||
45 | { | ||
46 | Q_OBJECT | ||
47 | |||
48 | public: | ||
49 | OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); | ||
50 | virtual ~OVersatileViewDemo(); | ||
51 | |||
52 | public slots: | ||
53 | void selectionChanged(); | ||
54 | void selectionChanged( Opie::Ui::OVersatileViewItem * ); | ||
55 | void currentChanged( Opie::Ui::OVersatileViewItem * ); | ||
56 | void clicked( Opie::Ui::OVersatileViewItem * ); | ||
57 | void pressed( OPie::Ui::OVersatileViewItem * ); | ||
58 | |||
59 | void doubleClicked( Opie::Ui::OVersatileViewItem *item ); | ||
60 | void returnPressed( Opie::Ui::OVersatileViewItem *item ); | ||
61 | |||
62 | void onItem( Opie::Ui::OVersatileViewItem *item ); | ||
63 | void onViewport(); | ||
64 | |||
65 | void expanded( Opie::Ui::OVersatileViewItem *item ); | ||
66 | void collapsed( Opie::Ui::OVersatileViewItem *item ); | ||
67 | |||
68 | void moved(); | ||
69 | |||
70 | void contextMenuRequested( Opie::Ui::OVersatileViewItem *item, const QPoint&, int col ); | ||
71 | |||
72 | private: | ||
73 | Opie::Ui::OVersatileView* vv; | ||
74 | |||
75 | }; | ||
76 | |||
77 | #endif | ||
diff --git a/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro b/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro new file mode 100644 index 0000000..ff78095 --- a/dev/null +++ b/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro | |||
@@ -0,0 +1,17 @@ | |||
1 | TEMPLATE = app | ||
2 | CONFIG = qt warn_on | ||
3 | HEADERS = opieuidemo.h \ | ||
4 | oversatileviewdemo.h | ||
5 | SOURCES = opieuidemo.cpp \ | ||
6 | oversatileviewdemo.cpp \ | ||
7 | main.cpp | ||
8 | INCLUDEPATH += $(OPIEDIR)/include | ||
9 | DEPENDPATH += $(OPIEDIR)/include | ||
10 | LIBS += -lopieui2 -lopiecore2 | ||
11 | TARGET = opieuidemo | ||
12 | MOC_DIR = moc | ||
13 | OBJECTS_DIR = obj | ||
14 | |||
15 | include( $(OPIEDIR)/include.pro ) | ||
16 | |||
17 | |||