Diffstat (limited to 'libopie2/examples/opieui/olistviewdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opieui/olistviewdemo/main.cpp | 3 | ||||
-rw-r--r-- | libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp | 2 | ||||
-rw-r--r-- | libopie2/examples/opieui/olistviewdemo/olistviewdemo.h | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp index a93f361..cd49c28 100644 --- a/libopie2/examples/opieui/olistviewdemo/main.cpp +++ b/libopie2/examples/opieui/olistviewdemo/main.cpp | |||
@@ -1,26 +1,29 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
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 | #include "olistviewdemo.h" | 16 | #include "olistviewdemo.h" |
17 | #include <opie2/oapplication.h> | 17 | #include <opie2/oapplication.h> |
18 | 18 | ||
19 | using namespace Opie::Ui; | ||
20 | using namespace Opie::Core; | ||
21 | |||
19 | int main( int argc, char **argv ) | 22 | int main( int argc, char **argv ) |
20 | { | 23 | { |
21 | OApplication a( argc, argv, "OListViewDemo" ); | 24 | OApplication a( argc, argv, "OListViewDemo" ); |
22 | OListViewDemo e; | 25 | OListViewDemo e; |
23 | a.showMainWidget(&e); | 26 | a.showMainWidget(&e); |
24 | return a.exec(); | 27 | return a.exec(); |
25 | } | 28 | } |
26 | 29 | ||
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp index 5ba7b69..7834b3b 100644 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp | |||
@@ -16,48 +16,50 @@ | |||
16 | .i_,=:_. -<s. This program is distributed in the hope that | 16 | .i_,=:_. -<s. This program is distributed in the hope that |
17 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 17 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
18 | : .. .:, . . . without even the implied warranty of | 18 | : .. .:, . . . without even the implied warranty of |
19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
21 | ..}^=.= = ; Library General Public License for more | 21 | ..}^=.= = ; Library General Public License for more |
22 | ++= -. .` .: details. | 22 | ++= -. .` .: details. |
23 | : = ...= . :.=- | 23 | : = ...= . :.=- |
24 | -. .:....=;==+<; You should have received a copy of the GNU | 24 | -. .:....=;==+<; You should have received a copy of the GNU |
25 | -_. . . )=. = Library General Public License along with | 25 | -_. . . )=. = Library General Public License along with |
26 | -- :-=` this library; see the file COPYING.LIB. | 26 | -- :-=` this library; see the file COPYING.LIB. |
27 | If not, write to the Free Software Foundation, | 27 | If not, write to the Free Software Foundation, |
28 | Inc., 59 Temple Place - Suite 330, | 28 | Inc., 59 Temple Place - Suite 330, |
29 | Boston, MA 02111-1307, USA. | 29 | Boston, MA 02111-1307, USA. |
30 | 30 | ||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include "olistviewdemo.h" | 33 | #include "olistviewdemo.h" |
34 | #include <opie2/olistview.h> | 34 | #include <opie2/olistview.h> |
35 | 35 | ||
36 | #include <qstring.h> | 36 | #include <qstring.h> |
37 | #include <qpixmap.h> | 37 | #include <qpixmap.h> |
38 | #include <qlistview.h> | 38 | #include <qlistview.h> |
39 | 39 | ||
40 | using namespace Opie::Ui; | ||
41 | |||
40 | OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) | 42 | OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) |
41 | :QVBox( parent, name, f ) | 43 | :QVBox( parent, name, f ) |
42 | { | 44 | { |
43 | lv = new ONamedListView( this ); | 45 | lv = new ONamedListView( this ); |
44 | lv->setRootIsDecorated( true ); | 46 | lv->setRootIsDecorated( true ); |
45 | lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); | 47 | lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); |
46 | 48 | ||
47 | ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 49 | ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
48 | item->setText( "Column2", "ModifiedText" ); | 50 | item->setText( "Column2", "ModifiedText" ); |
49 | item->setText( "Column5", "ThisColumnDoesNotExits" ); | 51 | item->setText( "Column5", "ThisColumnDoesNotExits" ); |
50 | 52 | ||
51 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 53 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
52 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 54 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
53 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); | 55 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); |
54 | item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); | 56 | item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); |
55 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 57 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
56 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 58 | new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
57 | 59 | ||
58 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); | 60 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); |
59 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); | 61 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); |
60 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); | 62 | new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); |
61 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); | 63 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); |
62 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); | 64 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); |
63 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); | 65 | item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); |
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h index 8a5986a..0b5c498 100644 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h | |||
@@ -23,29 +23,29 @@ | |||
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef OLISTVIEWDEMO_H | 32 | #ifndef OLISTVIEWDEMO_H |
33 | #define OLISTVIEWDEMO_H | 33 | #define OLISTVIEWDEMO_H |
34 | 34 | ||
35 | #include <qvbox.h> | 35 | #include <qvbox.h> |
36 | #include <opie2/olistview.h> | 36 | #include <opie2/olistview.h> |
37 | 37 | ||
38 | class OListViewDemo: public QVBox | 38 | class OListViewDemo: public QVBox |
39 | { | 39 | { |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 43 | OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
44 | virtual ~OListViewDemo(); | 44 | virtual ~OListViewDemo(); |
45 | 45 | ||
46 | private: | 46 | private: |
47 | ONamedListView* lv; | 47 | Opie::Ui::ONamedListView* lv; |
48 | 48 | ||
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif | 51 | #endif |