Diffstat (limited to 'core/settings/launcher/tabdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 13 |
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 | |||
@@ -29,32 +29,33 @@ | |||
29 | 29 | ||
30 | #include <qlayout.h> | 30 | #include <qlayout.h> |
31 | #include <qvbox.h> | 31 | #include <qvbox.h> |
32 | #include <qtabbar.h> | 32 | #include <qtabbar.h> |
33 | #include <qiconview.h> | 33 | #include <qiconview.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
37 | #include <qbuttongroup.h> | 37 | #include <qbuttongroup.h> |
38 | #include <qwhatsthis.h> | 38 | #include <qwhatsthis.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | 40 | ||
41 | #include <opie/ofontselector.h> | 41 | #include <opie2/ofontselector.h> |
42 | #include <opie/otabwidget.h> | 42 | #include <opie2/otabwidget.h> |
43 | #include <opie/ocolorbutton.h> | 43 | #include <opie2/ocolorbutton.h> |
44 | #include <opie/ofiledialog.h> | 44 | #include <opie2/ofiledialog.h> |
45 | 45 | ||
46 | #include "tabdialog.h" | 46 | #include "tabdialog.h" |
47 | 47 | ||
48 | 48 | ||
49 | using namespace Opie::Ui; | ||
49 | class SampleItem : public QIconViewItem { | 50 | class SampleItem : public QIconViewItem { |
50 | public: | 51 | public: |
51 | SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) | 52 | SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) |
52 | { | 53 | { |
53 | m_large = pix; | 54 | m_large = pix; |
54 | m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); | 55 | m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); |
55 | } | 56 | } |
56 | 57 | ||
57 | void sizeChange ( ) | 58 | void sizeChange ( ) |
58 | { | 59 | { |
59 | calcRect ( ); | 60 | calcRect ( ); |
60 | repaint ( ); | 61 | repaint ( ); |
@@ -344,25 +345,25 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) | |||
344 | rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); | 345 | rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); |
345 | m_bgtype-> insert ( rb, TabConfig::Ruled ); | 346 | m_bgtype-> insert ( rb, TabConfig::Ruled ); |
346 | gridLayout-> addWidget( rb, 0, 1 ); | 347 | gridLayout-> addWidget( rb, 0, 1 ); |
347 | 348 | ||
348 | QHBoxLayout *hb = new QHBoxLayout ( ); | 349 | QHBoxLayout *hb = new QHBoxLayout ( ); |
349 | hb-> setSpacing ( 3 ); | 350 | hb-> setSpacing ( 3 ); |
350 | 351 | ||
351 | rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); | 352 | rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); |
352 | m_bgtype-> insert ( rb, TabConfig::SolidColor ); | 353 | m_bgtype-> insert ( rb, TabConfig::SolidColor ); |
353 | hb-> addWidget ( rb ); | 354 | hb-> addWidget ( rb ); |
354 | hb-> addSpacing ( 10 ); | 355 | hb-> addSpacing ( 10 ); |
355 | 356 | ||
356 | m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); | 357 | m_solidcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); |
357 | connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&))); | 358 | connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&))); |
358 | hb-> addWidget ( m_solidcolor ); | 359 | hb-> addWidget ( m_solidcolor ); |
359 | hb-> addStretch ( 10 ); | 360 | hb-> addStretch ( 10 ); |
360 | 361 | ||
361 | gridLayout-> addLayout ( hb, 1, 1 ); | 362 | gridLayout-> addLayout ( hb, 1, 1 ); |
362 | 363 | ||
363 | hb = new QHBoxLayout ( ); | 364 | hb = new QHBoxLayout ( ); |
364 | hb-> setSpacing ( 3 ); | 365 | hb-> setSpacing ( 3 ); |
365 | 366 | ||
366 | rb = new QRadioButton( tr( "Image" ), tab, "image" ); | 367 | rb = new QRadioButton( tr( "Image" ), tab, "image" ); |
367 | m_bgtype-> insert ( rb, TabConfig::Image ); | 368 | m_bgtype-> insert ( rb, TabConfig::Image ); |
368 | hb-> addWidget( rb ); | 369 | hb-> addWidget( rb ); |
@@ -410,25 +411,25 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) | |||
410 | gridLayout-> addWidget( rb, 1, 1 ); | 411 | gridLayout-> addWidget( rb, 1, 1 ); |
411 | 412 | ||
412 | connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); | 413 | connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); |
413 | 414 | ||
414 | //vertLayout-> addSpacing ( 8 ); | 415 | //vertLayout-> addSpacing ( 8 ); |
415 | 416 | ||
416 | //gridLayout = new QGridLayout ( vertLayout ); | 417 | //gridLayout = new QGridLayout ( vertLayout ); |
417 | gridLayout-> addRowSpacing ( 2, 8 ); | 418 | gridLayout-> addRowSpacing ( 2, 8 ); |
418 | 419 | ||
419 | label = new QLabel ( tr( "Color:" ), tab ); | 420 | label = new QLabel ( tr( "Color:" ), tab ); |
420 | gridLayout-> addWidget ( label, 3, 0 ); | 421 | gridLayout-> addWidget ( label, 3, 0 ); |
421 | 422 | ||
422 | m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) ); | 423 | m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) ); |
423 | connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); | 424 | connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); |
424 | gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); | 425 | gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); |
425 | 426 | ||
426 | vertLayout-> addStretch ( 10 ); | 427 | vertLayout-> addStretch ( 10 ); |
427 | 428 | ||
428 | return tab; | 429 | return tab; |
429 | } | 430 | } |
430 | 431 | ||
431 | 432 | ||
432 | void TabDialog::iconSizeClicked ( int s ) | 433 | void TabDialog::iconSizeClicked ( int s ) |
433 | { | 434 | { |
434 | m_sample-> setViewMode ((TabConfig::ViewMode) s ); | 435 | m_sample-> setViewMode ((TabConfig::ViewMode) s ); |