author | sandman <sandman> | 2002-09-25 23:11:05 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-25 23:11:05 (UTC) |
commit | 0c6ce9f1600bf1efb7736f87fd14dd8215db851f (patch) (unidiff) | |
tree | 13d1367dc79a64d44ef83f57259e04a0be099f8c | |
parent | bdbd20a9a0415e2284e21923ed03d4ca3f6615e8 (diff) | |
download | opie-0c6ce9f1600bf1efb7736f87fd14dd8215db851f.zip opie-0c6ce9f1600bf1efb7736f87fd14dd8215db851f.tar.gz opie-0c6ce9f1600bf1efb7736f87fd14dd8215db851f.tar.bz2 |
load and save of tab settings works now -- bg image still missing
-rw-r--r-- | core/settings/launcher/tabconfig.h | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 34 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.h | 5 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 4 |
4 files changed, 32 insertions, 12 deletions
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h index 52ae81f..8f21eb4 100644 --- a/core/settings/launcher/tabconfig.h +++ b/core/settings/launcher/tabconfig.h | |||
@@ -20,2 +20,3 @@ struct TabConfig { | |||
20 | QString m_font_family; | 20 | QString m_font_family; |
21 | QString m_font_style; | ||
21 | int m_font_size; | 22 | int m_font_size; |
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index 7b01cc7..ca48e66 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp | |||
@@ -226,3 +226,3 @@ private: | |||
226 | TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl ) | 226 | TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl ) |
227 | : QDialog ( parent, name, modal, fl ) | 227 | : QDialog ( parent, name, modal, fl ), m_tc ( tc ) |
228 | { | 228 | { |
@@ -251,2 +251,10 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig | |||
251 | lay-> addWidget ( sample, 1 ); | 251 | lay-> addWidget ( sample, 1 ); |
252 | |||
253 | m_iconsize-> setButton ( tc. m_view ); | ||
254 | iconSizeClicked ( tc. m_view ); | ||
255 | m_bgtype-> setButton ( tc. m_bg_type ); | ||
256 | m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); | ||
257 | bgTypeClicked ( tc. m_bg_type ); | ||
258 | m_fontselect-> setSelectedFont ( tc. m_font_family, tc. m_font_style, tc. m_font_size ); | ||
259 | fontClicked ( m_fontselect-> selectedFont ( )); | ||
252 | } | 260 | } |
@@ -260,11 +268,3 @@ QWidget *TabDialog::createFontTab ( QWidget *parent ) | |||
260 | { | 268 | { |
261 | Config config ( "qpe" ); | ||
262 | config. setGroup ( "Appearance" ); | ||
263 | |||
264 | QString familyStr = config.readEntry( "FontFamily", "Helvetica" ); | ||
265 | QString styleStr = config.readEntry( "FontStyle", "Regular" ); | ||
266 | int size = config.readNumEntry( "FontSize", 10 ); | ||
267 | |||
268 | m_fontselect = new OFontSelector ( parent, "FontTab" ); | 269 | m_fontselect = new OFontSelector ( parent, "FontTab" ); |
269 | m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); | ||
270 | 270 | ||
@@ -301,2 +301,3 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) | |||
301 | hb-> addWidget ( rb ); | 301 | hb-> addWidget ( rb ); |
302 | hb-> addSpacing ( 10 ); | ||
302 | 303 | ||
@@ -305,3 +306,2 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) | |||
305 | hb-> addWidget ( m_solidcolor ); | 306 | hb-> addWidget ( m_solidcolor ); |
306 | hb-> addStretch ( 10 ); | ||
307 | 307 | ||
@@ -313,3 +313,3 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) | |||
313 | 313 | ||
314 | QPushButton *p; | 314 | //QPushButton *p; |
315 | 315 | ||
@@ -381 +381,13 @@ void TabDialog::colorClicked ( const QColor &col ) | |||
381 | } | 381 | } |
382 | |||
383 | void TabDialog::accept ( ) | ||
384 | { | ||
385 | m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( )); | ||
386 | m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( )); | ||
387 | m_tc. m_bg_color = m_solidcolor-> color ( ). name ( ); | ||
388 | m_tc. m_font_family = m_fontselect-> fontFamily ( ); | ||
389 | m_tc. m_font_size = m_fontselect-> fontSize ( ); | ||
390 | m_tc. m_font_style = m_fontselect-> fontStyle ( ); | ||
391 | |||
392 | QDialog::accept ( ); | ||
393 | } | ||
diff --git a/core/settings/launcher/tabdialog.h b/core/settings/launcher/tabdialog.h index d602573..e1935fd 100644 --- a/core/settings/launcher/tabdialog.h +++ b/core/settings/launcher/tabdialog.h | |||
@@ -17,2 +17,5 @@ public: | |||
17 | 17 | ||
18 | public slots: | ||
19 | virtual void accept ( ); | ||
20 | |||
18 | protected slots: | 21 | protected slots: |
@@ -36,2 +39,4 @@ private: | |||
36 | QButtonGroup *m_bgtype; | 39 | QButtonGroup *m_bgtype; |
40 | |||
41 | TabConfig &m_tc; | ||
37 | }; | 42 | }; |
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index fc2d2c9..ae78733 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -122,2 +122,3 @@ void TabsSettings::readTabSettings ( ) | |||
122 | tc. m_font_size = f [1]. toInt ( ); | 122 | tc. m_font_size = f [1]. toInt ( ); |
123 | tc. m_font_style = f [2]; | ||
123 | } else { | 124 | } else { |
@@ -125,2 +126,3 @@ void TabsSettings::readTabSettings ( ) | |||
125 | tc. m_font_size = font ( ). pointSize ( ); | 126 | tc. m_font_size = font ( ). pointSize ( ); |
127 | tc. m_font_style = "Regular"; | ||
126 | } | 128 | } |
@@ -160,3 +162,3 @@ void TabsSettings::accept ( ) | |||
160 | 162 | ||
161 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + ",50,0"; | 163 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + tc. m_font_style + ",0"; |
162 | cfg. writeEntry ( "Font", f ); | 164 | cfg. writeEntry ( "Font", f ); |