summaryrefslogtreecommitdiff
path: root/libopie2/opieui
Unidiff
Diffstat (limited to 'libopie2/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/obigscreen_p.h9
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp13
-rw-r--r--libopie2/opieui/big-screen/osplitter.h15
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp9
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.h7
-rw-r--r--libopie2/opieui/fileselector/ofiledialog.cpp2
-rw-r--r--libopie2/opieui/fileselector/ofiledialog.h7
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp9
-rw-r--r--libopie2/opieui/fileselector/ofileselector.h19
-rw-r--r--libopie2/opieui/fileselector/ofileselector_p.h10
-rw-r--r--libopie2/opieui/fileselector/ofileview.h9
-rw-r--r--libopie2/opieui/oclickablelabel.cpp2
-rw-r--r--libopie2/opieui/oclickablelabel.h7
-rw-r--r--libopie2/opieui/odialog.cpp2
-rw-r--r--libopie2/opieui/odialog.h5
-rw-r--r--libopie2/opieui/ofontselector.cpp19
-rw-r--r--libopie2/opieui/ofontselector.h12
-rw-r--r--libopie2/opieui/oimageeffect.cpp7
-rw-r--r--libopie2/opieui/oimageeffect.h5
-rw-r--r--libopie2/opieui/olistview.cpp7
-rw-r--r--libopie2/opieui/olistview.h25
-rw-r--r--libopie2/opieui/opieui.pro3
-rw-r--r--libopie2/opieui/opixmapeffect.cpp2
-rw-r--r--libopie2/opieui/opixmapeffect.h6
-rw-r--r--libopie2/opieui/opixmapprovider.cpp2
-rw-r--r--libopie2/opieui/opixmapprovider.h8
-rw-r--r--libopie2/opieui/opopupmenu.cpp3
-rw-r--r--libopie2/opieui/opopupmenu.h5
-rw-r--r--libopie2/opieui/oselector.cpp18
-rw-r--r--libopie2/opieui/oselector.h5
-rw-r--r--libopie2/opieui/oseparator.cpp2
-rw-r--r--libopie2/opieui/oseparator.h5
-rw-r--r--libopie2/opieui/otabbar.cpp2
-rw-r--r--libopie2/opieui/otabbar.h7
-rw-r--r--libopie2/opieui/otabinfo.h7
-rw-r--r--libopie2/opieui/otabwidget.cpp2
-rw-r--r--libopie2/opieui/otabwidget.h8
-rw-r--r--libopie2/opieui/otaskbarapplet.cpp52
-rw-r--r--libopie2/opieui/otaskbarapplet.h49
-rw-r--r--libopie2/opieui/otimepicker.cpp15
-rw-r--r--libopie2/opieui/otimepicker.h19
-rw-r--r--libopie2/opieui/otimepickerbase.ui38
-rw-r--r--libopie2/opieui/oversatileview.cpp43
-rw-r--r--libopie2/opieui/oversatileview.h83
-rw-r--r--libopie2/opieui/oversatileviewitem.cpp2
-rw-r--r--libopie2/opieui/oversatileviewitem.h5
-rw-r--r--libopie2/opieui/owait.cpp2
-rw-r--r--libopie2/opieui/owait.h6
48 files changed, 378 insertions, 221 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
@@ -6,8 +6,9 @@
6 6
7class QWidget; 7class QWidget;
8 8
9namespace Opie 9namespace Opie {
10{ 10namespace Ui {
11namespace Private{
11 12
12struct OSplitterContainer 13struct OSplitterContainer
13{ 14{
@@ -23,6 +24,8 @@ struct OSplitterContainer
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
@@ -35,7 +35,8 @@
35#include <qvaluelist.h> 35#include <qvaluelist.h>
36#include <qvbox.h> 36#include <qvbox.h>
37 37
38using namespace Opie; 38using namespace Opie::Ui;
39using namespace Opie::Ui::Private;
39 40
40/** 41/**
41 * 42 *
@@ -168,7 +169,7 @@ void OSplitter::addWidget( OSplitter* split )
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 }
@@ -213,7 +214,7 @@ void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& lab
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;
@@ -396,7 +397,7 @@ void OSplitter::resizeEvent( QResizeEvent* res )
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 */
399void OSplitter::addToTab( const Opie::OSplitterContainer& con ) 400void 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) );
@@ -410,7 +411,7 @@ void OSplitter::addToTab( const Opie::OSplitterContainer& con )
410/* 411/*
411 * adds a container to the box 412 * adds a container to the box
412 */ 413 */
413void OSplitter::addToBox( const Opie::OSplitterContainer& con ) 414void 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) );
@@ -545,7 +546,7 @@ void OSplitter::commonChangeBox()
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);
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
@@ -23,7 +23,7 @@
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#ifndef OSPLITTER_H 29#ifndef OSPLITTER_H
@@ -48,8 +48,8 @@ class QHBox;
48 * -allow inserting at a position 48 * -allow inserting at a position
49 */ 49 */
50 50
51namespace Opie 51namespace Opie{
52{ 52namespace Ui {
53class OTabWidget; 53class OTabWidget;
54 54
55/** 55/**
@@ -73,7 +73,7 @@ class OSplitter : public QFrame
73{ 73{
74 Q_OBJECT 74 Q_OBJECT
75public: 75public:
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();
@@ -124,8 +124,8 @@ private:
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();
@@ -145,6 +145,7 @@ private:
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
@@ -32,11 +32,11 @@
32#include <qapplication.h> 32#include <qapplication.h>
33#include <qwidgetstack.h> 33#include <qwidgetstack.h>
34 34
35namespace { 35namespace Opie {
36namespace Ui {
36 const int mode_size = 330; 37 const int mode_size = 330;
37}
38 38
39using 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
@@ -433,3 +433,6 @@ void OWidgetStack::switchTop() {
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
@@ -35,8 +35,8 @@
35 35
36class QWidgetStack; 36class QWidgetStack;
37 37
38namespace Opie 38namespace Opie {
39{ 39namespace 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
@@ -127,6 +127,7 @@ 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
@@ -39,7 +39,7 @@
39#include <qapplication.h> 39#include <qapplication.h>
40#include <qlayout.h> 40#include <qlayout.h>
41 41
42using namespace Opie; 42using namespace Opie::Ui;
43 43
44namespace 44namespace
45{ 45{
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
@@ -35,8 +35,8 @@
35/* QT */ 35/* QT */
36#include <qdialog.h> 36#include <qdialog.h>
37 37
38namespace Opie 38namespace Opie {
39{ 39namespace Ui {
40 40
41/** 41/**
42 * This class places a OFileSelector inside a QDialog. 42 * This class places a OFileSelector inside a QDialog.
@@ -104,6 +104,7 @@ private slots:
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
@@ -55,8 +55,11 @@
55#include <qregexp.h> 55#include <qregexp.h>
56#include <qobjectlist.h> 56#include <qobjectlist.h>
57 57
58using namespace Opie; 58using namespace Opie::Ui::Private;
59 59
60namespace Opie {
61namespace Ui {
62namespace Private {
60OFileViewInterface::OFileViewInterface( OFileSelector* selector ) 63OFileViewInterface::OFileViewInterface( OFileSelector* selector )
61 : m_selector( selector ) 64 : m_selector( selector )
62{} 65{}
@@ -810,6 +813,8 @@ void OFileViewFileSystem::activate( const QString& str)
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
@@ -1164,3 +1169,5 @@ void OFileSelector::setNameVisible( bool b )
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
@@ -52,11 +52,13 @@ class QHBox;
52 52
53typedef QMap<QString, QStringList> MimeTypes; 53typedef QMap<QString, QStringList> MimeTypes;
54 54
55namespace Opie 55namespace Opie {
56{ 56namespace Ui {
57 57
58namespace Private {
58class OFileViewInterface; 59class OFileViewInterface;
59class OFileViewFileListView; 60class OFileViewFileListView;
61}
60 62
61 63
62/** 64/**
@@ -73,8 +75,8 @@ class OFileViewFileListView;
73class OFileSelector : public QWidget 75class 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
79public: 81public:
80 /** 82 /**
@@ -185,13 +187,13 @@ 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
@@ -214,6 +216,7 @@ private slots:
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
@@ -56,10 +56,10 @@ typedef QMap<QString, QStringList> MimeTypes;
56class QFileInfo; 56class QFileInfo;
57class QToolButton; 57class QToolButton;
58 58
59namespace Opie 59namespace Opie{
60{ 60namespace Ui{
61
62class OFileSelector; 61class OFileSelector;
62namespace Private {
63 63
64class OFileViewInterface 64class OFileViewInterface
65{ 65{
@@ -186,6 +186,8 @@ 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
@@ -37,8 +37,9 @@ class QFileInfo;
37class QDir; 37class QDir;
38class DocLnk; 38class DocLnk;
39 39
40namespace Opie 40namespace Opie {
41{ 41namespace Ui {
42namespace Private {
42 43
43/** 44/**
44 * A OFileView is a specialised View for the 45 * A OFileView is a specialised View for the
@@ -90,6 +91,8 @@ public:
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
@@ -29,7 +29,7 @@
29 29
30#include <opie2/oclickablelabel.h> 30#include <opie2/oclickablelabel.h>
31 31
32using namespace Opie; 32using namespace Opie::Ui;
33 33
34/** 34/**
35 * This constructs the clickable ButtonLabel 35 * This constructs the clickable ButtonLabel
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
@@ -33,8 +33,8 @@
33/* QT */ 33/* QT */
34#include <qlabel.h> 34#include <qlabel.h>
35 35
36namespace Opie 36namespace Opie{
37{ 37namespace 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
@@ -98,6 +98,7 @@ 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
@@ -32,6 +32,8 @@
32 32
33#warning Make Margin and Spacing device dependend and configurable! 33#warning Make Margin and Spacing device dependend and configurable!
34 34
35using namespace Opie::Ui;
36
35int ODialog::mMarginSize = 5; 37int ODialog::mMarginSize = 5;
36int ODialog::mSpacingSize = 2; 38int ODialog::mSpacingSize = 2;
37 39
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
@@ -55,6 +55,9 @@ class QLayoutItem;
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
58namespace Opie {
59namespace Ui {
60
58class ODialog : public QDialog 61class ODialog : public QDialog
59{ 62{
60 Q_OBJECT 63 Q_OBJECT
@@ -88,4 +91,6 @@ class ODialog : public QDialog
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
@@ -38,10 +38,10 @@
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qmultilineedit.h> 39#include <qmultilineedit.h>
40 40
41using namespace Opie;
42 41
43namespace Opie 42namespace Opie {
44{ 43namespace Ui {
44namespace Private {
45 45
46class OFontSelectorPrivate 46class OFontSelectorPrivate
47{ 47{
@@ -56,11 +56,6 @@ public:
56 FontDatabase m_fdb; 56 FontDatabase m_fdb;
57}; 57};
58 58
59};
60
61namespace
62{
63
64class FontListItem : public QListBoxText 59class FontListItem : public QListBoxText
65{ 60{
66public: 61public:
@@ -95,7 +90,13 @@ private:
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
98using namespace Opie::Ui;
99using namespace Opie::Ui::Private;
99 100
100static int findItemCB( QComboBox *box, const QString &str ) 101static int findItemCB( QComboBox *box, const QString &str )
101{ 102{
@@ -107,7 +108,6 @@ static int findItemCB( QComboBox *box, const QString &str )
107 return -1; 108 return -1;
108} 109}
109 110
110}
111/* static same as anon. namespace */ 111/* static same as anon. namespace */
112static int qt_version() 112static int qt_version()
113{ 113{
@@ -426,3 +426,4 @@ void OFontSelector::resizeEvent ( QResizeEvent *re )
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
@@ -35,10 +35,11 @@
35 35
36class QListBox; 36class QListBox;
37 37
38namespace Opie 38namespace Opie {
39{ 39namespace Ui {
40 40namespace Private {
41class OFontSelectorPrivate; 41class 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.
@@ -95,10 +96,11 @@ private:
95 void changeFont ( ); 96 void changeFont ( );
96 97
97private: 98private:
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
@@ -41,6 +41,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41#define DegreesToRadians(x) ((x)*M_PI/180.0) 41#define DegreesToRadians(x) ((x)*M_PI/180.0)
42 42
43using namespace std; 43using namespace std;
44using namespace Opie::Core;
45
46namespace Opie {
47namespace Ui {
44 48
45inline unsigned int intensityValue(unsigned int color) 49inline unsigned int intensityValue(unsigned int color)
46{ 50{
@@ -3765,4 +3769,5 @@ void OImageEffect::contrastHSV(QImage &img, bool sharpen)
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
@@ -39,6 +39,8 @@ class QImage;
39class QSize; 39class QSize;
40class QColor; 40class QColor;
41 41
42namespace Opie {
43namespace 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 *
@@ -556,4 +558,7 @@ private:
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
@@ -36,6 +36,11 @@
36#include <opie2/odebug.h> 36#include <opie2/odebug.h>
37#include <opie2/olistview.h> 37#include <opie2/olistview.h>
38 38
39using namespace Opie::Core;
40
41
42namespace Opie {
43namespace Ui {
39/*====================================================================================== 44/*======================================================================================
40 * OListView 45 * OListView
41 *======================================================================================*/ 46 *======================================================================================*/
@@ -755,3 +760,5 @@ ONamedListViewItem* ONamedListViewItem::find( const QString& column, const QStri
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
@@ -36,6 +36,9 @@
36#include <qdatastream.h> 36#include <qdatastream.h>
37#include <qstringlist.h> 37#include <qstringlist.h>
38 38
39
40namespace Opie {
41namespace Ui {
39class OListViewItem; 42class OListViewItem;
40 43
41 44
@@ -54,6 +57,7 @@ class OListViewItem;
54 */ 57 */
55class OListView: public QListView 58class OListView: public QListView
56{ 59{
60 Q_OBJECT
57 public: 61 public:
58 /** 62 /**
59 * Constructor. 63 * Constructor.
@@ -139,8 +143,10 @@ class OListView: public QListView
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
@@ -242,8 +248,10 @@ class OListViewItem: public QListViewItem
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
@@ -354,6 +362,9 @@ class ONamedListView: public OListView
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/*======================================================================================
@@ -403,7 +414,13 @@ class ONamedListViewItem: public OListViewItem
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
@@ -6,11 +6,9 @@ HEADERS = oclickablelabel.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 \
@@ -31,7 +29,6 @@ SOURCES = oclickablelabel.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 \
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
@@ -17,6 +17,8 @@
17#include <opie2/opixmapeffect.h> 17#include <opie2/opixmapeffect.h>
18#include <opie2/oimageeffect.h> 18#include <opie2/oimageeffect.h>
19 19
20
21using namespace Opie::Ui;
20//====================================================================== 22//======================================================================
21// 23//
22// Gradient effects 24// Gradient effects
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
@@ -15,6 +15,9 @@
15typedef QPixmap OPixmap; 15typedef QPixmap OPixmap;
16class QColor; 16class QColor;
17 17
18
19namespace Opie {
20namespace Ui {
18/** 21/**
19 * This class includes various pixmap-based graphical effects. 22 * This class includes various pixmap-based graphical effects.
20 * 23 *
@@ -210,6 +213,7 @@ public:
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
@@ -20,6 +20,8 @@
20 20
21#include <opie2/opixmapprovider.h> 21#include <opie2/opixmapprovider.h>
22 22
23using namespace Opie::Ui;
24
23OPixmapProvider::~OPixmapProvider() {} 25OPixmapProvider::~OPixmapProvider() {}
24 26
25void OPixmapProvider::virtual_hook( int , void* ) 27void OPixmapProvider::virtual_hook( int , void* )
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
@@ -23,7 +23,10 @@
23 23
24#include <qpixmap.h> 24#include <qpixmap.h>
25 25
26namespace Opie {
27namespace 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 *
@@ -48,7 +51,12 @@ public:
48 virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0; 51 virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0;
49protected: 52protected:
50 virtual void virtual_hook( int id, void* data ); 53 virtual void virtual_hook( int id, void* data );
54private:
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
@@ -27,6 +27,9 @@
27#include <opie2/opopupmenu.h> 27#include <opie2/opopupmenu.h>
28#include <opie2/oconfig.h> 28#include <opie2/oconfig.h>
29 29
30using namespace Opie::Core;
31using namespace Opie::Ui;
32
30OPopupTitle::OPopupTitle(QWidget *parent, const char *name) 33OPopupTitle::OPopupTitle(QWidget *parent, const char *name)
31 : QWidget(parent, name) 34 : QWidget(parent, name)
32{ 35{
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
@@ -31,6 +31,8 @@
31 31
32#include <opie2/opixmapeffect.h> 32#include <opie2/opixmapeffect.h>
33 33
34namespace Opie {
35namespace Ui {
34/** 36/**
35 * Title widget for use in @ref OPopupMenu. 37 * Title widget for use in @ref OPopupMenu.
36 * 38 *
@@ -256,4 +258,7 @@ private:
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
@@ -36,6 +36,8 @@
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
39using namespace Opie::Ui;
40
39OXYSelector::OXYSelector( QWidget *parent, const char *name ) 41OXYSelector::OXYSelector( QWidget *parent, const char *name )
40 : QWidget( parent, name ) 42 : QWidget( parent, name )
41{ 43{
@@ -73,7 +75,7 @@ void OXYSelector::setValues( int _xPos, int _yPos )
73 xPos = maxX; 75 xPos = maxX;
74 else if ( xPos < minX ) 76 else if ( xPos < minX )
75 xPos = minX; 77 xPos = minX;
76 78
77 if ( yPos > maxY ) 79 if ( yPos > maxY )
78 yPos = maxY; 80 yPos = maxY;
79 else if ( yPos < minY ) 81 else if ( yPos < minY )
@@ -258,7 +260,7 @@ void OSelector::paintEvent( QPaintEvent * )
258 } 260 }
259 261
260 QPoint pos = calcArrowPos( value() ); 262 QPoint pos = calcArrowPos( value() );
261 drawArrow( &painter, TRUE, pos ); 263 drawArrow( &painter, TRUE, pos );
262 264
263 painter.end(); 265 painter.end();
264} 266}
@@ -288,10 +290,10 @@ void OSelector::valueChange()
288 painter.begin( this ); 290 painter.begin( this );
289 291
290 pos = calcArrowPos( prevValue() ); 292 pos = calcArrowPos( prevValue() );
291 drawArrow( &painter, FALSE, pos ); 293 drawArrow( &painter, FALSE, pos );
292 294
293 pos = calcArrowPos( value() ); 295 pos = calcArrowPos( value() );
294 drawArrow( &painter, TRUE, pos ); 296 drawArrow( &painter, TRUE, pos );
295 297
296 painter.end(); 298 painter.end();
297} 299}
@@ -361,8 +363,8 @@ void OSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
361 } 363 }
362 364
363 painter->drawPolygon( array ); 365 painter->drawPolygon( array );
364 } 366 }
365 else 367 else
366 { 368 {
367 if ( orientation() == Vertical ) 369 if ( orientation() == Vertical )
368 { 370 {
@@ -400,7 +402,7 @@ void OGradientSelector::init()
400{ 402{
401 color1.setRgb( 0, 0, 0 ); 403 color1.setRgb( 0, 0, 0 );
402 color2.setRgb( 255, 255, 255 ); 404 color2.setRgb( 255, 255, 255 );
403 405
404 text1 = text2 = ""; 406 text1 = text2 = "";
405} 407}
406 408
@@ -472,7 +474,7 @@ void OGradientSelector::drawContents( QPainter *painter )
472 painter->drawText( xPos, yPos, text2 ); 474 painter->drawText( xPos, yPos, text2 );
473 475
474 yPos = contentsRect().bottom() - painter->fontMetrics().descent() - 2; 476 yPos = contentsRect().bottom() - painter->fontMetrics().descent() - 2;
475 xPos = contentsRect().left() + (contentsRect().width() - 477 xPos = contentsRect().left() + (contentsRect().width() -
476 painter->fontMetrics().width( text1 )) / 2; 478 painter->fontMetrics().width( text1 )) / 2;
477 pen.setColor( color1 ); 479 pen.setColor( color1 );
478 painter->setPen( pen ); 480 painter->setPen( pen );
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
@@ -27,6 +27,9 @@
27#include <qrangecontrol.h> 27#include <qrangecontrol.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29 29
30
31namespace Opie {
32namespace 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
@@ -512,6 +515,8 @@ private:
512 OColorPrivate *d; 515 OColorPrivate *d;
513}; 516};
514 517
518}
519}
515 520
516 521
517 #endif // __OSELECT_H__ 522 #endif // __OSELECT_H__
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
@@ -36,6 +36,8 @@
36 36
37/* QT */ 37/* QT */
38 38
39using namespace Opie::Core;
40using namespace Opie::Ui;
39 41
40OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) 42OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f)
41 : QFrame(parent, name, f) 43 : QFrame(parent, name, f)
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
@@ -35,6 +35,9 @@
35 35
36#include <qframe.h> 36#include <qframe.h>
37 37
38namespace Opie {
39namespace Ui {
40
38/** 41/**
39 * Standard horizontal or vertical separator. 42 * Standard horizontal or vertical separator.
40 * 43 *
@@ -86,5 +89,7 @@ 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
@@ -31,7 +31,7 @@
31 31
32#include <opie2/otabbar.h> 32#include <opie2/otabbar.h>
33 33
34using namespace Opie; 34using namespace Opie::Ui;
35 35
36OTabBar::OTabBar( QWidget *parent , const char *name ) 36OTabBar::OTabBar( QWidget *parent , const char *name )
37 :QTabBar( parent, name ) 37 :QTabBar( parent, name )
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
@@ -35,8 +35,8 @@
35/* QT */ 35/* QT */
36#include <qtabbar.h> 36#include <qtabbar.h>
37 37
38namespace Opie 38namespace Opie {
39{ 39namespace Ui {
40 40
41/** 41/**
42 * @class OTabBar 42 * @class OTabBar
@@ -80,6 +80,7 @@ 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
@@ -38,8 +38,8 @@
38 38
39class QWidget; 39class QWidget;
40 40
41namespace Opie 41namespace Opie{
42{ 42namespace Ui {
43 43
44/** 44/**
45 * @class OTabInfo 45 * @class OTabInfo
@@ -135,6 +135,7 @@ private:
135 */ 135 */
136typedef QList<OTabInfo> OTabInfoList; 136typedef 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
@@ -41,7 +41,7 @@
41#include <qcombobox.h> 41#include <qcombobox.h>
42#include <qwidgetstack.h> 42#include <qwidgetstack.h>
43 43
44using namespace Opie; 44using namespace Opie::Ui;
45 45
46OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p ) 46OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPosition p )
47 : QWidget( parent, name ) 47 : QWidget( parent, name )
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
@@ -38,15 +38,14 @@
38#include <qwidget.h> 38#include <qwidget.h>
39#include <qlist.h> 39#include <qlist.h>
40 40
41using namespace Opie;
42 41
43class QComboBox; 42class QComboBox;
44class QPixmap; 43class QPixmap;
45class QTabBar; 44class QTabBar;
46class QWidgetStack; 45class QWidgetStack;
47 46
48namespace Opie 47namespace Opie {
49{ 48namespace Ui {
50 49
51class OTabBar; 50class OTabBar;
52 51
@@ -287,6 +286,7 @@ private:
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
@@ -28,5 +28,55 @@
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
36using 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 */
64OTaskbarApplet::OTaskbarApplet( QWidget* parent, const char* name )
65 :QWidget( parent, name ){
66 setFixedHeight( 18 );
67 setFixedWidth( 14 );
68}
69
70OTaskbarApplet::~OTaskbarApplet(){
71}
72
73void 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
@@ -33,11 +33,20 @@
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
40class QMouseEvent;
41
42namespace Opie {
43namespace Ui {
44namespace Private {
37/*====================================================================================== 45/*======================================================================================
38 * OTaskbarAppletWrapper 46 * OTaskbarAppletWrapper
39 *======================================================================================*/ 47 *======================================================================================*/
40 48
49class OTaskbarAppletWrapperPrivate;
41template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface 50template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface
42{ 51{
43 public: 52 public:
@@ -80,14 +89,10 @@ template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface
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
89class QMouseEvent;
90
91/*====================================================================================== 96/*======================================================================================
92 * OTaskbarApplet 97 * OTaskbarApplet
93 *======================================================================================*/ 98 *======================================================================================*/
@@ -103,28 +108,22 @@ class QMouseEvent;
103class OTaskbarApplet : public QWidget 108class 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
112 virtual ~OTaskbarApplet()
113 {
114 }
115 113
116 protected: 114 protected:
117 virtual void popup( QWidget* widget ) 115 virtual void popup( QWidget* widget );
118 { 116private:
119 QPoint curPos = mapToGlobal( QPoint( 0, 0 ) ); 117 class Private;
120 int w = widget->sizeHint().width(); 118 Private *d;
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 }
127}; 119};
120}
121}
122
123#define EXPORT_OPIE_APPLET_v1( AppLet ) \
124 Q_EXPORT_INTERFACE() { \
125 Q_CREATE_INSTANCE( Opie::Ui::Private::OTaskbarAppletWrapper<AppLet> ) \
126 }
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
@@ -27,14 +27,18 @@
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
37using namespace Opie; 39
40namespace Opie {
41namespace Ui {
38 42
39/** 43/**
40 * Constructs the widget 44 * Constructs the widget
@@ -220,6 +224,8 @@ void OTimePicker::setHour(int h)
220OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) 224OTimePickerDialog::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&) ) );
@@ -290,3 +296,6 @@ void OTimePickerDialog::setMinute ( const QString& minute )
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
@@ -32,7 +32,7 @@
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>
@@ -40,10 +40,9 @@
40#include <qdatetime.h> 40#include <qdatetime.h>
41#include <qdialog.h> 41#include <qdialog.h>
42 42
43using namespace Opie;
44 43
45// namespace Opie 44namespace Opie {
46// { 45namespace 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
@@ -56,7 +55,7 @@ using namespace Opie;
56 * @see QTime 55 * @see QTime
57 * @author Hakan Ardo, Stefan Eilers 56 * @author Hakan Ardo, Stefan Eilers
58 */ 57 */
59class OTimePicker: public QWidget 58class OTimePicker : public QWidget
60{ 59{
61 Q_OBJECT 60 Q_OBJECT
62 61
@@ -114,12 +113,20 @@ public slots:
114 void setMinute( const QString& minute ); 113 void setMinute( const QString& minute );
115 114
116private: 115private:
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
129typedef 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
@@ -11,7 +11,7 @@
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>
@@ -249,44 +249,8 @@
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
@@ -40,6 +40,9 @@
40#include <qaction.h> 40#include <qaction.h>
41#include <qpopupmenu.h> 41#include <qpopupmenu.h>
42 42
43using namespace Opie::Core;
44using namespace Opie::Ui;
45
43/* XPM */ 46/* XPM */
44static const char * view_icon_xpm[] = { 47static const char * view_icon_xpm[] = {
45"16 16 16 1", 48"16 16 16 1",
@@ -132,15 +135,15 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode )
132 _iconview->setGridX( 90 ); 135 _iconview->setGridX( 90 );
133 _iconview->setGridY( 42 ); 136 _iconview->setGridY( 42 );
134 _iconview->setAutoArrange( true ); 137 _iconview->setAutoArrange( true );
135 138
136 #ifdef QWS // TODO: Let this depend on current geometry (rotation) 139 #ifdef QWS // TODO: Let this depend on current geometry (rotation)
137 _iconview->setArrangement( QIconView::TopToBottom ); 140 _iconview->setArrangement( QIconView::TopToBottom );
138 #else 141 #else
139 _iconview->setArrangement( QIconView::LeftToRight ); 142 _iconview->setArrangement( QIconView::LeftToRight );
140 #endif 143 #endif
141 144
142 _iconview->setResizeMode( QIconView::Adjust ); 145 _iconview->setResizeMode( QIconView::Adjust );
143 146
144 // qt-embedded: map stylus right on hold to right button press 147 // qt-embedded: map stylus right on hold to right button press
145 148
146 #ifdef QWS 149 #ifdef QWS
@@ -168,7 +171,7 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode )
168 a2->setOn( true ); 171 a2->setOn( true );
169 connect( a1, SIGNAL( activated() ), this, SLOT( setIconViewMode() ) ); 172 connect( a1, SIGNAL( activated() ), this, SLOT( setIconViewMode() ) );
170 connect( a2, SIGNAL( activated() ), this, SLOT( setTreeViewMode() ) ); 173 connect( a2, SIGNAL( activated() ), this, SLOT( setTreeViewMode() ) );
171 174
172 #if (QT_VERSION >= 0x030000) 175 #if (QT_VERSION >= 0x030000)
173 connect( _listview, SIGNAL( contextMenuRequested(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); 176 connect( _listview, SIGNAL( contextMenuRequested(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
174 connect( _iconview, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) ); 177 connect( _iconview, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) );
@@ -176,7 +179,7 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode )
176 connect( _listview, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); 179 connect( _listview, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
177 connect( _iconview, SIGNAL( rightButtonPressed(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) ); 180 connect( _iconview, SIGNAL( rightButtonPressed(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) );
178 #endif 181 #endif
179 182
180 // 183 //
181 // signal forwarders 184 // signal forwarders
182 // 185 //
@@ -185,40 +188,40 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode )
185 // type-conversion :-( 188 // type-conversion :-(
186 189
187 // common signals for listview 190 // common signals for listview
188 191
189 connect( _listview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); 192 connect( _listview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
190 connect( _listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) ) ); 193 connect( _listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) ) );
191 connect( _listview, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( currentChanged(QListViewItem*) ) ); 194 connect( _listview, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( currentChanged(QListViewItem*) ) );
192 connect( _listview, SIGNAL( clicked(QListViewItem*) ), this, SLOT( clicked(QListViewItem*) ) ); 195 connect( _listview, SIGNAL( clicked(QListViewItem*) ), this, SLOT( clicked(QListViewItem*) ) );
193 connect( _listview, SIGNAL( pressed(QListViewItem*) ), this, SLOT( pressed(QListViewItem*) ) ); 196 connect( _listview, SIGNAL( pressed(QListViewItem*) ), this, SLOT( pressed(QListViewItem*) ) );
194 197
195 connect( _listview, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( doubleClicked(QListViewItem*) ) ); 198 connect( _listview, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( doubleClicked(QListViewItem*) ) );
196 connect( _listview, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( returnPressed(QListViewItem*) ) ); 199 connect( _listview, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( returnPressed(QListViewItem*) ) );
197 200
198 connect( _listview, SIGNAL( onItem(QListViewItem*) ), this, SLOT( onItem(QListViewItem*) ) ); 201 connect( _listview, SIGNAL( onItem(QListViewItem*) ), this, SLOT( onItem(QListViewItem*) ) );
199 connect( _listview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) ); 202 connect( _listview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) );
200 203
201 // common signals for iconview 204 // common signals for iconview
202 205
203 connect( _iconview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); 206 connect( _iconview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
204 connect( _iconview, SIGNAL( selectionChanged(QIconViewItem*) ), this, SLOT( selectionChanged(QIconViewItem*) ) ); 207 connect( _iconview, SIGNAL( selectionChanged(QIconViewItem*) ), this, SLOT( selectionChanged(QIconViewItem*) ) );
205 connect( _iconview, SIGNAL( currentChanged(QIconViewItem*) ), this, SLOT( currentChanged(QIconViewItem*) ) ); 208 connect( _iconview, SIGNAL( currentChanged(QIconViewItem*) ), this, SLOT( currentChanged(QIconViewItem*) ) );
206 connect( _iconview, SIGNAL( clicked(QIconViewItem*) ), this, SLOT( clicked(QIconViewItem*) ) ); 209 connect( _iconview, SIGNAL( clicked(QIconViewItem*) ), this, SLOT( clicked(QIconViewItem*) ) );
207 connect( _iconview, SIGNAL( pressed(QIconViewItem*) ), this, SLOT( pressed(QIconViewItem*) ) ); 210 connect( _iconview, SIGNAL( pressed(QIconViewItem*) ), this, SLOT( pressed(QIconViewItem*) ) );
208 211
209 connect( _iconview, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT( doubleClicked(QIconViewItem*) ) ); 212 connect( _iconview, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT( doubleClicked(QIconViewItem*) ) );
210 connect( _iconview, SIGNAL( returnPressed(QIconViewItem*) ), this, SLOT( returnPressed(QIconViewItem*) ) ); 213 connect( _iconview, SIGNAL( returnPressed(QIconViewItem*) ), this, SLOT( returnPressed(QIconViewItem*) ) );
211 214
212 connect( _iconview, SIGNAL( onItem(QIconViewItem*) ), this, SLOT( onItem(QIconViewItem*) ) ); 215 connect( _iconview, SIGNAL( onItem(QIconViewItem*) ), this, SLOT( onItem(QIconViewItem*) ) );
213 connect( _iconview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) ); 216 connect( _iconview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) );
214 217
215 // listview only signals 218 // listview only signals
216 219
217 connect( _listview, SIGNAL( expanded(QListViewItem*) ), this, SLOT( expanded(QListViewItem*) ) ); 220 connect( _listview, SIGNAL( expanded(QListViewItem*) ), this, SLOT( expanded(QListViewItem*) ) );
218 connect( _listview, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( collapsed(QListViewItem*) ) ); 221 connect( _listview, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( collapsed(QListViewItem*) ) );
219 222
220 // iconview only signals 223 // iconview only signals
221 224
222 connect( _iconview, SIGNAL( moved() ), this, SIGNAL( moved() ) ); 225 connect( _iconview, SIGNAL( moved() ), this, SIGNAL( moved() ) );
223} 226}
224 227
@@ -420,7 +423,7 @@ void OVersatileView::returnPressed( QListViewItem * item )
420{ 423{
421 emit( returnPressed( static_cast<OVersatileViewItem*>( item ) ) ); 424 emit( returnPressed( static_cast<OVersatileViewItem*>( item ) ) );
422} 425}
423 426
424void OVersatileView::returnPressed( QIconViewItem * item ) 427void OVersatileView::returnPressed( QIconViewItem * item )
425{ 428{
426 emit( returnPressed( static_cast<OVersatileViewItem*>( item ) ) ); 429 emit( returnPressed( static_cast<OVersatileViewItem*>( item ) ) );
@@ -453,7 +456,7 @@ void OVersatileView::collapsed( QListViewItem *item ) // QListView
453//=============================================================================================// 456//=============================================================================================//
454// OVersatileView Case I - API only existing in QListView or QIconView but not in both! 457// OVersatileView Case I - API only existing in QListView or QIconView but not in both!
455//==============================================================================================// 458//==============================================================================================//
456 459
457int OVersatileView::treeStepSize() const // QListView 460int OVersatileView::treeStepSize() const // QListView
458{ 461{
459 if ( !isValidViewMode( Tree ) ) 462 if ( !isValidViewMode( Tree ) )
@@ -745,7 +748,7 @@ void OVersatileView::triggerUpdate() // QListView
745// 748//
746// only in QIconView 749// only in QIconView
747// 750//
748 751
749uint OVersatileView::count() const // QIconView 752uint OVersatileView::count() const // QIconView
750{ 753{
751 if ( !isValidViewMode( Icons ) ) 754 if ( !isValidViewMode( Icons ) )
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
@@ -45,7 +45,6 @@
45class QHeader; 45class QHeader;
46class QIconSet; 46class QIconSet;
47class QIconViewItem; 47class QIconViewItem;
48class OListView;
49class QListViewItem; 48class QListViewItem;
50class QPopupMenu; 49class QPopupMenu;
51class QString; 50class QString;
@@ -54,10 +53,14 @@ class QString;
54class QIconDragItem; 53class QIconDragItem;
55#endif 54#endif
56 55
56namespace Opie {
57namespace Ui {
58class OListView;
59
57class OVersatileView : public QWidgetStack 60class OVersatileView : public QWidgetStack
58{ 61{
59 Q_OBJECT 62 Q_OBJECT
60 63
61 friend class OVersatileViewItem; 64 friend class OVersatileViewItem;
62 65
63 //==============================================================================================// 66 //==============================================================================================//
@@ -69,23 +72,23 @@ class OVersatileView : public QWidgetStack
69 ~OVersatileView(); 72 ~OVersatileView();
70 73
71 QPopupMenu* contextMenu() const; 74 QPopupMenu* contextMenu() const;
72 75
73 void setSynchronization( bool sync ); 76 void setSynchronization( bool sync );
74 bool synchronization(); 77 bool synchronization();
75 78
76 enum ViewMode { Tree = 0, Icons }; 79 enum ViewMode { Tree = 0, Icons };
77 int viewMode(); 80 int viewMode();
78 81
79 QIconView* iconView() const; 82 QIconView* iconView() const;
80 OListView* listView() const; 83 OListView* listView() const;
81 84
82 enum WarningPolicy { None = 0, Warn, WarnReturn }; 85 enum WarningPolicy { None = 0, Warn, WarnReturn };
83 86
84 void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode 87 void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode
85 bool warningPolicy() const; 88 bool warningPolicy() const;
86 89
87 void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); 90 void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed );
88 91
89 public slots: 92 public slots:
90 void setViewMode( int mode ); 93 void setViewMode( int mode );
91 void setIconViewMode(); 94 void setIconViewMode();
@@ -94,15 +97,15 @@ class OVersatileView : public QWidgetStack
94 protected: 97 protected:
95 virtual bool isValidViewMode( int mode ) const; 98 virtual bool isValidViewMode( int mode ) const;
96 virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); 99 virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 );
97 100
98 private: 101 private:
99 int _viewmode; 102 int _viewmode;
100 bool _synchronization; 103 bool _synchronization;
101 mutable int _warningpolicy; 104 mutable int _warningpolicy;
102 105
103 OListView* _listview; 106 OListView* _listview;
104 QIconView* _iconview; 107 QIconView* _iconview;
105 108
106 QPixmap _treeleaf; 109 QPixmap _treeleaf;
107 QPixmap _treeopened; 110 QPixmap _treeopened;
108 QPixmap _treeclosed; 111 QPixmap _treeclosed;
@@ -110,19 +113,19 @@ class OVersatileView : public QWidgetStack
110 QPixmap _iconleaf; 113 QPixmap _iconleaf;
111 QPixmap _iconopened; 114 QPixmap _iconopened;
112 QPixmap _iconclosed; 115 QPixmap _iconclosed;
113 116
114 QPopupMenu* _contextmenu; 117 QPopupMenu* _contextmenu;
115 118
116 int _iconstyle; 119 int _iconstyle;
117 int _treestyle; 120 int _treestyle;
118 121
119 private slots: 122 private slots:
120 123
121 void contextMenuRequested( QListViewItem*, const QPoint&, int ); 124 void contextMenuRequested( QListViewItem*, const QPoint&, int );
122 void contextMenuRequested( QIconViewItem*, const QPoint& ); 125 void contextMenuRequested( QIconViewItem*, const QPoint& );
123 126
124 // type converting signal forwarders 127 // type converting signal forwarders
125 128
126 void selectionChanged( QListViewItem * ); 129 void selectionChanged( QListViewItem * );
127 void currentChanged( QListViewItem * ); 130 void currentChanged( QListViewItem * );
128 void clicked( QListViewItem * ); 131 void clicked( QListViewItem * );
@@ -130,7 +133,7 @@ class OVersatileView : public QWidgetStack
130 void doubleClicked( QListViewItem * ); 133 void doubleClicked( QListViewItem * );
131 void returnPressed( QListViewItem * ); 134 void returnPressed( QListViewItem * );
132 void onItem( QListViewItem * ); 135 void onItem( QListViewItem * );
133 136
134 void selectionChanged( QIconViewItem * ); 137 void selectionChanged( QIconViewItem * );
135 void currentChanged( QIconViewItem * ); 138 void currentChanged( QIconViewItem * );
136 void clicked( QIconViewItem * ); 139 void clicked( QIconViewItem * );
@@ -138,14 +141,14 @@ class OVersatileView : public QWidgetStack
138 void doubleClicked( QIconViewItem * ); 141 void doubleClicked( QIconViewItem * );
139 void returnPressed( QIconViewItem * ); 142 void returnPressed( QIconViewItem * );
140 void onItem( QIconViewItem * ); 143 void onItem( QIconViewItem * );
141 144
142 void expanded( QListViewItem * item ); // QListView 145 void expanded( QListViewItem * item ); // QListView
143 void collapsed( QListViewItem * item ); // QListView 146 void collapsed( QListViewItem * item ); // QListView
144 147
145 signals: 148 signals:
146 149
147 void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); 150 void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col );
148 151
149 /*#ifndef QT_NO_DRAGANDDROP 152 /*#ifndef QT_NO_DRAGANDDROP
150 void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView 153 void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView
151 #endif 154 #endif
@@ -173,11 +176,11 @@ public:
173 Right 176 Right
174 }; 177 };
175 */ 178 */
176 179
177 // 180 //
178 // only in QListView 181 // only in QListView
179 // 182 //
180 183
181 int treeStepSize() const; // QListView 184 int treeStepSize() const; // QListView
182 virtual void setTreeStepSize( int ); // QListView 185 virtual void setTreeStepSize( int ); // QListView
183 186
@@ -226,7 +229,7 @@ public:
226 229
227 void setShowSortIndicator( bool show ); // QListView 230 void setShowSortIndicator( bool show ); // QListView
228 bool showSortIndicator() const; // QListView 231 bool showSortIndicator() const; // QListView
229 232
230 int index( const OVersatileViewItem *item ) const; // QIconView 233 int index( const OVersatileViewItem *item ) const; // QIconView
231 234
232 public slots: 235 public slots:
@@ -240,9 +243,9 @@ public:
240 // only in QIconView 243 // only in QIconView
241 // 244 //
242 245
243 public: 246 public:
244 uint count() const; // QIconView 247 uint count() const; // QIconView
245 248
246 OVersatileViewItem *firstItem() const; // QIconView 249 OVersatileViewItem *firstItem() const; // QIconView
247 OVersatileViewItem *lastItem() const; // QIconView 250 OVersatileViewItem *lastItem() const; // QIconView
248 251
@@ -287,7 +290,7 @@ public:
287 virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView 290 virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView
288 virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView 291 virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView
289 virtual void updateContents(); // QIconView 292 virtual void updateContents(); // QIconView
290 293
291 signals: 294 signals:
292 /*#ifndef QT_NO_DRAGANDDROP 295 /*#ifndef QT_NO_DRAGANDDROP
293 void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView 296 void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView
@@ -322,7 +325,7 @@ public:
322 virtual void selectAll( bool select ); 325 virtual void selectAll( bool select );
323 virtual void clearSelection(); 326 virtual void clearSelection();
324 virtual void invertSelection(); 327 virtual void invertSelection();
325 328
326 void ensureItemVisible( const OVersatileViewItem * ); 329 void ensureItemVisible( const OVersatileViewItem * );
327 virtual void repaintItem( const OVersatileViewItem * ) const; 330 virtual void repaintItem( const OVersatileViewItem * ) const;
328 331
@@ -344,16 +347,16 @@ public:
344 347
345 void doubleClicked( OVersatileViewItem * ); 348 void doubleClicked( OVersatileViewItem * );
346 void returnPressed( OVersatileViewItem * ); 349 void returnPressed( OVersatileViewItem * );
347 350
348 void onItem( OVersatileViewItem * ); 351 void onItem( OVersatileViewItem * );
349 void onViewport(); 352 void onViewport();
350 353
351 //==============================================================================================// 354 //==============================================================================================//
352 // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures 355 // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures
353 //==============================================================================================// 356 //==============================================================================================//
354 357
355 /* 358 /*
356 359
357 public: 360 public:
358 virtual void insertItem( OVersatileViewItem * ); // QListView 361 virtual void insertItem( OVersatileViewItem * ); // QListView
359 virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView 362 virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView
@@ -368,27 +371,29 @@ public:
368 virtual void sort( bool ascending = TRUE ); // QIconView 371 virtual void sort( bool ascending = TRUE ); // QIconView
369 372
370 */ 373 */
371 374
372 signals: 375 signals:
373 void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView 376 void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView
374 void clicked( OVersatileViewItem *, const QPoint & ); // QIconView 377 void clicked( OVersatileViewItem *, const QPoint & ); // QIconView
375 378
376 void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView 379 void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView
377 void pressed( OVersatileViewItem *, const QPoint & ); // QIconView 380 void pressed( OVersatileViewItem *, const QPoint & ); // QIconView
378 381
379 void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView 382 void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView
380 void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView 383 void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView
381 384
382 void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView 385 void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView
383 void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView 386 void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView
384 387
385 void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView 388 void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView
386 void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView 389 void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView
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
@@ -31,6 +31,8 @@
31#include <opie2/oversatileviewitem.h> 31#include <opie2/oversatileviewitem.h>
32#include <opie2/oversatileview.h> 32#include <opie2/oversatileview.h>
33 33
34using namespace Opie::Ui;
35
34OVersatileViewItem::OVersatileViewItem( OVersatileView * parent ) 36OVersatileViewItem::OVersatileViewItem( OVersatileView * parent )
35 :OListViewItem( parent->_listview ), QIconViewItem( parent->_iconview ), 37 :OListViewItem( parent->_listview ), QIconViewItem( parent->_iconview ),
36 _versatileview( parent ) 38 _versatileview( parent )
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
@@ -40,6 +40,9 @@
40 40
41#include <opie2/olistview.h> 41#include <opie2/olistview.h>
42 42
43namespace Opie {
44namespace Ui {
45
43class OVersatileView; 46class OVersatileView;
44 47
45class OVersatileViewItem : public OListViewItem, public QIconViewItem 48class OVersatileViewItem : public OListViewItem, public QIconViewItem
@@ -97,4 +100,6 @@ class OVersatileViewItem : public OListViewItem, public QIconViewItem
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
@@ -38,6 +38,8 @@
38#include <qlayout.h> 38#include <qlayout.h>
39#include <qpainter.h> 39#include <qpainter.h>
40 40
41using namespace Opie::Ui;
42
41static int frame = 0; 43static int frame = 0;
42 44
43/** 45/**
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
@@ -37,6 +37,9 @@
37#include <qpixmap.h> 37#include <qpixmap.h>
38#include <qtimer.h> 38#include <qtimer.h>
39 39
40
41namespace Opie {
42namespace 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 *
@@ -82,5 +85,6 @@ class OWait : public QDialog
82 class Private; 85 class Private;
83 Private *d; 86 Private *d;
84}; 87};
85 88}
89}
86#endif 90#endif