diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
commit | d7633c195a464e4d344ada9eea61afd10110598a (patch) | |
tree | 1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/svnfrontend/propertiesdlg.cpp | |
parent | 3fa7eb804f67b2789f128075cc2522f398640250 (diff) | |
download | tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip |
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/svnfrontend/propertiesdlg.cpp')
-rw-r--r-- | src/svnfrontend/propertiesdlg.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/svnfrontend/propertiesdlg.cpp b/src/svnfrontend/propertiesdlg.cpp index 4203765..7bef811 100644 --- a/src/svnfrontend/propertiesdlg.cpp +++ b/src/svnfrontend/propertiesdlg.cpp @@ -25,36 +25,36 @@ #include "svnitem.h" #include "src/svnqt/client.hpp" -#include <qvariant.h> -#include <qlabel.h> -#include <qheader.h> +#include <tqvariant.h> +#include <tqlabel.h> +#include <tqheader.h> #include <kpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kmessagebox.h> #include <kiconloader.h> #include <kdebug.h> /* - * Constructs a PropertiesDlg as a child of 'parent', with the + * Constructs a PropertiesDlg as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revision&aRev, QWidget* parent, const char* name, bool modal) +PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revision&aRev, TQWidget* tqparent, const char* name, bool modal) : - KDialogBase(parent,name,modal,i18n("Modify properties"),Ok|Cancel/*|Help|User1|User2*/, Ok, + KDialogBase(tqparent,name,modal,i18n("Modify properties"),Ok|Cancel/*|Help|User1|User2*/, Ok, true/*, KStdGuiItem::add(),KStdGuiItem::remove() */), m_Item(which),m_changed(false), m_Client(aClient),m_Rev(aRev) { if ( !name ) setName( "PropertiesDlg" ); - QWidget * m = makeMainWidget(); - PropertiesDlgLayout = new QHBoxLayout(m, marginHint(), spacingHint(), "PropertiesDlgLayout"); + TQWidget * m = makeMainWidget(); + PropertiesDlgLayout = new TQHBoxLayout(m, marginHint(), spacingHint(), "PropertiesDlgLayout"); m_PropertiesListview = new Propertylist(m, "m_PropertiesListview" ); m_PropertiesListview->setAllColumnsShowFocus( TRUE ); @@ -67,14 +67,14 @@ PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revi m_PropertiesListview->setFullWidth( TRUE ); PropertiesDlgLayout->addWidget( m_PropertiesListview); - m_rightLayout = new QVBoxLayout(0, marginHint(), spacingHint(), "m_rightLayout"); + m_rightLayout = new TQVBoxLayout(0, marginHint(), spacingHint(), "m_rightLayout"); m_AddButton = new KPushButton(m, "m_AddButton" ); m_rightLayout->addWidget( m_AddButton ); m_ModifyButton = new KPushButton(m, "m_ModifyButton" ); m_rightLayout->addWidget( m_ModifyButton ); m_DeleteButton = new KPushButton(m, "m_DeleteButton" ); m_rightLayout->addWidget( m_DeleteButton ); - m_rightSpacer = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); + m_rightSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); m_rightLayout->addItem(m_rightSpacer); PropertiesDlgLayout->addLayout(m_rightLayout); m_DeleteButton->setEnabled(false); @@ -85,12 +85,12 @@ PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revi clearWState( WState_Polished ); // signals and slots connections - connect( m_AddButton, SIGNAL(clicked()), this, SLOT(slotAdd())); - connect( m_ModifyButton, SIGNAL(clicked()), this, SLOT(slotModify())); - connect( m_DeleteButton, SIGNAL(clicked()), this, SLOT(slotDelete())); - connect(this,SIGNAL(helpClicked()),SLOT(slotHelp())); - connect(m_PropertiesListview,SIGNAL(selectionChanged(QListViewItem*)),this,SLOT(slotSelectionChanged(QListViewItem*))); -// connect(m_PropertiesListview,SIGNAL(executed(QListViewItem*)),this,SLOT(slotSelectionExecuted(QListViewItem*))); + connect( m_AddButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd())); + connect( m_ModifyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModify())); + connect( m_DeleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelete())); + connect(this,TQT_SIGNAL(helpClicked()),TQT_SLOT(slotHelp())); + connect(m_PropertiesListview,TQT_SIGNAL(selectionChanged(TQListViewItem*)),this,TQT_SLOT(slotSelectionChanged(TQListViewItem*))); +// connect(m_PropertiesListview,TQT_SIGNAL(executed(TQListViewItem*)),this,TQT_SLOT(slotSelectionExecuted(TQListViewItem*))); if (!m_Client) { m_PropertiesListview->setEnabled(false); @@ -107,7 +107,7 @@ bool PropertiesDlg::hasChanged()const */ PropertiesDlg::~PropertiesDlg() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* @@ -117,7 +117,7 @@ PropertiesDlg::~PropertiesDlg() void PropertiesDlg::languageChange() { setCaption( i18n("View and modify properties") ); - QToolTip::add(m_PropertiesListview, i18n( "List of properties set" )); + TQToolTip::add(m_PropertiesListview, i18n( "List of properties set" )); m_AddButton->setText(i18n("Add property")); m_ModifyButton->setText(i18n("Modify property")); m_DeleteButton->setText(i18n("Delete property")); @@ -128,7 +128,7 @@ void PropertiesDlg::slotHelp() qWarning( "PropertiesDlg::slotHelp(): Not implemented yet" ); } -void PropertiesDlg::slotSelectionChanged(QListViewItem*item) +void PropertiesDlg::slotSelectionChanged(TQListViewItem*item) { m_DeleteButton->setEnabled(item); m_ModifyButton->setEnabled(item); @@ -153,7 +153,7 @@ void PropertiesDlg::slotSelectionChanged(QListViewItem*item) */ void PropertiesDlg::initItem() { - QString ex; + TQString ex; if (!m_Client) { ex = i18n("Missing SVN link"); emit clientException(ex); @@ -186,9 +186,9 @@ void PropertiesDlg::polish() } /*! - \fn PropertiesDlg::slotSelectionExecuted(QListViewItem*) + \fn PropertiesDlg::slotSelectionExecuted(TQListViewItem*) */ -void PropertiesDlg::slotSelectionExecuted(QListViewItem*) +void PropertiesDlg::slotSelectionExecuted(TQListViewItem*) { } @@ -200,7 +200,7 @@ void PropertiesDlg::slotAdd() /// @TODO Use a object variable to store a reference to dlg for further reuse EditProperty_impl dlg(this); dlg.setDir(m_Item->isDir()); - if (dlg.exec()==QDialog::Accepted) { + if (dlg.exec()==TQDialog::Accepted) { if (PropertyListViewItem::protected_Property(dlg.propName())) { KMessageBox::error(this,i18n("This property may not set by users.\nRejecting it."),i18n("Protected property")); return; @@ -223,7 +223,7 @@ void PropertiesDlg::slotAdd() */ void PropertiesDlg::slotDelete() { - QListViewItem*qi = m_PropertiesListview->selectedItem(); + TQListViewItem*qi = m_PropertiesListview->selectedItem(); if (!qi) return; PropertyListViewItem*ki = static_cast<PropertyListViewItem*> (qi); if (PropertyListViewItem::protected_Property(ki->currentName())) return; @@ -241,7 +241,7 @@ void PropertiesDlg::slotDelete() */ void PropertiesDlg::slotModify() { - QListViewItem*qi = m_PropertiesListview->selectedItem(); + TQListViewItem*qi = m_PropertiesListview->selectedItem(); if (!qi) return; PropertyListViewItem*ki = static_cast<PropertyListViewItem*> (qi); if (PropertyListViewItem::protected_Property(ki->currentName())) return; @@ -250,7 +250,7 @@ void PropertiesDlg::slotModify() dlg.setDir(m_Item->isDir()); dlg.setPropName(ki->currentName()); dlg.setPropValue(ki->currentValue()); - if (dlg.exec()==QDialog::Accepted) { + if (dlg.exec()==TQDialog::Accepted) { if (PropertyListViewItem::protected_Property(dlg.propName())) { KMessageBox::error(this,i18n("This property may not set by users.\nRejecting it."),i18n("Protected property")); return; @@ -266,11 +266,11 @@ void PropertiesDlg::slotModify() } } -void PropertiesDlg::changedItems(svn::PropertiesMap&toSet,QValueList<QString>&toDelete) +void PropertiesDlg::changedItems(svn::PropertiesMap&toSet,TQValueList<TQString>&toDelete) { toSet.clear(); toDelete.clear(); - QListViewItemIterator iter( m_PropertiesListview ); + TQListViewItemIterator iter( m_PropertiesListview ); PropertyListViewItem*ki; while ( iter.current() ) { ki = static_cast<PropertyListViewItem*> (iter.current()); |