summaryrefslogtreecommitdiff
path: root/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
Unidiff
Diffstat (limited to 'noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
index 11b615b..fdabd5c 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
@@ -123,31 +123,59 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
123 timerDelaySpin->setMaxValue( 60); 123 timerDelaySpin->setMaxValue( 60);
124 124
125 cfg.setGroup("Timer"); 125 cfg.setGroup("Timer");
126 timerDelaySpin->setValue( cfg.readNumEntry("Delay",0)); 126 timerDelaySpin->setValue( cfg.readNumEntry("Delay",0));
127 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0); 127 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0);
128 128
129 QLabel *label2; 129 QLabel *label2;
130 label2 = new QLabel(this); 130 label2 = new QLabel(this);
131 label2->setText( tr("Minutes between lookups.")); 131 label2->setText( tr("Minutes between lookups."));
132 label2->setMaximumHeight(60); 132 label2->setMaximumHeight(60);
133 layout->addMultiCellWidget( label2, 6, 6, 1, 2); 133 layout->addMultiCellWidget( label2, 6, 6, 1, 2);
134 134
135 scrollSpeed = new QSpinBox( this, "Scrollspin" );
136 QWhatsThis::add( timerDelaySpin , tr( "Speed of scrolling action, in milliseconds" ) );
137 scrollSpeed->setMaxValue( 1000);
138 scrollSpeed->setSteps(50,50);
139 cfg.setGroup("Timer");
140 scrollSpeed->setValue( cfg.readNumEntry("ScrollSpeed",50));
141 layout->addMultiCellWidget( scrollSpeed , 7, 7, 0, 0);
142
143 QLabel *label3;
144 label3 = new QLabel(this);
145 label3->setText( tr("Scroll Speed, in milliseconds"));
146 label3->setMaximumHeight(60);
147 layout->addMultiCellWidget( label3, 7, 7, 1, 2);
148
149 scrollLength = new QSpinBox( this, "ScrollLength" );
150 QWhatsThis::add( timerDelaySpin , tr( "Length of scrolling" ) );
151 scrollLength->setMaxValue( 10);
152// scrollLength->setSteps(5,5);
153 cfg.setGroup("Timer");
154 scrollLength->setValue( cfg.readNumEntry("ScrollLength",1));
155 layout->addMultiCellWidget( scrollLength , 8, 8, 0, 0);
156
157 QLabel *label4;
158 label4 = new QLabel(this);
159 label4->setText( tr("Scroll Length"));
160 label4->setMaximumHeight(60);
161 layout->addMultiCellWidget( label4, 8, 8, 1, 2);
162
135// lookupButton = new QPushButton(this, "LookupButton"); 163// lookupButton = new QPushButton(this, "LookupButton");
136// lookupButton->setText(tr("Symbol Lookup")); 164// lookupButton->setText(tr("Symbol Lookup"));
137// connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup())); 165// connect(lookupButton,SIGNAL(clicked()),SLOT( doLookup()));
138// layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0); 166// layout->addMultiCellWidget( lookupButton , 9, 9, 0, 0);
139 167
140 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 168 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
141 layout->addItem( spacer, 8, 0 ); 169 layout->addItem( spacer, 9, 0 );
142 170
143} 171}
144 172
145 173
146void StocktickerPluginConfig::writeConfig() { 174void StocktickerPluginConfig::writeConfig() {
147 Config cfg( "stockticker"); 175 Config cfg( "stockticker");
148 cfg.setGroup( "Symbols" ); 176 cfg.setGroup( "Symbols" );
149 QString outText = text().upper(); 177 QString outText = text().upper();
150 outText.stripWhiteSpace(); 178 outText.stripWhiteSpace();
151 cfg.writeEntry("Symbols", outText ); 179 cfg.writeEntry("Symbols", outText );
152 cfg.setGroup( "Fields" ); 180 cfg.setGroup( "Fields" );
153 cfg.writeEntry("timeCheck",timeCheck->isChecked()); 181 cfg.writeEntry("timeCheck",timeCheck->isChecked());
@@ -155,24 +183,26 @@ void StocktickerPluginConfig::writeConfig() {
155 cfg.writeEntry("symbolCheck",symbolCheck->isChecked()); 183 cfg.writeEntry("symbolCheck",symbolCheck->isChecked());
156 cfg.writeEntry("nameCheck",nameCheck->isChecked()); 184 cfg.writeEntry("nameCheck",nameCheck->isChecked());
157 cfg.writeEntry("currentPriceCheck",currentPriceCheck->isChecked()); 185 cfg.writeEntry("currentPriceCheck",currentPriceCheck->isChecked());
158 cfg.writeEntry("lastPriceCheck",lastPriceCheck->isChecked()); 186 cfg.writeEntry("lastPriceCheck",lastPriceCheck->isChecked());
159 cfg.writeEntry("openPriceCheck",openPriceCheck->isChecked()); 187 cfg.writeEntry("openPriceCheck",openPriceCheck->isChecked());
160 cfg.writeEntry("minPriceCheck",minPriceCheck->isChecked()); 188 cfg.writeEntry("minPriceCheck",minPriceCheck->isChecked());
161 cfg.writeEntry("maxPriceCheck",maxPriceCheck->isChecked()); 189 cfg.writeEntry("maxPriceCheck",maxPriceCheck->isChecked());
162 cfg.writeEntry("variationCheck",variationCheck->isChecked()); 190 cfg.writeEntry("variationCheck",variationCheck->isChecked());
163 cfg.writeEntry("volumeCheck",volumeCheck->isChecked()); 191 cfg.writeEntry("volumeCheck",volumeCheck->isChecked());
164 192
165 cfg.setGroup("Timer"); 193 cfg.setGroup("Timer");
166 cfg.writeEntry("Delay",timerDelaySpin->value()); 194 cfg.writeEntry("Delay",timerDelaySpin->value());
195 cfg.writeEntry("ScrollLength",scrollLength->value());
196 cfg.writeEntry("ScrollSpeed",scrollSpeed->value());
167 197
168 cfg.write(); 198 cfg.write();
169} 199}
170 200
171StocktickerPluginConfig::~StocktickerPluginConfig() { 201StocktickerPluginConfig::~StocktickerPluginConfig() {
172} 202}
173 203
174QString StocktickerPluginConfig::text() const { 204QString StocktickerPluginConfig::text() const {
175 return LineEdit1->text(); 205 return LineEdit1->text();
176} 206}
177 207
178void StocktickerPluginConfig::doLookup() { 208void StocktickerPluginConfig::doLookup() {