diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
commit | eba47f8f0637f451e21348187591e1f1fd58ac74 (patch) | |
tree | 448f10b95c656604acc331a3236c1e59bde5c1ad /kiconedit/kiconconfig.cpp | |
parent | c7e8736c69373f48b0401319757c742e8607431a (diff) | |
download | tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip |
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kiconedit/kiconconfig.cpp')
-rw-r--r-- | kiconedit/kiconconfig.cpp | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/kiconedit/kiconconfig.cpp b/kiconedit/kiconconfig.cpp index e7677e30..d4621a0b 100644 --- a/kiconedit/kiconconfig.cpp +++ b/kiconedit/kiconconfig.cpp @@ -20,12 +20,12 @@ #include <stdlib.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <kaccel.h> #include <kbuttonbox.h> @@ -46,33 +46,33 @@ #endif // little helper: -static inline QPixmap loadIcon( const char * name ) +static inline TQPixmap loadIcon( const char * name ) { return KGlobal::instance()->iconLoader() - ->loadIcon( QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); } -KTemplateEditDlg::KTemplateEditDlg(QWidget *parent) +KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) : KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ), Ok|Cancel ) { - QFrame *frame = makeMainWidget(); - QVBoxLayout *ml = new QVBoxLayout(frame); - QGroupBox *grp = new QGroupBox(i18n("Template"), frame); + TQFrame *frame = makeMainWidget(); + TQVBoxLayout *ml = new TQVBoxLayout(frame); + TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame); grp->setColumnLayout(0, Qt::Vertical); grp->layout()->setSpacing(spacingHint()); grp->layout()->setMargin(marginHint()); - QGridLayout *l = new QGridLayout(grp->layout()); + TQGridLayout *l = new TQGridLayout(grp->layout()); - ln_name = new QLineEdit( grp ); - connect( ln_name, SIGNAL( textChanged( const QString & ) ), - SLOT( slotTextChanged() ) ); - QLabel* lb_name = new QLabel( ln_name, i18n( "Description:" ), grp ); + ln_name = new TQLineEdit( grp ); + connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotTextChanged() ) ); + TQLabel* lb_name = new TQLabel( ln_name, i18n( "Description:" ), grp ); ln_path = new KURLRequester(grp); - connect( ln_path, SIGNAL( textChanged( const QString & ) ), - SLOT( slotTextChanged() ) ); - QLabel* lb_path = new QLabel( ln_path, i18n( "Path:" ), grp ); + connect( ln_path, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotTextChanged() ) ); + TQLabel* lb_path = new TQLabel( ln_path, i18n( "Path:" ), grp ); l->addWidget(lb_name, 0, 0); l->addWidget(ln_name, 0, 1); @@ -88,49 +88,49 @@ KTemplateEditDlg::KTemplateEditDlg(QWidget *parent) void KTemplateEditDlg::slotTextChanged() { - QString name = ln_name->text(), path = ln_path->url(); + TQString name = ln_name->text(), path = ln_path->url(); enableButtonOK(name.length() && path.length()); } -void KTemplateEditDlg::setName(const QString & name) +void KTemplateEditDlg::setName(const TQString & name) { ln_name->setText(name); } -QString KTemplateEditDlg::name() +TQString KTemplateEditDlg::name() { return ln_name->text(); } -void KTemplateEditDlg::setPath(const QString & path) +void KTemplateEditDlg::setPath(const TQString & path) { ln_path->setURL(path); } -QString KTemplateEditDlg::path() +TQString KTemplateEditDlg::path() { return ln_path->url(); } -KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent) +KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) { kdDebug(4640) << "KTemplateConfig constructor" << endl; btadd = btremove = btedit = 0L; - QGroupBox* grp = new QGroupBox( i18n( "Templates" ), this ); + TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this ); grp->setColumnLayout( 0, Qt::Horizontal ); templates = new KIconListBox( grp ); - connect( templates, SIGNAL( highlighted( int ) ), - SLOT( checkSelection( int ) ) ); - connect( templates, SIGNAL(doubleClicked( QListBoxItem * ) ), - SLOT( edit() ) ); + connect( templates, TQT_SIGNAL( highlighted( int ) ), + TQT_SLOT( checkSelection( int ) ) ); + connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ), + TQT_SLOT( edit() ) ); - QVBoxLayout* ml = new QVBoxLayout( this ); + TQVBoxLayout* ml = new TQVBoxLayout( this ); ml->addWidget( grp ); - QVBoxLayout* l = new QVBoxLayout( grp->layout(), KDialog::spacingHint() ); + TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() ); l->addWidget( templates ); for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ ) @@ -139,14 +139,14 @@ KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent) KButtonBox *bbox = new KButtonBox( grp ); btadd = bbox->addButton( i18n( "&Add..." ) ); - connect( btadd, SIGNAL( clicked() ), SLOT( add() ) ); + connect( btadd, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) ); btedit = bbox->addButton( i18n( "&Edit..." ) ); - connect( btedit, SIGNAL( clicked() ), SLOT( edit() ) ); + connect( btedit, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) ); btedit->setEnabled( false ); btremove = bbox->addButton( i18n( "&Remove" ) ); - connect( btremove, SIGNAL( clicked() ), SLOT( remove() ) ); + connect( btremove, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) ); btremove->setEnabled( false ); bbox->addStretch( 1 ); @@ -224,8 +224,8 @@ void KTemplateConfig::edit() } } -KBackgroundConfig::KBackgroundConfig( QWidget* parent ) - : QWidget( parent ) +KBackgroundConfig::KBackgroundConfig( TQWidget* parent ) + : TQWidget( parent ) { kdDebug(4640) << "KBackgroundConfig - constructor" << endl; @@ -238,57 +238,57 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent ) if(pix.isNull()) { kdDebug(4640) << "BGPIX: " << pixpath << " not valid!" << endl; - QPixmap pmlogo((const char**)logo); + TQPixmap pmlogo((const char**)logo); pix = pmlogo; } - QVBoxLayout *mainLayout = new QVBoxLayout( this ); + TQVBoxLayout *mainLayout = new TQVBoxLayout( this ); - QGroupBox *grp1 = new QGroupBox( i18n( "Select Background" ), this ); + TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this ); grp1->setColumnLayout(0, Qt::Vertical ); grp1->layout()->setSpacing( KDialog::spacingHint() ); grp1->layout()->setMargin( KDialog::marginHint() ); mainLayout->addWidget( grp1 ); - QGridLayout *grp1Layout = new QGridLayout( grp1->layout(), 3, 2 ); + TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 ); - QButtonGroup* btngrp = new QButtonGroup( grp1 ); + TQButtonGroup* btngrp = new TQButtonGroup( grp1 ); btngrp->setExclusive( true ); - btngrp->setFrameStyle( QFrame::NoFrame ); - connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotBackgroundMode( int ) ) ); + btngrp->setFrameStyle( TQFrame::NoFrame ); + connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotBackgroundMode( int ) ) ); grp1Layout->addWidget( btngrp, 0, 0 ); - QVBoxLayout *bgl = new QVBoxLayout( btngrp, 5 ); + TQVBoxLayout *bgl = new TQVBoxLayout( btngrp, 5 ); - QRadioButton *rbc = new QRadioButton( i18n( "Use co&lor" ), btngrp ); + TQRadioButton *rbc = new TQRadioButton( i18n( "Use co&lor" ), btngrp ); btngrp->insert( rbc, 0 ); bgl->addWidget( rbc ); - QRadioButton *rbp = new QRadioButton( i18n( "Use pix&map" ), btngrp ); + TQRadioButton *rbp = new TQRadioButton( i18n( "Use pix&map" ), btngrp ); btngrp->insert( rbp, 1 ); bgl->addWidget( rbp ); bgl->addStretch( 1 ); - QVBox *bbox = new QVBox( grp1 ); + TQVBox *bbox = new TQVBox( grp1 ); grp1Layout->addWidget( bbox, 0, 1 ); btcolor = new KColorButton(props->bgColor(), bbox) ; - connect(btcolor, SIGNAL(changed(const QColor &)), - SLOT( selectColor(const QColor &))); + connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), + TQT_SLOT( selectColor(const TQColor &))); - btpix = new QPushButton(i18n( "Choose..." ), bbox); - connect( btpix, SIGNAL( clicked() ), SLOT( selectPixmap() ) ); + btpix = new TQPushButton(i18n( "Choose..." ), bbox); + connect( btpix, TQT_SIGNAL( clicked() ), TQT_SLOT( selectPixmap() ) ); - QGroupBox *grp2 = new QGroupBox( i18n( "Preview" ), this ); + TQGroupBox *grp2 = new TQGroupBox( i18n( "Preview" ), this ); mainLayout->addWidget( grp2, 1 ); - QBoxLayout *l2 = new QVBoxLayout( grp2, 15 ); + TQBoxLayout *l2 = new TQVBoxLayout( grp2, 15 ); l2->addSpacing( 10 ); - lb_ex = new QLabel( grp2 ); - lb_ex->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + lb_ex = new TQLabel( grp2 ); + lb_ex->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); l2->addWidget( lb_ex ); /* @@ -297,7 +297,7 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent ) */ bgmode = props->bgMode(); - if( bgmode == QWidget::FixedPixmap ) + if( bgmode == TQWidget::FixedPixmap ) { btngrp->setButton( 1 ); btcolor->setEnabled( false ); @@ -319,7 +319,7 @@ void KBackgroundConfig::slotBackgroundMode(int id) { if(id == 0) { - bgmode = QWidget::FixedColor; + bgmode = TQWidget::FixedColor; btpix->setEnabled(false); btcolor->setEnabled(true); if(lb_ex) @@ -327,7 +327,7 @@ void KBackgroundConfig::slotBackgroundMode(int id) } else { - bgmode = QWidget::FixedPixmap; + bgmode = TQWidget::FixedPixmap; btpix->setEnabled(true); btcolor->setEnabled(false); if(lb_ex) @@ -345,7 +345,7 @@ void KBackgroundConfig::saveSettings() kdDebug(4640) << "KBackgroundConfig::saveSettings - done" << endl; } -void KBackgroundConfig::selectColor(const QColor & newColor) +void KBackgroundConfig::selectColor(const TQColor & newColor) { lb_ex->setBackgroundColor(newColor); } @@ -364,7 +364,7 @@ void KBackgroundConfig::selectPixmap() return; } - QPixmap p(url.path()); + TQPixmap p(url.path()); if( !p.isNull() ) { @@ -373,70 +373,70 @@ void KBackgroundConfig::selectPixmap() } } -KMiscConfig::KMiscConfig(QWidget *parent) : QWidget(parent) +KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent) { kdDebug(4640) << "KMiscConfig - constructor" << endl; KIconEditProperties* props = KIconEditProperties::self(); - QBoxLayout *ml = new QVBoxLayout( this, 0, 5 ); + TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 ); - QCheckBox *cbp = new QCheckBox( i18n( "Paste &transparent pixels" ), this ); - connect( cbp, SIGNAL( toggled( bool ) ), SLOT( pasteMode( bool ) ) ); + TQCheckBox *cbp = new TQCheckBox( i18n( "Paste &transparent pixels" ), this ); + connect( cbp, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( pasteMode( bool ) ) ); ml->addWidget(cbp); - QCheckBox *cbr = new QCheckBox( i18n( "Show &rulers" ), this ); - connect( cbr, SIGNAL( toggled( bool ) ), SLOT( showRulers( bool ) ) ); + TQCheckBox *cbr = new TQCheckBox( i18n( "Show &rulers" ), this ); + connect( cbr, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( showRulers( bool ) ) ); ml->addWidget(cbr); - QButtonGroup* btngrp = new QButtonGroup( i18n( "Transparency Display" ), this); + TQButtonGroup* btngrp = new TQButtonGroup( i18n( "Transparency Display" ), this); btngrp->setExclusive( true ); - connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotTransparencyDisplayType( int ) ) ); + connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotTransparencyDisplayType( int ) ) ); ml->addWidget( btngrp ); - QVBoxLayout *tgl = new QVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout *tgl = new TQVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() ); tgl->insertSpacing(0, 10); - QHBoxLayout *hl = new QHBoxLayout(tgl); + TQHBoxLayout *hl = new TQHBoxLayout(tgl); - QRadioButton *solidColorRButton = new QRadioButton( i18n( "&Solid color:" ), btngrp ); + TQRadioButton *solidColorRButton = new TQRadioButton( i18n( "&Solid color:" ), btngrp ); btngrp->insert( solidColorRButton, 0 ); hl->addWidget( solidColorRButton ); m_solidColorButton = new KColorButton(props->transparencySolidColor(), btngrp); btngrp->insert( m_solidColorButton, 2 ); hl->addWidget(m_solidColorButton); - //connect(btcolor, SIGNAL(changed(const QColor &)), - // SLOT( selectColor(const QColor &))); + //connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), + // TQT_SLOT( selectColor(const TQColor &))); - QRadioButton *checkerboardRButton = new QRadioButton( i18n( "Checker&board" ), btngrp ); + TQRadioButton *checkerboardRButton = new TQRadioButton( i18n( "Checker&board" ), btngrp ); btngrp->insert( checkerboardRButton, 1 ); tgl->addWidget( checkerboardRButton ); - QGridLayout *grid = new QGridLayout(tgl, 3, 3); + TQGridLayout *grid = new TQGridLayout(tgl, 3, 3); grid->addColSpacing(0, 40); grid->setColStretch(1, 1); grid->setColStretch(2, 1); - m_checkerboardSizeCombo = new QComboBox(btngrp); + m_checkerboardSizeCombo = new TQComboBox(btngrp); m_checkerboardSizeCombo->insertItem( i18n( "Small" ) ); m_checkerboardSizeCombo->insertItem( i18n( "Medium" ) ); m_checkerboardSizeCombo->insertItem( i18n( "Large" ) ); m_checkerboardSizeCombo->setCurrentItem(props->checkerboardSize()); - QLabel *label = new QLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp); + TQLabel *label = new TQLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp); grid->addWidget(label, 0, 1); grid->addWidget(m_checkerboardSizeCombo, 0, 2); m_checkerboardColor1Button = new KColorButton(props->checkerboardColor1(), btngrp); - label = new QLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp); + label = new TQLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp); grid->addWidget(label, 1, 1); grid->addWidget(m_checkerboardColor1Button, 1, 2); m_checkerboardColor2Button = new KColorButton(props->checkerboardColor2(), btngrp); - label = new QLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp); + label = new TQLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp); grid->addWidget(label, 2, 1); grid->addWidget(m_checkerboardColor2Button, 2, 2); @@ -524,7 +524,7 @@ void KMiscConfig::slotTransparencyDisplayType(int id) } } -KIconConfig::KIconConfig(QWidget *parent) +KIconConfig::KIconConfig(TQWidget *parent) : KDialogBase(KDialogBase::IconList, i18n("Configure"), KDialogBase::Help | KDialogBase::Ok | @@ -533,20 +533,20 @@ KIconConfig::KIconConfig(QWidget *parent) KDialogBase::Ok, parent, "configDialog", true, true) { - setHelp(QString::null); + setHelp(TQString::null); //KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - connect(this, SIGNAL(finished()), this, SLOT(finis())); + connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis())); - QVBox* page = addVBoxPage(i18n("Icon Templates"), QString::null, loadIcon("icons")); + TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString::null, loadIcon("icons")); temps = new KTemplateConfig(page); - page = addVBoxPage(i18n("Background"), QString::null, loadIcon("background")); + page = addVBoxPage(i18n("Background"), TQString::null, loadIcon("background")); backs = new KBackgroundConfig(page); - page = addVBoxPage(i18n("Icon Grid"), QString::null, loadIcon("kiconedit")); + page = addVBoxPage(i18n("Icon Grid"), TQString::null, loadIcon("kiconedit")); misc = new KMiscConfig(page); - QSize min(300, 400); + TQSize min(300, 400); if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); } if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); } |