author | mickeyl <mickeyl> | 2005-01-11 16:46:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-11 16:46:50 (UTC) |
commit | f82173157bdba4fa99afde9cc999bfe9b511ce07 (patch) (side-by-side diff) | |
tree | 5285a7aef75f2acf78c40d8a992193d029c55446 | |
parent | 0619c844b8a3054c6d6e480ba1c90e3f42e63873 (diff) | |
download | opie-f82173157bdba4fa99afde9cc999bfe9b511ce07.zip opie-f82173157bdba4fa99afde9cc999bfe9b511ce07.tar.gz opie-f82173157bdba4fa99afde9cc999bfe9b511ce07.tar.bz2 |
number of icon columns now also customizable through LauncherSettings
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabconfig.h | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 14 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.h | 16 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 3 |
5 files changed, 26 insertions, 9 deletions
@@ -5,2 +5,3 @@ * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) + * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h index 84ba073..7844673 100644 --- a/core/settings/launcher/tabconfig.h +++ b/core/settings/launcher/tabconfig.h @@ -45,2 +45,3 @@ struct TabConfig { QString m_bg_color; + int m_iconcolumns; QString m_text_color; diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index cef92d9..abe310f 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -53,2 +53,3 @@ #include <qcheckbox.h> +#include <qspinbox.h> @@ -82,2 +83,4 @@ private: +//FIXME: Why not derive SampleView from LauncherView ??? + class SampleView : public QIconView { @@ -196,2 +199,3 @@ public: + //FIXME: Add per-tab column handling from launcherview.cpp void calculateGrid ( ItemTextPos pos ) @@ -418,5 +422,3 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) gridLayout-> addWidget( rb, 1, 1 ); - connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); - gridLayout-> addRowSpacing ( 2, 8 ); @@ -425,2 +427,3 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) gridLayout-> addWidget ( label, 3, 0 ); + gridLayout-> addRowSpacing ( 3, 8 ); @@ -430,2 +433,8 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) + label = new QLabel( tr( "Columns:" ), tab ); + gridLayout->addWidget( label, 4, 0 ); + m_iconcolumns = new QSpinBox( 0, 10, 1, tab, "iconspinbox" ); + m_iconcolumns->setSpecialValueText( tr( "Automatic" ) ); + gridLayout->addWidget( m_iconcolumns, 4, 1, AlignLeft ); + vertLayout-> addStretch ( 10 ); @@ -508,2 +517,3 @@ void TabDialog::accept ( ) m_tc. m_bg_color = m_solidcolor-> color ( ). name ( ); + m_tc. m_iconcolumns = m_iconcolumns-> value( ); m_tc. m_bg_image = m_bgimage; diff --git a/core/settings/launcher/tabdialog.h b/core/settings/launcher/tabdialog.h index 46b7ae9..9381237 100644 --- a/core/settings/launcher/tabdialog.h +++ b/core/settings/launcher/tabdialog.h @@ -2,3 +2,3 @@ =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> .>+-= @@ -17,3 +17,3 @@ ..}^=.= = ; Public License for more details. -++= -. .` .: +++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU @@ -39,2 +39,3 @@ class QPushButton; class QCheckBox; +class QSpinBox; @@ -45,3 +46,3 @@ public: TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *dname = 0, bool modal = false, WFlags = 0 ); - virtual ~TabDialog ( ); + virtual ~TabDialog ( ); @@ -63,4 +64,4 @@ private: QWidget *createIconTab ( QWidget *parent ); - - + + private: @@ -71,7 +72,8 @@ private: Opie::OColorButton *m_iconcolor; + QSpinBox *m_iconcolumns; QPushButton *m_imagebrowse; - QString m_bgimage; + QString m_bgimage; QButtonGroup *m_bgtype; QCheckBox *m_fontuse; - + TabConfig &m_tc; diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 5ac625b..ab64331 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp @@ -137,2 +137,3 @@ void TabsSettings::readTabSettings ( Config &cfg ) global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); + global_def. m_iconcolumns = 0; // automatic global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); @@ -170,2 +171,3 @@ void TabsSettings::readTabSettings ( Config &cfg ) tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); + tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); @@ -232,2 +234,3 @@ void TabsSettings::accept ( ) cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); + cfg. writeEntry ( "Columns", tc. m_iconcolumns ); cfg. writeEntry ( "TextColor", tc. m_text_color ); |