-rw-r--r-- | core/pim/today/today.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 139c91b..c83a5df 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -61,49 +61,49 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
61 | #endif | 61 | #endif |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | setOwnerField(); | 64 | setOwnerField(); |
65 | m_refreshTimer = new QTimer( this ); | 65 | m_refreshTimer = new QTimer( this ); |
66 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 66 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
67 | m_refreshTimer->start( 15000 ); | 67 | m_refreshTimer->start( 15000 ); |
68 | m_big_box = 0L; | 68 | m_big_box = 0L; |
69 | 69 | ||
70 | 70 | ||
71 | layout = new QVBoxLayout( this ); | 71 | layout = new QVBoxLayout( this ); |
72 | layout->addWidget( Frame ); | 72 | layout->addWidget( Frame ); |
73 | layout->addWidget( OwnerField ); | 73 | layout->addWidget( OwnerField ); |
74 | 74 | ||
75 | m_sv = new QScrollView( this ); | 75 | m_sv = new QScrollView( this ); |
76 | m_sv->setResizePolicy( QScrollView::AutoOneFit ); | 76 | m_sv->setResizePolicy( QScrollView::AutoOneFit ); |
77 | m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 77 | m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
78 | m_sv->setFrameShape( QFrame::NoFrame ); | 78 | m_sv->setFrameShape( QFrame::NoFrame ); |
79 | 79 | ||
80 | layout->addWidget( m_sv ); | 80 | layout->addWidget( m_sv ); |
81 | layout->setStretchFactor( m_sv,4 ); | 81 | layout->setStretchFactor( m_sv,4 ); |
82 | 82 | ||
83 | qApp->processEvents(); | 83 | qApp->processEvents(); |
84 | loadPlugins(); | 84 | loadPlugins(); |
85 | showMaximized(); | 85 | QPEApplication::showWidget( this ); |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Qcop receive method. | 89 | * Qcop receive method. |
90 | */ | 90 | */ |
91 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 91 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
92 | QDataStream stream( data, IO_ReadOnly ); | 92 | QDataStream stream( data, IO_ReadOnly ); |
93 | if ( msg == "message(QString)" ) { | 93 | if ( msg == "message(QString)" ) { |
94 | QString message; | 94 | QString message; |
95 | stream >> message; | 95 | stream >> message; |
96 | setOwnerField( message ); | 96 | setOwnerField( message ); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | void Today::setRefreshTimer( int interval ) { | 100 | void Today::setRefreshTimer( int interval ) { |
101 | 101 | ||
102 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 102 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
103 | 103 | ||
104 | // 0 is "never" case | 104 | // 0 is "never" case |
105 | if ( !interval == 0 ) { | 105 | if ( !interval == 0 ) { |
106 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 106 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
107 | m_refreshTimer->changeInterval( interval ); | 107 | m_refreshTimer->changeInterval( interval ); |
108 | } | 108 | } |
109 | } | 109 | } |
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index e71c5b0..9ced0d8 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -1,45 +1,46 @@ | |||
1 | /* | 1 | /* |
2 | * todayconfig.cpp | 2 | * todayconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002, 2003 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
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 | #include "todayconfig.h" | 17 | #include "todayconfig.h" |
18 | 18 | ||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | #include <qpe/qcopenvelope_qws.h> | 21 | #include <qpe/qcopenvelope_qws.h> |
22 | #include <qpe/qpeapplication.h> | ||
22 | 23 | ||
23 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
24 | #include <qlabel.h> | 25 | #include <qlabel.h> |
25 | #include <qspinbox.h> | 26 | #include <qspinbox.h> |
26 | #include <qlayout.h> | 27 | #include <qlayout.h> |
27 | #include <qheader.h> | 28 | #include <qheader.h> |
28 | #include <qvbox.h> | 29 | #include <qvbox.h> |
29 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
30 | #include <qwhatsthis.h> | 31 | #include <qwhatsthis.h> |
31 | 32 | ||
32 | class ToolButton : public QToolButton { | 33 | class ToolButton : public QToolButton { |
33 | 34 | ||
34 | public: | 35 | public: |
35 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 36 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
36 | : QToolButton( parent, name ) { | 37 | : QToolButton( parent, name ) { |
37 | setPixmap( Resource::loadPixmap( icon ) ); | 38 | setPixmap( Resource::loadPixmap( icon ) ); |
38 | setAutoRaise( TRUE ); | 39 | setAutoRaise( TRUE ); |
39 | setFocusPolicy( QWidget::NoFocus ); | 40 | setFocusPolicy( QWidget::NoFocus ); |
40 | setToggleButton( t ); | 41 | setToggleButton( t ); |
41 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 42 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
42 | } | 43 | } |
43 | }; | 44 | }; |
44 | 45 | ||
45 | 46 | ||
@@ -66,49 +67,49 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
66 | m_appletListView->addColumn( "PluginList" ); | 67 | m_appletListView->addColumn( "PluginList" ); |
67 | m_appletListView->header()->hide(); | 68 | m_appletListView->header()->hide(); |
68 | m_appletListView->setSorting( -1 ); | 69 | m_appletListView->setSorting( -1 ); |
69 | QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); | 70 | QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); |
70 | QVBox *vbox1 = new QVBox( hbox1 ); | 71 | QVBox *vbox1 = new QVBox( hbox1 ); |
71 | new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); | 72 | new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); |
72 | new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); | 73 | new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); |
73 | tab2Layout->addWidget( hbox1 ); | 74 | tab2Layout->addWidget( hbox1 ); |
74 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); | 75 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); |
75 | 76 | ||
76 | // Misc tab | 77 | // Misc tab |
77 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 78 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
78 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 79 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
79 | 80 | ||
80 | m_guiMisc = new TodayConfigMiscBase( tab_3 ); | 81 | m_guiMisc = new TodayConfigMiscBase( tab_3 ); |
81 | 82 | ||
82 | tab3Layout->addWidget( m_guiMisc ); | 83 | tab3Layout->addWidget( m_guiMisc ); |
83 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 84 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
84 | 85 | ||
85 | m_applets_changed = false; | 86 | m_applets_changed = false; |
86 | 87 | ||
87 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 88 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
88 | 89 | ||
89 | readConfig(); | 90 | readConfig(); |
90 | showMaximized(); | 91 | QPEApplication::showDialog( this ); |
91 | } | 92 | } |
92 | 93 | ||
93 | 94 | ||
94 | /** | 95 | /** |
95 | * Autostart, uses the new (opie only) autostart method in the launcher code. | 96 | * Autostart, uses the new (opie only) autostart method in the launcher code. |
96 | * If registered against that today ist started on each resume. | 97 | * If registered against that today ist started on each resume. |
97 | */ | 98 | */ |
98 | void TodayConfig::setAutoStart() { | 99 | void TodayConfig::setAutoStart() { |
99 | Config cfg( "today" ); | 100 | Config cfg( "today" ); |
100 | cfg.setGroup( "Autostart" ); | 101 | cfg.setGroup( "Autostart" ); |
101 | if ( m_autoStart ) { | 102 | if ( m_autoStart ) { |
102 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); | 103 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); |
103 | e << QString( "add" ); | 104 | e << QString( "add" ); |
104 | e << QString( "today" ); | 105 | e << QString( "today" ); |
105 | e << QString( "%1" ).arg( m_autoStartTimer ); | 106 | e << QString( "%1" ).arg( m_autoStartTimer ); |
106 | } else { | 107 | } else { |
107 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); | 108 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); |
108 | e << QString( "remove" ); | 109 | e << QString( "remove" ); |
109 | e << QString( "today" ); | 110 | e << QString( "today" ); |
110 | } | 111 | } |
111 | } | 112 | } |
112 | 113 | ||
113 | /** | 114 | /** |
114 | * Read the config part | 115 | * Read the config part |