author | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
commit | 6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff) | |
tree | 4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui | |
parent | 8e28911f7199f4450ac5eef09482069f9b9caea2 (diff) | |
download | opie-6d08277737e22b7a1527124623f3571969073ddf.zip opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2 |
Move XML class to internal PIM
Add namespaces!!!
Opie::Core and Opie::Core::Private
Opie::Net and Opie::Net::Private
Opie::Ui and Opie::Ui::Private
Opie::MM and Opie::MM::Private
Opie::DB and Opie::DB::Private
PIM classes are not yet converted because we will do other work
on it as well
48 files changed, 309 insertions, 152 deletions
diff --git a/libopie2/opieui/big-screen/obigscreen_p.h b/libopie2/opieui/big-screen/obigscreen_p.h index db8fc83..a85a56c 100644 --- a/libopie2/opieui/big-screen/obigscreen_p.h +++ b/libopie2/opieui/big-screen/obigscreen_p.h | |||
@@ -3,14 +3,15 @@ | |||
3 | 3 | ||
4 | /* QT */ | 4 | /* QT */ |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | 6 | ||
7 | class QWidget; | 7 | class QWidget; |
8 | 8 | ||
9 | namespace Opie | 9 | namespace Opie { |
10 | { | 10 | namespace Ui { |
11 | namespace Private{ | ||
11 | 12 | ||
12 | struct OSplitterContainer | 13 | struct OSplitterContainer |
13 | { | 14 | { |
14 | bool operator==( const OSplitterContainer& o) const | 15 | bool operator==( const OSplitterContainer& o) const |
15 | { | 16 | { |
16 | if (widget != o.widget ) return false; | 17 | if (widget != o.widget ) return false; |
@@ -20,9 +21,11 @@ struct OSplitterContainer | |||
20 | } | 21 | } |
21 | QWidget* widget; | 22 | QWidget* widget; |
22 | QString icon; | 23 | QString icon; |
23 | QString name; | 24 | QString name; |
24 | }; | 25 | }; |
25 | 26 | ||
26 | }; | 27 | } |
28 | } | ||
29 | } | ||
27 | 30 | ||
28 | #endif | 31 | #endif |
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp index 89f3793..bcfd3a6 100644 --- a/libopie2/opieui/big-screen/osplitter.cpp +++ b/libopie2/opieui/big-screen/osplitter.cpp | |||
@@ -32,13 +32,14 @@ | |||
32 | #include <opie2/otabwidget.h> | 32 | #include <opie2/otabwidget.h> |
33 | 33 | ||
34 | /* QT */ | 34 | /* QT */ |
35 | #include <qvaluelist.h> | 35 | #include <qvaluelist.h> |
36 | #include <qvbox.h> | 36 | #include <qvbox.h> |
37 | 37 | ||
38 | using namespace Opie; | 38 | using namespace Opie::Ui; |
39 | using namespace Opie::Ui::Private; | ||
39 | 40 | ||
40 | /** | 41 | /** |
41 | * | 42 | * |
42 | * This is the constructor of OSplitter | 43 | * This is the constructor of OSplitter |
43 | * You might want to call setSizeChange to tell | 44 | * You might want to call setSizeChange to tell |
44 | * OSplitter to change its layout when a specefic | 45 | * OSplitter to change its layout when a specefic |
@@ -165,13 +166,13 @@ void OSplitter::addWidget( OSplitter* split ) | |||
165 | * set tab widget | 166 | * set tab widget |
166 | */ | 167 | */ |
167 | if (m_tabWidget ) | 168 | if (m_tabWidget ) |
168 | setTabWidget( m_parentTab ); | 169 | setTabWidget( m_parentTab ); |
169 | else | 170 | else |
170 | { | 171 | { |
171 | Opie::OSplitterContainer con; | 172 | OSplitterContainer con; |
172 | con.widget =split; | 173 | con.widget =split; |
173 | addToBox( con ); | 174 | addToBox( con ); |
174 | } | 175 | } |
175 | } | 176 | } |
176 | 177 | ||
177 | /* | 178 | /* |
@@ -210,13 +211,13 @@ void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& lab | |||
210 | if (!wid ) | 211 | if (!wid ) |
211 | { | 212 | { |
212 | qWarning("Widget is not valid!"); | 213 | qWarning("Widget is not valid!"); |
213 | return; | 214 | return; |
214 | } | 215 | } |
215 | #endif | 216 | #endif |
216 | Opie::OSplitterContainer cont; | 217 | OSplitterContainer cont; |
217 | cont.widget = wid; | 218 | cont.widget = wid; |
218 | cont.icon =icon; | 219 | cont.icon =icon; |
219 | cont.name = label; | 220 | cont.name = label; |
220 | 221 | ||
221 | m_container.append( cont ); | 222 | m_container.append( cont ); |
222 | 223 | ||
@@ -393,13 +394,13 @@ void OSplitter::resizeEvent( QResizeEvent* res ) | |||
393 | } | 394 | } |
394 | 395 | ||
395 | /* | 396 | /* |
396 | * Adds a container to a tab either the parent tab | 397 | * Adds a container to a tab either the parent tab |
397 | * or our own | 398 | * or our own |
398 | */ | 399 | */ |
399 | void OSplitter::addToTab( const Opie::OSplitterContainer& con ) | 400 | void OSplitter::addToTab( const Opie::Ui::Private::OSplitterContainer& con ) |
400 | { | 401 | { |
401 | QWidget *wid = con.widget; | 402 | QWidget *wid = con.widget; |
402 | // not needed widgetstack will reparent as well wid.reparent(m_tabWidget, wid->getWFlags(), QPoint(0, 0) ); | 403 | // not needed widgetstack will reparent as well wid.reparent(m_tabWidget, wid->getWFlags(), QPoint(0, 0) ); |
403 | if (m_parentTab ) | 404 | if (m_parentTab ) |
404 | m_parentTab->addTab( wid, con.icon, con.name ); | 405 | m_parentTab->addTab( wid, con.icon, con.name ); |
405 | else | 406 | else |
@@ -407,13 +408,13 @@ void OSplitter::addToTab( const Opie::OSplitterContainer& con ) | |||
407 | } | 408 | } |
408 | 409 | ||
409 | 410 | ||
410 | /* | 411 | /* |
411 | * adds a container to the box | 412 | * adds a container to the box |
412 | */ | 413 | */ |
413 | void OSplitter::addToBox( const Opie::OSplitterContainer& con ) | 414 | void OSplitter::addToBox( const Opie::Ui::Private::OSplitterContainer& con ) |
414 | { | 415 | { |
415 | QWidget* wid = con.widget; | 416 | QWidget* wid = con.widget; |
416 | wid->reparent(m_hbox, 0, QPoint(0, 0) ); | 417 | wid->reparent(m_hbox, 0, QPoint(0, 0) ); |
417 | } | 418 | } |
418 | 419 | ||
419 | 420 | ||
@@ -542,13 +543,13 @@ void OSplitter::commonChangeBox() | |||
542 | addToBox( (*it) ); | 543 | addToBox( (*it) ); |
543 | } | 544 | } |
544 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) | 545 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) |
545 | { | 546 | { |
546 | /* tell them the world had changed */ | 547 | /* tell them the world had changed */ |
547 | split->setTabWidget( 0 ); | 548 | split->setTabWidget( 0 ); |
548 | Opie::OSplitterContainer con; | 549 | OSplitterContainer con; |
549 | con.widget = split; | 550 | con.widget = split; |
550 | // con.widget = split->m_tabWidget ? static_cast<QWidget*>(split->m_tabWidget) | 551 | // con.widget = split->m_tabWidget ? static_cast<QWidget*>(split->m_tabWidget) |
551 | // : static_cast<QWidget*>(split->m_hbox); | 552 | // : static_cast<QWidget*>(split->m_hbox); |
552 | addToBox( con ); | 553 | addToBox( con ); |
553 | } | 554 | } |
554 | 555 | ||
diff --git a/libopie2/opieui/big-screen/osplitter.h b/libopie2/opieui/big-screen/osplitter.h index 2daae7f..7b5ea53 100644 --- a/libopie2/opieui/big-screen/osplitter.h +++ b/libopie2/opieui/big-screen/osplitter.h | |||
@@ -45,14 +45,14 @@ class QHBox; | |||
45 | * TODO | 45 | * TODO |
46 | * -check API docu | 46 | * -check API docu |
47 | * -one more example | 47 | * -one more example |
48 | * -allow inserting at a position | 48 | * -allow inserting at a position |
49 | */ | 49 | */ |
50 | 50 | ||
51 | namespace Opie | 51 | namespace Opie{ |
52 | { | 52 | namespace Ui { |
53 | class OTabWidget; | 53 | class OTabWidget; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * | 56 | * |
57 | * If you've widgets that could be placed side by side but you think | 57 | * If you've widgets that could be placed side by side but you think |
58 | * on small resolutions is not enough place but it would really make sense | 58 | * on small resolutions is not enough place but it would really make sense |
@@ -70,13 +70,13 @@ class OTabWidget; | |||
70 | * @author zecke | 70 | * @author zecke |
71 | */ | 71 | */ |
72 | class OSplitter : public QFrame | 72 | class OSplitter : public QFrame |
73 | { | 73 | { |
74 | Q_OBJECT | 74 | Q_OBJECT |
75 | public: | 75 | public: |
76 | typedef QValueList<Opie::OSplitterContainer> ContainerList; | 76 | typedef QValueList<Opie::Ui::Private::OSplitterContainer> ContainerList; |
77 | OSplitter( Qt::Orientation = Horizontal, QWidget *parent = 0, | 77 | OSplitter( Qt::Orientation = Horizontal, QWidget *parent = 0, |
78 | const char* name = 0, WFlags fl = 0 ); | 78 | const char* name = 0, WFlags fl = 0 ); |
79 | ~OSplitter(); | 79 | ~OSplitter(); |
80 | 80 | ||
81 | void setLabel( const QString& name ); | 81 | void setLabel( const QString& name ); |
82 | void setIconName( const QString& name ); | 82 | void setIconName( const QString& name ); |
@@ -121,14 +121,14 @@ protected: | |||
121 | 121 | ||
122 | private: | 122 | private: |
123 | /* true if OTabMode */ | 123 | /* true if OTabMode */ |
124 | bool layoutMode()const; | 124 | bool layoutMode()const; |
125 | // void reparentAll(); | 125 | // void reparentAll(); |
126 | void setTabWidget( OTabWidget*); | 126 | void setTabWidget( OTabWidget*); |
127 | void addToTab( const Opie::OSplitterContainer& ); | 127 | void addToTab( const Opie::Ui::Private::OSplitterContainer& ); |
128 | void addToBox( const Opie::OSplitterContainer& ); | 128 | void addToBox( const Opie::Ui::Private::OSplitterContainer& ); |
129 | void removeFromTab( QWidget* ); | 129 | void removeFromTab( QWidget* ); |
130 | void changeTab(); | 130 | void changeTab(); |
131 | void changeHBox(); | 131 | void changeHBox(); |
132 | void changeVBox(); | 132 | void changeVBox(); |
133 | void commonChangeBox(); | 133 | void commonChangeBox(); |
134 | QHBox *m_hbox; | 134 | QHBox *m_hbox; |
@@ -142,9 +142,10 @@ private: | |||
142 | 142 | ||
143 | QString m_icon, m_name; | 143 | QString m_icon, m_name; |
144 | 144 | ||
145 | struct Private; | 145 | struct Private; |
146 | Private *d; | 146 | Private *d; |
147 | }; | 147 | }; |
148 | }; | 148 | } |
149 | } | ||
149 | 150 | ||
150 | #endif | 151 | #endif |
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp index 57e97e3..a0a6355 100644 --- a/libopie2/opieui/big-screen/owidgetstack.cpp +++ b/libopie2/opieui/big-screen/owidgetstack.cpp | |||
@@ -29,17 +29,17 @@ | |||
29 | #include "owidgetstack.h" | 29 | #include "owidgetstack.h" |
30 | 30 | ||
31 | /* QT */ | 31 | /* QT */ |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | #include <qwidgetstack.h> | 33 | #include <qwidgetstack.h> |
34 | 34 | ||
35 | namespace { | 35 | namespace Opie { |
36 | namespace Ui { | ||
36 | const int mode_size = 330; | 37 | const int mode_size = 330; |
37 | } | ||
38 | 38 | ||
39 | using namespace Opie; | 39 | |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * This is the standard widget. For simple usage see the example. Normally this widget | 42 | * This is the standard widget. For simple usage see the example. Normally this widget |
43 | * is the central widget of a QMainWindow. | 43 | * is the central widget of a QMainWindow. |
44 | * Use removeWidget before you delete a widget yourself. OWidgetStack does not | 44 | * Use removeWidget before you delete a widget yourself. OWidgetStack does not |
45 | * yet recognize removal of children. | 45 | * yet recognize removal of children. |
@@ -430,6 +430,9 @@ void OWidgetStack::switchTop() { | |||
430 | } | 430 | } |
431 | } | 431 | } |
432 | 432 | ||
433 | delete m_stack; | 433 | delete m_stack; |
434 | m_stack = 0; | 434 | m_stack = 0; |
435 | } | 435 | } |
436 | |||
437 | } | ||
438 | } \ No newline at end of file | ||
diff --git a/libopie2/opieui/big-screen/owidgetstack.h b/libopie2/opieui/big-screen/owidgetstack.h index 53818c8..d2f9a9f 100644 --- a/libopie2/opieui/big-screen/owidgetstack.h +++ b/libopie2/opieui/big-screen/owidgetstack.h | |||
@@ -32,14 +32,14 @@ | |||
32 | /* QT*/ | 32 | /* QT*/ |
33 | #include <qframe.h> | 33 | #include <qframe.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | 35 | ||
36 | class QWidgetStack; | 36 | class QWidgetStack; |
37 | 37 | ||
38 | namespace Opie | 38 | namespace Opie { |
39 | { | 39 | namespace Ui { |
40 | /** | 40 | /** |
41 | * | 41 | * |
42 | * OWidgetStack is the answer to the problem of using Opie at different screen | 42 | * OWidgetStack is the answer to the problem of using Opie at different screen |
43 | * sizes and to have a different behaviour. Most applications use a QWidgetStack | 43 | * sizes and to have a different behaviour. Most applications use a QWidgetStack |
44 | * to supply a view on click. And by clicking the (X) you go back but this | 44 | * to supply a view on click. And by clicking the (X) you go back but this |
45 | * behaviour feels strange on bigger screens. It's ok on smaller one because | 45 | * behaviour feels strange on bigger screens. It's ok on smaller one because |
@@ -124,9 +124,10 @@ private: | |||
124 | bool m_forced : 1; | 124 | bool m_forced : 1; |
125 | 125 | ||
126 | struct Private; | 126 | struct Private; |
127 | Private *d; | 127 | Private *d; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | }; | 130 | } |
131 | } | ||
131 | 132 | ||
132 | #endif | 133 | #endif |
diff --git a/libopie2/opieui/fileselector/ofiledialog.cpp b/libopie2/opieui/fileselector/ofiledialog.cpp index e7daead..beb4d6c 100644 --- a/libopie2/opieui/fileselector/ofiledialog.cpp +++ b/libopie2/opieui/fileselector/ofiledialog.cpp | |||
@@ -36,13 +36,13 @@ | |||
36 | /* QT */ | 36 | /* QT */ |
37 | #include <qfileinfo.h> | 37 | #include <qfileinfo.h> |
38 | #include <qstring.h> | 38 | #include <qstring.h> |
39 | #include <qapplication.h> | 39 | #include <qapplication.h> |
40 | #include <qlayout.h> | 40 | #include <qlayout.h> |
41 | 41 | ||
42 | using namespace Opie; | 42 | using namespace Opie::Ui; |
43 | 43 | ||
44 | namespace | 44 | namespace |
45 | { | 45 | { |
46 | /* | 46 | /* |
47 | * helper functions to load the start dir | 47 | * helper functions to load the start dir |
48 | * and to save it | 48 | * and to save it |
diff --git a/libopie2/opieui/fileselector/ofiledialog.h b/libopie2/opieui/fileselector/ofiledialog.h index 01a599b..dfecf3d 100644 --- a/libopie2/opieui/fileselector/ofiledialog.h +++ b/libopie2/opieui/fileselector/ofiledialog.h | |||
@@ -32,14 +32,14 @@ | |||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/ofileselector.h> | 33 | #include <opie2/ofileselector.h> |
34 | 34 | ||
35 | /* QT */ | 35 | /* QT */ |
36 | #include <qdialog.h> | 36 | #include <qdialog.h> |
37 | 37 | ||
38 | namespace Opie | 38 | namespace Opie { |
39 | { | 39 | namespace Ui { |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * This class places a OFileSelector inside a QDialog. | 42 | * This class places a OFileSelector inside a QDialog. |
43 | * It provides static method for letting a user chose | 43 | * It provides static method for letting a user chose |
44 | * a file for either opening or saving. | 44 | * a file for either opening or saving. |
45 | * Most of the time the c'tor will not be used instead using | 45 | * Most of the time the c'tor will not be used instead using |
@@ -101,9 +101,10 @@ private: | |||
101 | private slots: | 101 | private slots: |
102 | void slotFileSelected( const QString & ); | 102 | void slotFileSelected( const QString & ); |
103 | void slotDirSelected(const QString & ); | 103 | void slotDirSelected(const QString & ); |
104 | void slotSelectorOk(); | 104 | void slotSelectorOk(); |
105 | }; | 105 | }; |
106 | 106 | ||
107 | }; | 107 | } |
108 | } | ||
108 | 109 | ||
109 | #endif | 110 | #endif |
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 15cadd4..c4d5033 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp | |||
@@ -52,14 +52,17 @@ | |||
52 | #include <qlistview.h> | 52 | #include <qlistview.h> |
53 | #include <qpopupmenu.h> | 53 | #include <qpopupmenu.h> |
54 | #include <qwidgetstack.h> | 54 | #include <qwidgetstack.h> |
55 | #include <qregexp.h> | 55 | #include <qregexp.h> |
56 | #include <qobjectlist.h> | 56 | #include <qobjectlist.h> |
57 | 57 | ||
58 | using namespace Opie; | 58 | using namespace Opie::Ui::Private; |
59 | 59 | ||
60 | namespace Opie { | ||
61 | namespace Ui { | ||
62 | namespace Private { | ||
60 | OFileViewInterface::OFileViewInterface( OFileSelector* selector ) | 63 | OFileViewInterface::OFileViewInterface( OFileSelector* selector ) |
61 | : m_selector( selector ) | 64 | : m_selector( selector ) |
62 | {} | 65 | {} |
63 | 66 | ||
64 | OFileViewInterface::~OFileViewInterface() | 67 | OFileViewInterface::~OFileViewInterface() |
65 | {} | 68 | {} |
@@ -807,12 +810,14 @@ QWidget* OFileViewFileSystem::widget( QWidget* parent ) | |||
807 | 810 | ||
808 | void OFileViewFileSystem::activate( const QString& str) | 811 | void OFileViewFileSystem::activate( const QString& str) |
809 | { | 812 | { |
810 | m_all = (str != QObject::tr("Files") ); | 813 | m_all = (str != QObject::tr("Files") ); |
811 | } | 814 | } |
812 | 815 | ||
816 | |||
817 | } | ||
813 | /* Selector */ | 818 | /* Selector */ |
814 | /** | 819 | /** |
815 | * @short new and complete c'tor | 820 | * @short new and complete c'tor |
816 | * | 821 | * |
817 | * Create a OFileSelector to let the user select a file. It can | 822 | * Create a OFileSelector to let the user select a file. It can |
818 | * either be used to open a file, select a save name in a dir or | 823 | * either be used to open a file, select a save name in a dir or |
@@ -1161,6 +1166,8 @@ void OFileSelector::setNameVisible( bool b ) | |||
1161 | if ( b ) | 1166 | if ( b ) |
1162 | m_nameBox->show(); | 1167 | m_nameBox->show(); |
1163 | else | 1168 | else |
1164 | m_nameBox->hide(); | 1169 | m_nameBox->hide(); |
1165 | } | 1170 | } |
1166 | 1171 | ||
1172 | } | ||
1173 | } | ||
diff --git a/libopie2/opieui/fileselector/ofileselector.h b/libopie2/opieui/fileselector/ofileselector.h index 7fa657b..2205963 100644 --- a/libopie2/opieui/fileselector/ofileselector.h +++ b/libopie2/opieui/fileselector/ofileselector.h | |||
@@ -49,17 +49,19 @@ class QLineEdit; | |||
49 | class QComboBox; | 49 | class QComboBox; |
50 | class QWidgetStack; | 50 | class QWidgetStack; |
51 | class QHBox; | 51 | class QHBox; |
52 | 52 | ||
53 | typedef QMap<QString, QStringList> MimeTypes; | 53 | typedef QMap<QString, QStringList> MimeTypes; |
54 | 54 | ||
55 | namespace Opie | 55 | namespace Opie { |
56 | { | 56 | namespace Ui { |
57 | 57 | ||
58 | namespace Private { | ||
58 | class OFileViewInterface; | 59 | class OFileViewInterface; |
59 | class OFileViewFileListView; | 60 | class OFileViewFileListView; |
61 | } | ||
60 | 62 | ||
61 | 63 | ||
62 | /** | 64 | /** |
63 | * @short a dropin replacement for the FileSelector | 65 | * @short a dropin replacement for the FileSelector |
64 | * | 66 | * |
65 | * This class is first used insert the OFileDialog. | 67 | * This class is first used insert the OFileDialog. |
@@ -70,14 +72,14 @@ class OFileViewFileListView; | |||
70 | * @author zecke | 72 | * @author zecke |
71 | * @version 0.1 | 73 | * @version 0.1 |
72 | */ | 74 | */ |
73 | class OFileSelector : public QWidget | 75 | class OFileSelector : public QWidget |
74 | { | 76 | { |
75 | Q_OBJECT | 77 | Q_OBJECT |
76 | friend class Opie::OFileViewInterface; | 78 | friend class Private::OFileViewInterface; |
77 | friend class Opie::OFileViewFileListView; | 79 | friend class Private::OFileViewFileListView; |
78 | 80 | ||
79 | public: | 81 | public: |
80 | /** | 82 | /** |
81 | * The Mode of the Fileselector | 83 | * The Mode of the Fileselector |
82 | * Open = Open A File | 84 | * Open = Open A File |
83 | * Save = Save a File | 85 | * Save = Save a File |
@@ -182,19 +184,19 @@ private: | |||
182 | void initViews(); | 184 | void initViews(); |
183 | 185 | ||
184 | private: | 186 | private: |
185 | QLineEdit* m_lneEdit; // the LineEdit for the Name | 187 | QLineEdit* m_lneEdit; // the LineEdit for the Name |
186 | QComboBox *m_cmbView, *m_cmbMime; // two ComboBoxes to select the View and MimeType | 188 | QComboBox *m_cmbView, *m_cmbMime; // two ComboBoxes to select the View and MimeType |
187 | QWidgetStack* m_stack; // our widget stack which will contain the views | 189 | QWidgetStack* m_stack; // our widget stack which will contain the views |
188 | OFileViewInterface* currentView() const; // returns the currentView | 190 | Private::OFileViewInterface* currentView() const; // returns the currentView |
189 | OFileViewInterface* m_current; // here is the view saved | 191 | Private::OFileViewInterface* m_current; // here is the view saved |
190 | bool m_shNew : 1; // should we show New? | 192 | bool m_shNew : 1; // should we show New? |
191 | bool m_shClose : 1; // should we show Close? | 193 | bool m_shClose : 1; // should we show Close? |
192 | MimeTypes m_mimeType; // list of mimetypes | 194 | MimeTypes m_mimeType; // list of mimetypes |
193 | 195 | ||
194 | QMap<QString, OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr | 196 | QMap<QString, Private::OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr |
195 | QHBox* m_nameBox; // the LineEdit + Label is hold here | 197 | QHBox* m_nameBox; // the LineEdit + Label is hold here |
196 | QHBox* m_cmbBox; // this holds the two combo boxes | 198 | QHBox* m_cmbBox; // this holds the two combo boxes |
197 | 199 | ||
198 | QString m_startDir; | 200 | QString m_startDir; |
199 | int m_mode; | 201 | int m_mode; |
200 | int m_selector; | 202 | int m_selector; |
@@ -211,9 +213,10 @@ private slots: | |||
211 | void slotViewChange( const QString& ); | 213 | void slotViewChange( const QString& ); |
212 | 214 | ||
213 | bool eventFilter (QObject *o, QEvent *e); | 215 | bool eventFilter (QObject *o, QEvent *e); |
214 | 216 | ||
215 | }; | 217 | }; |
216 | 218 | ||
217 | }; | 219 | } |
220 | } | ||
218 | 221 | ||
219 | #endif | 222 | #endif |
diff --git a/libopie2/opieui/fileselector/ofileselector_p.h b/libopie2/opieui/fileselector/ofileselector_p.h index 818ced9..376dc98 100644 --- a/libopie2/opieui/fileselector/ofileselector_p.h +++ b/libopie2/opieui/fileselector/ofileselector_p.h | |||
@@ -53,16 +53,16 @@ | |||
53 | typedef QMap<QString, QStringList> MimeTypes; | 53 | typedef QMap<QString, QStringList> MimeTypes; |
54 | 54 | ||
55 | /* the View Interface */ | 55 | /* the View Interface */ |
56 | class QFileInfo; | 56 | class QFileInfo; |
57 | class QToolButton; | 57 | class QToolButton; |
58 | 58 | ||
59 | namespace Opie | 59 | namespace Opie{ |
60 | { | 60 | namespace Ui{ |
61 | |||
62 | class OFileSelector; | 61 | class OFileSelector; |
62 | namespace Private { | ||
63 | 63 | ||
64 | class OFileViewInterface | 64 | class OFileViewInterface |
65 | { | 65 | { |
66 | public: | 66 | public: |
67 | OFileViewInterface( OFileSelector* selector ); | 67 | OFileViewInterface( OFileSelector* selector ); |
68 | virtual ~OFileViewInterface(); | 68 | virtual ~OFileViewInterface(); |
@@ -183,9 +183,11 @@ private: | |||
183 | 183 | ||
184 | 184 | ||
185 | private: | 185 | private: |
186 | QListView* m_view; | 186 | QListView* m_view; |
187 | }; | 187 | }; |
188 | 188 | ||
189 | }; | 189 | } |
190 | } | ||
191 | } | ||
190 | 192 | ||
191 | #endif | 193 | #endif |
diff --git a/libopie2/opieui/fileselector/ofileview.h b/libopie2/opieui/fileselector/ofileview.h index 495401b..aaf56b1 100644 --- a/libopie2/opieui/fileselector/ofileview.h +++ b/libopie2/opieui/fileselector/ofileview.h | |||
@@ -34,14 +34,15 @@ | |||
34 | #include <qwidget.h> | 34 | #include <qwidget.h> |
35 | 35 | ||
36 | class QFileInfo; | 36 | class QFileInfo; |
37 | class QDir; | 37 | class QDir; |
38 | class DocLnk; | 38 | class DocLnk; |
39 | 39 | ||
40 | namespace Opie | 40 | namespace Opie { |
41 | { | 41 | namespace Ui { |
42 | namespace Private { | ||
42 | 43 | ||
43 | /** | 44 | /** |
44 | * A OFileView is a specialised View for the | 45 | * A OFileView is a specialised View for the |
45 | * OFileSelector | 46 | * OFileSelector |
46 | * With a View you can chage the user visible | 47 | * With a View you can chage the user visible |
47 | * representation of a OFileLister | 48 | * representation of a OFileLister |
@@ -87,9 +88,11 @@ public: | |||
87 | virtual ~OFileViewFactory() = 0; | 88 | virtual ~OFileViewFactory() = 0; |
88 | 89 | ||
89 | OFileView* newView(QWidget *parent, const char *name ); | 90 | OFileView* newView(QWidget *parent, const char *name ); |
90 | QString name()const; | 91 | QString name()const; |
91 | }; | 92 | }; |
92 | 93 | ||
93 | }; | 94 | } |
95 | } | ||
96 | } | ||
94 | 97 | ||
95 | #endif | 98 | #endif |
diff --git a/libopie2/opieui/oclickablelabel.cpp b/libopie2/opieui/oclickablelabel.cpp index 4c4e581..53cb77a 100644 --- a/libopie2/opieui/oclickablelabel.cpp +++ b/libopie2/opieui/oclickablelabel.cpp | |||
@@ -26,13 +26,13 @@ | |||
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <opie2/oclickablelabel.h> | 30 | #include <opie2/oclickablelabel.h> |
31 | 31 | ||
32 | using namespace Opie; | 32 | using namespace Opie::Ui; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * This constructs the clickable ButtonLabel | 35 | * This constructs the clickable ButtonLabel |
36 | * | 36 | * |
37 | * @param parent The parent of this label | 37 | * @param parent The parent of this label |
38 | * @param name A name of this label @see QObject | 38 | * @param name A name of this label @see QObject |
diff --git a/libopie2/opieui/oclickablelabel.h b/libopie2/opieui/oclickablelabel.h index b224d61..90859a0 100644 --- a/libopie2/opieui/oclickablelabel.h +++ b/libopie2/opieui/oclickablelabel.h | |||
@@ -30,14 +30,14 @@ | |||
30 | #ifndef OCLICKABLELABEL_H | 30 | #ifndef OCLICKABLELABEL_H |
31 | #define OCLICKABLELABEL_H | 31 | #define OCLICKABLELABEL_H |
32 | 32 | ||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qlabel.h> | 34 | #include <qlabel.h> |
35 | 35 | ||
36 | namespace Opie | 36 | namespace Opie{ |
37 | { | 37 | namespace Ui { |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * This class is a special QLabel which can behave | 40 | * This class is a special QLabel which can behave |
41 | * as a QPushButton or QToggleButton. | 41 | * as a QPushButton or QToggleButton. |
42 | * The reason to use a clickable is if you want to save space | 42 | * The reason to use a clickable is if you want to save space |
43 | * or you want to skip the border of a normal button | 43 | * or you want to skip the border of a normal button |
@@ -95,9 +95,10 @@ private: | |||
95 | 95 | ||
96 | private: | 96 | private: |
97 | class Private; | 97 | class Private; |
98 | Private *d; // private d pointer | 98 | Private *d; // private d pointer |
99 | }; | 99 | }; |
100 | 100 | ||
101 | }; | 101 | } |
102 | } | ||
102 | 103 | ||
103 | #endif | 104 | #endif |
diff --git a/libopie2/opieui/odialog.cpp b/libopie2/opieui/odialog.cpp index 4d269d4..27f8d20 100644 --- a/libopie2/opieui/odialog.cpp +++ b/libopie2/opieui/odialog.cpp | |||
@@ -29,12 +29,14 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <opie2/odialog.h> | 31 | #include <opie2/odialog.h> |
32 | 32 | ||
33 | #warning Make Margin and Spacing device dependend and configurable! | 33 | #warning Make Margin and Spacing device dependend and configurable! |
34 | 34 | ||
35 | using namespace Opie::Ui; | ||
36 | |||
35 | int ODialog::mMarginSize = 5; | 37 | int ODialog::mMarginSize = 5; |
36 | int ODialog::mSpacingSize = 2; | 38 | int ODialog::mSpacingSize = 2; |
37 | 39 | ||
38 | ODialog::ODialog(QWidget *parent, const char *name, bool modal, WFlags f) | 40 | ODialog::ODialog(QWidget *parent, const char *name, bool modal, WFlags f) |
39 | :QDialog(parent, name, modal, f) | 41 | :QDialog(parent, name, modal, f) |
40 | { | 42 | { |
diff --git a/libopie2/opieui/odialog.h b/libopie2/opieui/odialog.h index ceff612..57f534c 100644 --- a/libopie2/opieui/odialog.h +++ b/libopie2/opieui/odialog.h | |||
@@ -52,12 +52,15 @@ class QLayoutItem; | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | // lets fix up Qt instead! Size does matter. -zecke | 54 | // lets fix up Qt instead! Size does matter. -zecke |
55 | // while that may be true, reducing maintainance effort for the future does also matter - | 55 | // while that may be true, reducing maintainance effort for the future does also matter - |
56 | // and I believe that maintaining a patch against QtE is more work than our classes -mml | 56 | // and I believe that maintaining a patch against QtE is more work than our classes -mml |
57 | 57 | ||
58 | namespace Opie { | ||
59 | namespace Ui { | ||
60 | |||
58 | class ODialog : public QDialog | 61 | class ODialog : public QDialog |
59 | { | 62 | { |
60 | Q_OBJECT | 63 | Q_OBJECT |
61 | 64 | ||
62 | public: | 65 | public: |
63 | 66 | ||
@@ -85,7 +88,9 @@ class ODialog : public QDialog | |||
85 | static int mSpacingSize; | 88 | static int mSpacingSize; |
86 | 89 | ||
87 | class ODialogPrivate; | 90 | class ODialogPrivate; |
88 | ODialogPrivate *d; | 91 | ODialogPrivate *d; |
89 | 92 | ||
90 | }; | 93 | }; |
94 | } | ||
95 | } | ||
91 | #endif // ODIALOG_H | 96 | #endif // ODIALOG_H |
diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp index f93781f..b19c26e 100644 --- a/libopie2/opieui/ofontselector.cpp +++ b/libopie2/opieui/ofontselector.cpp | |||
@@ -35,16 +35,16 @@ | |||
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qlistbox.h> | 36 | #include <qlistbox.h> |
37 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qmultilineedit.h> | 39 | #include <qmultilineedit.h> |
40 | 40 | ||
41 | using namespace Opie; | ||
42 | 41 | ||
43 | namespace Opie | 42 | namespace Opie { |
44 | { | 43 | namespace Ui { |
44 | namespace Private { | ||
45 | 45 | ||
46 | class OFontSelectorPrivate | 46 | class OFontSelectorPrivate |
47 | { | 47 | { |
48 | public: | 48 | public: |
49 | QListBox * m_font_family_list; | 49 | QListBox * m_font_family_list; |
50 | QComboBox * m_font_style_list; | 50 | QComboBox * m_font_style_list; |
@@ -53,17 +53,12 @@ public: | |||
53 | 53 | ||
54 | bool m_pointbug : 1; | 54 | bool m_pointbug : 1; |
55 | 55 | ||
56 | FontDatabase m_fdb; | 56 | FontDatabase m_fdb; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | }; | ||
60 | |||
61 | namespace | ||
62 | { | ||
63 | |||
64 | class FontListItem : public QListBoxText | 59 | class FontListItem : public QListBoxText |
65 | { | 60 | { |
66 | public: | 61 | public: |
67 | FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText() | 62 | FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText() |
68 | { | 63 | { |
69 | m_name = t; | 64 | m_name = t; |
@@ -92,25 +87,30 @@ public: | |||
92 | 87 | ||
93 | private: | 88 | private: |
94 | QStringList m_styles; | 89 | QStringList m_styles; |
95 | QValueList<int> m_sizes; | 90 | QValueList<int> m_sizes; |
96 | QString m_name; | 91 | QString m_name; |
97 | }; | 92 | }; |
93 | } | ||
94 | } | ||
95 | } | ||
96 | |||
98 | 97 | ||
98 | using namespace Opie::Ui; | ||
99 | using namespace Opie::Ui::Private; | ||
99 | 100 | ||
100 | static int findItemCB( QComboBox *box, const QString &str ) | 101 | static int findItemCB( QComboBox *box, const QString &str ) |
101 | { | 102 | { |
102 | for ( int i = 0; i < box->count(); i++ ) | 103 | for ( int i = 0; i < box->count(); i++ ) |
103 | { | 104 | { |
104 | if ( box->text ( i ) == str ) | 105 | if ( box->text ( i ) == str ) |
105 | return i; | 106 | return i; |
106 | } | 107 | } |
107 | return -1; | 108 | return -1; |
108 | } | 109 | } |
109 | 110 | ||
110 | } | ||
111 | /* static same as anon. namespace */ | 111 | /* static same as anon. namespace */ |
112 | static int qt_version() | 112 | static int qt_version() |
113 | { | 113 | { |
114 | const char *qver = qVersion(); | 114 | const char *qver = qVersion(); |
115 | 115 | ||
116 | return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); | 116 | return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); |
@@ -423,6 +423,7 @@ void OFontSelector::resizeEvent ( QResizeEvent *re ) | |||
423 | QWidget::resizeEvent ( re ); | 423 | QWidget::resizeEvent ( re ); |
424 | 424 | ||
425 | if ( d->m_preview ) | 425 | if ( d->m_preview ) |
426 | d->m_preview->setFixedHeight ( d->m_preview->height()); | 426 | d->m_preview->setFixedHeight ( d->m_preview->height()); |
427 | 427 | ||
428 | } | 428 | } |
429 | |||
diff --git a/libopie2/opieui/ofontselector.h b/libopie2/opieui/ofontselector.h index ad51819..1d97233 100644 --- a/libopie2/opieui/ofontselector.h +++ b/libopie2/opieui/ofontselector.h | |||
@@ -32,16 +32,17 @@ | |||
32 | 32 | ||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qwidget.h> | 34 | #include <qwidget.h> |
35 | 35 | ||
36 | class QListBox; | 36 | class QListBox; |
37 | 37 | ||
38 | namespace Opie | 38 | namespace Opie { |
39 | { | 39 | namespace Ui { |
40 | 40 | namespace Private { | |
41 | class OFontSelectorPrivate; | 41 | class OFontSelectorPrivate; |
42 | } | ||
42 | 43 | ||
43 | /** | 44 | /** |
44 | * This class lets you chose a Font out of a list of Fonts. | 45 | * This class lets you chose a Font out of a list of Fonts. |
45 | * It can show a preview too. This selector will use all available | 46 | * It can show a preview too. This selector will use all available |
46 | * fonts | 47 | * fonts |
47 | * | 48 | * |
@@ -92,13 +93,14 @@ protected: | |||
92 | private: | 93 | private: |
93 | void loadFonts ( QListBox * ); | 94 | void loadFonts ( QListBox * ); |
94 | 95 | ||
95 | void changeFont ( ); | 96 | void changeFont ( ); |
96 | 97 | ||
97 | private: | 98 | private: |
98 | OFontSelectorPrivate *d; | 99 | Private::OFontSelectorPrivate *d; |
99 | }; | 100 | }; |
100 | 101 | ||
101 | }; | 102 | } |
103 | } | ||
102 | 104 | ||
103 | #endif | 105 | #endif |
104 | 106 | ||
diff --git a/libopie2/opieui/oimageeffect.cpp b/libopie2/opieui/oimageeffect.cpp index 9a58bb9..be47eb2 100644 --- a/libopie2/opieui/oimageeffect.cpp +++ b/libopie2/opieui/oimageeffect.cpp | |||
@@ -38,12 +38,16 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
38 | #include <opie2/odebug.h> | 38 | #include <opie2/odebug.h> |
39 | 39 | ||
40 | #define MaxRGB 255L | 40 | #define MaxRGB 255L |
41 | #define DegreesToRadians(x) ((x)*M_PI/180.0) | 41 | #define DegreesToRadians(x) ((x)*M_PI/180.0) |
42 | 42 | ||
43 | using namespace std; | 43 | using namespace std; |
44 | using namespace Opie::Core; | ||
45 | |||
46 | namespace Opie { | ||
47 | namespace Ui { | ||
44 | 48 | ||
45 | inline unsigned int intensityValue(unsigned int color) | 49 | inline unsigned int intensityValue(unsigned int color) |
46 | { | 50 | { |
47 | return((unsigned int)((0.299*qRed(color) + | 51 | return((unsigned int)((0.299*qRed(color) + |
48 | 0.587*qGreen(color) + | 52 | 0.587*qGreen(color) + |
49 | 0.1140000000000001*qBlue(color)))); | 53 | 0.1140000000000001*qBlue(color)))); |
@@ -3762,7 +3766,8 @@ void OImageEffect::contrastHSV(QImage &img, bool sharpen) | |||
3762 | data[i] = qRgba(c.red(), c.green(), c.blue(), qAlpha(data[i])); | 3766 | data[i] = qRgba(c.red(), c.green(), c.blue(), qAlpha(data[i])); |
3763 | } | 3767 | } |
3764 | } | 3768 | } |
3765 | 3769 | ||
3766 | 3770 | ||
3767 | 3771 | ||
3768 | 3772 | } | |
3773 | } | ||
diff --git a/libopie2/opieui/oimageeffect.h b/libopie2/opieui/oimageeffect.h index fb4d22d..4f86d5b 100644 --- a/libopie2/opieui/oimageeffect.h +++ b/libopie2/opieui/oimageeffect.h | |||
@@ -36,12 +36,14 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
36 | #define OIMAGEEFFECT_H | 36 | #define OIMAGEEFFECT_H |
37 | 37 | ||
38 | class QImage; | 38 | class QImage; |
39 | class QSize; | 39 | class QSize; |
40 | class QColor; | 40 | class QColor; |
41 | 41 | ||
42 | namespace Opie { | ||
43 | namespace Ui { | ||
42 | /** | 44 | /** |
43 | * This class includes various @ref QImage based graphical effects. | 45 | * This class includes various @ref QImage based graphical effects. |
44 | * | 46 | * |
45 | * Everything is | 47 | * Everything is |
46 | * static, so there is no need to create an instance of this class. You can | 48 | * static, so there is no need to create an instance of this class. You can |
47 | * just call the static methods. They are encapsulated here merely to provide | 49 | * just call the static methods. They are encapsulated here merely to provide |
@@ -553,7 +555,10 @@ private: | |||
553 | unsigned int *f, unsigned int *g); | 555 | unsigned int *f, unsigned int *g); |
554 | static unsigned int generateNoise(unsigned int pixel, NoiseType type); | 556 | static unsigned int generateNoise(unsigned int pixel, NoiseType type); |
555 | static unsigned int interpolateColor(QImage *image, double x, double y, | 557 | static unsigned int interpolateColor(QImage *image, double x, double y, |
556 | unsigned int background); | 558 | unsigned int background); |
557 | }; | 559 | }; |
558 | 560 | ||
561 | } | ||
562 | } | ||
563 | |||
559 | #endif | 564 | #endif |
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index 0ee2fde..38670b4 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp | |||
@@ -33,12 +33,17 @@ | |||
33 | 33 | ||
34 | /* OPIE */ | 34 | /* OPIE */ |
35 | 35 | ||
36 | #include <opie2/odebug.h> | 36 | #include <opie2/odebug.h> |
37 | #include <opie2/olistview.h> | 37 | #include <opie2/olistview.h> |
38 | 38 | ||
39 | using namespace Opie::Core; | ||
40 | |||
41 | |||
42 | namespace Opie { | ||
43 | namespace Ui { | ||
39 | /*====================================================================================== | 44 | /*====================================================================================== |
40 | * OListView | 45 | * OListView |
41 | *======================================================================================*/ | 46 | *======================================================================================*/ |
42 | 47 | ||
43 | OListView::OListView( QWidget *parent, const char *name ) | 48 | OListView::OListView( QWidget *parent, const char *name ) |
44 | :QListView( parent, name ) | 49 | :QListView( parent, name ) |
@@ -752,6 +757,8 @@ ONamedListViewItem* ONamedListViewItem::find( const QString& column, const QStri | |||
752 | if ( col != -1 ) | 757 | if ( col != -1 ) |
753 | return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), col, text, recurse ); | 758 | return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), col, text, recurse ); |
754 | else | 759 | else |
755 | return 0; | 760 | return 0; |
756 | } | 761 | } |
757 | 762 | ||
763 | } | ||
764 | } | ||
diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h index 59b0973..8195a62 100644 --- a/libopie2/opieui/olistview.h +++ b/libopie2/opieui/olistview.h | |||
@@ -33,12 +33,15 @@ | |||
33 | #include <qcolor.h> | 33 | #include <qcolor.h> |
34 | #include <qlistview.h> | 34 | #include <qlistview.h> |
35 | #include <qpen.h> | 35 | #include <qpen.h> |
36 | #include <qdatastream.h> | 36 | #include <qdatastream.h> |
37 | #include <qstringlist.h> | 37 | #include <qstringlist.h> |
38 | 38 | ||
39 | |||
40 | namespace Opie { | ||
41 | namespace Ui { | ||
39 | class OListViewItem; | 42 | class OListViewItem; |
40 | 43 | ||
41 | 44 | ||
42 | /*====================================================================================== | 45 | /*====================================================================================== |
43 | * OListView | 46 | * OListView |
44 | *======================================================================================*/ | 47 | *======================================================================================*/ |
@@ -51,12 +54,13 @@ class OListViewItem; | |||
51 | * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. | 54 | * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. |
52 | * | 55 | * |
53 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> | 56 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
54 | */ | 57 | */ |
55 | class OListView: public QListView | 58 | class OListView: public QListView |
56 | { | 59 | { |
60 | Q_OBJECT | ||
57 | public: | 61 | public: |
58 | /** | 62 | /** |
59 | * Constructor. | 63 | * Constructor. |
60 | * | 64 | * |
61 | * The parameters @a parent and @a name are handled by | 65 | * The parameters @a parent and @a name are handled by |
62 | * @ref QListView, as usual. | 66 | * @ref QListView, as usual. |
@@ -136,14 +140,16 @@ class OListView: public QListView | |||
136 | * expand the current OListViewItem | 140 | * expand the current OListViewItem |
137 | */ | 141 | */ |
138 | void expand(QListViewItem*); | 142 | void expand(QListViewItem*); |
139 | 143 | ||
140 | private: | 144 | private: |
141 | QColor m_alternateBackground; | 145 | QColor m_alternateBackground; |
142 | bool m_fullWidth; | 146 | bool m_fullWidth : 1; |
143 | QPen m_columnSeparator; | 147 | QPen m_columnSeparator; |
148 | class Private; | ||
149 | Private *d; | ||
144 | }; | 150 | }; |
145 | 151 | ||
146 | #ifndef QT_NO_DATASTREAM | 152 | #ifndef QT_NO_DATASTREAM |
147 | /** | 153 | /** |
148 | * @relates OListView | 154 | * @relates OListView |
149 | * Writes @a listview to the @a stream and returns a reference to the stream. | 155 | * Writes @a listview to the @a stream and returns a reference to the stream. |
@@ -239,14 +245,16 @@ class OListViewItem: public QListViewItem | |||
239 | /** | 245 | /** |
240 | * expand the the item | 246 | * expand the the item |
241 | */ | 247 | */ |
242 | virtual void expand(){}; | 248 | virtual void expand(){}; |
243 | 249 | ||
244 | private: | 250 | private: |
245 | bool m_known; | 251 | bool m_known : 1; |
246 | bool m_odd; | 252 | bool m_odd : 1; |
253 | class Private; | ||
254 | Private *d; | ||
247 | }; | 255 | }; |
248 | 256 | ||
249 | #ifndef QT_NO_DATASTREAM | 257 | #ifndef QT_NO_DATASTREAM |
250 | /** | 258 | /** |
251 | * @relates QListViewItem | 259 | * @relates QListViewItem |
252 | * Writes listview @a item and all subitems recursively to @a stream | 260 | * Writes listview @a item and all subitems recursively to @a stream |
@@ -351,12 +359,15 @@ class ONamedListView: public OListView | |||
351 | */ | 359 | */ |
352 | virtual ONamedListViewItem* find( ONamedListViewItem* start, int column, const QString& text, int recurse = -1 ) const; | 360 | virtual ONamedListViewItem* find( ONamedListViewItem* start, int column, const QString& text, int recurse = -1 ) const; |
353 | virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const; | 361 | virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const; |
354 | 362 | ||
355 | virtual ONamedListViewItem* find( ONamedListViewItem* start, const QString& column, const QString& text, int recurse = -1 ) const; | 363 | virtual ONamedListViewItem* find( ONamedListViewItem* start, const QString& column, const QString& text, int recurse = -1 ) const; |
356 | virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const; | 364 | virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const; |
365 | private: | ||
366 | class Private; | ||
367 | Private *d; | ||
357 | }; | 368 | }; |
358 | 369 | ||
359 | /*====================================================================================== | 370 | /*====================================================================================== |
360 | * ONamedListViewItem | 371 | * ONamedListViewItem |
361 | *======================================================================================*/ | 372 | *======================================================================================*/ |
362 | 373 | ||
@@ -400,10 +411,16 @@ class ONamedListViewItem: public OListViewItem | |||
400 | * <li>set it to -1 for maximum recursion. | 411 | * <li>set it to -1 for maximum recursion. |
401 | * </ul> | 412 | * </ul> |
402 | * @sa ONamedListView::find() | 413 | * @sa ONamedListView::find() |
403 | */ | 414 | */ |
404 | virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const; | 415 | virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const; |
405 | virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const; | 416 | virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const; |
406 | }; | ||
407 | 417 | ||
418 | private: | ||
419 | class Private; | ||
420 | Private *d; | ||
421 | |||
422 | }; | ||
423 | } | ||
424 | } | ||
408 | 425 | ||
409 | #endif // OLISTVIEW_H | 426 | #endif // OLISTVIEW_H |
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index 1be8db5..e895edc 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro | |||
@@ -3,17 +3,15 @@ CONFIG += qt warn_on debug | |||
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = oclickablelabel.h \ | 4 | HEADERS = oclickablelabel.h \ |
5 | odialog.h \ | 5 | odialog.h \ |
6 | ofontselector.h \ | 6 | ofontselector.h \ |
7 | oimageeffect.h \ | 7 | oimageeffect.h \ |
8 | olistview.h \ | 8 | olistview.h \ |
9 | omessagebox.h \ | ||
10 | opixmapeffect.h \ | 9 | opixmapeffect.h \ |
11 | opopupmenu.h \ | 10 | opopupmenu.h \ |
12 | opixmapprovider.h \ | 11 | opixmapprovider.h \ |
13 | oresource.h \ | ||
14 | oselector.h \ | 12 | oselector.h \ |
15 | oseparator.h \ | 13 | oseparator.h \ |
16 | otabinfo.h \ | 14 | otabinfo.h \ |
17 | otabbar.h \ | 15 | otabbar.h \ |
18 | otabwidget.h \ | 16 | otabwidget.h \ |
19 | otaskbarapplet.h \ | 17 | otaskbarapplet.h \ |
@@ -28,13 +26,12 @@ SOURCES = oclickablelabel.cpp \ | |||
28 | ofontselector.cpp \ | 26 | ofontselector.cpp \ |
29 | oimageeffect.cpp \ | 27 | oimageeffect.cpp \ |
30 | olistview.cpp \ | 28 | olistview.cpp \ |
31 | opixmapeffect.cpp \ | 29 | opixmapeffect.cpp \ |
32 | opopupmenu.cpp \ | 30 | opopupmenu.cpp \ |
33 | opixmapprovider.cpp \ | 31 | opixmapprovider.cpp \ |
34 | oresource.cpp \ | ||
35 | oselector.cpp \ | 32 | oselector.cpp \ |
36 | oseparator.cpp \ | 33 | oseparator.cpp \ |
37 | otabbar.cpp \ | 34 | otabbar.cpp \ |
38 | otabwidget.cpp \ | 35 | otabwidget.cpp \ |
39 | otaskbarapplet.cpp \ | 36 | otaskbarapplet.cpp \ |
40 | oticker.cpp \ | 37 | oticker.cpp \ |
diff --git a/libopie2/opieui/opixmapeffect.cpp b/libopie2/opieui/opixmapeffect.cpp index 05f851d..794c7b2 100644 --- a/libopie2/opieui/opixmapeffect.cpp +++ b/libopie2/opieui/opixmapeffect.cpp | |||
@@ -14,12 +14,14 @@ | |||
14 | 14 | ||
15 | /* OPIE */ | 15 | /* OPIE */ |
16 | 16 | ||
17 | #include <opie2/opixmapeffect.h> | 17 | #include <opie2/opixmapeffect.h> |
18 | #include <opie2/oimageeffect.h> | 18 | #include <opie2/oimageeffect.h> |
19 | 19 | ||
20 | |||
21 | using namespace Opie::Ui; | ||
20 | //====================================================================== | 22 | //====================================================================== |
21 | // | 23 | // |
22 | // Gradient effects | 24 | // Gradient effects |
23 | // | 25 | // |
24 | //====================================================================== | 26 | //====================================================================== |
25 | 27 | ||
diff --git a/libopie2/opieui/opixmapeffect.h b/libopie2/opieui/opixmapeffect.h index 283fe2d..b780f9f 100644 --- a/libopie2/opieui/opixmapeffect.h +++ b/libopie2/opieui/opixmapeffect.h | |||
@@ -12,12 +12,15 @@ | |||
12 | 12 | ||
13 | 13 | ||
14 | #include <qsize.h> | 14 | #include <qsize.h> |
15 | typedef QPixmap OPixmap; | 15 | typedef QPixmap OPixmap; |
16 | class QColor; | 16 | class QColor; |
17 | 17 | ||
18 | |||
19 | namespace Opie { | ||
20 | namespace Ui { | ||
18 | /** | 21 | /** |
19 | * This class includes various pixmap-based graphical effects. | 22 | * This class includes various pixmap-based graphical effects. |
20 | * | 23 | * |
21 | * Everything is | 24 | * Everything is |
22 | * static, so there is no need to create an instance of this class. You can | 25 | * static, so there is no need to create an instance of this class. You can |
23 | * just call the static methods. They are encapsulated here merely to provide | 26 | * just call the static methods. They are encapsulated here merely to provide |
@@ -207,9 +210,10 @@ public: | |||
207 | * on the desktop. | 210 | * on the desktop. |
208 | * @param pixmap the pixmap to select | 211 | * @param pixmap the pixmap to select |
209 | * @param col the selected color, usually from QColorGroup::highlight(). | 212 | * @param col the selected color, usually from QColorGroup::highlight(). |
210 | */ | 213 | */ |
211 | static OPixmap selectedPixmap( const OPixmap &pixmap, const QColor &col ); | 214 | static OPixmap selectedPixmap( const OPixmap &pixmap, const QColor &col ); |
212 | }; | 215 | }; |
213 | 216 | } | |
217 | } | ||
214 | 218 | ||
215 | #endif | 219 | #endif |
diff --git a/libopie2/opieui/opixmapprovider.cpp b/libopie2/opieui/opixmapprovider.cpp index 7be9e3b..7eb67a2 100644 --- a/libopie2/opieui/opixmapprovider.cpp +++ b/libopie2/opieui/opixmapprovider.cpp | |||
@@ -17,11 +17,13 @@ | |||
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <opie2/opixmapprovider.h> | 21 | #include <opie2/opixmapprovider.h> |
22 | 22 | ||
23 | using namespace Opie::Ui; | ||
24 | |||
23 | OPixmapProvider::~OPixmapProvider() {} | 25 | OPixmapProvider::~OPixmapProvider() {} |
24 | 26 | ||
25 | void OPixmapProvider::virtual_hook( int , void* ) | 27 | void OPixmapProvider::virtual_hook( int , void* ) |
26 | { /*BASE::virtual_hook( id, data );*/ } | 28 | { /*BASE::virtual_hook( id, data );*/ } |
27 | 29 | ||
diff --git a/libopie2/opieui/opixmapprovider.h b/libopie2/opieui/opixmapprovider.h index 5b76647..9d9bd69 100644 --- a/libopie2/opieui/opixmapprovider.h +++ b/libopie2/opieui/opixmapprovider.h | |||
@@ -20,13 +20,16 @@ | |||
20 | 20 | ||
21 | #ifndef OPIXMAPPROVIDER_H | 21 | #ifndef OPIXMAPPROVIDER_H |
22 | #define OPIXMAPPROVIDER_H | 22 | #define OPIXMAPPROVIDER_H |
23 | 23 | ||
24 | #include <qpixmap.h> | 24 | #include <qpixmap.h> |
25 | 25 | ||
26 | namespace Opie { | ||
27 | namespace Ui { | ||
26 | /** | 28 | /** |
29 | * \todo make usefull | ||
27 | * A tiny abstract class with just one method: | 30 | * A tiny abstract class with just one method: |
28 | * @ref pixmapFor() | 31 | * @ref pixmapFor() |
29 | * | 32 | * |
30 | * It will be called whenever an icon is searched for @p text. | 33 | * It will be called whenever an icon is searched for @p text. |
31 | * | 34 | * |
32 | * Used e.g. by @ref KHistoryCombo | 35 | * Used e.g. by @ref KHistoryCombo |
@@ -45,10 +48,15 @@ public: | |||
45 | * See @ref KIcon::StdSize. | 48 | * See @ref KIcon::StdSize. |
46 | * @return the pixmap for the arguments, or null if there is none | 49 | * @return the pixmap for the arguments, or null if there is none |
47 | */ | 50 | */ |
48 | virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0; | 51 | virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0; |
49 | protected: | 52 | protected: |
50 | virtual void virtual_hook( int id, void* data ); | 53 | virtual void virtual_hook( int id, void* data ); |
54 | private: | ||
55 | class Private; | ||
56 | Private *d; | ||
51 | }; | 57 | }; |
52 | 58 | ||
59 | } | ||
60 | } | ||
53 | 61 | ||
54 | #endif // OPIXMAPPROVIDER_H | 62 | #endif // OPIXMAPPROVIDER_H |
diff --git a/libopie2/opieui/opopupmenu.cpp b/libopie2/opieui/opopupmenu.cpp index d5cc575..3ab8490 100644 --- a/libopie2/opieui/opopupmenu.cpp +++ b/libopie2/opieui/opopupmenu.cpp | |||
@@ -24,12 +24,15 @@ | |||
24 | 24 | ||
25 | /* OPIE */ | 25 | /* OPIE */ |
26 | 26 | ||
27 | #include <opie2/opopupmenu.h> | 27 | #include <opie2/opopupmenu.h> |
28 | #include <opie2/oconfig.h> | 28 | #include <opie2/oconfig.h> |
29 | 29 | ||
30 | using namespace Opie::Core; | ||
31 | using namespace Opie::Ui; | ||
32 | |||
30 | OPopupTitle::OPopupTitle(QWidget *parent, const char *name) | 33 | OPopupTitle::OPopupTitle(QWidget *parent, const char *name) |
31 | : QWidget(parent, name) | 34 | : QWidget(parent, name) |
32 | { | 35 | { |
33 | setMinimumSize(16, fontMetrics().height()+8); | 36 | setMinimumSize(16, fontMetrics().height()+8); |
34 | } | 37 | } |
35 | 38 | ||
diff --git a/libopie2/opieui/opopupmenu.h b/libopie2/opieui/opopupmenu.h index 54e4301..419a954 100644 --- a/libopie2/opieui/opopupmenu.h +++ b/libopie2/opieui/opopupmenu.h | |||
@@ -28,12 +28,14 @@ | |||
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | 29 | ||
30 | /* OPIE */ | 30 | /* OPIE */ |
31 | 31 | ||
32 | #include <opie2/opixmapeffect.h> | 32 | #include <opie2/opixmapeffect.h> |
33 | 33 | ||
34 | namespace Opie { | ||
35 | namespace Ui { | ||
34 | /** | 36 | /** |
35 | * Title widget for use in @ref OPopupMenu. | 37 | * Title widget for use in @ref OPopupMenu. |
36 | * | 38 | * |
37 | * You usually don't have to create this manually since | 39 | * You usually don't have to create this manually since |
38 | * @ref OPopupMenu::insertTitle will do it for you, but it is allowed if | 40 | * @ref OPopupMenu::insertTitle will do it for you, but it is allowed if |
39 | * you wish to customize it's look. | 41 | * you wish to customize it's look. |
@@ -253,7 +255,10 @@ protected slots: | |||
253 | 255 | ||
254 | private: | 256 | private: |
255 | class OPopupMenuPrivate; | 257 | class OPopupMenuPrivate; |
256 | OPopupMenuPrivate *d; | 258 | OPopupMenuPrivate *d; |
257 | }; | 259 | }; |
258 | 260 | ||
261 | } | ||
262 | } | ||
263 | |||
259 | #endif | 264 | #endif |
diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp index 23b3ce3..5f6f10f 100644 --- a/libopie2/opieui/oselector.cpp +++ b/libopie2/opieui/oselector.cpp | |||
@@ -33,12 +33,14 @@ | |||
33 | //----------------------------------------------------------------------------- | 33 | //----------------------------------------------------------------------------- |
34 | /* | 34 | /* |
35 | * 2D value selector. | 35 | * 2D value selector. |
36 | * The contents of the selector are drawn by derived class. | 36 | * The contents of the selector are drawn by derived class. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | using namespace Opie::Ui; | ||
40 | |||
39 | OXYSelector::OXYSelector( QWidget *parent, const char *name ) | 41 | OXYSelector::OXYSelector( QWidget *parent, const char *name ) |
40 | : QWidget( parent, name ) | 42 | : QWidget( parent, name ) |
41 | { | 43 | { |
42 | xPos = 0; | 44 | xPos = 0; |
43 | yPos = 0; | 45 | yPos = 0; |
44 | minX = 0; | 46 | minX = 0; |
diff --git a/libopie2/opieui/oselector.h b/libopie2/opieui/oselector.h index f832239..fe75a46 100644 --- a/libopie2/opieui/oselector.h +++ b/libopie2/opieui/oselector.h | |||
@@ -24,12 +24,15 @@ | |||
24 | #define __OSELECT_H__ | 24 | #define __OSELECT_H__ |
25 | 25 | ||
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #include <qrangecontrol.h> | 27 | #include <qrangecontrol.h> |
28 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
29 | 29 | ||
30 | |||
31 | namespace Opie { | ||
32 | namespace Ui { | ||
30 | /** | 33 | /** |
31 | * OXYSelector is the base class for other widgets which | 34 | * OXYSelector is the base class for other widgets which |
32 | * provides the ability to choose from a two-dimensional | 35 | * provides the ability to choose from a two-dimensional |
33 | * range of values. The currently chosen value is indicated | 36 | * range of values. The currently chosen value is indicated |
34 | * by a cross. An example is the @ref OHSSelector which | 37 | * by a cross. An example is the @ref OHSSelector which |
35 | * allows to choose from a range of colors, and which is | 38 | * allows to choose from a range of colors, and which is |
@@ -509,10 +512,12 @@ protected: | |||
509 | 512 | ||
510 | private: | 513 | private: |
511 | class OColorPrivate; | 514 | class OColorPrivate; |
512 | OColorPrivate *d; | 515 | OColorPrivate *d; |
513 | }; | 516 | }; |
514 | 517 | ||
518 | } | ||
519 | } | ||
515 | 520 | ||
516 | 521 | ||
517 | #endif // __OSELECT_H__ | 522 | #endif // __OSELECT_H__ |
518 | 523 | ||
diff --git a/libopie2/opieui/oseparator.cpp b/libopie2/opieui/oseparator.cpp index b93c225..bbc4381 100644 --- a/libopie2/opieui/oseparator.cpp +++ b/libopie2/opieui/oseparator.cpp | |||
@@ -33,12 +33,14 @@ | |||
33 | 33 | ||
34 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
35 | #include <opie2/oseparator.h> | 35 | #include <opie2/oseparator.h> |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | 38 | ||
39 | using namespace Opie::Core; | ||
40 | using namespace Opie::Ui; | ||
39 | 41 | ||
40 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) | 42 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) |
41 | : QFrame(parent, name, f) | 43 | : QFrame(parent, name, f) |
42 | { | 44 | { |
43 | setLineWidth(1); | 45 | setLineWidth(1); |
44 | setMidLineWidth(0); | 46 | setMidLineWidth(0); |
diff --git a/libopie2/opieui/oseparator.h b/libopie2/opieui/oseparator.h index e59b3f4..6fc4344 100644 --- a/libopie2/opieui/oseparator.h +++ b/libopie2/opieui/oseparator.h | |||
@@ -32,12 +32,15 @@ | |||
32 | 32 | ||
33 | #ifndef OSEPARATOR_H | 33 | #ifndef OSEPARATOR_H |
34 | #define OSEPARATOR_H | 34 | #define OSEPARATOR_H |
35 | 35 | ||
36 | #include <qframe.h> | 36 | #include <qframe.h> |
37 | 37 | ||
38 | namespace Opie { | ||
39 | namespace Ui { | ||
40 | |||
38 | /** | 41 | /** |
39 | * Standard horizontal or vertical separator. | 42 | * Standard horizontal or vertical separator. |
40 | * | 43 | * |
41 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 44 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
42 | * @author Michael Roth <mroth@wirlweb.de> | 45 | * @author Michael Roth <mroth@wirlweb.de> |
43 | * @version $Id$ | 46 | * @version $Id$ |
@@ -83,8 +86,10 @@ protected: | |||
83 | virtual void drawFrame( QPainter * ); | 86 | virtual void drawFrame( QPainter * ); |
84 | 87 | ||
85 | private: | 88 | private: |
86 | class OSeparatorPrivate* d; | 89 | class OSeparatorPrivate* d; |
87 | }; | 90 | }; |
88 | 91 | ||
92 | } | ||
93 | } | ||
89 | 94 | ||
90 | #endif // OSEPARATOR_H | 95 | #endif // OSEPARATOR_H |
diff --git a/libopie2/opieui/otabbar.cpp b/libopie2/opieui/otabbar.cpp index cd3a34b..a62e18b 100644 --- a/libopie2/opieui/otabbar.cpp +++ b/libopie2/opieui/otabbar.cpp | |||
@@ -28,13 +28,13 @@ | |||
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <opie2/otabbar.h> | 32 | #include <opie2/otabbar.h> |
33 | 33 | ||
34 | using namespace Opie; | 34 | using namespace Opie::Ui; |
35 | 35 | ||
36 | OTabBar::OTabBar( QWidget *parent , const char *name ) | 36 | OTabBar::OTabBar( QWidget *parent , const char *name ) |
37 | :QTabBar( parent, name ) | 37 | :QTabBar( parent, name ) |
38 | {} | 38 | {} |
39 | 39 | ||
40 | void OTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const | 40 | void OTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const |
diff --git a/libopie2/opieui/otabbar.h b/libopie2/opieui/otabbar.h index 2f35c85..925ae96 100644 --- a/libopie2/opieui/otabbar.h +++ b/libopie2/opieui/otabbar.h | |||
@@ -32,14 +32,14 @@ | |||
32 | #ifndef OTABBAR_H | 32 | #ifndef OTABBAR_H |
33 | #define OTABBAR_H | 33 | #define OTABBAR_H |
34 | 34 | ||
35 | /* QT */ | 35 | /* QT */ |
36 | #include <qtabbar.h> | 36 | #include <qtabbar.h> |
37 | 37 | ||
38 | namespace Opie | 38 | namespace Opie { |
39 | { | 39 | namespace Ui { |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * @class OTabBar | 42 | * @class OTabBar |
43 | * @brief The OTabBar class is a derivative of QTabBar. | 43 | * @brief The OTabBar class is a derivative of QTabBar. |
44 | * | 44 | * |
45 | * OTabBar is a derivation of TrollTech's QTabBar which provides | 45 | * OTabBar is a derivation of TrollTech's QTabBar which provides |
@@ -77,9 +77,10 @@ protected: | |||
77 | 77 | ||
78 | private: | 78 | private: |
79 | class Private; | 79 | class Private; |
80 | Private *d; | 80 | Private *d; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | }; | 83 | } |
84 | } | ||
84 | 85 | ||
85 | #endif | 86 | #endif |
diff --git a/libopie2/opieui/otabinfo.h b/libopie2/opieui/otabinfo.h index 4a6ce14..426c45a 100644 --- a/libopie2/opieui/otabinfo.h +++ b/libopie2/opieui/otabinfo.h | |||
@@ -35,14 +35,14 @@ | |||
35 | /* QT */ | 35 | /* QT */ |
36 | #include <qlist.h> | 36 | #include <qlist.h> |
37 | #include <qstring.h> | 37 | #include <qstring.h> |
38 | 38 | ||
39 | class QWidget; | 39 | class QWidget; |
40 | 40 | ||
41 | namespace Opie | 41 | namespace Opie{ |
42 | { | 42 | namespace Ui { |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * @class OTabInfo | 45 | * @class OTabInfo |
46 | * @brief The OTabInfo class is used internally by OTabWidget to keep track | 46 | * @brief The OTabInfo class is used internally by OTabWidget to keep track |
47 | * of widgets added to the control. | 47 | * of widgets added to the control. |
48 | * | 48 | * |
@@ -132,9 +132,10 @@ private: | |||
132 | /** | 132 | /** |
133 | * @class OTabInfoList | 133 | * @class OTabInfoList |
134 | * @brief A list of OTabInfo objects used by OTabWidget. | 134 | * @brief A list of OTabInfo objects used by OTabWidget. |
135 | */ | 135 | */ |
136 | typedef QList<OTabInfo> OTabInfoList; | 136 | typedef QList<OTabInfo> OTabInfoList; |
137 | 137 | ||
138 | }; | 138 | } |
139 | } | ||
139 | 140 | ||
140 | #endif | 141 | #endif |
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index f47c90b..a9f7da9 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp | |||
@@ -38,13 +38,13 @@ | |||
38 | #include <opie2/otabbar.h> | 38 | #include <opie2/otabbar.h> |
39 | 39 | ||
40 | /* QT */ | 40 | /* QT */ |
41 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
42 | #include <qwidgetstack.h> | 42 | #include <qwidgetstack.h> |
43 | 43 | ||
44 | using namespace Opie; | 44 | using namespace Opie::Ui; |
45 | 45 | ||
46 | OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) | 46 | OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) |
47 | : QWidget( parent, name ) | 47 | : QWidget( parent, name ) |
48 | { | 48 | { |
49 | if ( s == Global ) | 49 | if ( s == Global ) |
50 | { | 50 | { |
diff --git a/libopie2/opieui/otabwidget.h b/libopie2/opieui/otabwidget.h index 092f22c..6a64b7d 100644 --- a/libopie2/opieui/otabwidget.h +++ b/libopie2/opieui/otabwidget.h | |||
@@ -35,21 +35,20 @@ | |||
35 | #include <opie2/otabinfo.h> | 35 | #include <opie2/otabinfo.h> |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qwidget.h> | 38 | #include <qwidget.h> |
39 | #include <qlist.h> | 39 | #include <qlist.h> |
40 | 40 | ||
41 | using namespace Opie; | ||
42 | 41 | ||
43 | class QComboBox; | 42 | class QComboBox; |
44 | class QPixmap; | 43 | class QPixmap; |
45 | class QTabBar; | 44 | class QTabBar; |
46 | class QWidgetStack; | 45 | class QWidgetStack; |
47 | 46 | ||
48 | namespace Opie | 47 | namespace Opie { |
49 | { | 48 | namespace Ui { |
50 | 49 | ||
51 | class OTabBar; | 50 | class OTabBar; |
52 | 51 | ||
53 | /** | 52 | /** |
54 | * @class OTabWidget | 53 | * @class OTabWidget |
55 | * @brief The OTabWidget class provides a stack of widgets. | 54 | * @brief The OTabWidget class provides a stack of widgets. |
@@ -284,9 +283,10 @@ private: | |||
284 | * | 283 | * |
285 | * @param id Index of widget selected. | 284 | * @param id Index of widget selected. |
286 | */ | 285 | */ |
287 | void slotTabListSelected( int ); | 286 | void slotTabListSelected( int ); |
288 | }; | 287 | }; |
289 | 288 | ||
290 | }; | 289 | } |
290 | } | ||
291 | 291 | ||
292 | #endif | 292 | #endif |
diff --git a/libopie2/opieui/otaskbarapplet.cpp b/libopie2/opieui/otaskbarapplet.cpp index a67356d..b5268f0 100644 --- a/libopie2/opieui/otaskbarapplet.cpp +++ b/libopie2/opieui/otaskbarapplet.cpp | |||
@@ -25,8 +25,58 @@ | |||
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 | #include <opie2/otaskbarapplet.h> | ||
32 | |||
33 | #include <qpe/qpeapplication.h> | ||
34 | #include <qframe.h> | ||
35 | |||
36 | using namespace Opie::Ui; | ||
37 | |||
38 | |||
39 | /** | ||
40 | * \todo no example yet!!! | ||
41 | * If you want to implement an Applet for the Opie Taskbar | ||
42 | * use this interface. | ||
43 | * The only specail thing about applets is that you need to build | ||
44 | * it as plugin/library and do EXPORT_OPIE_APPLET_v1( YourApplet ) | ||
45 | * at the bottom of your application. This takes care of | ||
46 | * the activation and implementing the TaskbarAppletInterface. | ||
47 | * You also need to add a static int position() functions to your | ||
48 | * application. | ||
49 | * \code | ||
50 | * class MyApplet : public OTaskBarApplet { | ||
51 | * public: | ||
52 | * static int position() { return 3: } | ||
53 | * void doStuff() { | ||
54 | * popup( myWidget ); | ||
55 | * } | ||
56 | * }; | ||
57 | * EXPORT_OPIE_APPLET_v1( MyApplet ) | ||
58 | * \endcode | ||
59 | * | ||
60 | * @author Michael Lauer | ||
61 | * @version 0.5 | ||
62 | * @see TaskbarAppletInterface | ||
63 | */ | ||
64 | OTaskbarApplet::OTaskbarApplet( QWidget* parent, const char* name ) | ||
65 | :QWidget( parent, name ){ | ||
66 | setFixedHeight( 18 ); | ||
67 | setFixedWidth( 14 ); | ||
68 | } | ||
69 | |||
70 | OTaskbarApplet::~OTaskbarApplet(){ | ||
71 | } | ||
72 | |||
73 | void OTaskbarApplet::popup( QWidget* widget ){ | ||
74 | QPoint curPos = mapToGlobal( QPoint( 0, 0 ) ); | ||
75 | int w = widget->sizeHint().width(); | ||
76 | int x = curPos.x() - (w/2 ); | ||
77 | if ( (x+w) > QPEApplication::desktop()->width() ) | ||
78 | x = QPEApplication::desktop()->width()-w; | ||
79 | widget->move( x, curPos.y()-widget->sizeHint().height() ); | ||
80 | widget->show(); | ||
81 | } | ||
31 | 82 | ||
32 | // Empty on purpose until we shipped Opie 1.0 (see otaskbarapplet.h for explanation) | ||
diff --git a/libopie2/opieui/otaskbarapplet.h b/libopie2/opieui/otaskbarapplet.h index 074367f..0c85ee7 100644 --- a/libopie2/opieui/otaskbarapplet.h +++ b/libopie2/opieui/otaskbarapplet.h | |||
@@ -30,17 +30,26 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef OTASKBARAPPLET_H | 32 | #ifndef OTASKBARAPPLET_H |
33 | #define OTASKBARAPPLET_H | 33 | #define OTASKBARAPPLET_H |
34 | 34 | ||
35 | #include <qpe/taskbarappletinterface.h> | 35 | #include <qpe/taskbarappletinterface.h> |
36 | #include <qpe/qcom.h> | ||
36 | 37 | ||
38 | #include <qwidget.h> | ||
39 | |||
40 | class QMouseEvent; | ||
41 | |||
42 | namespace Opie { | ||
43 | namespace Ui { | ||
44 | namespace Private { | ||
37 | /*====================================================================================== | 45 | /*====================================================================================== |
38 | * OTaskbarAppletWrapper | 46 | * OTaskbarAppletWrapper |
39 | *======================================================================================*/ | 47 | *======================================================================================*/ |
40 | 48 | ||
49 | class OTaskbarAppletWrapperPrivate; | ||
41 | template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface | 50 | template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface |
42 | { | 51 | { |
43 | public: | 52 | public: |
44 | OTaskbarAppletWrapper():_applet( 0 ) | 53 | OTaskbarAppletWrapper():_applet( 0 ) |
45 | { | 54 | { |
46 | } | 55 | } |
@@ -77,20 +86,16 @@ template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface | |||
77 | { | 86 | { |
78 | return T::position(); | 87 | return T::position(); |
79 | } | 88 | } |
80 | 89 | ||
81 | private: | 90 | private: |
82 | T* _applet; | 91 | T* _applet; |
92 | OTaskbarAppletWrapperPrivate *d; | ||
83 | }; | 93 | }; |
84 | 94 | ||
85 | #include <qframe.h> | 95 | } |
86 | #include <qwidget.h> | ||
87 | #include <qpe/qpeapplication.h> | ||
88 | |||
89 | class QMouseEvent; | ||
90 | |||
91 | /*====================================================================================== | 96 | /*====================================================================================== |
92 | * OTaskbarApplet | 97 | * OTaskbarApplet |
93 | *======================================================================================*/ | 98 | *======================================================================================*/ |
94 | 99 | ||
95 | // Must be inline until after we shipped Opie 1.0 | 100 | // Must be inline until after we shipped Opie 1.0 |
96 | 101 | ||
@@ -100,31 +105,25 @@ class QMouseEvent; | |||
100 | // the dynamic loader [dlopen] tries to resolve an applet which | 105 | // the dynamic loader [dlopen] tries to resolve an applet which |
101 | // inherits OTaskbarApplet | 106 | // inherits OTaskbarApplet |
102 | 107 | ||
103 | class OTaskbarApplet : public QWidget | 108 | class OTaskbarApplet : public QWidget |
104 | { | 109 | { |
105 | public: | 110 | public: |
106 | OTaskbarApplet( QWidget* parent, const char* name = 0 ):QWidget( parent, name ) | 111 | OTaskbarApplet( QWidget* parent, const char* name = 0 ); |
107 | { | 112 | virtual ~OTaskbarApplet(); |
108 | setFixedHeight( 18 ); | ||
109 | setFixedWidth( 14 ); | ||
110 | } | ||
111 | 113 | ||
112 | virtual ~OTaskbarApplet() | 114 | protected: |
113 | { | 115 | virtual void popup( QWidget* widget ); |
116 | private: | ||
117 | class Private; | ||
118 | Private *d; | ||
119 | }; | ||
120 | } | ||
114 | } | 121 | } |
115 | 122 | ||
116 | protected: | 123 | #define EXPORT_OPIE_APPLET_v1( AppLet ) \ |
117 | virtual void popup( QWidget* widget ) | 124 | Q_EXPORT_INTERFACE() { \ |
118 | { | 125 | Q_CREATE_INSTANCE( Opie::Ui::Private::OTaskbarAppletWrapper<AppLet> ) \ |
119 | QPoint curPos = mapToGlobal( QPoint( 0, 0 ) ); | ||
120 | int w = widget->sizeHint().width(); | ||
121 | int x = curPos.x() - (w/2 ); | ||
122 | if ( (x+w) > QPEApplication::desktop()->width() ) | ||
123 | x = QPEApplication::desktop()->width()-w; | ||
124 | widget->move( x, curPos.y()-widget->sizeHint().height() ); | ||
125 | widget->show(); | ||
126 | } | 126 | } |
127 | }; | ||
128 | 127 | ||
129 | #endif | 128 | #endif |
130 | 129 | ||
diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp index 66f9ce0..7de0fd3 100644 --- a/libopie2/opieui/otimepicker.cpp +++ b/libopie2/opieui/otimepicker.cpp | |||
@@ -24,20 +24,24 @@ | |||
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* OPIE */ | ||
31 | #include <opie2/otimepicker.h> | ||
32 | |||
30 | /* QT */ | 33 | /* QT */ |
34 | #include <qgroupbox.h> | ||
31 | #include <qlayout.h> | 35 | #include <qlayout.h> |
32 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
33 | 37 | ||
34 | /* OPIE */ | ||
35 | #include <opie2/otimepicker.h> | ||
36 | 38 | ||
37 | using namespace Opie; | 39 | |
40 | namespace Opie { | ||
41 | namespace Ui { | ||
38 | 42 | ||
39 | /** | 43 | /** |
40 | * Constructs the widget | 44 | * Constructs the widget |
41 | * @param parent The parent of the OTimePicker | 45 | * @param parent The parent of the OTimePicker |
42 | * @param name The name of the object | 46 | * @param name The name of the object |
43 | * @param fl Window Flags | 47 | * @param fl Window Flags |
@@ -217,12 +221,14 @@ void OTimePicker::setHour(int h) | |||
217 | * @param name The name of the object | 221 | * @param name The name of the object |
218 | * @param fl Possible window flags | 222 | * @param fl Possible window flags |
219 | */ | 223 | */ |
220 | OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) | 224 | OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) |
221 | : OTimePickerDialogBase (parent , name, true , fl) | 225 | : OTimePickerDialogBase (parent , name, true , fl) |
222 | { | 226 | { |
227 | m_timePicker = new OTimePicker( GroupBox1, "m_timePicker" ); | ||
228 | GroupBox1Layout->addWidget( m_timePicker, 0, 0 ); | ||
223 | 229 | ||
224 | connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ), | 230 | connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ), |
225 | this, SLOT( setTime(const QTime&) ) ); | 231 | this, SLOT( setTime(const QTime&) ) ); |
226 | connect ( minuteField, SIGNAL( textChanged(const QString&) ), | 232 | connect ( minuteField, SIGNAL( textChanged(const QString&) ), |
227 | this, SLOT ( setMinute(const QString&) ) ); | 233 | this, SLOT ( setMinute(const QString&) ) ); |
228 | connect ( hourField, SIGNAL( textChanged(const QString&) ), | 234 | connect ( hourField, SIGNAL( textChanged(const QString&) ), |
@@ -287,6 +293,9 @@ void OTimePickerDialog::setMinute ( const QString& minute ) | |||
287 | if ( QTime::isValid ( m_time.hour(), minute.toInt(), 00 ) ) | 293 | if ( QTime::isValid ( m_time.hour(), minute.toInt(), 00 ) ) |
288 | { | 294 | { |
289 | m_time.setHMS ( m_time.hour(), minute.toInt(), 00 ); | 295 | m_time.setHMS ( m_time.hour(), minute.toInt(), 00 ); |
290 | setTime ( m_time ); | 296 | setTime ( m_time ); |
291 | } | 297 | } |
292 | } | 298 | } |
299 | |||
300 | } | ||
301 | } | ||
diff --git a/libopie2/opieui/otimepicker.h b/libopie2/opieui/otimepicker.h index 2da7773..01bb557 100644 --- a/libopie2/opieui/otimepicker.h +++ b/libopie2/opieui/otimepicker.h | |||
@@ -29,24 +29,23 @@ | |||
29 | 29 | ||
30 | #ifndef OTIMEPICKER_H | 30 | #ifndef OTIMEPICKER_H |
31 | #define OTIMEPICKER_H | 31 | #define OTIMEPICKER_H |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/oclickablelabel.h> | 34 | #include <opie2/oclickablelabel.h> |
35 | #include "otimepickerbase.h" | 35 | #include <opie2/otimepickerbase.h> |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qwidget.h> | 38 | #include <qwidget.h> |
39 | #include <qvaluelist.h> | 39 | #include <qvaluelist.h> |
40 | #include <qdatetime.h> | 40 | #include <qdatetime.h> |
41 | #include <qdialog.h> | 41 | #include <qdialog.h> |
42 | 42 | ||
43 | using namespace Opie; | ||
44 | 43 | ||
45 | // namespace Opie | 44 | namespace Opie { |
46 | // { | 45 | namespace Ui { |
47 | 46 | ||
48 | /** | 47 | /** |
49 | * A class to pick time. It uses clickable labels | 48 | * A class to pick time. It uses clickable labels |
50 | * internally to allow a quick selection of a time. | 49 | * internally to allow a quick selection of a time. |
51 | * A time can be selected by two clicks of a user | 50 | * A time can be selected by two clicks of a user |
52 | * | 51 | * |
@@ -111,15 +110,23 @@ public: | |||
111 | public slots: | 110 | public slots: |
112 | void setTime( const QTime& time ); | 111 | void setTime( const QTime& time ); |
113 | void setHour( const QString& hour ); | 112 | void setHour( const QString& hour ); |
114 | void setMinute( const QString& minute ); | 113 | void setMinute( const QString& minute ); |
115 | 114 | ||
116 | private: | 115 | private: |
116 | OTimePicker *m_timePicker; | ||
117 | QTime m_time; | 117 | QTime m_time; |
118 | class Private; | 118 | class Private; |
119 | Private* d; | 119 | Private* d; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | // }; | 122 | } |
123 | } | ||
123 | 124 | ||
125 | /* for Qt2 */ | ||
126 | #if ( QT_VERSION-0 >= 0x030000 ) | ||
127 | #error "Fix the UI File to use namespaces" | ||
128 | #else | ||
129 | typedef Opie::Ui::OTimePicker OUIOTimePicker; | ||
130 | #endif | ||
124 | #endif | 131 | #endif |
125 | 132 | ||
diff --git a/libopie2/opieui/otimepickerbase.ui b/libopie2/opieui/otimepickerbase.ui index 3e7f2fb..c2eb7c5 100644 --- a/libopie2/opieui/otimepickerbase.ui +++ b/libopie2/opieui/otimepickerbase.ui | |||
@@ -8,13 +8,13 @@ | |||
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>210</width> | 14 | <width>182</width> |
15 | <height>137</height> | 15 | <height>137</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>sizePolicy</name> | 19 | <name>sizePolicy</name> |
20 | <sizepolicy> | 20 | <sizepolicy> |
@@ -246,47 +246,11 @@ | |||
246 | <number>11</number> | 246 | <number>11</number> |
247 | </property> | 247 | </property> |
248 | <property stdset="1"> | 248 | <property stdset="1"> |
249 | <name>spacing</name> | 249 | <name>spacing</name> |
250 | <number>6</number> | 250 | <number>6</number> |
251 | </property> | 251 | </property> |
252 | <widget row="0" column="0" > | ||
253 | <class>OTimePicker</class> | ||
254 | <property stdset="1"> | ||
255 | <name>name</name> | ||
256 | <cstring>m_timePicker</cstring> | ||
257 | </property> | ||
258 | <property stdset="1"> | ||
259 | <name>sizePolicy</name> | ||
260 | <sizepolicy> | ||
261 | <hsizetype>3</hsizetype> | ||
262 | <vsizetype>3</vsizetype> | ||
263 | </sizepolicy> | ||
264 | </property> | ||
265 | </widget> | ||
266 | </grid> | 252 | </grid> |
267 | </widget> | 253 | </widget> |
268 | </vbox> | 254 | </vbox> |
269 | </widget> | 255 | </widget> |
270 | <customwidgets> | ||
271 | <customwidget> | ||
272 | <class>OTimePicker</class> | ||
273 | <header location="local">otimepicker.h</header> | ||
274 | <sizehint> | ||
275 | <width>-1</width> | ||
276 | <height>-1</height> | ||
277 | </sizehint> | ||
278 | <container>0</container> | ||
279 | <sizepolicy> | ||
280 | <hordata>7</hordata> | ||
281 | <verdata>1</verdata> | ||
282 | </sizepolicy> | ||
283 | <pixmap>image0</pixmap> | ||
284 | </customwidget> | ||
285 | </customwidgets> | ||
286 | <images> | ||
287 | <image> | ||
288 | <name>image0</name> | ||
289 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data> | ||
290 | </image> | ||
291 | </images> | ||
292 | </UI> | 256 | </UI> |
diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp index 78154b7..f6c6410 100644 --- a/libopie2/opieui/oversatileview.cpp +++ b/libopie2/opieui/oversatileview.cpp | |||
@@ -37,12 +37,15 @@ | |||
37 | 37 | ||
38 | /* QT */ | 38 | /* QT */ |
39 | 39 | ||
40 | #include <qaction.h> | 40 | #include <qaction.h> |
41 | #include <qpopupmenu.h> | 41 | #include <qpopupmenu.h> |
42 | 42 | ||
43 | using namespace Opie::Core; | ||
44 | using namespace Opie::Ui; | ||
45 | |||
43 | /* XPM */ | 46 | /* XPM */ |
44 | static const char * view_icon_xpm[] = { | 47 | static const char * view_icon_xpm[] = { |
45 | "16 16 16 1", | 48 | "16 16 16 1", |
46 | " c None", | 49 | " c None", |
47 | ".c #87BD88", | 50 | ".c #87BD88", |
48 | "+c #8BBE8B", | 51 | "+c #8BBE8B", |
diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 8af21dc..61b61db 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h | |||
@@ -42,21 +42,24 @@ | |||
42 | 42 | ||
43 | /* FORWARDS */ | 43 | /* FORWARDS */ |
44 | 44 | ||
45 | class QHeader; | 45 | class QHeader; |
46 | class QIconSet; | 46 | class QIconSet; |
47 | class QIconViewItem; | 47 | class QIconViewItem; |
48 | class OListView; | ||
49 | class QListViewItem; | 48 | class QListViewItem; |
50 | class QPopupMenu; | 49 | class QPopupMenu; |
51 | class QString; | 50 | class QString; |
52 | 51 | ||
53 | #ifndef QT_NO_DRAGANDDROP | 52 | #ifndef QT_NO_DRAGANDDROP |
54 | class QIconDragItem; | 53 | class QIconDragItem; |
55 | #endif | 54 | #endif |
56 | 55 | ||
56 | namespace Opie { | ||
57 | namespace Ui { | ||
58 | class OListView; | ||
59 | |||
57 | class OVersatileView : public QWidgetStack | 60 | class OVersatileView : public QWidgetStack |
58 | { | 61 | { |
59 | Q_OBJECT | 62 | Q_OBJECT |
60 | 63 | ||
61 | friend class OVersatileViewItem; | 64 | friend class OVersatileViewItem; |
62 | 65 | ||
@@ -387,8 +390,10 @@ public: | |||
387 | 390 | ||
388 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView | 391 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView |
389 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 392 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView |
390 | 393 | ||
391 | }; | 394 | }; |
392 | 395 | ||
396 | } | ||
397 | } | ||
393 | #endif | 398 | #endif |
394 | 399 | ||
diff --git a/libopie2/opieui/oversatileviewitem.cpp b/libopie2/opieui/oversatileviewitem.cpp index 66de8eb..03c6738 100644 --- a/libopie2/opieui/oversatileviewitem.cpp +++ b/libopie2/opieui/oversatileviewitem.cpp | |||
@@ -28,12 +28,14 @@ | |||
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <opie2/oversatileviewitem.h> | 31 | #include <opie2/oversatileviewitem.h> |
32 | #include <opie2/oversatileview.h> | 32 | #include <opie2/oversatileview.h> |
33 | 33 | ||
34 | using namespace Opie::Ui; | ||
35 | |||
34 | OVersatileViewItem::OVersatileViewItem( OVersatileView * parent ) | 36 | OVersatileViewItem::OVersatileViewItem( OVersatileView * parent ) |
35 | :OListViewItem( parent->_listview ), QIconViewItem( parent->_iconview ), | 37 | :OListViewItem( parent->_listview ), QIconViewItem( parent->_iconview ), |
36 | _versatileview( parent ) | 38 | _versatileview( parent ) |
37 | { | 39 | { |
38 | init(); | 40 | init(); |
39 | } | 41 | } |
diff --git a/libopie2/opieui/oversatileviewitem.h b/libopie2/opieui/oversatileviewitem.h index ee8ee20..c4977af 100644 --- a/libopie2/opieui/oversatileviewitem.h +++ b/libopie2/opieui/oversatileviewitem.h | |||
@@ -37,12 +37,15 @@ | |||
37 | #include <qiconview.h> | 37 | #include <qiconview.h> |
38 | 38 | ||
39 | /* OPIE */ | 39 | /* OPIE */ |
40 | 40 | ||
41 | #include <opie2/olistview.h> | 41 | #include <opie2/olistview.h> |
42 | 42 | ||
43 | namespace Opie { | ||
44 | namespace Ui { | ||
45 | |||
43 | class OVersatileView; | 46 | class OVersatileView; |
44 | 47 | ||
45 | class OVersatileViewItem : public OListViewItem, public QIconViewItem | 48 | class OVersatileViewItem : public OListViewItem, public QIconViewItem |
46 | { | 49 | { |
47 | public: | 50 | public: |
48 | OVersatileViewItem( OVersatileView * parent ); | 51 | OVersatileViewItem( OVersatileView * parent ); |
@@ -94,7 +97,9 @@ class OVersatileViewItem : public OListViewItem, public QIconViewItem | |||
94 | 97 | ||
95 | private: | 98 | private: |
96 | void init(); | 99 | void init(); |
97 | 100 | ||
98 | }; | 101 | }; |
99 | 102 | ||
103 | } | ||
104 | } | ||
100 | #endif | 105 | #endif |
diff --git a/libopie2/opieui/owait.cpp b/libopie2/opieui/owait.cpp index 8bb4ed6..9519888 100644 --- a/libopie2/opieui/owait.cpp +++ b/libopie2/opieui/owait.cpp | |||
@@ -35,12 +35,14 @@ | |||
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qlayout.h> | 38 | #include <qlayout.h> |
39 | #include <qpainter.h> | 39 | #include <qpainter.h> |
40 | 40 | ||
41 | using namespace Opie::Ui; | ||
42 | |||
41 | static int frame = 0; | 43 | static int frame = 0; |
42 | 44 | ||
43 | /** | 45 | /** |
44 | * This will construct a modal dialog. | 46 | * This will construct a modal dialog. |
45 | * | 47 | * |
46 | * The default timer length is 10. | 48 | * The default timer length is 10. |
diff --git a/libopie2/opieui/owait.h b/libopie2/opieui/owait.h index 3267064..03c33e4 100644 --- a/libopie2/opieui/owait.h +++ b/libopie2/opieui/owait.h | |||
@@ -34,12 +34,15 @@ | |||
34 | /* QT */ | 34 | /* QT */ |
35 | #include <qdialog.h> | 35 | #include <qdialog.h> |
36 | #include <qlabel.h> | 36 | #include <qlabel.h> |
37 | #include <qpixmap.h> | 37 | #include <qpixmap.h> |
38 | #include <qtimer.h> | 38 | #include <qtimer.h> |
39 | 39 | ||
40 | |||
41 | namespace Opie { | ||
42 | namespace Ui { | ||
40 | /** | 43 | /** |
41 | * This class displays a animated waiting icon in the middle of the screen. | 44 | * This class displays a animated waiting icon in the middle of the screen. |
42 | * | 45 | * |
43 | * @short modal hour glass dialog | 46 | * @short modal hour glass dialog |
44 | * @see QDialog | 47 | * @see QDialog |
45 | * @author Maximilian Reiß | 48 | * @author Maximilian Reiß |
@@ -79,8 +82,9 @@ class OWait : public QDialog | |||
79 | QTimer *m_waitTimer; | 82 | QTimer *m_waitTimer; |
80 | int m_timerLength; | 83 | int m_timerLength; |
81 | int m_aniSize; | 84 | int m_aniSize; |
82 | class Private; | 85 | class Private; |
83 | Private *d; | 86 | Private *d; |
84 | }; | 87 | }; |
85 | 88 | } | |
89 | } | ||
86 | #endif | 90 | #endif |