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/big-screen | |
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
-rw-r--r-- | libopie2/opieui/big-screen/obigscreen_p.h | 9 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/osplitter.cpp | 13 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/osplitter.h | 13 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/owidgetstack.cpp | 9 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/owidgetstack.h | 7 |
5 files changed, 30 insertions, 21 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 |