-rw-r--r-- | core/pim/today/today.cpp | 5 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 8 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index d8b427d..901a61a 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -24,25 +24,25 @@ | |||
24 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/contact.h> | 26 | #include <qpe/contact.h> |
27 | 27 | ||
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qpixmap.h> | 33 | #include <qpixmap.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qtabwidget.h> | 36 | #include <opie/otabwidget.h> |
37 | #include <qdialog.h> | 37 | #include <qdialog.h> |
38 | 38 | ||
39 | 39 | ||
40 | struct TodayPlugin { | 40 | struct TodayPlugin { |
41 | QLibrary *library; | 41 | QLibrary *library; |
42 | TodayPluginInterface *iface; | 42 | TodayPluginInterface *iface; |
43 | TodayPluginObject *guiPart; | 43 | TodayPluginObject *guiPart; |
44 | QWidget *guiBox; | 44 | QWidget *guiBox; |
45 | QString name; | 45 | QString name; |
46 | bool active; | 46 | bool active; |
47 | int pos; | 47 | int pos; |
48 | }; | 48 | }; |
@@ -251,25 +251,26 @@ void Today::startConfig() { | |||
251 | TodayConfig conf( this, "dialog", true ); | 251 | TodayConfig conf( this, "dialog", true ); |
252 | 252 | ||
253 | TodayPlugin plugin; | 253 | TodayPlugin plugin; |
254 | QList<ConfigWidget> configWidgetList; | 254 | QList<ConfigWidget> configWidgetList; |
255 | 255 | ||
256 | for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) { | 256 | for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) { |
257 | plugin = pluginList[i]; | 257 | plugin = pluginList[i]; |
258 | 258 | ||
259 | // load the config widgets in the tabs | 259 | // load the config widgets in the tabs |
260 | if ( plugin.guiPart->configWidget( this ) != 0l ) { | 260 | if ( plugin.guiPart->configWidget( this ) != 0l ) { |
261 | ConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); | 261 | ConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); |
262 | configWidgetList.append( widget ); | 262 | configWidgetList.append( widget ); |
263 | conf.TabWidget3->insertTab( widget, plugin.guiPart->appName() ); | 263 | conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig() |
264 | , plugin.guiPart->appName() ); | ||
264 | } | 265 | } |
265 | // set the order/activate tab | 266 | // set the order/activate tab |
266 | conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), | 267 | conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), |
267 | Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); | 268 | Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); |
268 | } | 269 | } |
269 | 270 | ||
270 | if ( conf.exec() == QDialog::Accepted ) { | 271 | if ( conf.exec() == QDialog::Accepted ) { |
271 | conf.writeConfig(); | 272 | conf.writeConfig(); |
272 | ConfigWidget *confWidget; | 273 | ConfigWidget *confWidget; |
273 | for ( confWidget = configWidgetList.first(); confWidget != 0; | 274 | for ( confWidget = configWidgetList.first(); confWidget != 0; |
274 | confWidget = configWidgetList.next() ) { | 275 | confWidget = configWidgetList.next() ) { |
275 | confWidget->writeConfig(); | 276 | confWidget->writeConfig(); |
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 532d126..04f595b 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -46,58 +46,56 @@ public: | |||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * The class has currently quite some duplicate code. | 48 | * The class has currently quite some duplicate code. |
49 | * By that way it would be real easy to have it as seperate app in settings tab | 49 | * By that way it would be real easy to have it as seperate app in settings tab |
50 | * | 50 | * |
51 | */ | 51 | */ |
52 | TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags fl ) | 52 | TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags fl ) |
53 | : QDialog( parent, name, modal, fl ) { | 53 | : QDialog( parent, name, modal, fl ) { |
54 | 54 | ||
55 | setCaption( tr( "Today config" ) ); | 55 | setCaption( tr( "Today config" ) ); |
56 | 56 | ||
57 | QVBoxLayout *layout = new QVBoxLayout( this ); | 57 | QVBoxLayout *layout = new QVBoxLayout( this ); |
58 | TabWidget3 = new QTabWidget( this, "TabWidget3" ); | 58 | TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); |
59 | TabWidget3->setAutoMask( FALSE ); | ||
60 | TabWidget3->setTabShape( QTabWidget::Rounded ); | ||
61 | layout->addWidget( TabWidget3 ); | 59 | layout->addWidget( TabWidget3 ); |
62 | 60 | ||
63 | tab_2 = new QWidget( TabWidget3, "tab_2" ); | 61 | tab_2 = new QWidget( TabWidget3, "tab_2" ); |
64 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); | 62 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); |
65 | QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); | 63 | QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); |
66 | tab2Layout->addWidget( l ); | 64 | tab2Layout->addWidget( l ); |
67 | QHBox *hbox1 = new QHBox( tab_2 ); | 65 | QHBox *hbox1 = new QHBox( tab_2 ); |
68 | m_appletListView = new QListView( hbox1 ); | 66 | m_appletListView = new QListView( hbox1 ); |
69 | m_appletListView->addColumn( "PluginList" ); | 67 | m_appletListView->addColumn( "PluginList" ); |
70 | m_appletListView->header()->hide(); | 68 | m_appletListView->header()->hide(); |
71 | m_appletListView->setSorting( -1 ); | 69 | m_appletListView->setSorting( -1 ); |
72 | QVBox *vbox1 = new QVBox( hbox1 ); | 70 | QVBox *vbox1 = new QVBox( hbox1 ); |
73 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", this , SLOT( moveSelectedUp() ) ); | 71 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", this , SLOT( moveSelectedUp() ) ); |
74 | new ToolButton( vbox1, tr( "Move Down" ),"opieplayer/down", this , SLOT( moveSelectedDown() ) ); | 72 | new ToolButton( vbox1, tr( "Move Down" ),"opieplayer/down", this , SLOT( moveSelectedDown() ) ); |
75 | tab2Layout->addWidget( hbox1 ); | 73 | tab2Layout->addWidget( hbox1 ); |
76 | TabWidget3->insertTab( tab_2, tr( "active/order" ) ); | 74 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); |
77 | 75 | ||
78 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 76 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
79 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 77 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
80 | tab3Layout->setMargin( 20 ); | 78 | tab3Layout->setMargin( 20 ); |
81 | QHBox *hbox_auto = new QHBox( tab_3 ); | 79 | QHBox *hbox_auto = new QHBox( tab_3 ); |
82 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); | 80 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); |
83 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); | 81 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); |
84 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | 82 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); |
85 | QHBox *hbox_inactive = new QHBox( tab_3 ); | 83 | QHBox *hbox_inactive = new QHBox( tab_3 ); |
86 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); | 84 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); |
87 | TimeLabel->setText( tr( "minutes inactive" ) ); | 85 | TimeLabel->setText( tr( "minutes inactive" ) ); |
88 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); | 86 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); |
89 | tab3Layout->addWidget( hbox_auto ); | 87 | tab3Layout->addWidget( hbox_auto ); |
90 | tab3Layout->addWidget( hbox_inactive ); | 88 | tab3Layout->addWidget( hbox_inactive ); |
91 | TabWidget3->insertTab( tab_3, tr( "Misc" ) ); | 89 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
92 | 90 | ||
93 | m_applets_changed = false; | 91 | m_applets_changed = false; |
94 | 92 | ||
95 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 93 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
96 | 94 | ||
97 | readConfig(); | 95 | readConfig(); |
98 | showMaximized(); | 96 | showMaximized(); |
99 | } | 97 | } |
100 | 98 | ||
101 | 99 | ||
102 | /** | 100 | /** |
103 | * Autostart, uses the new (opie only) autostart method in the launcher code. | 101 | * Autostart, uses the new (opie only) autostart method in the launcher code. |
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h index d5bdb4b..49cd10f 100644 --- a/core/pim/today/todayconfig.h +++ b/core/pim/today/todayconfig.h | |||
@@ -11,39 +11,40 @@ | |||
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef TODAYCONFIG_H | 17 | #ifndef TODAYCONFIG_H |
18 | #define TODAYCONFIG_H | 18 | #define TODAYCONFIG_H |
19 | 19 | ||
20 | #include <qvariant.h> | 20 | #include <qvariant.h> |
21 | #include <qdialog.h> | 21 | #include <qdialog.h> |
22 | #include <qlistview.h> | 22 | #include <qlistview.h> |
23 | #include <opie/otabwidget.h> | ||
23 | 24 | ||
24 | class QCheckBox; | 25 | class QCheckBox; |
25 | class QLabel; | 26 | class QLabel; |
26 | class QSpinBox; | 27 | class QSpinBox; |
27 | class QTabWidget; | 28 | class QTabWidget; |
28 | 29 | ||
29 | class TodayConfig : public QDialog { | 30 | class TodayConfig : public QDialog { |
30 | 31 | ||
31 | Q_OBJECT | 32 | Q_OBJECT |
32 | 33 | ||
33 | public: | 34 | public: |
34 | TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | 35 | TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
35 | ~TodayConfig(); | 36 | ~TodayConfig(); |
36 | 37 | ||
37 | QTabWidget* TabWidget3; | 38 | OTabWidget* TabWidget3; |
38 | 39 | ||
39 | void writeConfig(); | 40 | void writeConfig(); |
40 | void pluginManagement( QString libName, QString name, QPixmap icon ); | 41 | void pluginManagement( QString libName, QString name, QPixmap icon ); |
41 | 42 | ||
42 | protected slots: | 43 | protected slots: |
43 | void appletChanged(); | 44 | void appletChanged(); |
44 | void moveSelectedUp(); | 45 | void moveSelectedUp(); |
45 | void moveSelectedDown(); | 46 | void moveSelectedDown(); |
46 | 47 | ||
47 | private: | 48 | private: |
48 | void setAutoStart(); | 49 | void setAutoStart(); |
49 | void readConfig(); | 50 | void readConfig(); |