summaryrefslogtreecommitdiff
path: root/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
Unidiff
Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
index 915233a..009d390 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
@@ -12,18 +12,18 @@
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 "stocktickerconfig.h" 17#include "stocktickerconfig.h"
18#include <opie/todayconfigwidget.h> 18
19#include <opie2/todayconfigwidget.h>
19 20
20#include <qpe/config.h> 21#include <qpe/config.h>
21 22
22#include <qapplication.h> 23#include <qapplication.h>
23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qspinbox.h> 25#include <qspinbox.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qvariant.h> 28#include <qvariant.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
@@ -41,39 +41,39 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
41 layout->setSpacing(2); 41 layout->setSpacing(2);
42 layout->setMargin( 2); 42 layout->setMargin( 2);
43 43
44 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 44 LineEdit1 = new QLineEdit( this, "LineEdit1" );
45 LineEdit1->setFocus(); 45 LineEdit1->setFocus();
46// QWhatsThis::add( LineEdit1, tr("Enter the stock symbols you want to be shown here.")); 46// QWhatsThis::add( LineEdit1, tr("Enter the stock symbols you want to be shown here."));
47 47
48 layout->addMultiCellWidget( LineEdit1, 0, 0, 0, 4); 48 layout->addMultiCellWidget( LineEdit1, 0, 0, 0, 4);
49 49
50 Config cfg( "stockticker"); 50 Config cfg( "stockticker");
51 cfg.setGroup( "Symbols" ); 51 cfg.setGroup( "Symbols" );
52 QString symbollist; 52 QString symbollist;
53 symbollist = cfg.readEntry("Symbols", ""); 53 symbollist = cfg.readEntry("Symbols", "");
54 LineEdit1->setText(symbollist); 54 LineEdit1->setText(symbollist);
55 55
56 QLabel *label; 56 QLabel *label;
57 label = new QLabel(this); 57 label = new QLabel(this);
58 label->setText( tr("Enter stock symbols seperated\nby a space.")); 58 label->setText( tr("Enter stock symbols seperated\nby a space."));
59 label->setMaximumHeight(60); 59 label->setMaximumHeight(60);
60 layout->addMultiCellWidget( label, 1, 1, 0, 4); 60 layout->addMultiCellWidget( label, 1, 1, 0, 4);
61 61
62 cfg.setGroup( "Fields" ); 62 cfg.setGroup( "Fields" );
63 63
64 timeCheck= new QCheckBox ( "Time",this ); 64 timeCheck= new QCheckBox ( "Time",this );
65 timeCheck->setChecked( cfg.readBoolEntry("timeCheck",1)); 65 timeCheck->setChecked( cfg.readBoolEntry("timeCheck",1));
66 layout->addMultiCellWidget(timeCheck, 2, 2, 0, 0 ); 66 layout->addMultiCellWidget(timeCheck, 2, 2, 0, 0 );
67 QWhatsThis::add( timeCheck, tr("Toggles Time of current price field")); 67 QWhatsThis::add( timeCheck, tr("Toggles Time of current price field"));
68 68
69 dateCheck= new QCheckBox ( "Date", this ); 69 dateCheck= new QCheckBox ( "Date", this );
70 dateCheck->setChecked( cfg.readBoolEntry("dateCheck",1)); 70 dateCheck->setChecked( cfg.readBoolEntry("dateCheck",1));
71 layout->addMultiCellWidget( dateCheck, 2, 2, 1, 1 ); 71 layout->addMultiCellWidget( dateCheck, 2, 2, 1, 1 );
72 QWhatsThis::add(dateCheck, tr("Toggles date field")); 72 QWhatsThis::add(dateCheck, tr("Toggles date field"));
73 73
74 symbolCheck= new QCheckBox ( "Symbol", this ); 74 symbolCheck= new QCheckBox ( "Symbol", this );
75 symbolCheck->setChecked( cfg.readBoolEntry("symbolCheck",1)); 75 symbolCheck->setChecked( cfg.readBoolEntry("symbolCheck",1));
76 layout->addMultiCellWidget( symbolCheck, 2, 2, 2, 2 ); 76 layout->addMultiCellWidget( symbolCheck, 2, 2, 2, 2 );
77 QWhatsThis::add(symbolCheck, tr("Toggles Symbol field")); 77 QWhatsThis::add(symbolCheck, tr("Toggles Symbol field"));
78 78
79 nameCheck= new QCheckBox ( "Name", this ); 79 nameCheck= new QCheckBox ( "Name", this );
@@ -120,13 +120,13 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
120 QWhatsThis::add( timerDelaySpin , tr( "How often stocks prices should be looked up. In minutes" ) ); 120 QWhatsThis::add( timerDelaySpin , tr( "How often stocks prices should be looked up. In minutes" ) );
121 timerDelaySpin->setMaxValue( 60); 121 timerDelaySpin->setMaxValue( 60);
122 122
123 cfg.setGroup("Timer"); 123 cfg.setGroup("Timer");
124 timerDelaySpin->setValue( cfg.readNumEntry("Delay",15)); 124 timerDelaySpin->setValue( cfg.readNumEntry("Delay",15));
125 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0); 125 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0);
126 126
127 QLabel *label2; 127 QLabel *label2;
128 label2 = new QLabel(this); 128 label2 = new QLabel(this);
129 label2->setText( tr("Minutes between lookups.")); 129 label2->setText( tr("Minutes between lookups."));
130 label2->setMaximumHeight(60); 130 label2->setMaximumHeight(60);
131 layout->addMultiCellWidget( label2, 6, 6, 1, 2); 131 layout->addMultiCellWidget( label2, 6, 6, 1, 2);
132 132
@@ -134,13 +134,13 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
134 QWhatsThis::add( timerDelaySpin , tr( "Speed of scrolling action, in milliseconds" ) ); 134 QWhatsThis::add( timerDelaySpin , tr( "Speed of scrolling action, in milliseconds" ) );
135 scrollSpeed->setMaxValue( 1000); 135 scrollSpeed->setMaxValue( 1000);
136 scrollSpeed->setSteps(50,50); 136 scrollSpeed->setSteps(50,50);
137 cfg.setGroup("Timer"); 137 cfg.setGroup("Timer");
138 scrollSpeed->setValue( cfg.readNumEntry("ScrollSpeed",50)); 138 scrollSpeed->setValue( cfg.readNumEntry("ScrollSpeed",50));
139 layout->addMultiCellWidget( scrollSpeed , 7, 7, 0, 0); 139 layout->addMultiCellWidget( scrollSpeed , 7, 7, 0, 0);
140 140
141 QLabel *label3; 141 QLabel *label3;
142 label3 = new QLabel(this); 142 label3 = new QLabel(this);
143 label3->setText( tr("Scroll Speed, in milliseconds")); 143 label3->setText( tr("Scroll Speed, in milliseconds"));
144 label3->setMaximumHeight(60); 144 label3->setMaximumHeight(60);
145 layout->addMultiCellWidget( label3, 7, 7, 1, 2); 145 layout->addMultiCellWidget( label3, 7, 7, 1, 2);
146 146
@@ -148,24 +148,24 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
148 QWhatsThis::add( timerDelaySpin , tr( "Length of scrolling" ) ); 148 QWhatsThis::add( timerDelaySpin , tr( "Length of scrolling" ) );
149 scrollLength->setMaxValue( 10); 149 scrollLength->setMaxValue( 10);
150// scrollLength->setSteps(5,5); 150// scrollLength->setSteps(5,5);
151 cfg.setGroup("Timer"); 151 cfg.setGroup("Timer");
152 scrollLength->setValue( cfg.readNumEntry("ScrollLength",1)); 152 scrollLength->setValue( cfg.readNumEntry("ScrollLength",1));
153 layout->addMultiCellWidget( scrollLength , 8, 8, 0, 0); 153 layout->addMultiCellWidget( scrollLength , 8, 8, 0, 0);
154 154
155 QLabel *label4; 155 QLabel *label4;
156 label4 = new QLabel(this); 156 label4 = new QLabel(this);
157 label4->setText( tr("Scroll Length")); 157 label4->setText( tr("Scroll Length"));
158 label4->setMaximumHeight(60); 158 label4->setMaximumHeight(60);
159 layout->addMultiCellWidget( label4, 8, 8, 1, 2); 159 layout->addMultiCellWidget( label4, 8, 8, 1, 2);
160 160
161// lookupButton = new QPushButton(this, "LookupButton"); 161// lookupButton = new QPushButton(this, "LookupButton");
162// lookupButton->setText(tr("Symbol Lookup")); 162// lookupButton->setText(tr("Symbol Lookup"));
163// connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup())); 163// connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup()));
164// layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0); 164// layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0);
165 165
166 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 166 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
167 layout->addItem( spacer, 9, 0 ); 167 layout->addItem( spacer, 9, 0 );
168 168
169} 169}
170 170
171 171
@@ -189,13 +189,13 @@ void StocktickerPluginConfig::writeConfig() {
189 cfg.writeEntry("volumeCheck",volumeCheck->isChecked()); 189 cfg.writeEntry("volumeCheck",volumeCheck->isChecked());
190 190
191 cfg.setGroup("Timer"); 191 cfg.setGroup("Timer");
192 cfg.writeEntry("Delay",timerDelaySpin->value()); 192 cfg.writeEntry("Delay",timerDelaySpin->value());
193 cfg.writeEntry("ScrollLength",scrollLength->value()); 193 cfg.writeEntry("ScrollLength",scrollLength->value());
194 cfg.writeEntry("ScrollSpeed",scrollSpeed->value()); 194 cfg.writeEntry("ScrollSpeed",scrollSpeed->value());
195 195
196 cfg.write(); 196 cfg.write();
197} 197}
198 198
199StocktickerPluginConfig::~StocktickerPluginConfig() { 199StocktickerPluginConfig::~StocktickerPluginConfig() {
200} 200}
201 201