From 7a741e43ff09e70396a918956219b8316c48e522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 27 Apr 2011 00:40:29 +0000 Subject: TQt4 port Dolphin This enables compilation under Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1229359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/viewpropertiesdialog.cpp | 90 ++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'src/viewpropertiesdialog.cpp') diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp index 0739ad8..93f1c3e 100644 --- a/src/viewpropertiesdialog.cpp +++ b/src/viewpropertiesdialog.cpp @@ -20,16 +20,16 @@ #include "viewpropertiesdialog.h" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -46,29 +46,29 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : assert(dolphinView != 0); const int margin = KDialog::marginHint(); - const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); const KURL& url = dolphinView->url(); m_viewProps = new ViewProperties(url); m_viewProps->setAutoSaveEnabled(false); - QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), 0, spacingHint()); + TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), 0, spacingHint()); // create 'Properties' group containing view mode, sorting, sort order and show hidden files - QGroupBox* propsGroup = new QGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage()); - propsGroup->setSizePolicy(sizePolicy); + TQGroupBox* propsGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage()); + propsGroup->tqsetSizePolicy(sizePolicy); propsGroup->setMargin(margin); - new QLabel(i18n("View mode:"), propsGroup); - m_viewMode = new QComboBox(propsGroup); + new TQLabel(i18n("View mode:"), propsGroup); + m_viewMode = new TQComboBox(propsGroup); m_viewMode->insertItem(SmallIcon("view_icon"), i18n("Icons")); m_viewMode->insertItem(SmallIcon("view_text"), i18n("Details")); m_viewMode->insertItem(SmallIcon("gvdirpart"), i18n("Previews")); const int index = static_cast(m_viewProps->viewMode()); m_viewMode->setCurrentItem(index); - new QLabel(i18n("Sorting:"), propsGroup); - m_sorting = new QComboBox(propsGroup); + new TQLabel(i18n("Sorting:"), propsGroup); + m_sorting = new TQComboBox(propsGroup); m_sorting->insertItem("By Name"); m_sorting->insertItem("By Size"); m_sorting->insertItem("By Date"); @@ -81,31 +81,31 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : } m_sorting->setCurrentItem(sortingIdx); - new QLabel(i18n("Sort order:"), propsGroup); - m_sortOrder = new QComboBox(propsGroup); + new TQLabel(i18n("Sort order:"), propsGroup); + m_sortOrder = new TQComboBox(propsGroup); m_sortOrder->insertItem(i18n("Ascending")); m_sortOrder->insertItem(i18n("Descending")); - const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1; + const int sortOrderIdx = (m_viewProps->sortOrder() == TQt::Ascending) ? 0 : 1; m_sortOrder->setCurrentItem(sortOrderIdx); - m_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsGroup); + m_showHiddenFiles = new TQCheckBox(i18n("Show hidden files"), propsGroup); m_showHiddenFiles->setChecked(m_viewProps->isShowHiddenFilesEnabled()); // create 'Apply view properties to:' group - QButtonGroup* buttonGroup = new QButtonGroup(3, + TQButtonGroup* buttonGroup = new TQButtonGroup(3, Qt::Vertical, i18n("Apply view properties to:"), plainPage()); - buttonGroup->setSizePolicy(sizePolicy); + buttonGroup->tqsetSizePolicy(sizePolicy); buttonGroup->setMargin(margin); - m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), buttonGroup); + m_applyToCurrentFolder = new TQRadioButton(i18n("Current folder"), buttonGroup); buttonGroup->insert(m_applyToCurrentFolder); - m_applyToSubFolders = new QRadioButton(i18n("Current folder including all sub folders"), buttonGroup); + m_applyToSubFolders = new TQRadioButton(i18n("Current folder including all sub folders"), buttonGroup); buttonGroup->insert(m_applyToSubFolders); - m_applyToAllFolders = new QRadioButton(i18n("All folders"), buttonGroup); + m_applyToAllFolders = new TQRadioButton(i18n("All folders"), buttonGroup); buttonGroup->insert(m_applyToAllFolders); if (m_viewProps->isValidForSubDirs()) { @@ -118,20 +118,20 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : topLayout->addWidget(propsGroup); topLayout->addWidget(buttonGroup); - connect(m_viewMode, SIGNAL(activated(int)), - this, SLOT(slotViewModeChanged(int))); - connect(m_sorting, SIGNAL(activated(int)), - this, SLOT(slotSortingChanged(int))); - connect(m_sortOrder, SIGNAL(activated(int)), - this, SLOT(slotSortOrderChanged(int))); - connect(m_showHiddenFiles, SIGNAL(clicked()), - this, SLOT(slotShowHiddenFilesChanged())); - connect(m_applyToCurrentFolder, SIGNAL(clicked()), - this, SLOT(slotApplyToCurrentFolder())); - connect(m_applyToSubFolders, SIGNAL(clicked()), - this, SLOT(slotApplyToSubFolders())); - connect(m_applyToAllFolders, SIGNAL(clicked()), - this, SLOT(slotApplyToAllFolders())); + connect(m_viewMode, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotViewModeChanged(int))); + connect(m_sorting, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSortingChanged(int))); + connect(m_sortOrder, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSortOrderChanged(int))); + connect(m_showHiddenFiles, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowHiddenFilesChanged())); + connect(m_applyToCurrentFolder, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToCurrentFolder())); + connect(m_applyToSubFolders, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToSubFolders())); + connect(m_applyToAllFolders, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToAllFolders())); } ViewPropertiesDialog::~ViewPropertiesDialog() @@ -174,7 +174,7 @@ void ViewPropertiesDialog::slotSortingChanged(int index) void ViewPropertiesDialog::slotSortOrderChanged(int index) { - Qt::SortOrder sortOrder = (index == 0) ? Qt::Ascending : Qt::Descending; + TQt::SortOrder sortOrder = (index == 0) ? TQt::Ascending : TQt::Descending; m_viewProps->setSortOrder(sortOrder); m_isDirty = true; } @@ -207,13 +207,13 @@ void ViewPropertiesDialog::applyViewProperties() { if (m_applyToAllFolders->isChecked()) { if (m_isDirty) { - const QString text(i18n("The view properties of all folders will be replaced. Do you want to continue?")); + const TQString text(i18n("The view properties of all folders will be replaced. Do you want to continue?")); if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { return; } } - ViewProperties props(QDir::homeDirPath()); + ViewProperties props(TQDir::homeDirPath()); props.setViewMode(m_viewProps->viewMode()); props.setSorting(m_viewProps->sorting()); props.setSortOrder(m_viewProps->sortOrder()); @@ -221,7 +221,7 @@ void ViewPropertiesDialog::applyViewProperties() props.setValidForSubDirs(true); } else if (m_applyToSubFolders->isChecked() && m_isDirty) { - const QString text(i18n("The view properties of all sub folders will be replaced. Do you want to continue?")); + const TQString text(i18n("The view properties of all sub folders will be replaced. Do you want to continue?")); if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { return; } -- cgit v1.2.1