diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /ksim/themeprefs.cpp | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/themeprefs.cpp')
-rw-r--r-- | ksim/themeprefs.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/ksim/themeprefs.cpp b/ksim/themeprefs.cpp index 3951f61..f2aa04d 100644 --- a/ksim/themeprefs.cpp +++ b/ksim/themeprefs.cpp @@ -20,11 +20,11 @@ #include "themeprefs.h" #include "themeprefs.moc" -#include <qdir.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qlabel.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqlabel.h> +#include <tqregexp.h> #include <klocale.h> #include <kdebug.h> @@ -46,7 +46,7 @@ class ThemeViewItem : public KListViewItem { public: - ThemeViewItem(QListView *parent, const QString &text, + ThemeViewItem(TQListView *parent, const TQString &text, const KURL &url) : KListViewItem(parent, text) { m_url = url; @@ -58,52 +58,52 @@ class ThemeViewItem : public KListViewItem KURL m_url; }; -KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name) - : QWidget(parent, name) +KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - m_themeLayout = new QGridLayout(this); + m_themeLayout = new TQGridLayout(this); m_themeLayout->setSpacing(6); - m_label = new QLabel(this); + m_label = new TQLabel(this); m_label->setText(i18n("GKrellm theme support. To use" " gkrellm themes just untar the themes into the folder below")); - m_label->setAlignment(QLabel::WordBreak | - QLabel::AlignVCenter | QLabel::AlignLeft); + m_label->setAlignment(TQLabel::WordBreak | + TQLabel::AlignVCenter | TQLabel::AlignLeft); m_themeLayout->addMultiCellWidget(m_label, 0, 0, 0, 4); - QString themeDir(locateLocal("data", "ksim")); - themeDir += QString::fromLatin1("/themes"); + TQString themeDir(locateLocal("data", "ksim")); + themeDir += TQString::fromLatin1("/themes"); m_urlLabel = new KURLLabel(this); m_urlLabel->setText(i18n("Open Konqueror in KSim's theme folder")); - m_urlLabel->setURL(QString::fromLatin1("file://") + themeDir); - connect(m_urlLabel, SIGNAL(leftClickedURL(const QString &)), - this, SLOT(openURL(const QString &))); + m_urlLabel->setURL(TQString::fromLatin1("file://") + themeDir); + connect(m_urlLabel, TQT_SIGNAL(leftClickedURL(const TQString &)), + this, TQT_SLOT(openURL(const TQString &))); m_themeLayout->addMultiCellWidget(m_urlLabel, 1, 1, 0, 4); m_line = new KSeparator(Horizontal, this); m_themeLayout->addMultiCellWidget(m_line, 2, 2, 0, 4); - m_authorLabel = new QLabel(this); - m_authorLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, - QSizePolicy::Minimum)); + m_authorLabel = new TQLabel(this); + m_authorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + TQSizePolicy::Minimum)); m_authorLabel->setText(i18n("Author:")); m_themeLayout->addMultiCellWidget(m_authorLabel, 3, 3, 0, 0); m_authLabel = new KSqueezedTextLabel(this); - m_authLabel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, - QSizePolicy::Minimum)); + m_authLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + TQSizePolicy::Minimum)); m_authLabel->setText(i18n("None")); m_themeLayout->addMultiCellWidget(m_authLabel, 3, 3, 1, 4); m_listView = new KListView(this); m_listView->addColumn(i18n("Theme")); m_listView->setFullWidth(true); - connect(m_listView, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(selectItem(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(selectItem(TQListViewItem *))); m_themeLayout->addMultiCellWidget(m_listView, 4, 4, 0, 4); - m_alternateLabel = new QLabel(this); + m_alternateLabel = new TQLabel(this); m_alternateLabel->setText(i18n("Alternate themes:")); m_alternateLabel->setAlignment(AlignVCenter | AlignRight); m_themeLayout->addMultiCellWidget(m_alternateLabel, 5, 5, 0, 1); @@ -111,11 +111,11 @@ KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name) m_altTheme = new KIntSpinBox(this); m_themeLayout->addMultiCellWidget(m_altTheme, 5, 5, 2, 2); - m_fontLabel = new QLabel(this); + m_fontLabel = new TQLabel(this); m_fontLabel->setText(i18n("Font:")); m_fontLabel->setAlignment(AlignVCenter | AlignRight); - m_fontLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, - QSizePolicy::Fixed)); + m_fontLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, + TQSizePolicy::Fixed)); m_themeLayout->addMultiCellWidget(m_fontLabel, 5, 5, 3, 3); m_fontsCombo = new KComboBox(this); @@ -124,14 +124,14 @@ KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name) m_fontsCombo->insertItem(i18n("Large")); m_fontsCombo->insertItem(i18n("Custom")); m_fontsCombo->insertItem(i18n("Default")); - m_fontsCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, - QSizePolicy::Fixed)); - connect(m_fontsCombo, SIGNAL(activated(int)), - this, SLOT(showFontDialog(int))); + m_fontsCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + TQSizePolicy::Fixed)); + connect(m_fontsCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(showFontDialog(int))); m_themeLayout->addMultiCellWidget(m_fontsCombo, 5, 5, 4, 4); - QStringList locatedFiles = KGlobal::dirs()->findDirs("data", "ksim/themes"); - for (QStringList::ConstIterator it = locatedFiles.begin(); it != locatedFiles.end(); ++it) + TQStringList locatedFiles = KGlobal::dirs()->findDirs("data", "ksim/themes"); + for (TQStringList::ConstIterator it = locatedFiles.begin(); it != locatedFiles.end(); ++it) readThemes(*it); } @@ -176,7 +176,7 @@ void KSim::ThemePrefs::setThemeAlts(int alternatives) m_alternateLabel->setEnabled(alternatives == 0 ? false : true); } -void KSim::ThemePrefs::openURL(const QString &url) +void KSim::ThemePrefs::openURL(const TQString &url) { kapp->invokeBrowser(url); } @@ -201,7 +201,7 @@ void KSim::ThemePrefs::completed() { kdDebug(2003) << "Finished listing" << endl; - for (QListViewItemIterator it(m_listView); it.current(); it++) + for (TQListViewItemIterator it(m_listView); it.current(); it++) { if (it.current()->text(0) == m_currentTheme.name) { @@ -215,7 +215,7 @@ void KSim::ThemePrefs::completed() } } -void KSim::ThemePrefs::selectItem(QListViewItem *item) +void KSim::ThemePrefs::selectItem(TQListViewItem *item) { if (!item) return; @@ -233,26 +233,26 @@ void KSim::ThemePrefs::selectItem(QListViewItem *item) if (theme.name() != "ksim") KSim::ThemeLoader::self().parseDir(theme.path(), theme.alternatives()); - QToolTip::remove(m_authLabel); + TQToolTip::remove(m_authLabel); if (theme.author().isEmpty()) { m_authLabel->setText(i18n("None Specified")); - QToolTip::add(m_authLabel, i18n("None specified")); + TQToolTip::add(m_authLabel, i18n("None specified")); } else { m_authLabel->setText(theme.author()); - QToolTip::add(m_authLabel, theme.author()); + TQToolTip::add(m_authLabel, theme.author()); } kdDebug( 2003 ) << "theme.alternatives() = " << theme.alternatives() << endl; setThemeAlts(theme.alternatives()); } -void KSim::ThemePrefs::readThemes(const QString &location) +void KSim::ThemePrefs::readThemes(const TQString &location) { kdDebug(2003) << "readThemes(" << location << ")" << endl; ThemeInfoList themeList; - QStringList items(QDir(location).entryList(QDir::Dirs, QDir::IgnoreCase)); - QStringList::ConstIterator it; + TQStringList items(TQDir(location).entryList(TQDir::Dirs, TQDir::IgnoreCase)); + TQStringList::ConstIterator it; for (it = items.begin(); it != items.end(); ++it) { if ((*it) != "." && (*it) != "..") themeList.append(ThemeInfo((*it), KURL(location + (*it) + "/"))); @@ -264,7 +264,7 @@ void KSim::ThemePrefs::readThemes(const QString &location) void KSim::ThemePrefs::showFontDialog(int currentItem) { if (currentItem == 3) { - QFont customFont = m_font; + TQFont customFont = m_font; int result = KFontDialog::getFont(customFont); if (result == KFontDialog::Accepted) m_font = customFont; |