diff options
Diffstat (limited to 'krusader/ActionMan/useractionpage.cpp')
-rw-r--r-- | krusader/ActionMan/useractionpage.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/krusader/ActionMan/useractionpage.cpp b/krusader/ActionMan/useractionpage.cpp index c4c91e7..95b38c4 100644 --- a/krusader/ActionMan/useractionpage.cpp +++ b/krusader/ActionMan/useractionpage.cpp @@ -11,10 +11,10 @@ // #include "useractionpage.h" -#include <qsplitter.h> -#include <qlayout.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqsplitter.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <klineedit.h> #include <kmessagebox.h> #include <kfiledialog.h> @@ -34,43 +34,43 @@ static const char* FILE_FILTER = I18N_NOOP("*.xml|xml-files\n*|all files"); -UserActionPage::UserActionPage( QWidget* parent ) - : QWidget( parent, "UserActionPage" ) +UserActionPage::UserActionPage( TQWidget* tqparent ) + : TQWidget( tqparent, "UserActionPage" ) { - QVBoxLayout* layout = new QVBoxLayout( this, 0, 6, "UserActionPageLayout" ); // 0px margin, 6px item-spacing + TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0, 6, "UserActionPageLayout" ); // 0px margin, 6px item-spacing // ======== pseudo-toolbar start ======== - QHBoxLayout* toolbarLayout = new QHBoxLayout( layout, 0, 0 ); // neither margin nor spacing for the toolbar with autoRaise + TQHBoxLayout* toolbarLayout = new TQHBoxLayout( tqlayout, 0, 0 ); // neither margin nor spacing for the toolbar with autoRaise - newButton = new QToolButton( this, "newButton" ); + newButton = new TQToolButton( this, "newButton" ); newButton->setPixmap( ICON("filenew") ); newButton->setAutoRaise(true); - QToolTip::add( newButton, i18n("Create new useraction") ); + TQToolTip::add( newButton, i18n("Create new useraction") ); - importButton = new QToolButton( this, "importButton" ); + importButton = new TQToolButton( this, "importButton" ); importButton->setPixmap( ICON("fileimport") ); importButton->setAutoRaise(true); - QToolTip::add( importButton, i18n("Import useractions") ); + TQToolTip::add( importButton, i18n("Import useractions") ); - exportButton = new QToolButton( this, "exportButton" ); + exportButton = new TQToolButton( this, "exportButton" ); exportButton->setPixmap( ICON("fileexport") ); exportButton->setAutoRaise(true); - QToolTip::add( exportButton, i18n("Export useractions") ); + TQToolTip::add( exportButton, i18n("Export useractions") ); - copyButton = new QToolButton( this, "copyButton" ); + copyButton = new TQToolButton( this, "copyButton" ); copyButton->setPixmap( ICON("editcopy") ); copyButton->setAutoRaise(true); - QToolTip::add( copyButton, i18n("Copy useractions to clipboard") ); + TQToolTip::add( copyButton, i18n("Copy useractions to clipboard") ); - pasteButton = new QToolButton( this, "pasteButton" ); + pasteButton = new TQToolButton( this, "pasteButton" ); pasteButton->setPixmap( ICON("editpaste") ); pasteButton->setAutoRaise(true); - QToolTip::add( pasteButton, i18n("Paste useractions from clipboard") ); + TQToolTip::add( pasteButton, i18n("Paste useractions from clipboard") ); - removeButton = new QToolButton( this, "removeButton" ); + removeButton = new TQToolButton( this, "removeButton" ); removeButton->setPixmap( ICON("editdelete") ); removeButton->setAutoRaise(true); - QToolTip::add( removeButton, i18n("Delete selected useractions") ); + TQToolTip::add( removeButton, i18n("Delete selected useractions") ); toolbarLayout->addWidget( newButton ); toolbarLayout->addWidget( importButton ); @@ -83,32 +83,32 @@ UserActionPage::UserActionPage( QWidget* parent ) // ======== pseudo-toolbar end ======== /* This seems obsolete now! // Display some help - KMessageBox::information( this, // parent + KMessageBox::information( this, // tqparent i18n( "When you apply changes to an action, the modifications " "become available in the current session immediately.\n" "When closing ActionMan, you will be asked to save the changes permanently." ), - QString::null, // caption + TQString(), // caption "show UserAction help" //dontShowAgainName for the config ); */ - QSplitter *split = new QSplitter( this, "useractionpage splitter"); - layout->addWidget( split, 1000 ); // again a very large stretch-factor to fix the height of the toolbar + TQSplitter *split = new TQSplitter( this, "useractionpage splitter"); + tqlayout->addWidget( split, 1000 ); // again a very large stretch-factor to fix the height of the toolbar actionTree = new UserActionListView( split, "actionTree" ); actionProperties = new ActionProperty( split, "actionProperties" ); actionProperties->setEnabled( false ); // if there are any actions in the list, the first is displayed and this widget is enabled - connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); - connect( newButton, SIGNAL( clicked() ), SLOT( slotNewAction() ) ); - connect( removeButton, SIGNAL( clicked() ), SLOT( slotRemoveAction() ) ); - connect( importButton, SIGNAL( clicked() ), SLOT( slotImport() ) ); - connect( exportButton, SIGNAL( clicked() ), SLOT( slotExport() ) ); - connect( copyButton, SIGNAL( clicked() ), SLOT( slotToClip() ) ); - connect( pasteButton, SIGNAL( clicked() ), SLOT( slotFromClip() ) ); + connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) ); + connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotNewAction() ) ); + connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveAction() ) ); + connect( importButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotImport() ) ); + connect( exportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotExport() ) ); + connect( copyButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotToClip() ) ); + connect( pasteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotFromClip() ) ); // forwards the changed signal of the properties - connect ( actionProperties, SIGNAL( changed() ), SIGNAL( changed() ) ); + connect ( actionProperties, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) ); actionTree->setFirstActionCurrent(); actionTree->setFocus(); @@ -126,16 +126,16 @@ bool UserActionPage::continueInSpiteOfChanges() { i18n("The current action has been modified. Do you want to apply these changes?") ); if ( answer == KMessageBox::Cancel ) { - disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) ); + disconnect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( slotChangeCurrent() ) ); actionTree->setCurrentAction( actionProperties->action() ); - connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); + connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) ); return false; } if ( answer == KMessageBox::Yes ) { if ( ! actionProperties->validProperties() ) { - disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) ); + disconnect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( slotChangeCurrent() ) ); actionTree->setCurrentAction( actionProperties->action() ); - connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); + connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) ); return false; } slotUpdateAction(); @@ -199,7 +199,7 @@ void UserActionPage::slotRemoveAction() { if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) ) return; - int messageDelete = KMessageBox::warningContinueCancel ( this, //parent + int messageDelete = KMessageBox::warningContinueCancel ( this, //tqparent i18n("Are you sure that you want to remove all selected actions?"), //text i18n("Remove selected actions?"), //caption i18n("Remove"), //Label for the continue-button @@ -215,7 +215,7 @@ void UserActionPage::slotRemoveAction() { } void UserActionPage::slotImport() { - QString filename = KFileDialog::getOpenFileName(QString::null, i18n(FILE_FILTER), this); + TQString filename = KFileDialog::getOpenFileName(TQString(), i18n(FILE_FILTER), this); if ( filename.isEmpty() ) return; @@ -233,16 +233,16 @@ void UserActionPage::slotExport() { if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) ) return; - QString filename = KFileDialog::getSaveFileName(QString::null, i18n(FILE_FILTER), this); + TQString filename = KFileDialog::getSaveFileName(TQString(), i18n(FILE_FILTER), this); if ( filename.isEmpty() ) return; - QDomDocument doc = QDomDocument( ACTION_DOCTYPE ); - QFile file( filename ); + TQDomDocument doc = TQDomDocument( ACTION_DOCTYPE ); + TQFile file( filename ); int answer = 0; if( file.open( IO_ReadOnly ) ) { // getting here, means the file already exists an can be read if( doc.setContent( &file ) ) // getting here means the file exists and already contains an UserAction-XML-tree - answer = KMessageBox::warningYesNoCancel( this, //parent + answer = KMessageBox::warningYesNoCancel( this, //tqparent i18n("This file already contains some useractions.\nDo you want to overwrite it or should it be merged with the selected actions?"), //text i18n("Overwrite or merge?"), //caption i18n("Overwrite"), //label for Yes-Button @@ -251,7 +251,7 @@ void UserActionPage::slotExport() { file.close(); } if ( answer == 0 && file.exists() ) - answer = KMessageBox::warningContinueCancel( this, //parent + answer = KMessageBox::warningContinueCancel( this, //tqparent i18n("This file already exists. Do you want to overwrite it?"), //text i18n("Overwrite existing file?"), //caption i18n("Overwrite") //label for Continue-Button @@ -268,7 +268,7 @@ void UserActionPage::slotExport() { bool success = UserAction::writeToFile( doc, filename ); if ( ! success ) KMessageBox::error( this, - i18n("Can't open %1 for writing!\nNothing exported.").arg(filename), + i18n("Can't open %1 for writing!\nNothing exported.").tqarg(filename), i18n("Export failed!") ); } @@ -277,14 +277,14 @@ void UserActionPage::slotToClip() { if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) ) return; - QDomDocument doc = actionTree->dumpSelectedActions(); - KApplication::clipboard()->setText( doc.toString() ); + TQDomDocument doc = actionTree->dumpSelectedActions(); + KApplication::tqclipboard()->setText( doc.toString() ); } void UserActionPage::slotFromClip() { - QDomDocument doc( ACTION_DOCTYPE ); - if ( doc.setContent( KApplication::clipboard()->text() ) ) { - QDomElement root = doc.documentElement(); + TQDomDocument doc( ACTION_DOCTYPE ); + if ( doc.setContent( KApplication::tqclipboard()->text() ) ) { + TQDomElement root = doc.documentElement(); UserAction::KrActionList newActions; krUserAction->readFromElement( root, UserAction::renameDoublicated, &newActions ); for ( KrAction* action = newActions.first(); action; action = newActions.next() ) |