summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-12-11 10:13:25 (UTC)
committer harlekin <harlekin>2002-12-11 10:13:25 (UTC)
commit6ee0a61001307e71f51d1e8c7beaa81a94df89aa (patch) (unidiff)
tree5029ce146bca8f2fa192d9b7436450a9889de613
parent2318caf33bf03acfbcbc0ccce61e3e7ff0aac4aa (diff)
downloadopie-6ee0a61001307e71f51d1e8c7beaa81a94df89aa.zip
opie-6ee0a61001307e71f51d1e8c7beaa81a94df89aa.tar.gz
opie-6ee0a61001307e71f51d1e8c7beaa81a94df89aa.tar.bz2
max inactive minutes to 1 day - 1440 minutes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/todayconfig.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 8d0b069..bedfd61 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -45,96 +45,97 @@ public:
45 } 45 }
46}; 46};
47 47
48 48
49/** 49/**
50 * The class has currently quite some duplicate code. 50 * The class has currently quite some duplicate code.
51 * By that way it would be real easy to have it as seperate app in settings tab 51 * By that way it would be real easy to have it as seperate app in settings tab
52 * 52 *
53 */ 53 */
54TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) 54TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
55 : QDialog( parent, name, modal, WStyle_ContextHelp ) { 55 : QDialog( parent, name, modal, WStyle_ContextHelp ) {
56 56
57 setCaption( tr( "Today config" ) ); 57 setCaption( tr( "Today config" ) );
58 58
59 QVBoxLayout *layout = new QVBoxLayout( this ); 59 QVBoxLayout *layout = new QVBoxLayout( this );
60 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 60 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
61 layout->addWidget( TabWidget3 ); 61 layout->addWidget( TabWidget3 );
62 62
63 tab_2 = new QWidget( TabWidget3, "tab_2" ); 63 tab_2 = new QWidget( TabWidget3, "tab_2" );
64 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); 64 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 );
65 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); 65 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 );
66 tab2Layout->addWidget( l ); 66 tab2Layout->addWidget( l );
67 QHBox *hbox1 = new QHBox( tab_2 ); 67 QHBox *hbox1 = new QHBox( tab_2 );
68 m_appletListView = new QListView( hbox1 ); 68 m_appletListView = new QListView( hbox1 );
69 m_appletListView->addColumn( "PluginList" ); 69 m_appletListView->addColumn( "PluginList" );
70 m_appletListView->header()->hide(); 70 m_appletListView->header()->hide();
71 m_appletListView->setSorting( -1 ); 71 m_appletListView->setSorting( -1 );
72 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin ore use the arrow buttons on the right to change the appearance order" ) ); 72 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin ore use the arrow buttons on the right to change the appearance order" ) );
73 QVBox *vbox1 = new QVBox( hbox1 ); 73 QVBox *vbox1 = new QVBox( hbox1 );
74 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); 74 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
75 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); 75 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
76 tab2Layout->addWidget( hbox1 ); 76 tab2Layout->addWidget( hbox1 );
77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); 77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
78 78
79 tab_3 = new QWidget( TabWidget3, "tab_3" ); 79 tab_3 = new QWidget( TabWidget3, "tab_3" );
80 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); 80 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
81 tab3Layout->setMargin( 20 ); 81 tab3Layout->setMargin( 20 );
82 QHBox *hbox_auto = new QHBox( tab_3 ); 82 QHBox *hbox_auto = new QHBox( tab_3 );
83 TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); 83 TextLabel2 = new QLabel( hbox_auto, "AutoStart" );
84 TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); 84 TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) );
85 QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) ); 85 QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
86 CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); 86 CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
87 QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); 87 QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
88 QHBox *hbox_inactive = new QHBox( tab_3 ); 88 QHBox *hbox_inactive = new QHBox( tab_3 );
89 TimeLabel = new QLabel( hbox_inactive, "TimeLabel" ); 89 TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
90 TimeLabel->setText( tr( "minutes inactive" ) ); 90 TimeLabel->setText( tr( "minutes inactive" ) );
91 QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) ); 91 QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
92 SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); 92 SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
93 SpinBoxTime->setMaxValue ( 1440 );
93 QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) ); 94 QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
94 QHBox *hbox_iconSize = new QHBox( tab_3 ); 95 QHBox *hbox_iconSize = new QHBox( tab_3 );
95 QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" ); 96 QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
96 iconSizeLabel->setText( tr( "Icon size" ) ); 97 iconSizeLabel->setText( tr( "Icon size" ) );
97 QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) ); 98 QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) );
98 SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); 99 SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
99 SpinBoxIconSize->setMaxValue( 32 ); 100 SpinBoxIconSize->setMaxValue( 32 );
100 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) ); 101 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
101 102
102 QHBox *hbox_refresh = new QHBox( tab_3 ); 103 QHBox *hbox_refresh = new QHBox( tab_3 );
103 QLabel *refreshLabel = new QLabel( hbox_refresh ); 104 QLabel *refreshLabel = new QLabel( hbox_refresh );
104 refreshLabel->setText( tr( "Refresh" ) ); 105 refreshLabel->setText( tr( "Refresh" ) );
105 QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) ); 106 QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
106 SpinRefresh = new QSpinBox( hbox_refresh ); 107 SpinRefresh = new QSpinBox( hbox_refresh );
107 SpinRefresh->setMinValue( 0 ); 108 SpinRefresh->setMinValue( 0 );
108 SpinRefresh->setSuffix( tr( " sec" ) ); 109 SpinRefresh->setSuffix( tr( " sec" ) );
109 SpinRefresh->setMaxValue ( 7200 ); 110 SpinRefresh->setMaxValue ( 7200 );
110 SpinRefresh->setSpecialValueText ( tr("never") ); 111 SpinRefresh->setSpecialValueText ( tr("never") );
111 QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) ); 112 QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
112 113
113 tab3Layout->addWidget( hbox_auto ); 114 tab3Layout->addWidget( hbox_auto );
114 tab3Layout->addWidget( hbox_inactive ); 115 tab3Layout->addWidget( hbox_inactive );
115 tab3Layout->addWidget( hbox_iconSize ); 116 tab3Layout->addWidget( hbox_iconSize );
116 tab3Layout->addWidget( hbox_refresh ); 117 tab3Layout->addWidget( hbox_refresh );
117 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); 118 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
118 119
119 m_applets_changed = false; 120 m_applets_changed = false;
120 121
121 connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); 122 connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) );
122 123
123 readConfig(); 124 readConfig();
124 showMaximized(); 125 showMaximized();
125} 126}
126 127
127 128
128/** 129/**
129 * Autostart, uses the new (opie only) autostart method in the launcher code. 130 * Autostart, uses the new (opie only) autostart method in the launcher code.
130 * If registered against that today ist started on each resume. 131 * If registered against that today ist started on each resume.
131 */ 132 */
132void TodayConfig::setAutoStart() { 133void TodayConfig::setAutoStart() {
133 Config cfg( "today" ); 134 Config cfg( "today" );
134 cfg.setGroup( "Autostart" ); 135 cfg.setGroup( "Autostart" );
135 if ( m_autoStart ) { 136 if ( m_autoStart ) {
136 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); 137 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" );
137 e << QString( "add" ); 138 e << QString( "add" );
138 e << QString( "today" ); 139 e << QString( "today" );
139 e << QString( "%1" ).arg( m_autoStartTimer ); 140 e << QString( "%1" ).arg( m_autoStartTimer );
140 } else { 141 } else {