summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabdialog.cpp
Side-by-side diff
Diffstat (limited to 'core/settings/launcher/tabdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabdialog.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index c0d1cf2..763b360 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -17,56 +17,57 @@
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qpe/resource.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qtabbar.h>
#include <qiconview.h>
#include <qapplication.h>
#include <qlabel.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <qwhatsthis.h>
#include <qcheckbox.h>
-#include <opie/ofontselector.h>
-#include <opie/otabwidget.h>
-#include <opie/ocolorbutton.h>
-#include <opie/ofiledialog.h>
+#include <opie2/ofontselector.h>
+#include <opie2/otabwidget.h>
+#include <opie2/ocolorbutton.h>
+#include <opie2/ofiledialog.h>
#include "tabdialog.h"
+using namespace Opie::Ui;
class SampleItem : public QIconViewItem {
public:
SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text )
{
m_large = pix;
m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 ));
}
void sizeChange ( )
{
calcRect ( );
repaint ( );
}
QPixmap *pixmap ( ) const
{
if ( iconView ( )-> itemTextPos ( ) == QIconView::Right )
return (QPixmap *) &m_small;
else
return (QPixmap *) &m_large;
}
private:
QPixmap m_large, m_small;
@@ -332,49 +333,49 @@ QWidget *TabDialog::createBgTab ( QWidget *parent )
QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
QGridLayout* gridLayout = new QGridLayout ( vertLayout );
gridLayout-> setColStretch ( 1, 10 );
QLabel* label = new QLabel( tr( "Type:" ), tab );
gridLayout-> addWidget ( label, 0, 0 );
m_bgtype = new QButtonGroup( tab, "buttongroup" );
m_bgtype-> hide ( );
m_bgtype-> setExclusive ( true );
QRadioButton *rb;
rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" );
m_bgtype-> insert ( rb, TabConfig::Ruled );
gridLayout-> addWidget( rb, 0, 1 );
QHBoxLayout *hb = new QHBoxLayout ( );
hb-> setSpacing ( 3 );
rb = new QRadioButton( tr( "Solid color" ), tab, "solid" );
m_bgtype-> insert ( rb, TabConfig::SolidColor );
hb-> addWidget ( rb );
hb-> addSpacing ( 10 );
- m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) );
+ m_solidcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_bg_color ) );
connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&)));
hb-> addWidget ( m_solidcolor );
hb-> addStretch ( 10 );
gridLayout-> addLayout ( hb, 1, 1 );
hb = new QHBoxLayout ( );
hb-> setSpacing ( 3 );
rb = new QRadioButton( tr( "Image" ), tab, "image" );
m_bgtype-> insert ( rb, TabConfig::Image );
hb-> addWidget( rb );
hb-> addSpacing ( 10 );
m_imagebrowse = new QPushButton ( tr( "Select..." ), tab );
connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked()));
hb-> addWidget ( m_imagebrowse );
hb-> addStretch ( 10 );
gridLayout-> addLayout ( hb, 2, 1 );
QPushButton *p = new QPushButton ( tr( "Default" ), tab );
connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked()));
gridLayout-> addWidget ( p, 3, 1 );
@@ -398,49 +399,49 @@ QWidget *TabDialog::createIconTab ( QWidget *parent )
gridLayout-> addWidget ( label, 0, 0 );
m_iconsize = new QButtonGroup( tab, "buttongroup" );
m_iconsize-> hide ( );
m_iconsize-> setExclusive ( true );
QRadioButton *rb;
rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" );
m_iconsize-> insert ( rb, TabConfig::List );
gridLayout-> addWidget( rb, 0, 1 );
rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" );
m_iconsize-> insert ( rb, TabConfig::Icon );
gridLayout-> addWidget( rb, 1, 1 );
connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int)));
// vertLayout-> addSpacing ( 8 );
// gridLayout = new QGridLayout ( vertLayout );
gridLayout-> addRowSpacing ( 2, 8 );
label = new QLabel ( tr( "Color:" ), tab );
gridLayout-> addWidget ( label, 3, 0 );
- m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) );
+ m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) );
connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&)));
gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft );
vertLayout-> addStretch ( 10 );
return tab;
}
void TabDialog::iconSizeClicked ( int s )
{
m_sample-> setViewMode ((TabConfig::ViewMode) s );
}
void TabDialog::fontClicked ( const QFont &f )
{
m_sample-> setViewFont ( f );
}
void TabDialog::bgTypeClicked ( int t )
{
QString s;
if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t )