diff options
Diffstat (limited to 'kcontrol/filetypes')
-rw-r--r-- | kcontrol/filetypes/control.cpp | 2 | ||||
-rw-r--r-- | kcontrol/filetypes/filegroupdetails.cpp | 26 | ||||
-rw-r--r-- | kcontrol/filetypes/filegroupdetails.h | 6 | ||||
-rw-r--r-- | kcontrol/filetypes/filetypedetails.cpp | 104 | ||||
-rw-r--r-- | kcontrol/filetypes/filetypedetails.h | 24 | ||||
-rw-r--r-- | kcontrol/filetypes/filetypesview.cpp | 130 | ||||
-rw-r--r-- | kcontrol/filetypes/filetypesview.h | 32 | ||||
-rw-r--r-- | kcontrol/filetypes/keditfiletype.cpp | 28 | ||||
-rw-r--r-- | kcontrol/filetypes/kservicelistwidget.cpp | 90 | ||||
-rw-r--r-- | kcontrol/filetypes/kservicelistwidget.h | 16 | ||||
-rw-r--r-- | kcontrol/filetypes/kserviceselectdlg.cpp | 14 | ||||
-rw-r--r-- | kcontrol/filetypes/kserviceselectdlg.h | 2 | ||||
-rw-r--r-- | kcontrol/filetypes/newtypedlg.cpp | 30 | ||||
-rw-r--r-- | kcontrol/filetypes/newtypedlg.h | 12 | ||||
-rw-r--r-- | kcontrol/filetypes/typeslistitem.cpp | 110 | ||||
-rw-r--r-- | kcontrol/filetypes/typeslistitem.h | 56 |
16 files changed, 341 insertions, 341 deletions
diff --git a/kcontrol/filetypes/control.cpp b/kcontrol/filetypes/control.cpp index 55e98d95e..9736e9c9b 100644 --- a/kcontrol/filetypes/control.cpp +++ b/kcontrol/filetypes/control.cpp @@ -2,7 +2,7 @@ extern "C" { - KDE_EXPORT KCModule *create_filetypes(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_filetypes(TQWidget *parent, const char *) { return new FileTypesView(parent, "filetypes"); } diff --git a/kcontrol/filetypes/filegroupdetails.cpp b/kcontrol/filetypes/filegroupdetails.cpp index a8895965a..eb57f50ac 100644 --- a/kcontrol/filetypes/filegroupdetails.cpp +++ b/kcontrol/filetypes/filegroupdetails.cpp @@ -17,29 +17,29 @@ */ #include "filegroupdetails.h" #include "typeslistitem.h" -#include <qlayout.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> #include <kdialog.h> #include <klocale.h> -FileGroupDetails::FileGroupDetails(QWidget *parent, const char *name ) - : QWidget( parent, name ) +FileGroupDetails::FileGroupDetails(TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QWidget * parentWidget = this; - QVBoxLayout *secondLayout = new QVBoxLayout(parentWidget, + TQWidget * parentWidget = this; + TQVBoxLayout *secondLayout = new TQVBoxLayout(parentWidget, 0, KDialog::spacingHint()); - m_autoEmbed = new QVButtonGroup( i18n("Left Click Action"), parentWidget ); + m_autoEmbed = new TQVButtonGroup( i18n("Left Click Action"), parentWidget ); m_autoEmbed->layout()->setSpacing( KDialog::spacingHint() ); secondLayout->addWidget( m_autoEmbed ); // The order of those two items is very important. If you change it, fix typeslistitem.cpp ! - new QRadioButton( i18n("Show file in embedded viewer"), m_autoEmbed ); - new QRadioButton( i18n("Show file in separate viewer"), m_autoEmbed ); - connect(m_autoEmbed, SIGNAL( clicked( int ) ), SLOT( slotAutoEmbedClicked( int ) )); + new TQRadioButton( i18n("Show file in embedded viewer"), m_autoEmbed ); + new TQRadioButton( i18n("Show file in separate viewer"), m_autoEmbed ); + connect(m_autoEmbed, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotAutoEmbedClicked( int ) )); - QWhatsThis::add( m_autoEmbed, i18n("Here you can configure what the Konqueror file manager" + TQWhatsThis::add( m_autoEmbed, i18n("Here you can configure what the Konqueror file manager" " will do when you click on a file belonging to this group. Konqueror can display the file in" " an embedded viewer or start up a separate application. You can change this setting for a" " specific file type in the 'Embedding' tab of the file type configuration.") ); diff --git a/kcontrol/filetypes/filegroupdetails.h b/kcontrol/filetypes/filegroupdetails.h index 1716954f3..d52bec176 100644 --- a/kcontrol/filetypes/filegroupdetails.h +++ b/kcontrol/filetypes/filegroupdetails.h @@ -18,7 +18,7 @@ #ifndef _FILEGROUPDETAILS_H #define _FILEGROUPDETAILS_H -#include <qwidget.h> +#include <tqwidget.h> class TypesListItem; class QButtonGroup; @@ -30,7 +30,7 @@ class FileGroupDetails : public QWidget { Q_OBJECT public: - FileGroupDetails(QWidget *parent = 0, const char *name = 0); + FileGroupDetails(TQWidget *parent = 0, const char *name = 0); void setTypeItem( TypesListItem * item ); @@ -44,7 +44,7 @@ private: TypesListItem * m_item; // Embedding config - QButtonGroup *m_autoEmbed; + TQButtonGroup *m_autoEmbed; }; #endif diff --git a/kcontrol/filetypes/filetypedetails.cpp b/kcontrol/filetypes/filetypedetails.cpp index 436fd138d..a678e0eb2 100644 --- a/kcontrol/filetypes/filetypedetails.cpp +++ b/kcontrol/filetypes/filetypedetails.cpp @@ -1,8 +1,8 @@ -#include <qcheckbox.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> +#include <tqwhatsthis.h> #include <kapplication.h> #include <kconfig.h> @@ -16,102 +16,102 @@ #include "filetypedetails.h" #include "typeslistitem.h" -FileTypeDetails::FileTypeDetails( QWidget * parent, const char * name ) - : QTabWidget( parent, name ), m_item( 0L ) +FileTypeDetails::FileTypeDetails( TQWidget * parent, const char * name ) + : TQTabWidget( parent, name ), m_item( 0L ) { - QString wtstr; + TQString wtstr; // First tab - General - QWidget * firstWidget = new QWidget(this); - QVBoxLayout *firstLayout = new QVBoxLayout(firstWidget,KDialog::marginHint(), + TQWidget * firstWidget = new TQWidget(this); + TQVBoxLayout *firstLayout = new TQVBoxLayout(firstWidget,KDialog::marginHint(), KDialog::spacingHint()); - QHBoxLayout *hBox = new QHBoxLayout(0L, 0, KDialog::spacingHint()); + TQHBoxLayout *hBox = new TQHBoxLayout(0L, 0, KDialog::spacingHint()); firstLayout->addLayout(hBox, 1); iconButton = new KIconButton(firstWidget); iconButton->setIconType(KIcon::Desktop, KIcon::MimeType); - connect(iconButton, SIGNAL(iconChanged(QString)), SLOT(updateIcon(QString))); + connect(iconButton, TQT_SIGNAL(iconChanged(TQString)), TQT_SLOT(updateIcon(TQString))); iconButton->setFixedSize(70, 70); hBox->addWidget(iconButton); - QWhatsThis::add( iconButton, i18n("This button displays the icon associated" + TQWhatsThis::add( iconButton, i18n("This button displays the icon associated" " with the selected file type. Click on it to choose a different icon.") ); - QGroupBox *gb = new QGroupBox(i18n("Filename Patterns"), firstWidget); + TQGroupBox *gb = new TQGroupBox(i18n("Filename Patterns"), firstWidget); hBox->addWidget(gb); - QGridLayout *grid = new QGridLayout(gb, 3, 2, KDialog::marginHint(), + TQGridLayout *grid = new TQGridLayout(gb, 3, 2, KDialog::marginHint(), KDialog::spacingHint()); grid->addRowSpacing(0, fontMetrics().lineSpacing()); - extensionLB = new QListBox(gb); - connect(extensionLB, SIGNAL(highlighted(int)), SLOT(enableExtButtons(int))); + extensionLB = new TQListBox(gb); + connect(extensionLB, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableExtButtons(int))); grid->addMultiCellWidget(extensionLB, 1, 2, 0, 0); grid->setRowStretch(0, 0); grid->setRowStretch(1, 1); grid->setRowStretch(2, 0); - QWhatsThis::add( extensionLB, i18n("This box contains a list of patterns that can be" + TQWhatsThis::add( extensionLB, i18n("This box contains a list of patterns that can be" " used to identify files of the selected type. For example, the pattern *.txt is" " associated with the file type 'text/plain'; all files ending in '.txt' are recognized" " as plain text files.") ); - addExtButton = new QPushButton(i18n("Add..."), gb); + addExtButton = new TQPushButton(i18n("Add..."), gb); addExtButton->setEnabled(false); - connect(addExtButton, SIGNAL(clicked()), - this, SLOT(addExtension())); + connect(addExtButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addExtension())); grid->addWidget(addExtButton, 1, 1); - QWhatsThis::add( addExtButton, i18n("Add a new pattern for the selected file type.") ); + TQWhatsThis::add( addExtButton, i18n("Add a new pattern for the selected file type.") ); - removeExtButton = new QPushButton(i18n("Remove"), gb); + removeExtButton = new TQPushButton(i18n("Remove"), gb); removeExtButton->setEnabled(false); - connect(removeExtButton, SIGNAL(clicked()), - this, SLOT(removeExtension())); + connect(removeExtButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeExtension())); grid->addWidget(removeExtButton, 2, 1); - QWhatsThis::add( removeExtButton, i18n("Remove the selected filename pattern.") ); + TQWhatsThis::add( removeExtButton, i18n("Remove the selected filename pattern.") ); - gb = new QGroupBox(i18n("Description"), firstWidget); + gb = new TQGroupBox(i18n("Description"), firstWidget); firstLayout->addWidget(gb); gb->setColumnLayout(1, Qt::Horizontal); description = new KLineEdit(gb); - connect(description, SIGNAL(textChanged(const QString &)), - SLOT(updateDescription(const QString &))); + connect(description, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(updateDescription(const TQString &))); wtstr = i18n("You can enter a short description for files of the selected" " file type (e.g. 'HTML Page'). This description will be used by applications" " like Konqueror to display directory content."); - QWhatsThis::add( gb, wtstr ); - QWhatsThis::add( description, wtstr ); + TQWhatsThis::add( gb, wtstr ); + TQWhatsThis::add( description, wtstr ); serviceListWidget = new KServiceListWidget( KServiceListWidget::SERVICELIST_APPLICATIONS, firstWidget ); - connect( serviceListWidget, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect( serviceListWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); firstLayout->addWidget(serviceListWidget, 5); // Second tab - Embedding - QWidget * secondWidget = new QWidget(this); - QVBoxLayout *secondLayout = new QVBoxLayout(secondWidget, KDialog::marginHint(), + TQWidget * secondWidget = new TQWidget(this); + TQVBoxLayout *secondLayout = new TQVBoxLayout(secondWidget, KDialog::marginHint(), KDialog::spacingHint()); - m_autoEmbed = new QVButtonGroup( i18n("Left Click Action"), secondWidget ); + m_autoEmbed = new TQVButtonGroup( i18n("Left Click Action"), secondWidget ); m_autoEmbed->layout()->setSpacing( KDialog::spacingHint() ); secondLayout->addWidget( m_autoEmbed, 1 ); - m_autoEmbed->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, m_autoEmbed->sizePolicy().hasHeightForWidth() ) ); + m_autoEmbed->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, m_autoEmbed->sizePolicy().hasHeightForWidth() ) ); // The order of those three items is very important. If you change it, fix typeslistitem.cpp ! - new QRadioButton( i18n("Show file in embedded viewer"), m_autoEmbed ); - new QRadioButton( i18n("Show file in separate viewer"), m_autoEmbed ); - m_rbGroupSettings = new QRadioButton( i18n("Use settings for '%1' group"), m_autoEmbed ); - connect(m_autoEmbed, SIGNAL( clicked( int ) ), SLOT( slotAutoEmbedClicked( int ) )); + new TQRadioButton( i18n("Show file in embedded viewer"), m_autoEmbed ); + new TQRadioButton( i18n("Show file in separate viewer"), m_autoEmbed ); + m_rbGroupSettings = new TQRadioButton( i18n("Use settings for '%1' group"), m_autoEmbed ); + connect(m_autoEmbed, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotAutoEmbedClicked( int ) )); - m_chkAskSave = new QCheckBox( i18n("Ask whether to save to disk instead"), m_autoEmbed); - connect(m_chkAskSave, SIGNAL( toggled(bool) ), SLOT( slotAskSaveToggled(bool) )); + m_chkAskSave = new TQCheckBox( i18n("Ask whether to save to disk instead"), m_autoEmbed); + connect(m_chkAskSave, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotAskSaveToggled(bool) )); - QWhatsThis::add( m_autoEmbed, i18n("Here you can configure what the Konqueror file manager" + TQWhatsThis::add( m_autoEmbed, i18n("Here you can configure what the Konqueror file manager" " will do when you click on a file of this type. Konqueror can display the file in" " an embedded viewer or start up a separate application. If set to 'Use settings for G group'," " Konqueror will behave according to the settings of the group G this type belongs to," @@ -121,7 +121,7 @@ FileTypeDetails::FileTypeDetails( QWidget * parent, const char * name ) embedServiceListWidget = new KServiceListWidget( KServiceListWidget::SERVICELIST_SERVICES, secondWidget ); embedServiceListWidget->setMinimumHeight( serviceListWidget->sizeHint().height() ); - connect( embedServiceListWidget, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect( embedServiceListWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); secondLayout->addWidget(embedServiceListWidget, 3); addTab( firstWidget, i18n("&General") ); @@ -133,7 +133,7 @@ void FileTypeDetails::updateRemoveButton() removeExtButton->setEnabled(extensionLB->count()>0); } -void FileTypeDetails::updateIcon(QString icon) +void FileTypeDetails::updateIcon(TQString icon) { if (!m_item) return; @@ -143,7 +143,7 @@ void FileTypeDetails::updateIcon(QString icon) emit changed(true); } -void FileTypeDetails::updateDescription(const QString &desc) +void FileTypeDetails::updateDescription(const TQString &desc) { if (!m_item) return; @@ -159,11 +159,11 @@ void FileTypeDetails::addExtension() return; bool ok; - QString ext = KInputDialog::getText( i18n( "Add New Extension" ), + TQString ext = KInputDialog::getText( i18n( "Add New Extension" ), i18n( "Extension:" ), "*.", &ok, this ); if (ok) { extensionLB->insertItem(ext); - QStringList patt = m_item->patterns(); + TQStringList patt = m_item->patterns(); patt += ext; m_item->setPatterns(patt); updateRemoveButton(); @@ -177,7 +177,7 @@ void FileTypeDetails::removeExtension() return; if ( !m_item ) return; - QStringList patt = m_item->patterns(); + TQStringList patt = m_item->patterns(); patt.remove(extensionLB->text(extensionLB->currentItem())); m_item->setPatterns(patt); extensionLB->removeItem(extensionLB->currentItem()); @@ -210,9 +210,9 @@ void FileTypeDetails::updateAskSave() button = embedParent ? 0 : 1; } - QString mimeType = m_item->name(); + TQString mimeType = m_item->name(); - QString dontAskAgainName; + TQString dontAskAgainName; if (button == 0) // Embedded dontAskAgainName = "askEmbedOrSave"+mimeType; @@ -271,7 +271,7 @@ void FileTypeDetails::setTypeItem( TypesListItem * tlitem ) iconButton->setIcon(tlitem->icon()); else iconButton->resetIcon(); - description->setText(tlitem ? tlitem->comment() : QString::null); + description->setText(tlitem ? tlitem->comment() : TQString::null); if ( tlitem ) m_rbGroupSettings->setText( i18n("Use settings for '%1' group").arg( tlitem->majorType() ) ); extensionLB->clear(); diff --git a/kcontrol/filetypes/filetypedetails.h b/kcontrol/filetypes/filetypedetails.h index 6f9a0a548..fcbe3f3d5 100644 --- a/kcontrol/filetypes/filetypedetails.h +++ b/kcontrol/filetypes/filetypedetails.h @@ -1,7 +1,7 @@ #ifndef _FILETYPEDETAILS_H #define _FILETYPEDETAILS_H -#include <qtabwidget.h> +#include <tqtabwidget.h> class TypesListItem; class KIconButton; class QLineEdit; @@ -22,7 +22,7 @@ class FileTypeDetails : public QTabWidget { Q_OBJECT public: - FileTypeDetails(QWidget *parent = 0, const char *name = 0); + FileTypeDetails(TQWidget *parent = 0, const char *name = 0); void setTypeItem( TypesListItem * item ); @@ -31,12 +31,12 @@ protected: void updateAskSave(); signals: - void embedMajor(const QString &major, bool &embed); // To adjust whether major type is being embedded + void embedMajor(const TQString &major, bool &embed); // To adjust whether major type is being embedded void changed(bool); protected slots: - void updateIcon(QString icon); - void updateDescription(const QString &desc); + void updateIcon(TQString icon); + void updateDescription(const TQString &desc); void addExtension(); void removeExtension(); void enableExtButtons(int index); @@ -48,17 +48,17 @@ private: // First tab - General KIconButton *iconButton; - QListBox *extensionLB; - QPushButton *addExtButton, *removeExtButton; - QLineEdit *description; + TQListBox *extensionLB; + TQPushButton *addExtButton, *removeExtButton; + TQLineEdit *description; KServiceListWidget *serviceListWidget; // Second tab - Embedding - QButtonGroup *m_autoEmbed; + TQButtonGroup *m_autoEmbed; KServiceListWidget *embedServiceListWidget; - QRadioButton *m_rbOpenSeparate; - QCheckBox *m_chkAskSave; - QRadioButton *m_rbGroupSettings; + TQRadioButton *m_rbOpenSeparate; + TQCheckBox *m_chkAskSave; + TQRadioButton *m_rbGroupSettings; }; #endif diff --git a/kcontrol/filetypes/filetypesview.cpp b/kcontrol/filetypes/filetypesview.cpp index 4088e9eee..ad60fc3de 100644 --- a/kcontrol/filetypes/filetypesview.cpp +++ b/kcontrol/filetypes/filetypesview.cpp @@ -1,10 +1,10 @@ -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qwhatsthis.h> -#include <qwidgetstack.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqwhatsthis.h> +#include <tqwidgetstack.h> #include <dcopclient.h> @@ -24,7 +24,7 @@ #include "filetypesview.h" #include <ksycoca.h> -FileTypesView::FileTypesView(QWidget *p, const char *name) +FileTypesView::FileTypesView(TQWidget *p, const char *name) : KCModule(p, name) { m_konqConfig = KSharedConfig::openConfig("konquerorrc", false, false); @@ -50,30 +50,30 @@ FileTypesView::FileTypesView(QWidget *p, const char *name) " MIME-type by directly examining the contents of the file.")); setButtons(Help | Apply | Cancel | Ok); - QString wtstr; + TQString wtstr; - QHBoxLayout *l = new QHBoxLayout(this, 0, KDialog::marginHint()); - QGridLayout *leftLayout = new QGridLayout(0, 4, 3); + TQHBoxLayout *l = new TQHBoxLayout(this, 0, KDialog::marginHint()); + TQGridLayout *leftLayout = new TQGridLayout(0, 4, 3); leftLayout->setSpacing( KDialog::spacingHint() ); leftLayout->setColStretch(1, 1); l->addLayout( leftLayout ); - QLabel *patternFilterLBL = new QLabel(i18n("F&ind filename pattern:"), this); + TQLabel *patternFilterLBL = new TQLabel(i18n("F&ind filename pattern:"), this); leftLayout->addMultiCellWidget(patternFilterLBL, 0, 0, 0, 2); patternFilterLE = new KLineEdit(this); patternFilterLBL->setBuddy( patternFilterLE ); leftLayout->addMultiCellWidget(patternFilterLE, 1, 1, 0, 2); - connect(patternFilterLE, SIGNAL(textChanged(const QString &)), - this, SLOT(slotFilter(const QString &))); + connect(patternFilterLE, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotFilter(const TQString &))); wtstr = i18n("Enter a part of a filename pattern. Only file types with a " "matching file pattern will appear in the list."); - QWhatsThis::add( patternFilterLE, wtstr ); - QWhatsThis::add( patternFilterLBL, wtstr ); + TQWhatsThis::add( patternFilterLE, wtstr ); + TQWhatsThis::add( patternFilterLBL, wtstr ); typesLV = new KListView(this); typesLV->setRootIsDecorated(true); @@ -81,60 +81,60 @@ FileTypesView::FileTypesView(QWidget *p, const char *name) typesLV->addColumn(i18n("Known Types")); leftLayout->addMultiCellWidget(typesLV, 2, 2, 0, 2); - connect(typesLV, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(updateDisplay(QListViewItem *))); - connect(typesLV, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotDoubleClicked(QListViewItem *))); + connect(typesLV, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(updateDisplay(TQListViewItem *))); + connect(typesLV, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotDoubleClicked(TQListViewItem *))); - QWhatsThis::add( typesLV, i18n("Here you can see a hierarchical list of" + TQWhatsThis::add( typesLV, i18n("Here you can see a hierarchical list of" " the file types which are known on your system. Click on the '+' sign" " to expand a category, or the '-' sign to collapse it. Select a file type" " (e.g. text/html for HTML files) to view/edit the information for that" " file type using the controls on the right.") ); - QPushButton *addTypeB = new QPushButton(i18n("Add..."), this); - connect(addTypeB, SIGNAL(clicked()), SLOT(addType())); + TQPushButton *addTypeB = new TQPushButton(i18n("Add..."), this); + connect(addTypeB, TQT_SIGNAL(clicked()), TQT_SLOT(addType())); leftLayout->addWidget(addTypeB, 3, 0); - QWhatsThis::add( addTypeB, i18n("Click here to add a new file type.") ); + TQWhatsThis::add( addTypeB, i18n("Click here to add a new file type.") ); - m_removeTypeB = new QPushButton(i18n("&Remove"), this); - connect(m_removeTypeB, SIGNAL(clicked()), SLOT(removeType())); + m_removeTypeB = new TQPushButton(i18n("&Remove"), this); + connect(m_removeTypeB, TQT_SIGNAL(clicked()), TQT_SLOT(removeType())); leftLayout->addWidget(m_removeTypeB, 3, 2); m_removeTypeB->setEnabled(false); - QWhatsThis::add( m_removeTypeB, i18n("Click here to remove the selected file type.") ); + TQWhatsThis::add( m_removeTypeB, i18n("Click here to remove the selected file type.") ); // For the right panel, prepare a widget stack - m_widgetStack = new QWidgetStack(this); + m_widgetStack = new TQWidgetStack(this); l->addWidget( m_widgetStack ); // File Type Details m_details = new FileTypeDetails( m_widgetStack ); - connect( m_details, SIGNAL( changed(bool) ), - this, SLOT( setDirty(bool) ) ); - connect( m_details, SIGNAL( embedMajor(const QString &, bool &) ), - this, SLOT( slotEmbedMajor(const QString &, bool &))); + connect( m_details, TQT_SIGNAL( changed(bool) ), + this, TQT_SLOT( setDirty(bool) ) ); + connect( m_details, TQT_SIGNAL( embedMajor(const TQString &, bool &) ), + this, TQT_SLOT( slotEmbedMajor(const TQString &, bool &))); m_widgetStack->addWidget( m_details, 1 /*id*/ ); // File Group Details m_groupDetails = new FileGroupDetails( m_widgetStack ); - connect( m_groupDetails, SIGNAL( changed(bool) ), - this, SLOT( setDirty(bool) ) ); + connect( m_groupDetails, TQT_SIGNAL( changed(bool) ), + this, TQT_SLOT( setDirty(bool) ) ); m_widgetStack->addWidget( m_groupDetails, 2 /*id*/ ); // Widget shown on startup - m_emptyWidget = new QLabel( i18n("Select a file type by name or by extension"), m_widgetStack); + m_emptyWidget = new TQLabel( i18n("Select a file type by name or by extension"), m_widgetStack); m_emptyWidget->setAlignment(AlignCenter); m_widgetStack->addWidget( m_emptyWidget, 3 /*id*/ ); m_widgetStack->raiseWidget( m_emptyWidget ); - QTimer::singleShot( 0, this, SLOT( init() ) ); // this takes some time + TQTimer::singleShot( 0, this, TQT_SLOT( init() ) ); // this takes some time - connect( KSycoca::self(), SIGNAL( databaseChanged() ), SLOT( slotDatabaseChanged() ) ); + connect( KSycoca::self(), TQT_SIGNAL( databaseChanged() ), TQT_SLOT( slotDatabaseChanged() ) ); } FileTypesView::~FileTypesView() @@ -171,14 +171,14 @@ void FileTypesView::readFileTypes() TypesListItem *groupItem; KMimeType::List mimetypes = KMimeType::allMimeTypes(); - QValueListIterator<KMimeType::Ptr> it2(mimetypes.begin()); + TQValueListIterator<KMimeType::Ptr> it2(mimetypes.begin()); for (; it2 != mimetypes.end(); ++it2) { - QString mimetype = (*it2)->name(); + TQString mimetype = (*it2)->name(); int index = mimetype.find("/"); - QString maj = mimetype.left(index); - QString min = mimetype.right(mimetype.length() - index+1); + TQString maj = mimetype.left(index); + TQString min = mimetype.right(mimetype.length() - index+1); - QMapIterator<QString,TypesListItem*> mit = m_majorMap.find( maj ); + TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.find( maj ); if ( mit == m_majorMap.end() ) { groupItem = new TypesListItem( typesLV, maj ); m_majorMap.insert( maj, groupItem ); @@ -193,10 +193,10 @@ void FileTypesView::readFileTypes() } -void FileTypesView::slotEmbedMajor(const QString &major, bool &embed) +void FileTypesView::slotEmbedMajor(const TQString &major, bool &embed) { TypesListItem *groupItem; - QMapIterator<QString,TypesListItem*> mit = m_majorMap.find( major ); + TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.find( major ); if ( mit == m_majorMap.end() ) return; @@ -205,11 +205,11 @@ void FileTypesView::slotEmbedMajor(const QString &major, bool &embed) embed = (groupItem->autoEmbed() == 0); } -void FileTypesView::slotFilter(const QString & patternFilter) +void FileTypesView::slotFilter(const TQString & patternFilter) { // one of the few ways to clear a listview without destroying the - // listviewitems and without making QListView crash. - QListViewItem *item; + // listviewitems and without making TQListView crash. + TQListViewItem *item; while ( (item = typesLV->firstChild()) ) { while ( item->firstChild() ) item->takeItem( item->firstChild() ); @@ -218,13 +218,13 @@ void FileTypesView::slotFilter(const QString & patternFilter) } // insert all items and their group that match the filter - QPtrListIterator<TypesListItem> it( m_itemList ); + TQPtrListIterator<TypesListItem> it( m_itemList ); while ( it.current() ) { if ( patternFilter.isEmpty() || !((*it)->patterns().grep( patternFilter, false )).isEmpty() ) { TypesListItem *group = m_majorMap[ (*it)->majorType() ]; - // QListView makes sure we don't insert a group-item more than once + // TQListView makes sure we don't insert a group-item more than once typesLV->insertItem( group ); group->insertItem( *it ); } @@ -234,8 +234,8 @@ void FileTypesView::slotFilter(const QString & patternFilter) void FileTypesView::addType() { - QStringList allGroups; - QMapIterator<QString,TypesListItem*> it = m_majorMap.begin(); + TQStringList allGroups; + TQMapIterator<TQString,TypesListItem*> it = m_majorMap.begin(); while ( it != m_majorMap.end() ) { allGroups.append( it.key() ); ++it; @@ -244,13 +244,13 @@ void FileTypesView::addType() NewTypeDialog m(allGroups, this); if (m.exec()) { - QListViewItemIterator it(typesLV); - QString loc = m.group() + "/" + m.text() + ".desktop"; + TQListViewItemIterator it(typesLV); + TQString loc = m.group() + "/" + m.text() + ".desktop"; loc = locateLocal("mime", loc); KMimeType::Ptr mimetype = new KMimeType(loc, m.group() + "/" + m.text(), - QString(), QString(), - QStringList()); + TQString(), TQString(), + TQStringList()); TypesListItem *group = m_majorMap[ m.group() ]; if ( !group ) @@ -261,7 +261,7 @@ void FileTypesView::addType() } // find out if our group has been filtered out -> insert if necessary - QListViewItem *item = typesLV->firstChild(); + TQListViewItem *item = typesLV->firstChild(); bool insert = true; while ( item ) { if ( item == group ) { @@ -297,7 +297,7 @@ void FileTypesView::removeType() if ( current->isEssential() ) return; - QListViewItem *li = current->itemAbove(); + TQListViewItem *li = current->itemAbove(); if (!li) li = current->itemBelow(); if (!li) @@ -312,13 +312,13 @@ void FileTypesView::removeType() typesLV->setSelected(li, true); } -void FileTypesView::slotDoubleClicked(QListViewItem *item) +void FileTypesView::slotDoubleClicked(TQListViewItem *item) { if ( !item ) return; item->setOpen( !item->isOpen() ); } -void FileTypesView::updateDisplay(QListViewItem *item) +void FileTypesView::updateDisplay(TQListViewItem *item) { if (!item) { @@ -348,12 +348,12 @@ void FileTypesView::updateDisplay(QListViewItem *item) setDirty(false); } -bool FileTypesView::sync( QValueList<TypesListItem *>& itemsModified ) +bool FileTypesView::sync( TQValueList<TypesListItem *>& itemsModified ) { bool didIt = false; // first, remove those items which we are asked to remove. - QStringList::Iterator it(removedList.begin()); - QString loc; + TQStringList::Iterator it(removedList.begin()); + TQString loc; for (; it != removedList.end(); ++it) { didIt = true; @@ -370,7 +370,7 @@ bool FileTypesView::sync( QValueList<TypesListItem *>& itemsModified ) // now go through all entries and sync those which are dirty. // don't use typesLV, it may be filtered - QMapIterator<QString,TypesListItem*> it1 = m_majorMap.begin(); + TQMapIterator<TQString,TypesListItem*> it1 = m_majorMap.begin(); while ( it1 != m_majorMap.end() ) { TypesListItem *tli = *it1; if (tli->isDirty()) { @@ -381,7 +381,7 @@ bool FileTypesView::sync( QValueList<TypesListItem *>& itemsModified ) } ++it1; } - QPtrListIterator<TypesListItem> it2( m_itemList ); + TQPtrListIterator<TypesListItem> it2( m_itemList ); while ( it2.current() ) { TypesListItem *tli = *it2; if (tli->isDirty()) { @@ -422,9 +422,9 @@ void FileTypesView::slotDatabaseChanged() // our 'copies' to be in sync with it. Not important for OK, but // important for Apply (how to differentiate those 2?). // See BR 35071. - QValueList<TypesListItem *>::Iterator it = m_itemsModified.begin(); + TQValueList<TypesListItem *>::Iterator it = m_itemsModified.begin(); for( ; it != m_itemsModified.end(); ++it ) { - QString name = (*it)->name(); + TQString name = (*it)->name(); if ( removedList.find( name ) == removedList.end() ) // if not deleted meanwhile (*it)->refresh(); } diff --git a/kcontrol/filetypes/filetypesview.h b/kcontrol/filetypes/filetypesview.h index bc6323d85..70b6bb88d 100644 --- a/kcontrol/filetypes/filetypesview.h +++ b/kcontrol/filetypes/filetypesview.h @@ -1,8 +1,8 @@ #ifndef _FILETYPESVIEW_H #define _FILETYPESVIEW_H -#include <qptrlist.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqmap.h> #include <kconfig.h> #include <kcmodule.h> @@ -25,7 +25,7 @@ class FileTypesView : public KCModule { Q_OBJECT public: - FileTypesView(QWidget *p = 0, const char *name = 0); + FileTypesView(TQWidget *p = 0, const char *name = 0); ~FileTypesView(); void load(); @@ -38,34 +38,34 @@ protected slots: void addType(); void removeType(); - void updateDisplay(QListViewItem *); - void slotDoubleClicked(QListViewItem *); - void slotFilter(const QString &patternFilter); + void updateDisplay(TQListViewItem *); + void slotDoubleClicked(TQListViewItem *); + void slotFilter(const TQString &patternFilter); void setDirty(bool state); void slotDatabaseChanged(); - void slotEmbedMajor(const QString &major, bool &embed); + void slotEmbedMajor(const TQString &major, bool &embed); protected: void readFileTypes(); - bool sync( QValueList<TypesListItem *>& itemsModified ); + bool sync( TQValueList<TypesListItem *>& itemsModified ); private: KListView *typesLV; - QPushButton *m_removeTypeB; + TQPushButton *m_removeTypeB; - QWidgetStack * m_widgetStack; + TQWidgetStack * m_widgetStack; FileTypeDetails * m_details; FileGroupDetails * m_groupDetails; - QLabel * m_emptyWidget; + TQLabel * m_emptyWidget; - QLineEdit *patternFilterLE; - QStringList removedList; + TQLineEdit *patternFilterLE; + TQStringList removedList; bool m_dirty; - QMap<QString,TypesListItem*> m_majorMap; - QPtrList<TypesListItem> m_itemList; + TQMap<TQString,TypesListItem*> m_majorMap; + TQPtrList<TypesListItem> m_itemList; - QValueList<TypesListItem *> m_itemsModified; + TQValueList<TypesListItem *> m_itemsModified; KSharedConfig::Ptr m_konqConfig; }; diff --git a/kcontrol/filetypes/keditfiletype.cpp b/kcontrol/filetypes/keditfiletype.cpp index 6c5c4eb6c..48f9e14c5 100644 --- a/kcontrol/filetypes/keditfiletype.cpp +++ b/kcontrol/filetypes/keditfiletype.cpp @@ -19,7 +19,7 @@ #include "typeslistitem.h" #include "keditfiletype.h" -#include <qfile.h> +#include <tqfile.h> #include <dcopclient.h> #include <kapplication.h> @@ -35,14 +35,14 @@ #endif FileTypeDialog::FileTypeDialog( KMimeType::Ptr mime ) - : KDialogBase( 0L, 0, false, QString::null, /* Help | */ Cancel | Apply | Ok, + : KDialogBase( 0L, 0, false, TQString::null, /* Help | */ Cancel | Apply | Ok, Ok, false ) { init( mime, false ); } FileTypeDialog::FileTypeDialog( KMimeType::Ptr mime, bool newItem ) - : KDialogBase( 0L, 0, false, QString::null, /* Help | */ Cancel | Apply | Ok, + : KDialogBase( 0L, 0, false, TQString::null, /* Help | */ Cancel | Apply | Ok, Ok, false ) { init( mime, newItem ); @@ -51,18 +51,18 @@ FileTypeDialog::FileTypeDialog( KMimeType::Ptr mime, bool newItem ) void FileTypeDialog::init( KMimeType::Ptr mime, bool newItem ) { m_details = new FileTypeDetails( this ); - QListView * dummyListView = new QListView( m_details ); + TQListView * dummyListView = new TQListView( m_details ); dummyListView->hide(); m_item = new TypesListItem( dummyListView, mime, newItem ); m_details->setTypeItem( m_item ); // This code is very similar to kcdialog.cpp setMainWidget( m_details ); - connect(m_details, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); + connect(m_details, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(clientChanged(bool))); // TODO setHelp() enableButton(Apply, false); - connect( KSycoca::self(), SIGNAL( databaseChanged() ), SLOT( slotDatabaseChanged() ) ); + connect( KSycoca::self(), TQT_SIGNAL( databaseChanged() ), TQT_SLOT( slotDatabaseChanged() ) ); } void FileTypeDialog::save() @@ -126,31 +126,31 @@ int main(int argc, char ** argv) if (args->count() == 0) KCmdLineArgs::usage(); - QString arg = args->arg(0); + TQString arg = args->arg(0); bool createType = arg.startsWith( "*" ); KMimeType::Ptr mime; if ( createType ) { - QString mimeString = "application/x-kdeuser%1"; - QString loc; + TQString mimeString = "application/x-kdeuser%1"; + TQString loc; int inc = 0; do { ++inc; loc = locateLocal( "mime", mimeString.arg( inc ) + ".desktop" ); } - while ( QFile::exists( loc ) ); + while ( TQFile::exists( loc ) ); - QStringList patterns; + TQStringList patterns; if ( arg.length() > 2 ) patterns << arg.lower() << arg.upper(); - QString comment; + TQString comment; if ( arg.startsWith( "*." ) && arg.length() >= 3 ) { - QString type = arg.mid( 3 ).prepend( arg[2].upper() ); + TQString type = arg.mid( 3 ).prepend( arg[2].upper() ); comment = i18n( "%1 File" ).arg( type ); } - mime = new KMimeType( loc, mimeString.arg( inc ), QString::null, comment, patterns ); + mime = new KMimeType( loc, mimeString.arg( inc ), TQString::null, comment, patterns ); } else { mime = KMimeType::mimeType( arg ); diff --git a/kcontrol/filetypes/kservicelistwidget.cpp b/kcontrol/filetypes/kservicelistwidget.cpp index ed6819a37..e4363415d 100644 --- a/kcontrol/filetypes/kservicelistwidget.cpp +++ b/kcontrol/filetypes/kservicelistwidget.cpp @@ -20,9 +20,9 @@ #include <unistd.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <kapplication.h> #include <kdebug.h> @@ -38,7 +38,7 @@ #include <kstandarddirs.h> KServiceListItem::KServiceListItem( KService *pService, int kind ) - : QListBoxText(), desktopPath(pService->desktopEntryPath()) + : TQListBoxText(), desktopPath(pService->desktopEntryPath()) { if ( kind == KServiceListWidget::SERVICELIST_APPLICATIONS ) setText( pService->name() ); @@ -57,13 +57,13 @@ bool KServiceListItem::isImmutable() return !checkAccess(localPath, W_OK); } -KServiceListWidget::KServiceListWidget(int kind, QWidget *parent, const char *name) - : QGroupBox( kind == SERVICELIST_APPLICATIONS ? i18n("Application Preference Order") +KServiceListWidget::KServiceListWidget(int kind, TQWidget *parent, const char *name) + : TQGroupBox( kind == SERVICELIST_APPLICATIONS ? i18n("Application Preference Order") : i18n("Services Preference Order"), parent, name ), m_kind( kind ), m_item( 0L ) { - QWidget * gb = this; - QGridLayout * grid = new QGridLayout(gb, 7, 2, KDialog::marginHint(), + TQWidget * gb = this; + TQGridLayout * grid = new TQGridLayout(gb, 7, 2, KDialog::marginHint(), KDialog::spacingHint()); grid->addRowSpacing(0, fontMetrics().lineSpacing()); grid->setRowStretch(1, 1); @@ -73,12 +73,12 @@ KServiceListWidget::KServiceListWidget(int kind, QWidget *parent, const char *na grid->setRowStretch(5, 1); grid->setRowStretch(6, 1); - servicesLB = new QListBox(gb); - connect(servicesLB, SIGNAL(highlighted(int)), SLOT(enableMoveButtons(int))); + servicesLB = new TQListBox(gb); + connect(servicesLB, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int))); grid->addMultiCellWidget(servicesLB, 1, 6, 0, 0); - connect( servicesLB, SIGNAL( doubleClicked ( QListBoxItem * )), this, SLOT( editService())); + connect( servicesLB, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )), this, TQT_SLOT( editService())); - QString wtstr = + TQString wtstr = (kind == SERVICELIST_APPLICATIONS ? i18n("This is a list of applications associated with files of the selected" " file type. This list is shown in Konqueror's context menus when you select" @@ -91,15 +91,15 @@ KServiceListWidget::KServiceListWidget(int kind, QWidget *parent, const char *na " then the list is ordered by priority with the uppermost item taking precedence" " over the others.")); - QWhatsThis::add( gb, wtstr ); - QWhatsThis::add( servicesLB, wtstr ); + TQWhatsThis::add( gb, wtstr ); + TQWhatsThis::add( servicesLB, wtstr ); - servUpButton = new QPushButton(i18n("Move &Up"), gb); + servUpButton = new TQPushButton(i18n("Move &Up"), gb); servUpButton->setEnabled(false); - connect(servUpButton, SIGNAL(clicked()), SLOT(promoteService())); + connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(promoteService())); grid->addWidget(servUpButton, 2, 1); - QWhatsThis::add( servUpButton, kind == SERVICELIST_APPLICATIONS ? + TQWhatsThis::add( servUpButton, kind == SERVICELIST_APPLICATIONS ? i18n("Assigns a higher priority to the selected\n" "application, moving it up in the list. Note: This\n" "only affects the selected application if the file type is\n" @@ -107,12 +107,12 @@ KServiceListWidget::KServiceListWidget(int kind, QWidget *parent, const char *na i18n("Assigns a higher priority to the selected\n" "service, moving it up in the list.")); - servDownButton = new QPushButton(i18n("Move &Down"), gb); + servDownButton = new TQPushButton(i18n("Move &Down"), gb); servDownButton->setEnabled(false); - connect(servDownButton, SIGNAL(clicked()), SLOT(demoteService())); + connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(demoteService())); grid->addWidget(servDownButton, 3, 1); - QWhatsThis::add( servDownButton, kind == SERVICELIST_APPLICATIONS ? + TQWhatsThis::add( servDownButton, kind == SERVICELIST_APPLICATIONS ? i18n("Assigns a lower priority to the selected\n" "application, moving it down in the list. Note: This \n" "only affects the selected application if the file type is\n" @@ -120,28 +120,28 @@ KServiceListWidget::KServiceListWidget(int kind, QWidget *parent, const char *na i18n("Assigns a lower priority to the selected\n" "service, moving it down in the list.")); - servNewButton = new QPushButton(i18n("Add..."), gb); + servNewButton = new TQPushButton(i18n("Add..."), gb); servNewButton->setEnabled(false); - connect(servNewButton, SIGNAL(clicked()), SLOT(addService())); + connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addService())); grid->addWidget(servNewButton, 1, 1); - QWhatsThis::add( servNewButton, i18n( "Add a new application for this file type." ) ); + TQWhatsThis::add( servNewButton, i18n( "Add a new application for this file type." ) ); - servEditButton = new QPushButton(i18n("Edit..."), gb); + servEditButton = new TQPushButton(i18n("Edit..."), gb); servEditButton->setEnabled(false); - connect(servEditButton, SIGNAL(clicked()), SLOT(editService())); + connect(servEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(editService())); grid->addWidget(servEditButton, 4, 1); - QWhatsThis::add( servEditButton, i18n( "Edit command line of the selected application." ) ); + TQWhatsThis::add( servEditButton, i18n( "Edit command line of the selected application." ) ); - servRemoveButton = new QPushButton(i18n("Remove"), gb); + servRemoveButton = new TQPushButton(i18n("Remove"), gb); servRemoveButton->setEnabled(false); - connect(servRemoveButton, SIGNAL(clicked()), SLOT(removeService())); + connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeService())); grid->addWidget(servRemoveButton, 5, 1); - QWhatsThis::add( servRemoveButton, i18n( "Remove the selected application from the list." ) ); + TQWhatsThis::add( servRemoveButton, i18n( "Remove the selected application from the list." ) ); } void KServiceListWidget::setTypeItem( TypesListItem * item ) @@ -163,14 +163,14 @@ void KServiceListWidget::setTypeItem( TypesListItem * item ) if ( item ) { - QStringList services = ( m_kind == SERVICELIST_APPLICATIONS ) + TQStringList services = ( m_kind == SERVICELIST_APPLICATIONS ) ? item->appServices() : item->embedServices(); if (services.count() == 0) { servicesLB->insertItem(i18n("None")); } else { - for ( QStringList::Iterator it = services.begin(); + for ( TQStringList::Iterator it = services.begin(); it != services.end(); it++ ) { KService::Ptr pService = KService::serviceByDesktopPath( *it ); @@ -196,7 +196,7 @@ void KServiceListWidget::promoteService() return; } - QListBoxItem *selItem = servicesLB->item(selIndex); + TQListBoxItem *selItem = servicesLB->item(selIndex); servicesLB->takeItem(selItem); servicesLB->insertItem(selItem, selIndex-1); servicesLB->setCurrentItem(selIndex - 1); @@ -219,7 +219,7 @@ void KServiceListWidget::demoteService() return; } - QListBoxItem *selItem = servicesLB->item(selIndex); + TQListBoxItem *selItem = servicesLB->item(selIndex); servicesLB->takeItem(selItem); servicesLB->insertItem(selItem, selIndex+1); servicesLB->setCurrentItem(selIndex + 1); @@ -237,9 +237,9 @@ void KServiceListWidget::addService() KService::Ptr service = 0L; if ( m_kind == SERVICELIST_APPLICATIONS ) { - KOpenWithDlg dlg(m_item->name(), QString::null, 0L); + KOpenWithDlg dlg(m_item->name(), TQString::null, 0L); dlg.setSaveNewApplications(true); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; service = dlg.service(); @@ -250,8 +250,8 @@ void KServiceListWidget::addService() } else { - KServiceSelectDlg dlg(m_item->name(), QString::null, 0L); - if (dlg.exec() != QDialog::Accepted) + KServiceSelectDlg dlg(m_item->name(), TQString::null, 0L); + if (dlg.exec() != TQDialog::Accepted) return; service = dlg.service(); Q_ASSERT(service); @@ -294,14 +294,14 @@ void KServiceListWidget::editService() { // Just like popping up an add dialog except that we // pass the current command line as a default - QListBoxItem *selItem = servicesLB->item(selected); + TQListBoxItem *selItem = servicesLB->item(selected); KService::Ptr service = KService::serviceByDesktopPath( ((KServiceListItem*)selItem)->desktopPath ); if (!service) return; - QString path = service->desktopEntryPath(); + TQString path = service->desktopEntryPath(); // If the path to the desktop file is relative, try to get the full // path from KStdDirs. @@ -310,7 +310,7 @@ void KServiceListWidget::editService() serviceURL.setPath( path ); KFileItem item( serviceURL, "application/x-desktop", KFileItem::Unknown ); KPropertiesDialog dlg( &item, this, 0, true /*modal*/, false /*no auto-show*/ ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; // Reload service @@ -349,15 +349,15 @@ void KServiceListWidget::removeService() if (!m_item) return; // Here are some strings already so that we don't have to break translations // later on. - QString msg1 = i18n("The service <b>%1</b> can not be removed."); - QString msg2 = i18n("The service is listed here because it has been associated " + TQString msg1 = i18n("The service <b>%1</b> can not be removed."); + TQString msg2 = i18n("The service is listed here because it has been associated " "with the <b>%1</b> (%2) file type and files of type " "<b>%3</b> (%4) are per definition also of type " "<b>%5</b>."); - QString msg3 = i18n("Either select the <b>%1</b> file type to remove the " + TQString msg3 = i18n("Either select the <b>%1</b> file type to remove the " "service from there or move the service down " "to deprecate it."); - QString msg4 = i18n("Do you want to remove the service from the <b>%1</b> " + TQString msg4 = i18n("Do you want to remove the service from the <b>%1</b> " "file type or from the <b>%2</b> file type?"); int selected = servicesLB->currentItem(); @@ -398,7 +398,7 @@ void KServiceListWidget::updatePreferredServices() { if (!m_item) return; - QStringList sl; + TQStringList sl; unsigned int count = servicesLB->count(); for (unsigned int i = 0; i < count; i++) { diff --git a/kcontrol/filetypes/kservicelistwidget.h b/kcontrol/filetypes/kservicelistwidget.h index fb20d1c64..eb2590781 100644 --- a/kcontrol/filetypes/kservicelistwidget.h +++ b/kcontrol/filetypes/kservicelistwidget.h @@ -21,8 +21,8 @@ #ifndef _KSERVICELISTWIDGET_H #define _KSERVICELISTWIDGET_H -#include <qgroupbox.h> -#include <qlistbox.h> +#include <tqgroupbox.h> +#include <tqlistbox.h> class TypesListItem; class QLineEdit; class QPushButton; @@ -33,8 +33,8 @@ class KServiceListItem : public QListBoxText public: KServiceListItem( KService *pService, int kind ); bool isImmutable(); - QString desktopPath; - QString localPath; + TQString desktopPath; + TQString localPath; }; /** @@ -48,7 +48,7 @@ class KServiceListWidget : public QGroupBox Q_OBJECT public: enum { SERVICELIST_APPLICATIONS, SERVICELIST_SERVICES }; - KServiceListWidget(int kind, QWidget *parent = 0, const char *name = 0); + KServiceListWidget(int kind, TQWidget *parent = 0, const char *name = 0); void setTypeItem( TypesListItem * item ); @@ -68,9 +68,9 @@ protected: private: int m_kind; - QListBox *servicesLB; - QPushButton *servUpButton, *servDownButton; - QPushButton *servNewButton, *servEditButton, *servRemoveButton; + TQListBox *servicesLB; + TQPushButton *servUpButton, *servDownButton; + TQPushButton *servNewButton, *servEditButton, *servRemoveButton; TypesListItem *m_item; }; diff --git a/kcontrol/filetypes/kserviceselectdlg.cpp b/kcontrol/filetypes/kserviceselectdlg.cpp index c3a925218..340391e32 100644 --- a/kcontrol/filetypes/kserviceselectdlg.cpp +++ b/kcontrol/filetypes/kserviceselectdlg.cpp @@ -22,17 +22,17 @@ #include <klocale.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqvbox.h> +#include <tqlabel.h> -KServiceSelectDlg::KServiceSelectDlg( const QString& /*serviceType*/, const QString& /*value*/, QWidget *parent ) +KServiceSelectDlg::KServiceSelectDlg( const TQString& /*serviceType*/, const TQString& /*value*/, TQWidget *parent ) : KDialogBase( parent, "serviceSelectDlg", true, i18n( "Add Service" ), Ok|Cancel, Ok ) { - QVBox *vbox = new QVBox ( this ); + TQVBox *vbox = new TQVBox ( this ); vbox->setSpacing( KDialog::spacingHint() ); - new QLabel( i18n( "Select service:" ), vbox ); + new TQLabel( i18n( "Select service:" ), vbox ); m_listbox=new KListBox( vbox ); // Can't make a KTrader query since we don't have a servicetype to give, @@ -40,7 +40,7 @@ KServiceSelectDlg::KServiceSelectDlg( const QString& /*serviceType*/, const QStr // So we have to do it the slow way // ### Why can't we query for KParts/ReadOnlyPart as the servicetype? Should work fine! KService::List allServices = KService::allServices(); - QValueListIterator<KService::Ptr> it(allServices.begin()); + TQValueListIterator<KService::Ptr> it(allServices.begin()); for ( ; it != allServices.end() ; ++it ) if ( (*it)->hasServiceType( "KParts/ReadOnlyPart" ) ) { @@ -50,7 +50,7 @@ KServiceSelectDlg::KServiceSelectDlg( const QString& /*serviceType*/, const QStr m_listbox->sort(); m_listbox->setMinimumHeight(350); m_listbox->setMinimumWidth(300); - connect(m_listbox,SIGNAL(doubleClicked ( QListBoxItem * )),SLOT(slotOk())); + connect(m_listbox,TQT_SIGNAL(doubleClicked ( TQListBoxItem * )),TQT_SLOT(slotOk())); setMainWidget(vbox); } diff --git a/kcontrol/filetypes/kserviceselectdlg.h b/kcontrol/filetypes/kserviceselectdlg.h index 05a2d4e9d..6f9bbe568 100644 --- a/kcontrol/filetypes/kserviceselectdlg.h +++ b/kcontrol/filetypes/kserviceselectdlg.h @@ -32,7 +32,7 @@ public: * @param value is the initial service to select (not implemented currently) * @param parent parent widget */ - KServiceSelectDlg( const QString& serviceType, const QString& value = QString::null, QWidget *parent = 0L ); + KServiceSelectDlg( const TQString& serviceType, const TQString& value = TQString::null, TQWidget *parent = 0L ); ~KServiceSelectDlg(); diff --git a/kcontrol/filetypes/newtypedlg.cpp b/kcontrol/filetypes/newtypedlg.cpp index 24760cf1d..fb358f567 100644 --- a/kcontrol/filetypes/newtypedlg.cpp +++ b/kcontrol/filetypes/newtypedlg.cpp @@ -1,39 +1,39 @@ -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> #include <klocale.h> #include <klineedit.h> #include "newtypedlg.h" -NewTypeDialog::NewTypeDialog(QStringList groups, - QWidget *parent, const char *name) +NewTypeDialog::NewTypeDialog(TQStringList groups, + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n( "Create New File Type" ), Ok|Cancel, Ok, true) { - QFrame *main = makeMainWidget(); - QVBoxLayout *topl = new QVBoxLayout(main, 0, spacingHint()); + TQFrame *main = makeMainWidget(); + TQVBoxLayout *topl = new TQVBoxLayout(main, 0, spacingHint()); - QGridLayout *grid = new QGridLayout(2, 2); + TQGridLayout *grid = new TQGridLayout(2, 2); grid->setColStretch(1, 1); topl->addLayout(grid); - QLabel *l = new QLabel(i18n("Group:"), main); + TQLabel *l = new TQLabel(i18n("Group:"), main); grid->addWidget(l, 0, 0); - groupCombo = new QComboBox(main); + groupCombo = new TQComboBox(main); //groupCombo->setEditable( true ); M.O.: Currently, the code in filetypesview isn't capable of handling //new top level types; so better not let them be added than crash. groupCombo->insertStringList(groups); grid->addWidget(groupCombo, 0, 1); - QWhatsThis::add( groupCombo, i18n("Select the category under which" + TQWhatsThis::add( groupCombo, i18n("Select the category under which" " the new file type should be added.") ); - l = new QLabel(i18n("Type name:"), main); + l = new TQLabel(i18n("Type name:"), main); grid->addWidget(l, 1, 0); typeEd = new KLineEdit(main); @@ -45,13 +45,13 @@ NewTypeDialog::NewTypeDialog(QStringList groups, setMinimumSize( 300, 50 ); } -QString NewTypeDialog::group() const +TQString NewTypeDialog::group() const { return groupCombo->currentText(); } -QString NewTypeDialog::text() const +TQString NewTypeDialog::text() const { return typeEd->text(); } diff --git a/kcontrol/filetypes/newtypedlg.h b/kcontrol/filetypes/newtypedlg.h index 386b5fcdb..e76025ea6 100644 --- a/kcontrol/filetypes/newtypedlg.h +++ b/kcontrol/filetypes/newtypedlg.h @@ -1,8 +1,8 @@ #ifndef _NEWTYPEDLG_H #define _NEWTYPEDLG_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdialogbase.h> class KLineEdit; @@ -16,13 +16,13 @@ class QComboBox; class NewTypeDialog : public KDialogBase { public: - NewTypeDialog(QStringList groups, QWidget *parent = 0, + NewTypeDialog(TQStringList groups, TQWidget *parent = 0, const char *name = 0); - QString group() const; - QString text() const; + TQString group() const; + TQString text() const; private: KLineEdit *typeEd; - QComboBox *groupCombo; + TQComboBox *groupCombo; }; #endif diff --git a/kcontrol/filetypes/typeslistitem.cpp b/kcontrol/filetypes/typeslistitem.cpp index 88f3c8035..5bef9a5d6 100644 --- a/kcontrol/filetypes/typeslistitem.cpp +++ b/kcontrol/filetypes/typeslistitem.cpp @@ -26,32 +26,32 @@ #include "typeslistitem.h" -QMap< QString, QStringList >* TypesListItem::s_changedServices; -static KStaticDeleter< QMap< QString, QStringList > > deleter; +TQMap< TQString, TQStringList >* TypesListItem::s_changedServices; +static KStaticDeleter< TQMap< TQString, TQStringList > > deleter; -TypesListItem::TypesListItem(QListView *parent, const QString & major) - : QListViewItem(parent), metaType(true), m_bNewItem(false), m_askSave(2) +TypesListItem::TypesListItem(TQListView *parent, const TQString & major) + : TQListViewItem(parent), metaType(true), m_bNewItem(false), m_askSave(2) { initMeta(major); setText(0, majorType()); } TypesListItem::TypesListItem(TypesListItem *parent, KMimeType::Ptr mimetype, bool newItem) - : QListViewItem(parent), metaType(false), m_bNewItem(newItem), m_askSave(2) + : TQListViewItem(parent), metaType(false), m_bNewItem(newItem), m_askSave(2) { init(mimetype); setText(0, minorType()); } -TypesListItem::TypesListItem(QListView *parent, KMimeType::Ptr mimetype) - : QListViewItem(parent), metaType(false), m_bNewItem(false), m_askSave(2) +TypesListItem::TypesListItem(TQListView *parent, KMimeType::Ptr mimetype) + : TQListViewItem(parent), metaType(false), m_bNewItem(false), m_askSave(2) { init(mimetype); setText(0, majorType()); } -TypesListItem::TypesListItem(QListView *parent, KMimeType::Ptr mimetype, bool newItem) - : QListViewItem(parent), metaType(false), m_bNewItem(newItem), m_askSave(2) +TypesListItem::TypesListItem(TQListView *parent, KMimeType::Ptr mimetype, bool newItem) + : TQListViewItem(parent), metaType(false), m_bNewItem(newItem), m_askSave(2) { init(mimetype); setText(0, majorType()); @@ -61,7 +61,7 @@ TypesListItem::~TypesListItem() { } -void TypesListItem::initMeta( const QString & major ) +void TypesListItem::initMeta( const TQString & major ) { m_bFullInit = true; m_mimetype = 0L; @@ -69,10 +69,10 @@ void TypesListItem::initMeta( const QString & major ) KSharedConfig::Ptr config = KSharedConfig::openConfig("konquerorrc", false, false); config->setGroup("EmbedSettings"); bool defaultValue = defaultEmbeddingSetting( major ); - m_autoEmbed = config->readBoolEntry( QString::fromLatin1("embed-")+m_major, defaultValue ) ? 0 : 1; + m_autoEmbed = config->readBoolEntry( TQString::fromLatin1("embed-")+m_major, defaultValue ) ? 0 : 1; } -bool TypesListItem::defaultEmbeddingSetting( const QString& major ) +bool TypesListItem::defaultEmbeddingSetting( const TQString& major ) { // embedding is false by default except for image/* return ( major=="image" ); @@ -84,7 +84,7 @@ void TypesListItem::setup() { setPixmap(0, m_mimetype->pixmap(KIcon::Small, IconSize(KIcon::Small))); } - QListViewItem::setup(); + TQListViewItem::setup(); } void TypesListItem::init(KMimeType::Ptr mimetype) @@ -101,15 +101,15 @@ void TypesListItem::init(KMimeType::Ptr mimetype) m_major = mimetype->name(); m_minor = ""; } - m_comment = mimetype->comment(QString(), false); - m_icon = mimetype->icon(QString(), false); + m_comment = mimetype->comment(TQString(), false); + m_icon = mimetype->icon(TQString(), false); m_patterns = mimetype->patterns(); m_autoEmbed = readAutoEmbed( mimetype ); } int TypesListItem::readAutoEmbed( KMimeType::Ptr mimetype ) { - QVariant v = mimetype->property( "X-KDE-AutoEmbed" ); + TQVariant v = mimetype->property( "X-KDE-AutoEmbed" ); if ( v.isValid() ) return (v.toBool() ? 0 : 1); else if ( !mimetype->property( "X-KDE-LocalProtocol" ).toString().isEmpty() ) @@ -118,7 +118,7 @@ int TypesListItem::readAutoEmbed( KMimeType::Ptr mimetype ) return 2; } -QStringList TypesListItem::appServices() const +TQStringList TypesListItem::appServices() const { if (!m_bFullInit) { @@ -129,7 +129,7 @@ QStringList TypesListItem::appServices() const return m_appServices; } -QStringList TypesListItem::embedServices() const +TQStringList TypesListItem::embedServices() const { if (!m_bFullInit) { @@ -140,13 +140,13 @@ QStringList TypesListItem::embedServices() const return m_embedServices; } -void TypesListItem::getServiceOffers( QStringList & appServices, QStringList & embedServices ) const +void TypesListItem::getServiceOffers( TQStringList & appServices, TQStringList & embedServices ) const { KServiceTypeProfile::setConfigurationMode(); KServiceTypeProfile::OfferList offerList = KServiceTypeProfile::offers(m_mimetype->name(), "Application"); - QValueListIterator<KServiceOffer> it(offerList.begin()); + TQValueListIterator<KServiceOffer> it(offerList.begin()); for (; it != offerList.end(); ++it) if ((*it).allowAsDefault()) appServices.append((*it).service()->desktopEntryPath()); @@ -168,14 +168,14 @@ bool TypesListItem::isMimeTypeDirty() const kdDebug() << "Mimetype Name Dirty: old=" << m_mimetype->name() << " name()=" << name() << endl; return true; } - if (m_mimetype->comment(QString(), false) != m_comment) + if (m_mimetype->comment(TQString(), false) != m_comment) { - kdDebug() << "Mimetype Comment Dirty: old=" << m_mimetype->comment(QString(),false) << " m_comment=" << m_comment << endl; + kdDebug() << "Mimetype Comment Dirty: old=" << m_mimetype->comment(TQString(),false) << " m_comment=" << m_comment << endl; return true; } - if (m_mimetype->icon(QString(), false) != m_icon) + if (m_mimetype->icon(TQString(), false) != m_icon) { - kdDebug() << "Mimetype Icon Dirty: old=" << m_mimetype->icon(QString(),false) << " m_icon=" << m_icon << endl; + kdDebug() << "Mimetype Icon Dirty: old=" << m_mimetype->icon(TQString(),false) << " m_icon=" << m_icon << endl; return true; } @@ -206,8 +206,8 @@ bool TypesListItem::isDirty() const if ( !isMeta() ) { - QStringList oldAppServices; - QStringList oldEmbedServices; + TQStringList oldAppServices; + TQStringList oldEmbedServices; getServiceOffers( oldAppServices, oldEmbedServices ); if (oldAppServices != m_appServices) @@ -230,7 +230,7 @@ bool TypesListItem::isDirty() const KSharedConfig::Ptr config = KSharedConfig::openConfig("konquerorrc", false, false); config->setGroup("EmbedSettings"); bool defaultValue = defaultEmbeddingSetting(m_major); - unsigned int oldAutoEmbed = config->readBoolEntry( QString::fromLatin1("embed-")+m_major, defaultValue ) ? 0 : 1; + unsigned int oldAutoEmbed = config->readBoolEntry( TQString::fromLatin1("embed-")+m_major, defaultValue ) ? 0 : 1; if ( m_autoEmbed != oldAutoEmbed ) return true; } @@ -249,7 +249,7 @@ void TypesListItem::sync() { KSharedConfig::Ptr config = KSharedConfig::openConfig("konquerorrc", false, false); config->setGroup("EmbedSettings"); - config->writeEntry( QString::fromLatin1("embed-")+m_major, m_autoEmbed == 0 ); + config->writeEntry( TQString::fromLatin1("embed-")+m_major, m_autoEmbed == 0 ); return; } @@ -286,9 +286,9 @@ void TypesListItem::sync() config.writeEntry("Hidden", false); if ( m_autoEmbed == 2 ) - config.deleteEntry( QString::fromLatin1("X-KDE-AutoEmbed"), false ); + config.deleteEntry( TQString::fromLatin1("X-KDE-AutoEmbed"), false ); else - config.writeEntry( QString::fromLatin1("X-KDE-AutoEmbed"), m_autoEmbed == 0 ); + config.writeEntry( TQString::fromLatin1("X-KDE-AutoEmbed"), m_autoEmbed == 0 ); m_bNewItem = false; } @@ -298,9 +298,9 @@ void TypesListItem::sync() // Deleting current contents in profilerc relating to // this service type // - QStringList groups = profile.groupList(); + TQStringList groups = profile.groupList(); - for (QStringList::Iterator it = groups.begin(); + for (TQStringList::Iterator it = groups.begin(); it != groups.end(); it++ ) { profile.setGroup(*it); @@ -331,7 +331,7 @@ void TypesListItem::sync() offerList += KServiceTypeProfile::offers(m_mimetype->name(), "KParts/ReadOnlyPart"); KServiceTypeProfile::unsetConfigurationMode(); - QValueListIterator<KServiceOffer> it_srv(offerList.begin()); + TQValueListIterator<KServiceOffer> it_srv(offerList.begin()); for (; it_srv != offerList.end(); ++it_srv) { @@ -350,8 +350,8 @@ void TypesListItem::sync() // create a new .desktop file without this mimetype if( s_changedServices == NULL ) - deleter.setObject( s_changedServices, new QMap< QString, QStringList > ); - QStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) + deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); if ( mimeTypeList.contains( name() ) ) { @@ -364,7 +364,7 @@ void TypesListItem::sync() } else { - QString path = pService->locateLocal(); + TQString path = pService->locateLocal(); KConfig orig(pService->desktopEntryPath(), true, false, "apps"); desktop = orig.copyTo(path); } @@ -374,7 +374,7 @@ void TypesListItem::sync() ? (*s_changedServices)[ pService->desktopEntryPath() ] : desktop->readListEntry("MimeType", ';'); // Remove entry and the number that might follow. - QStringList::Iterator it; + TQStringList::Iterator it; for(;(it = mimeTypeList.find(name())) != mimeTypeList.end();) { it = mimeTypeList.remove(it); @@ -405,10 +405,10 @@ void TypesListItem::sync() // KUserProfile is concerned, but using the mimetype makes it a // bit more structured for "manual" reading while ( profile.hasGroup( - name() + " - " + QString::number(groupCount) ) ) + name() + " - " + TQString::number(groupCount) ) ) groupCount++; - profile.setGroup( name() + " - " + QString::number(groupCount) ); + profile.setGroup( name() + " - " + TQString::number(groupCount) ); profile.writeEntry("Application", pService->storageId()); profile.writeEntry("ServiceType", name()); @@ -419,9 +419,9 @@ void TypesListItem::sync() } } -static bool inheritsMimetype(KMimeType::Ptr m, const QStringList &mimeTypeList) +static bool inheritsMimetype(KMimeType::Ptr m, const TQStringList &mimeTypeList) { - for(QStringList::ConstIterator it = mimeTypeList.begin(); + for(TQStringList::ConstIterator it = mimeTypeList.begin(); it != mimeTypeList.end(); ++it) { if (m->is(*it)) @@ -431,17 +431,17 @@ static bool inheritsMimetype(KMimeType::Ptr m, const QStringList &mimeTypeList) return false; } -KMimeType::Ptr TypesListItem::findImplicitAssociation(const QString &desktop) +KMimeType::Ptr TypesListItem::findImplicitAssociation(const TQString &desktop) { KService::Ptr s = KService::serviceByDesktopPath(desktop); if (!s) return 0; // Hey, where did that one go? if( s_changedServices == NULL ) - deleter.setObject( s_changedServices, new QMap< QString, QStringList > ); - QStringList mimeTypeList = s_changedServices->contains( s->desktopEntryPath()) + deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); + TQStringList mimeTypeList = s_changedServices->contains( s->desktopEntryPath()) ? (*s_changedServices)[ s->desktopEntryPath() ] : s->serviceTypes(); - for(QStringList::ConstIterator it = mimeTypeList.begin(); + for(TQStringList::ConstIterator it = mimeTypeList.begin(); it != mimeTypeList.end(); ++it) { if ((m_mimetype->name() != *it) && m_mimetype->is(*it)) @@ -452,9 +452,9 @@ KMimeType::Ptr TypesListItem::findImplicitAssociation(const QString &desktop) return 0; } -void TypesListItem::saveServices( KConfig & profile, QStringList services, const QString & genericServiceType ) +void TypesListItem::saveServices( KConfig & profile, TQStringList services, const TQString & genericServiceType ) { - QStringList::Iterator it(services.begin()); + TQStringList::Iterator it(services.begin()); for (int i = services.count(); it != services.end(); ++it, i--) { KService::Ptr pService = KService::serviceByDesktopPath(*it); @@ -463,10 +463,10 @@ void TypesListItem::saveServices( KConfig & profile, QStringList services, const // Find a group header. The headers are just dummy names as far as // KUserProfile is concerned, but using the mimetype makes it a // bit more structured for "manual" reading - while ( profile.hasGroup( name() + " - " + QString::number(groupCount) ) ) + while ( profile.hasGroup( name() + " - " + TQString::number(groupCount) ) ) groupCount++; - profile.setGroup( name() + " - " + QString::number(groupCount) ); + profile.setGroup( name() + " - " + TQString::number(groupCount) ); profile.writeEntry("ServiceType", name()); profile.writeEntry("GenericServiceType", genericServiceType); @@ -476,20 +476,20 @@ void TypesListItem::saveServices( KConfig & profile, QStringList services, const // merge new mimetype if( s_changedServices == NULL ) - deleter.setObject( s_changedServices, new QMap< QString, QStringList > ); - QStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) + deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); if (!mimeTypeList.contains(name()) && !inheritsMimetype(m_mimetype, mimeTypeList)) { KConfig *desktop; - if ( pService->type() == QString("Service") ) + if ( pService->type() == TQString("Service") ) { desktop = new KConfig(pService->desktopEntryPath(), false, false, "services"); } else { - QString path = pService->locateLocal(); + TQString path = pService->locateLocal(); KConfig orig(pService->desktopEntryPath(), true, false, "apps"); desktop = orig.copyTo(path); } @@ -510,7 +510,7 @@ void TypesListItem::saveServices( KConfig & profile, QStringList services, const } } -void TypesListItem::setIcon( const QString& icon ) +void TypesListItem::setIcon( const TQString& icon ) { m_icon = icon; setPixmap( 0, SmallIcon( icon ) ); @@ -518,7 +518,7 @@ void TypesListItem::setIcon( const QString& icon ) bool TypesListItem::isEssential() const { - QString n = name(); + TQString n = name(); if ( n == "application/octet-stream" ) return true; if ( n == "inode/directory" ) diff --git a/kcontrol/filetypes/typeslistitem.h b/kcontrol/filetypes/typeslistitem.h index 5f44e9864..18dca1af6 100644 --- a/kcontrol/filetypes/typeslistitem.h +++ b/kcontrol/filetypes/typeslistitem.h @@ -20,7 +20,7 @@ #ifndef _TYPESLISTITEM_H #define _TYPESLISTITEM_H -#include <qlistview.h> +#include <tqlistview.h> #include <kmimetype.h> #include <kuserprofile.h> @@ -31,7 +31,7 @@ public: /** * Create a filetype group */ - TypesListItem(QListView *parent, const QString & major ); + TypesListItem(TQListView *parent, const TQString & major ); /** * Create a filetype item inside a group @@ -41,22 +41,22 @@ public: /** * Create a filetype item not inside a group (used by keditfiletype) */ - TypesListItem(QListView *parent, KMimeType::Ptr mimetype); + TypesListItem(TQListView *parent, KMimeType::Ptr mimetype); /** * Create a filetype item not inside a group (used by keditfiletype) * KDE4: merge with previous */ - TypesListItem(QListView *parent, KMimeType::Ptr mimetype, bool newItem); + TypesListItem(TQListView *parent, KMimeType::Ptr mimetype, bool newItem); ~TypesListItem(); - QString name() const { return m_major + "/" + m_minor; } - QString majorType() const { return m_major; } - QString minorType() const { return m_minor; } - void setMinor(QString m) { m_minor = m; } - QString comment() const { return m_comment; } - void setComment(QString c) { m_comment = c; } + TQString name() const { return m_major + "/" + m_minor; } + TQString majorType() const { return m_major; } + TQString minorType() const { return m_minor; } + void setMinor(TQString m) { m_minor = m; } + TQString comment() const { return m_comment; } + void setComment(TQString c) { m_comment = c; } /** * Returns true if "this" is a group */ @@ -66,14 +66,14 @@ public: * (see KMimeType::checkEssentialMimeTypes) */ bool isEssential() const; - QString icon() const { return m_icon; } - void setIcon(const QString& i); - QStringList patterns() const { return m_patterns; } - void setPatterns(const QStringList &p) { m_patterns = p; } - QStringList appServices() const; - void setAppServices(const QStringList &dsl) { m_appServices = dsl; } - QStringList embedServices() const; - void setEmbedServices(const QStringList &dsl) { m_embedServices = dsl; } + TQString icon() const { return m_icon; } + void setIcon(const TQString& i); + TQStringList patterns() const { return m_patterns; } + void setPatterns(const TQStringList &p) { m_patterns = p; } + TQStringList appServices() const; + void setAppServices(const TQStringList &dsl) { m_appServices = dsl; } + TQStringList embedServices() const; + void setEmbedServices(const TQStringList &dsl) { m_embedServices = dsl; } int autoEmbed() const { return m_autoEmbed; } void setAutoEmbed( int a ) { m_autoEmbed = a; } const KMimeType::Ptr& mimeType() const { return m_mimetype; } @@ -83,7 +83,7 @@ public: void setAskSave(bool); // Whether the service s lists this mimetype explicitly - KMimeType::Ptr findImplicitAssociation(const QString &desktop); + KMimeType::Ptr findImplicitAssociation(const TQString &desktop); bool isMimeTypeDirty() const; // whether the mimetype .desktop file needs saving bool isDirty() const; @@ -91,13 +91,13 @@ public: void setup(); void refresh(); // update m_mimetype from ksycoca when Apply is pressed - static bool defaultEmbeddingSetting( const QString& major ); + static bool defaultEmbeddingSetting( const TQString& major ); static void reset(); private: - void getServiceOffers( QStringList & appServices, QStringList & embedServices ) const; - void saveServices( KConfig & profile, QStringList services, const QString & servicetype2 ); - void initMeta( const QString & major ); + void getServiceOffers( TQStringList & appServices, TQStringList & embedServices ) const; + void saveServices( KConfig & profile, TQStringList services, const TQString & servicetype2 ); + void initMeta( const TQString & major ); void init(KMimeType::Ptr mimetype); static int readAutoEmbed( KMimeType::Ptr mimetype ); @@ -108,11 +108,11 @@ private: unsigned int m_bNewItem:1; unsigned int m_bFullInit:1; unsigned int m_askSave:2; // 0 yes, 1 no, 2 default - QString m_major, m_minor, m_comment, m_icon; - QStringList m_patterns; - QStringList m_appServices; - QStringList m_embedServices; - static QMap< QString, QStringList >* s_changedServices; + TQString m_major, m_minor, m_comment, m_icon; + TQStringList m_patterns; + TQStringList m_appServices; + TQStringList m_embedServices; + static TQMap< TQString, TQStringList >* s_changedServices; }; #endif |