diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kcontrol/kdm/kdm-appear.cpp | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/kdm/kdm-appear.cpp')
-rw-r--r-- | kcontrol/kdm/kdm-appear.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kcontrol/kdm/kdm-appear.cpp b/kcontrol/kdm/kdm-appear.cpp index 58696902b..90631e3bf 100644 --- a/kcontrol/kdm/kdm-appear.cpp +++ b/kcontrol/kdm/kdm-appear.cpp @@ -124,7 +124,7 @@ KDMAppearanceWidget::KDMAppearanceWidget(TQWidget *parent, const char *name) logobutton->installEventFilter(this); // for drag and drop connect(logobutton, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogoButtonClicked())); hglay->addWidget(logoLabel, 1, 0); - hglay->addWidget(logobutton, 1, 1, AlignCenter); + hglay->addWidget(logobutton, 1, 1, Qt::AlignCenter); hglay->addRowSpacing(1, 110); wtstr = i18n("Click here to choose an image that KDM will display. " "You can also drag and drop an image onto this button " @@ -139,8 +139,8 @@ KDMAppearanceWidget::KDMAppearanceWidget(TQWidget *parent, const char *name) grid->addLayout(hglay, 2, 1); label = new TQLabel(i18n("Position:"), group); - hglay->addMultiCellWidget(label, 0,1, 0,0, AlignVCenter); - TQValidator *posValidator = new TQIntValidator(0, 100, group); + hglay->addMultiCellWidget(label, 0,1, 0,0, Qt::AlignVCenter); + TQValidator *posValidator = new TQIntValidator(0, 100, TQT_TQOBJECT(group)); TQLabel *xLineLabel = new TQLabel(i18n("&X:"), group); hglay->addWidget(xLineLabel, 0, 1); xLineEdit = new TQLineEdit (group); @@ -209,7 +209,7 @@ KDMAppearanceWidget::KDMAppearanceWidget(TQWidget *parent, const char *name) // The Language group box - group = new TQGroupBox(0, Vertical, i18n("Locale"), this); + group = new TQGroupBox(0, Qt::Vertical, i18n("Locale"), this); vbox->addWidget(group); langcombo = new KLanguageButton(group); @@ -250,19 +250,19 @@ void KDMAppearanceWidget::makeReadOnly() void KDMAppearanceWidget::loadLanguageList(KLanguageButton *combo) { TQStringList langlist = KGlobal::dirs()->findAllResources("locale", - TQString::fromLatin1("*/entry.desktop")); + TQString::tqfromLatin1("*/entry.desktop")); langlist.sort(); for ( TQStringList::ConstIterator it = langlist.begin(); it != langlist.end(); ++it ) { TQString fpath = (*it).left((*it).length() - 14); - int index = fpath.findRev('/'); + int index = fpath.tqfindRev('/'); TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); - combo->insertLanguage(nid, name, TQString::fromLatin1("l10n/"), TQString::null); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); + combo->insertLanguage(nid, name, TQString::tqfromLatin1("l10n/"), TQString::null); } } @@ -280,7 +280,7 @@ void KDMAppearanceWidget::loadColorSchemes(KBackedComboBox *combo) if (!(str = config.readEntry("Name")).isEmpty() || !(str = config.readEntry("name")).isEmpty()) { - TQString str2 = (*it).mid( (*it).findRev( '/' ) + 1 ); // strip off path + TQString str2 = (*it).mid( (*it).tqfindRev( '/' ) + 1 ); // strip off path str2.setLength( str2.length() - 6 ); // strip off ".kcsrc combo->insertItem( str2, str ); } @@ -316,15 +316,15 @@ void KDMAppearanceWidget::loadGuiStyles(KBackedComboBox *combo) bool KDMAppearanceWidget::setLogo(TQString logo) { TQString flogo = logo.isEmpty() ? - locate("data", TQString::fromLatin1("kdm/pics/kdelogo.png") ) : + locate("data", TQString::tqfromLatin1("kdm/pics/kdelogo.png") ) : logo; TQImage p(flogo); if (p.isNull()) return false; if (p.width() > 100 || p.height() > 100) - p = p.smoothScale(100, 100, TQImage::ScaleMin); + p = p.smoothScale(100, 100, TQ_ScaleMin); logobutton->setPixmap(p); - uint bd = style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2; + uint bd = tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin ) * 2; logobutton->setFixedSize(p.width() + bd, p.height() + bd); logopath = logo; return true; @@ -334,7 +334,7 @@ bool KDMAppearanceWidget::setLogo(TQString logo) void KDMAppearanceWidget::slotLogoButtonClicked() { KImageIO::registerFormats(); - KFileDialog dialogue(locate("data", TQString::fromLatin1("kdm/pics/")), + KFileDialog dialogue(locate("data", TQString::tqfromLatin1("kdm/pics/")), KImageIO::pattern( KImageIO::Reading ), this, 0, true); dialogue.setOperationMode( KFileDialog::Opening ); @@ -392,7 +392,7 @@ void KDMAppearanceWidget::iconLoaderDropEvent(TQDropEvent *e) if(!url->isLocalFile()) { pixurl.setPath(KGlobal::dirs()->resourceDirs("data").last() + "kdm/pics/" + url->fileName()); - KIO::NetAccess::copy(*url, pixurl, parentWidget()); + KIO::NetAccess::copy(*url, pixurl, tqparentWidget()); istmp = true; } else { pixurl = *url; @@ -401,7 +401,7 @@ void KDMAppearanceWidget::iconLoaderDropEvent(TQDropEvent *e) // By now url should be "file:/..." if (!setLogo(pixurl.path())) { - KIO::NetAccess::del(pixurl, parentWidget()); + KIO::NetAccess::del(pixurl, tqparentWidget()); TQString msg = i18n("There was an error loading the image:\n" "%1\n" "It will not be saved.") |