diff options
Diffstat (limited to 'src/stylesheetdialog.cpp')
-rw-r--r-- | src/stylesheetdialog.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/stylesheetdialog.cpp b/src/stylesheetdialog.cpp index 94c351e..99795ca 100644 --- a/src/stylesheetdialog.cpp +++ b/src/stylesheetdialog.cpp @@ -20,20 +20,20 @@ * * ***************************************************************************/ -#include <qiconset.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> +#include <ntqiconset.h> +#include <ntqlabel.h> +#include <ntqlayout.h> +#include <ntqlineedit.h> +#include <ntqlistbox.h> +#include <ntqpushbutton.h> +#include <ntqstring.h> +#include <ntqstringlist.h> #include <kdebug.h> #include <kfiledialog.h> #include <kglobalsettings.h> #include <kiconloader.h> -#include <klocale.h> +#include <tdelocale.h> #include <kmessagebox.h> #include "stylesheetdialog.h" @@ -41,28 +41,28 @@ // constructor // =========== -StylesheetDialog::StylesheetDialog( const QString& currentStylesheetURL, - const QStringList& stylesheetURLs, - QWidget* parent, +StylesheetDialog::StylesheetDialog( const TQString& currentStylesheetURL, + const TQStringList& stylesheetURLs, + TQWidget* parent, const char* name ) : KDialogBase( Plain, "'man' stylesheet location", Ok | Cancel, Ok, parent, name ), m_currentStylesheetURL( currentStylesheetURL ), m_stylesheetURLs( stylesheetURLs ) -{ QGridLayout* layout = new QGridLayout( plainPage( )); - KIconLoader* iconLoader = KGlobal::iconLoader( ); - QIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", KIcon::Small ); - QPushButton* urlButton = new QPushButton( fileOpenIconSet, NULL, plainPage( ), "stylesheet url button" ); - m_urlLineEdit = new QLineEdit( plainPage( ), "stylesheet url line edit" ); - m_urlListBox = new QListBox( plainPage( ), "stylesheet url list box" ); +{ TQGridLayout* layout = new TQGridLayout( plainPage( )); + TDEIconLoader* iconLoader = TDEGlobal::iconLoader( ); + TQIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", TDEIcon::Small ); + TQPushButton* urlButton = new TQPushButton( fileOpenIconSet, NULL, plainPage( ), "stylesheet url button" ); + m_urlLineEdit = new TQLineEdit( plainPage( ), "stylesheet url line edit" ); + m_urlListBox = new TQListBox( plainPage( ), "stylesheet url list box" ); m_urlListBox->insertStringList( stylesheetURLs ); m_urlLineEdit->setMinimumWidth( int( 1.1 * m_urlListBox->maxItemWidth( ))); m_urlLineEdit->setText( currentStylesheetURL ); - layout->addWidget( new QLabel( "Stylesheet URL: ", plainPage( ), "url label" ), 1, 1, Qt::AlignRight ); + layout->addWidget( new TQLabel( "Stylesheet URL: ", plainPage( ), "url label" ), 1, 1, TQt::AlignRight ); layout->addWidget( m_urlLineEdit, 1, 2 ); layout->addWidget( urlButton, 1, 3 ); - layout->addWidget( new QLabel( "Known URLs: ", plainPage( ), "url label" ), 3, 1, Qt::AlignRight | Qt::AlignTop ); + layout->addWidget( new TQLabel( "Known URLs: ", plainPage( ), "url label" ), 3, 1, TQt::AlignRight | TQt::AlignTop ); layout->addWidget( m_urlListBox, 3, 2 ); layout->setColStretch( 0, 1 ); @@ -75,22 +75,22 @@ StylesheetDialog::StylesheetDialog( const QString& currentStylesheetURL, layout->setRowStretch( 4, 2 ); connect( urlButton, SIGNAL( clicked( )), SLOT( slotURLButtonClicked( ))); - connect( m_urlListBox, SIGNAL( doubleClicked( QListBoxItem* )), SLOT( slotURLListBoxDoubleClicked( QListBoxItem* ))); + connect( m_urlListBox, SIGNAL( doubleClicked( TQListBoxItem* )), SLOT( slotURLListBoxDoubleClicked( TQListBoxItem* ))); } // slotOk // ====== void StylesheetDialog::slotOk( ) -{ QString currentStylesheetURL = m_urlLineEdit->text( ); - QStringList::Iterator it = m_stylesheetURLs.find( currentStylesheetURL ); +{ TQString currentStylesheetURL = m_urlLineEdit->text( ); + TQStringList::Iterator it = m_stylesheetURLs.find( currentStylesheetURL ); if( it != m_stylesheetURLs.end( )) m_stylesheetURLs.remove( it ); - if( !QFile::exists( currentStylesheetURL )) - { KMessageBox::sorry( this, QString( i18n( "The stylesheet \"%1\" does not exist" )).arg( currentStylesheetURL ), i18n( "Nonexistant stylesheet" )); - QListBoxItem* item = m_urlListBox->findItem( currentStylesheetURL, Qt::ExactMatch ); + if( !TQFile::exists( currentStylesheetURL )) + { KMessageBox::sorry( this, TQString( i18n( "The stylesheet \"%1\" does not exist" )).arg( currentStylesheetURL ), i18n( "Nonexistant stylesheet" )); + TQListBoxItem* item = m_urlListBox->findItem( currentStylesheetURL, TQt::ExactMatch ); if( item != NULL ) { m_urlListBox->removeItem( m_urlListBox->index( item )); @@ -109,9 +109,9 @@ void StylesheetDialog::slotOk( ) // ==================== void StylesheetDialog::slotURLButtonClicked( ) -{ QString filter = "*.css|CSS files\n*.*|All files"; - QString startDir = (m_currentStylesheetURL.isEmpty( )) ? KGlobalSettings::documentPath( ) : m_currentStylesheetURL; - QString stylesheetURL = KFileDialog::getOpenFileName( startDir, filter, this, "url path dlg" ); +{ TQString filter = "*.css|CSS files\n*.*|All files"; + TQString startDir = (m_currentStylesheetURL.isEmpty( )) ? TDEGlobalSettings::documentPath( ) : m_currentStylesheetURL; + TQString stylesheetURL = KFileDialog::getOpenFileName( startDir, filter, this, "url path dlg" ); if( stylesheetURL.isEmpty( )) return; @@ -122,7 +122,7 @@ void StylesheetDialog::slotURLButtonClicked( ) // slotURLListBoxDoubleClicked // =========================== -void StylesheetDialog::slotURLListBoxDoubleClicked( QListBoxItem* item ) +void StylesheetDialog::slotURLListBoxDoubleClicked( TQListBoxItem* item ) { m_urlLineEdit->setText( item->text( )); slotOk( ); } |