diff options
698 files changed, 7065 insertions, 6801 deletions
diff --git a/ark/ace.cpp b/ark/ace.cpp index 0c8fb14..4ce0709 100644 --- a/ark/ace.cpp +++ b/ark/ace.cpp @@ -102,7 +102,7 @@ void AceArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -174,7 +174,7 @@ void AceArch::unarchFileInternal( ) void AceArch::catchMeIfYouCan( KProcess*, char *buffer, int buflen ) { - TQString myBuf = TQString::fromLatin1( buffer, buflen ); + TQString myBuf = TQString::tqfromLatin1( buffer, buflen ); kdDebug(1601) << " Wololo!: " << myBuf << endl; } @@ -32,6 +32,7 @@ class KProcess; // TODO: Remove me! class AceArch : public Arch { Q_OBJECT + TQ_OBJECT public: AceArch( ArkWidget *, const TQString & ); virtual ~AceArch(); diff --git a/ark/addition.ui b/ark/addition.ui index a8f51d8..8098325 100644 --- a/ark/addition.ui +++ b/ark/addition.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>Addition</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Addition</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_replaceOnlyWithNewer</cstring> </property> @@ -24,7 +24,7 @@ <string>Replace old files only &with newer files</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_forceMSDOS</cstring> </property> @@ -32,7 +32,7 @@ <string>Force &MS-DOS short filenames (Zip)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_convertLF2CRLF</cstring> </property> @@ -40,7 +40,7 @@ <string>Translate &LF to DOS CRLF (Zip)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_rarStoreSymlinks</cstring> </property> @@ -48,7 +48,7 @@ <string>&Store symlinks as links (Zip, Rar)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_rarRecurseSubdirs</cstring> </property> @@ -66,7 +66,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>51</height> @@ -75,5 +75,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> @@ -100,7 +100,7 @@ void ArArch::open() if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { KMessageBox::error( 0, i18n("Could not start a subprocess.") ); - emit sigOpen(this, false, TQString::null, 0 ); + emit sigOpen(this, false, TQString(), 0 ); } kdDebug(1601) << "-ArArch::open" << endl; } @@ -40,6 +40,7 @@ class ArkWidget; class ArArch : public Arch { Q_OBJECT + TQ_OBJECT public: ArArch( ArkWidget *_gui, const TQString & _fileName ); diff --git a/ark/arch.cpp b/ark/arch.cpp index a08484c..336fe59 100644 --- a/ark/arch.cpp +++ b/ark/arch.cpp @@ -118,7 +118,7 @@ void Arch::slotOpenExited( KProcess* _kp ) return; } m_password = ""; - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); delete _kp; _kp = m_currentProcess = 0; return; @@ -140,7 +140,7 @@ void Arch::slotOpenExited( KProcess* _kp ) emit sigOpen( this, true, m_filename, Arch::Extract | Arch::Delete | Arch::Add | Arch::View ); else - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); delete _kp; _kp = m_currentProcess = 0; @@ -206,7 +206,7 @@ void Arch::slotExtractExited( KProcess *_kp ) if ( !getLastShellOutput().isNull() ) { - //getLastShellOutput() is a TQString. errorList is expecting QStringLists to show in multiple lines + //getLastShellOutput() is a TQString. errorList is expecting TQStringLists to show in multiple lines TQStringList list = TQStringList::split( "\n", getLastShellOutput() ); KMessageBox::errorList( m_gui, msg, list ); clearShellOutput(); @@ -297,7 +297,7 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length ) { processLine( m_buffer ); } - else if ( m_buffer.find( m_headerString ) == -1 ) + else if ( m_buffer.tqfind( m_headerString.data() ) == -1 ) { if ( m_header_removed && !m_finished ) { @@ -365,13 +365,13 @@ bool Arch::processLine( const TQCString &line ) : columns[ m_fixYear ]; TQString month = ( m_repairMonth >= 0 ) ? TQString( "%1" ) - .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) + .tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) : columns[ m_fixMonth ]; - TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) - .arg( year ) - .arg( month ) - .arg( columns[ m_fixDay ] ) - .arg( columns[ m_fixTime ] ); + TQString timestamp = TQString::tqfromLatin1( "%1-%2-%3 %4" ) + .tqarg( year ) + .tqarg( month ) + .tqarg( columns[ m_fixDay ] ) + .tqarg( columns[ m_fixTime ] ); columns[ m_dateCol ] = timestamp; } @@ -390,37 +390,37 @@ bool Arch::processLine( const TQCString &line ) Arch *Arch::archFactory( ArchType aType, - ArkWidget *parent, const TQString &filename, + ArkWidget *tqparent, const TQString &filename, const TQString &openAsMimeType ) { switch( aType ) { case TAR_FORMAT: - return new TarArch( parent, filename, openAsMimeType ); + return new TarArch( tqparent, filename, openAsMimeType ); case ZIP_FORMAT: - return new ZipArch( parent, filename ); + return new ZipArch( tqparent, filename ); case LHA_FORMAT: - return new LhaArch( parent, filename ); + return new LhaArch( tqparent, filename ); case COMPRESSED_FORMAT: - return new CompressedFile( parent, filename, openAsMimeType ); + return new CompressedFile( tqparent, filename, openAsMimeType ); case ZOO_FORMAT: - return new ZooArch( parent, filename ); + return new ZooArch( tqparent, filename ); case RAR_FORMAT: - return new RarArch( parent, filename ); + return new RarArch( tqparent, filename ); case AA_FORMAT: - return new ArArch( parent, filename ); + return new ArArch( tqparent, filename ); case SEVENZIP_FORMAT: - return new SevenZipArch( parent, filename ); + return new SevenZipArch( tqparent, filename ); case ACE_FORMAT: - return new AceArch( parent, filename ); + return new AceArch( tqparent, filename ); case UNKNOWN_FORMAT: default: @@ -67,15 +67,16 @@ enum ArchType { UNKNOWN_FORMAT, ZIP_FORMAT, TAR_FORMAT, AA_FORMAT, LHA_FORMAT, RAR_FORMAT, ZOO_FORMAT, COMPRESSED_FORMAT, SEVENZIP_FORMAT, ACE_FORMAT }; -typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList; +typedef TQValueList< TQPair< TQString, TQt::AlignmentFlags > > ColumnList; /** * Pure virtual base class for archives - provides a framework as well as * useful common functionality. */ -class Arch : public QObject +class Arch : public TQObject { Q_OBJECT + TQ_OBJECT protected: /** @@ -128,7 +129,7 @@ class Arch : public QObject // check to see if the utility exists in the PATH of the user void verifyUtilityIsAvailable( const TQString &, - const TQString & = TQString::null ); + const TQString & = TQString() ); void verifyCompressUtilityIsAvailable( const TQString &utility ); @@ -146,9 +147,9 @@ class Arch : public QObject void clearShellOutput() { m_lastShellOutput.truncate( 0 ); } const TQString& getLastShellOutput() const { return m_lastShellOutput; } - static Arch *archFactory( ArchType aType, ArkWidget *parent, + static Arch *archFactory( ArchType aType, ArkWidget *tqparent, const TQString &filename, - const TQString &openAsMimeType = TQString::null ); + const TQString &openAsMimeType = TQString() ); protected slots: void slotOpenExited( KProcess* ); @@ -204,18 +205,18 @@ class Arch : public QObject // Columns // don't forget to change common_texts.cpp if you change something here -#define FILENAME_COLUMN qMakePair( i18n(" Filename "), Qt::AlignLeft ) -#define PERMISSION_COLUMN qMakePair( i18n(" Permissions "), Qt::AlignLeft ) -#define OWNER_GROUP_COLUMN qMakePair( i18n(" Owner/Group "), Qt::AlignLeft ) -#define SIZE_COLUMN qMakePair( i18n(" Size "), Qt::AlignRight ) -#define TIMESTAMP_COLUMN qMakePair( i18n(" Timestamp "), Qt::AlignRight ) -#define LINK_COLUMN qMakePair( i18n(" Link "), Qt::AlignLeft ) -#define PACKED_COLUMN qMakePair( i18n(" Size Now "), Qt::AlignRight ) -#define RATIO_COLUMN qMakePair( i18n(" Ratio "), Qt::AlignRight ) -#define CRC_COLUMN qMakePair( i18n("Cyclic Redundancy Check"," CRC "), Qt::AlignLeft ) -#define METHOD_COLUMN qMakePair( i18n(" Method "), Qt::AlignLeft ) -#define VERSION_COLUMN qMakePair( i18n(" Version "), Qt::AlignLeft ) -#define OWNER_COLUMN qMakePair( i18n(" Owner "), Qt::AlignLeft ) -#define GROUP_COLUMN qMakePair( i18n(" Group "), Qt::AlignLeft ) +#define FILENAME_COLUMN tqMakePair( i18n(" Filename "), TQt::AlignLeft ) +#define PERMISSION_COLUMN tqMakePair( i18n(" Permissions "), TQt::AlignLeft ) +#define OWNER_GROUP_COLUMN tqMakePair( i18n(" Owner/Group "), TQt::AlignLeft ) +#define SIZE_COLUMN tqMakePair( i18n(" Size "), TQt::AlignRight ) +#define TIMESTAMP_COLUMN tqMakePair( i18n(" Timestamp "), TQt::AlignRight ) +#define LINK_COLUMN tqMakePair( i18n(" Link "), TQt::AlignLeft ) +#define PACKED_COLUMN tqMakePair( i18n(" Size Now "), TQt::AlignRight ) +#define RATIO_COLUMN tqMakePair( i18n(" Ratio "), TQt::AlignRight ) +#define CRC_COLUMN tqMakePair( i18n("Cyclic Redundancy Check"," CRC "), TQt::AlignLeft ) +#define METHOD_COLUMN tqMakePair( i18n(" Method "), TQt::AlignLeft ) +#define VERSION_COLUMN tqMakePair( i18n(" Version "), TQt::AlignLeft ) +#define OWNER_COLUMN tqMakePair( i18n(" Owner "), TQt::AlignLeft ) +#define GROUP_COLUMN tqMakePair( i18n(" Group "), TQt::AlignLeft ) #endif /* ARCH_H */ diff --git a/ark/archiveformatdlg.cpp b/ark/archiveformatdlg.cpp index 5ac942c..f9ac931 100644 --- a/ark/archiveformatdlg.cpp +++ b/ark/archiveformatdlg.cpp @@ -28,8 +28,8 @@ #include <tqlabel.h> #include <tqvbox.h> -ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType ) - :KDialogBase( parent, "archiveformatdialog", true, +ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaultType ) + :KDialogBase( tqparent, "archiveformatdialog", true, i18n( "Choose Archive Format" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok), m_combo( 0 ) @@ -40,12 +40,12 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultT text = i18n( "This file appears to be of type %1,\n" "which is not a supported archive format.\n" "In order to proceed, please choose the format\n" - "of the file." ).arg( defaultType ); + "of the file." ).tqarg( defaultType ); else text = i18n( "You are about to open a file that has a non-standard extension.\n" "Ark has detected the format: %1\n" "If this is not correct, please choose " - "the appropriate format." ).arg( defaultDescription ); + "the appropriate format." ).tqarg( defaultDescription ); TQVBox * page = makeVBoxMainWidget(); @@ -56,7 +56,7 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultT TQStringList list = ArchiveFormatInfo::self()->allDescriptions(); list.sort(); m_combo->insertStringList( list ); - m_combo->setCurrentItem( list.findIndex( defaultDescription ) ); + m_combo->setCurrentItem( list.tqfindIndex( defaultDescription ) ); } TQString ArchiveFormatDlg::mimeType() diff --git a/ark/archiveformatdlg.h b/ark/archiveformatdlg.h index 6ef2302..1a1cefa 100644 --- a/ark/archiveformatdlg.h +++ b/ark/archiveformatdlg.h @@ -28,8 +28,9 @@ class ArchiveFormatDlg: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType ); + ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaultType ); TQString mimeType(); private: diff --git a/ark/archiveformatinfo.cpp b/ark/archiveformatinfo.cpp index 01b84fc..ea07d6a 100644 --- a/ark/archiveformatinfo.cpp +++ b/ark/archiveformatinfo.cpp @@ -72,7 +72,7 @@ void ArchiveFormatInfo::buildFormatInfos() addFormatInfo( COMPRESSED_FORMAT, "application/x-xz", ".xz" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-lzop", ".lzo" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-compress", ".Z" ); - find( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); + tqfind( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); addFormatInfo( ZOO_FORMAT, "application/x-zoo", ".zoo" ); @@ -90,7 +90,7 @@ void ArchiveFormatInfo::buildFormatInfos() void ArchiveFormatInfo::addFormatInfo( ArchType type, TQString mime, TQString stdExt ) { - FormatInfo & info = find( type ); + FormatInfo & info = tqfind( type ); KDesktopFile * desktopFile = new KDesktopFile( mime + ".desktop", true, "mime" ); if( !desktopFile ) @@ -146,7 +146,7 @@ TQStringList ArchiveFormatInfo::allDescriptions() return descriptions; } -ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::find( ArchType type ) +ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::tqfind( ArchType type ) { InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) @@ -177,7 +177,7 @@ ArchType ArchiveFormatInfo::archTypeForMimeType( const TQString & mimeType ) InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) { - int index = (*it).mimeTypes.findIndex( mimeType ); + int index = (*it).mimeTypes.tqfindIndex( mimeType ); if( index != -1 ) return (*it).type; } @@ -223,7 +223,7 @@ TQString ArchiveFormatInfo::findMimeType( const KURL & url ) char buffer[ 0x200 ]; dev->open( IO_ReadOnly ); - Q_LONG n = dev->readBlock( buffer, 0x200 ); + TQ_LONG n = dev->readBlock( buffer, 0x200 ); delete dev; if ( n == 0x200 && buffer[0] != 0 && !strncmp(buffer + 257, "ustar", 5) ) @@ -243,11 +243,11 @@ TQString ArchiveFormatInfo::mimeTypeForDescription( const TQString & description int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).allDescriptions.findIndex( description ); + index = (*it).allDescriptions.tqfindIndex( description ); if ( index != -1 ) return (* (*it).mimeTypes.at( index ) ); } - return TQString::null; + return TQString(); } TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType ) @@ -256,11 +256,11 @@ TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.findIndex( mimeType ); + index = (*it).mimeTypes.tqfindIndex( mimeType ); if ( index != -1 ) return (* (*it).allDescriptions.at( index ) ); } - return TQString::null; + return TQString(); } TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType ) @@ -269,11 +269,11 @@ TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.findIndex( mimeType ); + index = (*it).mimeTypes.tqfindIndex( mimeType ); if ( index != -1 ) return (* (*it).defaultExtensions.at( index ) ); } - return TQString::null; + return TQString(); } bool ArchiveFormatInfo::wasUnknownExtension() diff --git a/ark/archiveformatinfo.h b/ark/archiveformatinfo.h index 5ba5ef3..e1c987d 100644 --- a/ark/archiveformatinfo.h +++ b/ark/archiveformatinfo.h @@ -59,7 +59,7 @@ private: enum ArchType type; }; - FormatInfo & find ( ArchType type ); + FormatInfo & tqfind ( ArchType type ); typedef TQValueList<FormatInfo> InfoList; InfoList m_formatInfos; diff --git a/ark/ark_part.cpp b/ark/ark_part.cpp index 60e7ff0..62aa81e 100644 --- a/ark/ark_part.cpp +++ b/ark/ark_part.cpp @@ -63,13 +63,13 @@ KAboutData *ArkPart::createAboutData() -ArkPart::ArkPart( TQWidget *parentWidget, const char * /*widgetName*/, TQObject *parent, +ArkPart::ArkPart( TQWidget *tqparentWidget, const char * /*widgetName*/, TQObject *tqparent, const char *name, const TQStringList &, bool readWrite ) - : KParts::ReadWritePart(parent, name) + : KParts::ReadWritePart(tqparent, name) { kdDebug(1601)<<"ArkPart::ArkPart"<<endl; setInstance(ArkFactory::instance()); - awidget = new ArkWidget( parentWidget, "ArkWidget" ); + awidget = new ArkWidget( tqparentWidget, "ArkWidget" ); setWidget(awidget); connect( awidget, TQT_SIGNAL( fixActions() ), this, TQT_SLOT( fixEnables() ) ); @@ -116,40 +116,40 @@ ArkPart::~ArkPart() void ArkPart::setupActions() { - addFileAction = new KAction(i18n("Add &File..."), "ark_addfile", 0, awidget, + addFileAction = new KAction(i18n("Add &File..."), "ark_addfile", 0, TQT_TQOBJECT(awidget), TQT_SLOT(action_add()), actionCollection(), "addfile"); - addDirAction = new KAction(i18n("Add Folde&r..."), "ark_adddir", 0, awidget, + addDirAction = new KAction(i18n("Add Folde&r..."), "ark_adddir", 0, TQT_TQOBJECT(awidget), TQT_SLOT(action_add_dir()), actionCollection(), "adddir"); - extractAction = new KAction(i18n("E&xtract..."), "ark_extract", 0, awidget, + extractAction = new KAction(i18n("E&xtract..."), "ark_extract", 0, TQT_TQOBJECT(awidget), TQT_SLOT(action_extract()), actionCollection(), "extract"); - deleteAction = new KAction(i18n("De&lete"), "ark_delete", KShortcut(Qt::Key_Delete), awidget, + deleteAction = new KAction(i18n("De&lete"), "ark_delete", KShortcut(TQt::Key_Delete), TQT_TQOBJECT(awidget), TQT_SLOT(action_delete()), actionCollection(), "delete"); - viewAction = new KAction(i18n("to view something","&View"), "ark_view", 0, awidget, + viewAction = new KAction(i18n("to view something","&View"), "ark_view", 0, TQT_TQOBJECT(awidget), TQT_SLOT(action_view()), actionCollection(), "view"); - openWithAction = new KAction(i18n("&Open With..."), 0, awidget, + openWithAction = new KAction(i18n("&Open With..."), 0, TQT_TQOBJECT(awidget), TQT_SLOT(slotOpenWith()), actionCollection(), "open_with"); - editAction = new KAction(i18n("Edit &With..."), 0, awidget, + editAction = new KAction(i18n("Edit &With..."), 0, TQT_TQOBJECT(awidget), TQT_SLOT(action_edit()), actionCollection(), "edit"); - selectAllAction = KStdAction::selectAll(awidget->fileList(), TQT_SLOT(selectAll()), actionCollection(), "select_all"); + selectAllAction = KStdAction::selectAll(TQT_TQOBJECT(awidget->fileList()), TQT_SLOT(selectAll()), actionCollection(), "select_all"); - deselectAllAction = new KAction(i18n("&Unselect All"), 0, awidget->fileList(), TQT_SLOT(unselectAll()), actionCollection(), "deselect_all"); + deselectAllAction = new KAction(i18n("&Unselect All"), 0, TQT_TQOBJECT(awidget->fileList()),TQT_SLOT(unselectAll()), actionCollection(), "deselect_all"); - invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, awidget->fileList(), TQT_SLOT(invertSelection()), actionCollection(), "invert_selection"); + invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, TQT_TQOBJECT(awidget->fileList()),TQT_SLOT(invertSelection()), actionCollection(), "invert_selection"); saveAsAction = KStdAction::saveAs(this, TQT_SLOT(file_save_as()), actionCollection()); //KStdAction::preferences(awidget, TQT_SLOT(showSettings()), actionCollection()); - ( void ) new KAction( i18n( "Configure &Ark..." ), "configure" , 0, awidget, + ( void ) new KAction( i18n( "Configure &Ark..." ), "configure" , 0, TQT_TQOBJECT(awidget), TQT_SLOT( showSettings() ), actionCollection(), "options_configure_ark" ); @@ -158,7 +158,7 @@ ArkPart::setupActions() showSearchBar->setChecked( ArkSettings::showSearchBar() ); - connect( showSearchBar, TQT_SIGNAL( toggled( bool ) ), awidget, TQT_SLOT( slotShowSearchBarToggled( bool ) ) ); + connect( showSearchBar, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(awidget), TQT_SLOT( slotShowSearchBarToggled( bool ) ) ); initialEnables(); } @@ -249,7 +249,7 @@ bool ArkPart::openFile() url.setPath( m_file ); if( !TQFile::exists( m_file ) ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( awidget->realURL() ); return false; } @@ -294,7 +294,7 @@ bool ArkPart::closeURL() int res = KMessageBox::warningYesNoCancel( widget(), i18n( "The archive \"%1\" has been modified.\n" - "Do you want to save it?" ).arg( docName ), + "Do you want to save it?" ).tqarg( docName ), i18n( "Save Archive?" ), KStdGuiItem::save(), KStdGuiItem::discard() ); switch ( res ) @@ -320,7 +320,7 @@ void ArkPart::transferStarted( KIO::Job *job ) { m_job = job; - m_bar->slotSetBusy( i18n( "Downloading %1..." ).arg( m_url.prettyURL() ), + m_bar->slotSetBusy( i18n( "Downloading %1..." ).tqarg( m_url.prettyURL() ), (job != 0), (job != 0) ); if ( job ) @@ -372,8 +372,8 @@ void ArkPart::cancelTransfer() } } -ArkBrowserExtension::ArkBrowserExtension( KParts::ReadOnlyPart * parent, const char * name ) - : KParts::BrowserExtension( parent, name ) +ArkBrowserExtension::ArkBrowserExtension( KParts::ReadOnlyPart * tqparent, const char * name ) + : KParts::BrowserExtension( tqparent, name ) { } @@ -382,8 +382,8 @@ void ArkBrowserExtension::slotOpenURLRequested( const KURL & url ) emit openURLRequest( url, KParts::URLArgs() ); } -ArkStatusBarExtension::ArkStatusBarExtension( KParts::ReadWritePart * parent ) - : KParts::StatusBarExtension( parent ), +ArkStatusBarExtension::ArkStatusBarExtension( KParts::ReadWritePart * tqparent ) + : KParts::StatusBarExtension( tqparent ), m_bBusy( false ), m_pStatusLabelSelect( 0 ), m_pStatusLabelTotal( 0 ), @@ -411,12 +411,12 @@ void ArkStatusBarExtension::setupStatusBar() m_pStatusLabelTotal = new KSqueezedTextLabel( statusBar(), "StatusLabelTotal" ); m_pStatusLabelTotal->setFrameStyle( TQFrame::NoFrame ); - m_pStatusLabelTotal->setAlignment( AlignRight ); + m_pStatusLabelTotal->tqsetAlignment( AlignRight ); m_pStatusLabelTotal->setText( i18n( "Total: 0 files" ) ); m_pStatusLabelSelect = new TQLabel( statusBar(), "StatusLabelSelect" ); m_pStatusLabelSelect->setFrameStyle( TQFrame::NoFrame ); - m_pStatusLabelSelect->setAlignment( AlignLeft ); + m_pStatusLabelSelect->tqsetAlignment( AlignLeft ); m_pStatusLabelSelect->setText(i18n( "0 files selected" ) ); m_cancelButton = new KPushButton( SmallIcon( "cancel" ), TQString(), statusBar(), "CancelButton" ); @@ -454,7 +454,7 @@ void ArkStatusBarExtension::slotSetBusy( const TQString & text, bool showCancelB { m_pBusyText = new TQLabel( statusBar() ); - m_pBusyText->setAlignment( AlignLeft ); + m_pBusyText->tqsetAlignment( AlignLeft ); m_pBusyText->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); } diff --git a/ark/ark_part.h b/ark/ark_part.h index 2be1bd8..816ee6c 100644 --- a/ark/ark_part.h +++ b/ark/ark_part.h @@ -46,8 +46,9 @@ namespace KIO class ArkBrowserExtension: public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - ArkBrowserExtension( KParts::ReadOnlyPart * parent, const char * name = 0L ); + ArkBrowserExtension( KParts::ReadOnlyPart * tqparent, const char * name = 0L ); public slots: void slotOpenURLRequested( const KURL & url ); }; @@ -55,8 +56,9 @@ public slots: class ArkStatusBarExtension: public KParts::StatusBarExtension { Q_OBJECT + TQ_OBJECT public: - ArkStatusBarExtension( KParts::ReadWritePart * parent ); + ArkStatusBarExtension( KParts::ReadWritePart * tqparent ); ~ArkStatusBarExtension(); void setProgress( unsigned long progress ); @@ -86,8 +88,9 @@ private: class ArkPart: public KParts::ReadWritePart { Q_OBJECT + TQ_OBJECT public: - ArkPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, + ArkPart( TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList &, bool readWrite ); virtual ~ArkPart(); diff --git a/ark/arkapp.cpp b/ark/arkapp.cpp index c4604e6..3085399 100644 --- a/ark/arkapp.cpp +++ b/ark/arkapp.cpp @@ -85,7 +85,7 @@ static TQString resolveFilename(const TQString & _arkname) if (name.at(0) != '/') { // copy the path from _arkname - int index = _arkname.findRev('/'); + int index = _arkname.tqfindRev('/'); name = _arkname.left(index + 1) + name; } kdDebug(1601) << "Now resolve " << name << endl; @@ -243,7 +243,7 @@ ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr) else realName = _arkname.prettyURL(); openArksList.append(realName); - m_windowsHash.replace(realName, _ptr); + m_windowsHash.tqreplace(realName, _ptr); kdDebug(1601) << "Saved ptr " << _ptr << " added open ark: " << realName << endl; } @@ -287,7 +287,7 @@ ArkApplication::isArkOpenAlready(const KURL & _arkname) realName = resolveFilename(_arkname.path()); // follow symlink else realName = _arkname.prettyURL(); - return ( openArksList.findIndex(realName) != -1 ); + return ( openArksList.tqfindIndex(realName) != -1 ); } #include "arkapp.moc" diff --git a/ark/arkapp.h b/ark/arkapp.h index 197b241..71cd573 100644 --- a/ark/arkapp.h +++ b/ark/arkapp.h @@ -52,6 +52,7 @@ class EqualKey class ArkApplication : public KUniqueApplication { Q_OBJECT + TQ_OBJECT public: virtual int newInstance(); virtual ~ArkApplication() {} @@ -78,7 +79,7 @@ class ArkApplication : public KUniqueApplication ArkApplication(); private: - TQWidget *m_mainwidget; // to be the parent of all ArkWidgets + TQWidget *m_mainwidget; // to be the tqparent of all ArkWidgets int m_windowCount; TQStringList openArksList; diff --git a/ark/arkfactory.cpp b/ark/arkfactory.cpp index 3e17e7a..d5dfba6 100644 --- a/ark/arkfactory.cpp +++ b/ark/arkfactory.cpp @@ -38,8 +38,8 @@ ArkFactory::~ArkFactory() s_instance = 0L; } -KParts::Part * ArkFactory::createPartObject( TQWidget *parentWidget, - const char *widgetName, TQObject *parent, +KParts::Part * ArkFactory::createPartObject( TQWidget *tqparentWidget, + const char *widgetName, TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ) { @@ -49,7 +49,7 @@ KParts::Part * ArkFactory::createPartObject( TQWidget *parentWidget, { readWrite = true; } - ArkPart* obj = new ArkPart( parentWidget, widgetName, parent, name, + ArkPart* obj = new ArkPart( tqparentWidget, widgetName, tqparent, name, args, readWrite ); //kdDebug( 1601 ) << "classname is: " << TQCString( classname ) << endl; return obj; diff --git a/ark/arkfactory.h b/ark/arkfactory.h index 2b5514b..57bc105 100644 --- a/ark/arkfactory.h +++ b/ark/arkfactory.h @@ -29,8 +29,8 @@ public: ArkFactory() : KParts::Factory() {} virtual ~ArkFactory(); virtual KParts::Part *createPartObject( - TQWidget *parentWidget = 0,const char *widgetName = 0, - TQObject *parent = 0, const char *name = 0, + TQWidget *tqparentWidget = 0,const char *widgetName = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() ); static KInstance* instance(); diff --git a/ark/arkutils.cpp b/ark/arkutils.cpp index bfe496c..94b5bc1 100644 --- a/ark/arkutils.cpp +++ b/ark/arkutils.cpp @@ -69,7 +69,7 @@ #include <klocale.h> #include <klargefile.h> -// Qt includes +// TQt includes #include <tqfile.h> #include "arkutils.h" @@ -101,7 +101,7 @@ TQString ArkUtils::getTimeStamp(const TQString &_month, TQString year, timestamp; - if (_yearOrTime.contains(":")) + if (_yearOrTime.tqcontains(":")) // it has a timestamp so we have to figure out the year { year.sprintf("%d", ArkUtils::getYear(nMonth, thisYear, thisMonth)); @@ -147,7 +147,7 @@ int ArkUtils::getMonth(const char *strMonth) int ArkUtils::getYear(int theMonth, int thisYear, int thisMonth) { - int monthDiff = QABS(thisMonth - theMonth); + int monthDiff = TQABS(thisMonth - theMonth); if (monthDiff > 6) return (thisYear - 1); else @@ -176,7 +176,7 @@ TQString ArkUtils::fixYear(const TQString& strYear) return TQString::number( y ); } else - return TQString::null; + return TQString(); } bool diff --git a/ark/arkviewer.cpp b/ark/arkviewer.cpp index 2f173a8..1e70ce5 100644 --- a/ark/arkviewer.cpp +++ b/ark/arkviewer.cpp @@ -36,11 +36,11 @@ #include <tqurl.h> -ArkViewer::ArkViewer( TQWidget * parent, const char * name ) - : KDialogBase( parent, name, false, TQString::null, Close ), m_part( 0 ) +ArkViewer::ArkViewer( TQWidget * tqparent, const char * name ) + : KDialogBase( tqparent, name, false, TQString(), Close ), m_part( 0 ) { m_widget = new TQVBox( this ); - m_widget->layout()->setSpacing( 10 ); + m_widget->tqlayout()->setSpacing( 10 ); connect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotFinished() ) ); @@ -76,17 +76,17 @@ bool ArkViewer::view( const KURL& filename ) TQLabel *iconLabel = new TQLabel( header ); iconLabel->setPixmap( mimetype->pixmap( KIcon::Desktop ) ); - iconLabel->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); + iconLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); TQVBox *headerRight = new TQVBox( header ); new TQLabel( TQString( "<qt><b>%1</b></qt>" ) - .arg( filename.fileName() ), headerRight + .tqarg( filename.fileName() ), headerRight ); new TQLabel( mimetype->comment(), headerRight ); - header->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Maximum ); + header->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Maximum ); - m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype->name(), TQString::null, m_widget, 0, this ); + m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype->name(), TQString(), m_widget, 0, TQT_TQOBJECT(this) ); if ( m_part ) { diff --git a/ark/arkviewer.h b/ark/arkviewer.h index 3720ffa..c601eab 100644 --- a/ark/arkviewer.h +++ b/ark/arkviewer.h @@ -28,9 +28,10 @@ class ArkViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ArkViewer( TQWidget* parent = 0, const char * name = 0 ); + ArkViewer( TQWidget* tqparent = 0, const char * name = 0 ); ~ArkViewer(); bool view( const KURL& filename ); diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp index 4ced49a..2eb922b 100644 --- a/ark/arkwidget.cpp +++ b/ark/arkwidget.cpp @@ -32,7 +32,7 @@ #include <sys/types.h> #include <sys/stat.h> -// Qt includes +// TQt includes #include <tqlayout.h> #include <tqstringlist.h> #include <tqlabel.h> @@ -81,7 +81,7 @@ #include "searchbar.h" #include "arkviewer.h" -static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) +static void viewInExternalViewer( ArkWidget* tqparent, const KURL& filename ) { TQString mimetype = KMimeType::findByURL( filename )->name(); bool view = true; @@ -89,7 +89,7 @@ static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) if ( KRun::isExecutable( mimetype ) ) { TQString text = i18n( "The file you're trying to view may be an executable. Running untrusted executables may compromise your system's security.\nAre you sure you want to run that file?" ); - view = ( KMessageBox::warningContinueCancel( parent, text, TQString::null, i18n("Run Nevertheless") ) == KMessageBox::Continue ); + view = ( KMessageBox::warningContinueCancel( tqparent, text, TQString(), i18n("Run Nevertheless") ) == KMessageBox::Continue ); } if ( view ) @@ -103,10 +103,10 @@ static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) // //---------------------------------------------------------------------- -ArkWidget::ArkWidget( TQWidget *parent, const char *name ) - : TQVBox(parent, name), m_bBusy( false ), m_bBusyHold( false ), +ArkWidget::ArkWidget( TQWidget *tqparent, const char *name ) + : TQVBox(tqparent, name), m_bBusy( false ), m_bBusyHold( false ), m_extractOnly( false ), m_extractRemote(false), - m_openAsMimeType(TQString::null), m_pTempAddList(NULL), + m_openAsMimeType(TQString()), m_pTempAddList(NULL), m_bArchivePopupEnabled( false ), m_convert_tmpDir( NULL ), m_convertSuccess( false ), m_createRealArchTmpDir( NULL ), m_extractRemoteTmpDir( NULL ), @@ -199,7 +199,7 @@ ArkWidget::updateStatusTotals() m_nSizeOfFiles = m_fileListView->totalSize(); TQString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles ) - .arg( KIO::convertSize( m_nSizeOfFiles ) ); + .tqarg( KIO::convertSize( m_nSizeOfFiles ) ); emit setStatusBarText(strInfo); } @@ -354,7 +354,7 @@ ArkWidget::convertSlotCreateDone( bool success ) // addFile( const TQString & baseDir, // // const TQStringList & filesToAdd ) // ////////////////////////////////////////////////////// - *it = TQString::fromLatin1( "file:" )+ m_convert_tmpDir->name() + *it; + *it = TQString::tqfromLatin1( "file:" )+ m_convert_tmpDir->name() + *it; } bool bOldRecVal = ArkSettings::rarRecurseSubdirs(); connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( convertSlotAddDone( bool ) ) ); @@ -431,7 +431,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b { if ( !KIO::NetAccess::mkdir( m_extractTo_targetDirectory, this ) ) { - KMessageBox::error( 0, i18n( "Could not create the folder %1" ).arg( + KMessageBox::error( 0, i18n( "Could not create the folder %1" ).tqarg( targetDirectory.prettyURL() ) ); emit request_file_quit(); return; @@ -441,7 +441,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b connect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) ); } -const QString +const TQString ArkWidget::guessName( const KURL &archive ) { TQString fileName = archive.fileName(); @@ -453,7 +453,7 @@ ArkWidget::guessName( const KURL &archive ) ext = (*it).remove( '*' ); if ( fileName.endsWith( ext ) ) { - fileName = fileName.left( fileName.findRev( ext ) ); + fileName = fileName.left( fileName.tqfindRev( ext ) ); break; } } @@ -467,7 +467,7 @@ ArkWidget::extractToSlotOpenDone( bool success ) disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) ); if ( !success ) { - KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).arg( m_url.prettyURL() ) ); + KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).tqarg( m_url.prettyURL() ) ); emit request_file_quit(); return; } @@ -712,7 +712,7 @@ ArkWidget::file_open(const KURL& url) TQFileInfo fileInfo( strFile ); if ( !fileInfo.exists() ) { - KMessageBox::error(this, i18n("The archive %1 does not exist.").arg(strFile)); + KMessageBox::error(this, i18n("The archive %1 does not exist.").tqarg(strFile)); emit removeRecentURL( m_realURL ); return; } @@ -756,7 +756,7 @@ ArkWidget::getCreateFilename(const TQString & _caption, TQString strFile; KURL url; - KFileDialog dlg( ":ArkSaveAsDialog", TQString::null, this, "SaveAsDialog", true ); + KFileDialog dlg( ":ArkSaveAsDialog", TQString(), this, "SaveAsDialog", true ); dlg.setCaption( _caption ); dlg.setOperationMode( KFileDialog::Saving ); dlg.setMimeFilter( ArchiveFormatInfo::self()->supportedMimeTypes( allowCompressed ), @@ -775,13 +775,13 @@ ArkWidget::getCreateFilename(const TQString & _caption, strFile = url.path(); if (strFile.isEmpty()) - return TQString::null; + return TQString(); //the user chose to save as the current archive //or wanted to create a new one with the same name //no need to do anything if (strFile == m_strArchName && m_bIsArchiveOpen) - return TQString::null; + return TQString(); TQStringList extensions = dlg.currentFilterMimeType()->patterns(); TQStringList::Iterator it = extensions.begin(); @@ -809,7 +809,7 @@ ArkWidget::getCreateFilename(const TQString & _caption, } else if ( choice == KMessageBox::Cancel ) { - return TQString::null; + return TQString(); } else { @@ -821,8 +821,8 @@ ArkWidget::getCreateFilename(const TQString & _caption, { KMessageBox::error( this, i18n( "You do not have permission" - " to write to the directory %1" ).arg(url.directory() ) ); - return TQString::null; + " to write to the directory %1" ).tqarg(url.directory() ) ); + return TQString(); } } // end of while loop @@ -957,7 +957,7 @@ ArkWidget::file_close() if ( isArchiveOpen() ) { closeArch(); - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeOpenArk( m_strArchName ); updateStatusTotals(); updateStatusSelection(); @@ -968,7 +968,7 @@ ArkWidget::file_close() closeArch(); } - m_strArchName = TQString::null; + m_strArchName = TQString(); m_url = KURL(); } @@ -984,10 +984,10 @@ ArkWidget::askToCreateRealArchive() if (choice == KMessageBox::Yes) { url = getCreateFilename( i18n("Create New Archive"), - TQString::null, false ); + TQString(), false ); } else - url.setPath( TQString::null ); + url.setPath( TQString() ); return url; } @@ -1096,7 +1096,7 @@ ArkWidget::action_add() return; } - KFileDialog fileDlg( ":ArkAddDir", TQString::null, this, "adddlg", true ); + KFileDialog fileDlg( ":ArkAddDir", TQString(), this, "adddlg", true ); fileDlg.setMode( KFile::Mode( KFile::Files | KFile::ExistingOnly ) ); fileDlg.setCaption(i18n("Select Files to Add")); @@ -1204,7 +1204,7 @@ ArkWidget::toLocalFile( const KURL& url ) TQString strURL = url.prettyURL(); TQString tempfile = tmpDir(); - tempfile += strURL.right(strURL.length() - strURL.findRev("/") - 1); + tempfile += strURL.right(strURL.length() - strURL.tqfindRev("/") - 1); deleteAfterUse(tempfile); // remember for deletion KURL tempurl; tempurl.setPath( tempfile ); if( !KIO::NetAccess::dircopy(url, tempurl, this) ) @@ -1255,7 +1255,7 @@ ArkWidget::action_delete() if ( KMessageBox::warningContinueCancelList( this, i18n( "Do you really want to delete the selected items?" ), list, - TQString::null, + TQString(), KStdGuiItem::del(), "confirmDelete" ) != KMessageBox::Continue) @@ -1321,7 +1321,7 @@ ArkWidget::openWithSlotExtractDone( bool success ) { KURL::List list; list.append(m_viewURL); - KOpenWithDlg l( list, i18n("Open with:"), TQString::null, (TQWidget*)0L); + KOpenWithDlg l( list, i18n("Open with:"), TQString(), (TQWidget*)0L); if ( l.exec() ) { KService::Ptr service = l.service(); @@ -1389,7 +1389,7 @@ ArkWidget::reportExtractFailures( const TQString & _dest, TQStringList *_list ) return redoExtraction; } -QStringList +TQStringList ArkWidget::existingFiles( const TQString & _dest, TQStringList & _list ) { TQString strFilename, tmp; @@ -1608,7 +1608,7 @@ ArkWidget::editStart() KURL::List list; // edit will be in progress until the KProcess terminates. KOpenWithDlg l( list, i18n("Edit with:"), - TQString::null, (TQWidget*)0L ); + TQString(), (TQWidget*)0L ); if ( l.exec() ) { KProcess *kp = new KProcess; @@ -1643,10 +1643,10 @@ ArkWidget::slotEditFinished(KProcess *kp) TQStringList::Iterator it = list.begin(); TQString filename = *it; TQString path; - if (filename.contains('/') > 3) + if (filename.tqcontains('/') > 3) { kdDebug(1601) << "Filename is originally: " << filename << endl; - int i = filename.find('/', 5); + int i = filename.tqfind('/', 5); path = filename.left(1+i); kdDebug(1601) << "Changing to dir: " << path << endl; TQDir::setCurrent(path); @@ -1696,7 +1696,7 @@ ArkWidget::viewSlotExtractDone( bool success ) if ( !viewer->view( m_viewURL ) ) { TQString text = i18n( "The internal viewer is not able to display this file. Would you like to view it using an external program?" ); - view = ( KMessageBox::warningYesNo( this, text, TQString::null, i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes ); + view = ( KMessageBox::warningYesNo( this, text, TQString(), i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes ); if ( view ) viewInExternalViewer( this, m_viewURL ); @@ -1734,7 +1734,7 @@ ArkWidget::showCurrentFile() TQString fullname = tmpDir(); fullname += name; - if(fullname.contains("../")) + if(fullname.tqcontains("../")) fullname.remove("../"); //Convert the TQString filename to KURL to escape the bad characters @@ -1817,13 +1817,13 @@ ArkWidget::updateStatusSelection() else if (m_nNumSelectedFiles != 1) { strInfo = i18n("%1 files selected %2") - .arg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0)) - .arg(KIO::convertSize(m_nSizeOfSelectedFiles)); + .tqarg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0)) + .tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); } else { strInfo = i18n("1 file selected %2") - .arg(KIO::convertSize(m_nSizeOfSelectedFiles)); + .tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); } emit setStatusBarSelectedFiles(strInfo); @@ -1896,7 +1896,7 @@ ArkWidget::dropAction( TQStringList & list ) // one or open it as the new current archive int nRet = KMessageBox::warningYesNoCancel(this, i18n("Do you wish to add this to the current archive or open it as a new archive?"), - TQString::null, + TQString(), i18n("&Add"), i18n("&Open")); if (KMessageBox::Yes == nRet) // add it { @@ -1954,7 +1954,7 @@ ArkWidget::dropAction( TQStringList & list ) str = (list.count() > 1) ? i18n("There is no archive currently open. Do you wish to create one now for these files?") : i18n("There is no archive currently open. Do you wish to create one now for this file?"); - int nRet = KMessageBox::warningYesNo(this, str, TQString::null, i18n("Create Archive"), i18n("Do Not Create")); + int nRet = KMessageBox::warningYesNo(this, str, TQString(), i18n("Create Archive"), i18n("Do Not Create")); if (nRet == KMessageBox::Yes) // yes { file_new(); @@ -2044,7 +2044,7 @@ Arch * ArkWidget::getNewArchive( const TQString & _fileName, const TQString& _mi if (!newArch->archUtilityIsAvailable()) { - KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getArchUtility())); + KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getArchUtility())); return NULL; } @@ -2128,7 +2128,7 @@ ArkWidget::openArchive( const TQString & _filename ) ArchiveFormatDlg * dlg = new ArchiveFormatDlg( this, info->findMimeType( m_url ) ); if ( !dlg->exec() == TQDialog::Accepted ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( m_realURL ); delete dlg; file_close(); @@ -2148,7 +2148,7 @@ ArkWidget::openArchive( const TQString & _filename ) if( 0 == ( newArch = Arch::archFactory( archtype, this, _filename, m_openAsMimeType) ) ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( m_realURL ); KMessageBox::error( this, i18n("Unknown archive format or corrupted archive") ); return; @@ -2156,7 +2156,7 @@ ArkWidget::openArchive( const TQString & _filename ) if (!newArch->unarchUtilityIsAvailable()) { - KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getUnarchUtility())); + KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getUnarchUtility())); return; } @@ -2210,8 +2210,8 @@ ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const TQString & _fil else { emit removeRecentURL( m_realURL ); - emit setWindowCaption( TQString::null ); - KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).arg( _filename ) ); + emit setWindowCaption( TQString() ); + KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).tqarg( _filename ) ); if ( m_extractOnly ) emit request_file_quit(); @@ -2257,7 +2257,7 @@ void ArkWidget::showSettings(){ if ( offers.isEmpty() ) genPage->kcfg_KonquerorIntegration->setEnabled( false ); else - genPage->konqIntegrationLabel->setText( TQString::null ); + genPage->konqIntegrationLabel->setText( TQString() ); dialog->show(); diff --git a/ark/arkwidget.h b/ark/arkwidget.h index 529d50e..1ea203f 100644 --- a/ark/arkwidget.h +++ b/ark/arkwidget.h @@ -56,11 +56,12 @@ class FileListView; class SearchBar; -class ArkWidget : public QVBox +class ArkWidget : public TQVBox { Q_OBJECT + TQ_OBJECT public: - ArkWidget( TQWidget *parent=0, const char *name=0 ); + ArkWidget( TQWidget *tqparent=0, const char *name=0 ); virtual ~ArkWidget(); bool isArchiveOpen() const { return m_bIsArchiveOpen; } @@ -75,7 +76,7 @@ public: const KURL& realURL() const { return m_realURL; } void setRealURL( const KURL& url ) { m_realURL = url; } - TQString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : TQString::null; } + TQString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : TQString(); } FileListView * fileList() const { return m_fileListView; } SearchBar * searchBar() const { return m_searchBar; } @@ -181,9 +182,9 @@ private: // methods void createRealArchive( const TQString &strFilename, const TQStringList & filesToAdd = TQStringList() ); KURL getCreateFilename( const TQString & _caption, - const TQString & _defaultMimeType = TQString::null, + const TQString & _defaultMimeType = TQString(), bool allowCompressed = true, - const TQString & _suggestedName = TQString::null ); + const TQString & _suggestedName = TQString() ); bool reportExtractFailures(const TQString & _dest, TQStringList *_list); TQStringList existingFiles( const TQString & _dest, TQStringList & _list ); diff --git a/ark/compressedfile.cpp b/ark/compressedfile.cpp index 65e21de..17df279 100644 --- a/ark/compressedfile.cpp +++ b/ark/compressedfile.cpp @@ -28,7 +28,7 @@ #include <stdlib.h> #include <fcntl.h> -// Qt includes +// TQt includes #include <tqdir.h> // KDE includes @@ -60,7 +60,7 @@ CompressedFile::CompressedFile( ArkWidget *_gui, const TQString & _fileName, con m_openAsMimeType = _openAsMimeType; kdDebug(1601) << "CompressedFile constructor" << endl; m_tempDirectory = new KTempDir( _gui->tmpDir() - + TQString::fromLatin1( "compressed_file_temp" ) ); + + TQString::tqfromLatin1( "compressed_file_temp" ) ); m_tempDirectory->setAutoDelete( true ); m_tmpdir = m_tempDirectory->name(); initData(); @@ -97,8 +97,8 @@ void CompressedFile::setHeaders() void CompressedFile::initData() { - m_unarchiver_program = TQString::null; - m_archiver_program = TQString::null; + m_unarchiver_program = TQString(); + m_archiver_program = TQString(); TQString mimeType; if ( !m_openAsMimeType.isNull() ) @@ -155,7 +155,7 @@ TQString CompressedFile::extension() TQStringList::Iterator it = m_defaultExtensions.begin(); for( ; it != m_defaultExtensions.end(); ++it ) if( m_filename.endsWith( *it ) ) - return TQString::null; + return TQString(); return m_defaultExtensions.first(); } @@ -212,7 +212,7 @@ void CompressedFile::open() if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { KMessageBox::error( 0, i18n("Could not start a subprocess.") ); - emit sigOpen(this, false, TQString::null, 0 ); + emit sigOpen(this, false, TQString(), 0 ); } kdDebug(1601) << "-CompressedFile::open" << endl; @@ -235,7 +235,7 @@ void CompressedFile::slotUncompressDone(KProcess *_kp) if ( !bSuccess ) { - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); return; } @@ -289,7 +289,7 @@ void CompressedFile::addFile( const TQStringList &urls ) proc.start(KProcess::Block); m_tmpfile = file.right(file.length() - - file.findRev("/")-1); + - file.tqfindRev("/")-1); m_tmpfile = m_tmpdir + '/' + m_tmpfile; kdDebug(1601) << "Temp file name is " << m_tmpfile << endl; diff --git a/ark/compressedfile.h b/ark/compressedfile.h index 99e19be..3c5ede8 100644 --- a/ark/compressedfile.h +++ b/ark/compressedfile.h @@ -44,6 +44,7 @@ class ArkWidget; class CompressedFile : public Arch { Q_OBJECT + TQ_OBJECT public: CompressedFile( ArkWidget *_gui, const TQString & _fileName, const TQString &_openAsMimeType ); virtual ~CompressedFile(); diff --git a/ark/extraction.ui b/ark/extraction.ui index 692692f..a8b324a 100644 --- a/ark/extraction.ui +++ b/ark/extraction.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>Extraction</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Extraction</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_extractOverwrite</cstring> </property> @@ -24,7 +24,7 @@ <string>O&verwrite files (Zip, Tar, Zoo, Rar)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_preservePerms</cstring> </property> @@ -32,7 +32,7 @@ <string>&Preserve permissions (Tar)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_extractJunkPaths</cstring> </property> @@ -40,7 +40,7 @@ <string>&Ignore folder names (Zip)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_rarToLower</cstring> </property> @@ -48,7 +48,7 @@ <string>Convert file names to &lowercase (Zip, Rar)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_rarToUpper</cstring> </property> @@ -66,7 +66,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -75,5 +75,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ark/extractiondialog.cpp b/ark/extractiondialog.cpp index cf95d48..87df006 100644 --- a/ark/extractiondialog.cpp +++ b/ark/extractiondialog.cpp @@ -51,36 +51,36 @@ #include "arkutils.h" #include "settings.h" -ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, +ExtractionDialog::ExtractionDialog( TQWidget *tqparent, const char *name, bool enableSelected, const KURL& defaultExtractionDir, const TQString &prefix, const TQString &archiveName ) - : KDialogBase( parent, name, true, i18n( "Extract" ), Ok | Cancel, Ok ), + : KDialogBase( tqparent, name, true, i18n( "Extract" ), Ok | Cancel, Ok ), m_selectedButton( 0 ), m_allButton( 0 ), m_selectedOnly( enableSelected ), m_extractionDirectory( defaultExtractionDir ), m_defaultExtractionDir( defaultExtractionDir.prettyURL() ), m_prefix( prefix ) { if ( !archiveName.isNull() ) { - setCaption( i18n( "Extract Files From %1" ).arg( archiveName ) ); + setCaption( i18n( "Extract Files From %1" ).tqarg( archiveName ) ); } TQVBox *vbox = makeVBoxMainWidget(); TQHBox *header = new TQHBox( vbox ); - header->layout()->setSpacing( 10 ); + header->tqlayout()->setSpacing( 10 ); TQLabel *icon = new TQLabel( header ); icon->setPixmap( DesktopIcon( "ark_extract" ) ); - icon->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); + icon->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); if ( enableSelected ) { TQVBox *whichFiles = new TQVBox( header ); - whichFiles->layout()->setSpacing( 6 ); + whichFiles->tqlayout()->setSpacing( 6 ); new TQLabel( TQString( "<qt><b><font size=\"+1\">%1</font></b></qt>" ) - .arg( i18n( "Extract:" ) ), whichFiles ); + .tqarg( i18n( "Extract:" ) ), whichFiles ); TQHButtonGroup *filesGroup = new TQHButtonGroup( whichFiles ); m_selectedButton = new TQRadioButton( i18n( "Selected files only" ), filesGroup ); m_allButton = new TQRadioButton( i18n( "All files" ), filesGroup ); @@ -90,13 +90,13 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, else { new TQLabel( TQString( "<qt><b><font size=\"+2\">%1</font></b></qt>" ) - .arg( i18n( "Extract all files" ) ), header ); + .tqarg( i18n( "Extract all files" ) ), header ); } TQHBox *destDirBox = new TQHBox( vbox ); TQLabel *destFolderLabel = new TQLabel( i18n( "Destination folder: " ), destDirBox ); - destFolderLabel->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + destFolderLabel->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); KHistoryCombo *combobox = new KHistoryCombo( true, destDirBox ); combobox->setPixmapProvider( new KURLPixmapProvider ); @@ -111,7 +111,7 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, combobox->setInsertionPolicy( TQComboBox::AtTop ); m_urlRequester = new KURLRequester( combobox, destDirBox ); - m_urlRequester->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + m_urlRequester->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); m_urlRequester->setMode( KFile::Directory ); if (!defaultExtractionDir.prettyURL().isEmpty() ) @@ -145,7 +145,7 @@ void ExtractionDialog::accept() TQFileInfo fi( p.path() ); if ( !fi.isDir() && !fi.exists() ) { - TQString ltext = i18n( "Create folder %1?").arg(p.path()); + TQString ltext = i18n( "Create folder %1?").tqarg(p.path()); int createDir = KMessageBox::questionYesNo( this, ltext, i18n( "Missing Folder" ) , i18n("Create Folder"), i18n("Do Not Create")); if( createDir == 4 ) { diff --git a/ark/extractiondialog.h b/ark/extractiondialog.h index 6d27ae2..b881770 100644 --- a/ark/extractiondialog.h +++ b/ark/extractiondialog.h @@ -41,15 +41,16 @@ class KURLRequester; class ExtractionDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - ExtractionDialog( TQWidget *parent = 0, const char *name = 0, + ExtractionDialog( TQWidget *tqparent = 0, const char *name = 0, bool enableSelected = true, const KURL &defaultExtractionDir = KURL(), const TQString &prefix = TQString(), - const TQString &archiveName = TQString::null ); + const TQString &archiveName = TQString() ); /** * Destructor. diff --git a/ark/filelistview.cpp b/ark/filelistview.cpp index 165b128..8036a28 100644 --- a/ark/filelistview.cpp +++ b/ark/filelistview.cpp @@ -26,7 +26,7 @@ */ -// Qt includes +// TQt includes #include <tqpainter.h> #include <tqwhatsthis.h> #include <tqheader.h> @@ -129,7 +129,7 @@ void FileLVI::setText( int column, const TQString &text ) name = name.left( name.length() - 1 ); if ( name.startsWith( "/" ) ) name = name.mid( 1 ); - int pos = name.findRev( '/' ); + int pos = name.tqfindRev( '/' ); if ( pos != -1 ) name = name.right( name.length() - pos - 1 ); TQListViewItem::setText( column, name ); @@ -153,7 +153,7 @@ void FileLVI::setText( int column, const TQString &text ) else m_ratio = text.toDouble(); TQListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" ) - .arg(KGlobal::locale()->formatNumber( m_ratio, 1 ) ) + .tqarg(KGlobal::locale()->formatNumber( m_ratio, 1 ) ) ); } else if ( colName == timeStampStrCol ) @@ -162,7 +162,7 @@ void FileLVI::setText( int column, const TQString &text ) TQListViewItem::setText(column, text); else { - m_timeStamp = TQDateTime::fromString( text, ISODate ); + m_timeStamp = TQDateTime::fromString( text, Qt::ISODate ); TQListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) ); } } @@ -170,9 +170,9 @@ void FileLVI::setText( int column, const TQString &text ) TQListViewItem::setText(column, text); } -static FileLVI* folderLVI( KListViewItem *parent, const TQString& name ) +static FileLVI* folderLVI( KListViewItem *tqparent, const TQString& name ) { - FileLVI *folder = new FileLVI( parent ); + FileLVI *folder = new FileLVI( tqparent ); folder->setText( 0, name ); @@ -181,9 +181,9 @@ static FileLVI* folderLVI( KListViewItem *parent, const TQString& name ) return folder; } -static FileLVI* folderLVI( KListView *parent, const TQString& name ) +static FileLVI* folderLVI( KListView *tqparent, const TQString& name ) { - FileLVI *folder = new FileLVI( parent ); + FileLVI *folder = new FileLVI( tqparent ); folder->setText( 0, name ); folder->setPixmap( 0, KMimeType::mimeType( "inode/directory" )->pixmap( KIcon::Small ) ); return folder; @@ -194,8 +194,8 @@ static FileLVI* folderLVI( KListView *parent, const TQString& name ) ///////////////////////////////////////////////////////////////////// -FileListView::FileListView(TQWidget *parent, const char* name) - : KListView(parent, name) +FileListView::FileListView(TQWidget *tqparent, const char* name) + : KListView(tqparent, name) { TQWhatsThis::add( this, i18n( "This area is for displaying information about the files contained within an archive." ) @@ -242,7 +242,7 @@ void FileListView::removeColumn( int index ) { for ( unsigned int i = index; i < m_columnMap.count() - 2; i++ ) { - m_columnMap.replace( i, m_columnMap[ i + 1 ] ); + m_columnMap.tqreplace( i, m_columnMap[ i + 1 ] ); } m_columnMap.remove( m_columnMap[ m_columnMap.count() - 1 ] ); @@ -264,31 +264,31 @@ TQStringList FileListView::selectedFilenames() { if ( item->isSelected() ) { - // If the item has children, add each child and the item + // If the item has tqchildren, add each child and the item if ( item->childCount() > 0 ) { files += item->fileName(); - files += childrenOf( item ); + files += tqchildrenOf( item ); /* If we got here, then the logic for "going to the next item" - * is a bit different: as we already dealt with all the children, + * is a bit different: as we already dealt with all the tqchildren, * the "next item" is the next sibling of the current item, not * its first child. If the current item has no siblings, then - * the next item is the next sibling of its parent, and so on. + * the next item is the next sibling of its tqparent, and so on. */ FileLVI *nitem = static_cast<FileLVI*>( item->nextSibling() ); - while ( !nitem && item->parent() ) + while ( !nitem && item->tqparent() ) { - item = static_cast<FileLVI*>( item->parent() ); - if ( item->parent() ) - nitem = static_cast<FileLVI*>( item->parent()->nextSibling() ); + item = static_cast<FileLVI*>( item->tqparent() ); + if ( item->tqparent() ) + nitem = static_cast<FileLVI*>( item->tqparent()->nextSibling() ); } item = nitem; continue; } else { - // If the item has no children, just add it to the list + // If the item has no tqchildren, just add it to the list files += item->fileName(); } } @@ -331,7 +331,7 @@ bool FileListView::isSelectionEmpty() void FileListView::contentsMousePressEvent(TQMouseEvent *e) { - if( e->button()==TQMouseEvent::LeftButton ) + if( e->button()==Qt::LeftButton ) { m_pressed = true; m_presspos = e->pos(); @@ -385,9 +385,9 @@ FileListView::item(const TQString& filename) const void FileListView::addItem( const TQStringList & entries ) { - FileLVI *flvi, *parent = findParent( entries[0] ); - if ( parent ) - flvi = new FileLVI( parent ); + FileLVI *flvi, *tqparent = findParent( entries[0] ); + if ( tqparent ) + flvi = new FileLVI( tqparent ); else flvi = new FileLVI( this ); @@ -422,7 +422,7 @@ void FileListView::setHeaders( const ColumnList& columns ) it != columns.constEnd(); ++it ) { - QPair< TQString, Qt::AlignmentFlags > pair = *it; + TQPair< TQString, TQt::AlignmentFlags > pair = *it; int colnum = addColumn( pair.first ); setColumnAlignment( colnum, pair.second ); } @@ -508,13 +508,13 @@ FileLVI* FileListView::findParent( const TQString& fullname ) name = name.left( name.length() -1 ); if ( name.startsWith( "/" ) ) name = name.mid( 1 ); - // Checks if this entry needs a parent - if ( !name.contains( '/' ) ) + // Checks if this entry needs a tqparent + if ( !name.tqcontains( '/' ) ) return static_cast< FileLVI* >( 0 ); // Get a list of ancestors - TQString parentFullname = name.left( name.findRev( '/' ) ); - TQStringList ancestorList = TQStringList::split( '/', parentFullname ); + TQString tqparentFullname = name.left( name.tqfindRev( '/' ) ); + TQStringList ancestorList = TQStringList::split( '/', tqparentFullname ); // Checks if the listview contains the first item in the list of ancestors TQListViewItem *item = firstChild(); @@ -538,8 +538,8 @@ FileLVI* FileListView::findParent( const TQString& fullname ) { TQString name = ancestorList[0]; - FileLVI *parent = static_cast< FileLVI*>( item ); - item = parent->firstChild(); + FileLVI *tqparent = static_cast< FileLVI*>( item ); + item = tqparent->firstChild(); while ( item ) { if ( item->text(0) == name ) @@ -549,7 +549,7 @@ FileLVI* FileListView::findParent( const TQString& fullname ) if ( !item ) { - item = folderLVI( parent, name ); + item = folderLVI( tqparent, name ); } ancestorList.pop_front(); @@ -559,28 +559,28 @@ FileLVI* FileListView::findParent( const TQString& fullname ) return static_cast< FileLVI* >( item ); } -TQStringList FileListView::childrenOf( FileLVI* parent ) +TQStringList FileListView::tqchildrenOf( FileLVI* tqparent ) { - Q_ASSERT( parent ); - TQStringList children; + Q_ASSERT( tqparent ); + TQStringList tqchildren; - FileLVI *item = static_cast<FileLVI*>( parent->firstChild() ); + FileLVI *item = static_cast<FileLVI*>( tqparent->firstChild() ); while ( item ) { if ( item->childCount() == 0 ) { - children += item->fileName(); + tqchildren += item->fileName(); } else { - children += item->fileName(); - children += childrenOf( item ); + tqchildren += item->fileName(); + tqchildren += tqchildrenOf( item ); } item = static_cast<FileLVI*>( item->nextSibling() ); } - return children; + return tqchildren; } #include "filelistview.moc" diff --git a/ark/filelistview.h b/ark/filelistview.h index 54c22c1..e2546e5 100644 --- a/ark/filelistview.h +++ b/ark/filelistview.h @@ -69,13 +69,14 @@ class FileLVI : public KListViewItem TQString m_entryName; }; -typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList; +typedef TQValueList< TQPair< TQString, TQt::AlignmentFlags > > ColumnList; class FileListView: public KListView { Q_OBJECT + TQ_OBJECT public: - FileListView( TQWidget *parent = 0, const char* name = 0 ); + FileListView( TQWidget *tqparent = 0, const char* name = 0 ); FileLVI *currentItem() {return ((FileLVI *) KListView::currentItem());} @@ -152,7 +153,7 @@ class FileListView: public KListView private: FileLVI* findParent( const TQString& fullname ); - TQStringList childrenOf( FileLVI* parent ); + TQStringList tqchildrenOf( FileLVI* tqparent ); TQMap<int, columnName> m_columnMap; bool m_pressed; diff --git a/ark/general.ui b/ark/general.ui index d822b4c..f782d69 100644 --- a/ark/general.ui +++ b/ark/general.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>General</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>General</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_UseIntegratedViewer</cstring> </property> @@ -27,7 +27,7 @@ <string>&Use integrated viewer</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_KonquerorIntegration</cstring> </property> @@ -35,9 +35,9 @@ <string>&Enable Konqueror integration</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -53,14 +53,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>15</width> <height>31</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>konqIntegrationLabel</cstring> </property> @@ -80,7 +80,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -89,5 +89,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ark/lha.cpp b/ark/lha.cpp index 1bf3aac..d34fd51 100644 --- a/ark/lha.cpp +++ b/ark/lha.cpp @@ -67,7 +67,7 @@ bool LhaArch::processLine( const TQCString &line ) char columns[13][80]; char filename[4096]; - if ( line.contains( "[generic]" ) ) + if ( line.tqcontains( "[generic]" ) ) { sscanf( _line, " %79[]\\[generic] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -76,7 +76,7 @@ bool LhaArch::processLine( const TQCString &line ) columns[9], filename ); strcpy( columns[1], " " ); } - else if ( line.contains( "[MS-DOS]" ) ) + else if ( line.tqcontains( "[MS-DOS]" ) ) { sscanf( _line, " %79[]\\[MS-DOS] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -103,7 +103,7 @@ bool LhaArch::processLine( const TQCString &line ) TQString file = filename; TQString name, link; bool bLink = false; - int pos = file.find( " -> " ); + int pos = file.tqfind( " -> " ); if ( pos != -1 ) { bLink = true; @@ -154,7 +154,7 @@ void LhaArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -38,6 +38,7 @@ class ArkWidget; class LhaArch : public Arch { Q_OBJECT + TQ_OBJECT public: LhaArch( ArkWidget *, const TQString & ); virtual ~LhaArch() { } diff --git a/ark/mainwindow.cpp b/ark/mainwindow.cpp index 5866d18..045ce1a 100644 --- a/ark/mainwindow.cpp +++ b/ark/mainwindow.cpp @@ -45,11 +45,11 @@ #include "archiveformatinfo.h" #include "arkwidget.h" -MainWindow::MainWindow( TQWidget * /*parent*/, const char *name ) +MainWindow::MainWindow( TQWidget * /*tqparent*/, const char *name ) : KParts::MainWindow(), progressDialog( 0 ) { setXMLFile( "arkui.rc" ); - m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadWritePart>( "libarkpart", this, name, this, "ArkPart"); + m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadWritePart>( "libarkpart", this, name, TQT_TQOBJECT(this), "ArkPart"); if (m_part ) { //Since most of the functionality is still in ArkWidget: @@ -109,24 +109,24 @@ MainWindow::~MainWindow() void MainWindow::setupActions() { - newWindowAction = new KAction(i18n("New &Window"), "window_new", KShortcut(), this, + newWindowAction = new KAction(i18n("New &Window"), "window_new", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(file_newWindow()), actionCollection(), "new_window"); - newArchAction = KStdAction::openNew(this, TQT_SLOT(file_new()), actionCollection()); - openAction = KStdAction::open(this, TQT_SLOT(file_open()), actionCollection()); + newArchAction = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(file_new()), actionCollection()); + openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(file_open()), actionCollection()); - reloadAction = new KAction(i18n("Re&load"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), this, + reloadAction = new KAction(i18n("Re&load"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), TQT_TQOBJECT(this), TQT_SLOT(file_reload()), actionCollection(), "reload_arch"); - closeAction = KStdAction::close(this, TQT_SLOT(file_close()), actionCollection(), "file_close"); + closeAction = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(file_close()), actionCollection(), "file_close"); - recent = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection()); + recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openURL(const KURL&)), actionCollection()); recent->loadEntries(kapp->config()); createStandardStatusBarAction(); - KStdAction::quit(this, TQT_SLOT(window_close()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(editToolbars()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT( slotConfigureKeyBindings()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(window_close()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(editToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeyBindings()), actionCollection()); openAction->setEnabled( true ); recent->setEnabled( true ); @@ -177,7 +177,7 @@ MainWindow::file_reload() void MainWindow::editToolbars() { - saveMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") ); + saveMainWindowSettings( KGlobal::config(), TQString::tqfromLatin1("MainWindow") ); KEditToolbar dlg( factory(), this ); connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); @@ -187,7 +187,7 @@ void MainWindow::slotNewToolbarConfig() { createGUI( m_part ); - applyMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") ); + applyMainWindowSettings( KGlobal::config(), TQString::tqfromLatin1("MainWindow") ); } void @@ -221,7 +221,7 @@ MainWindow::arkAlreadyOpen( const KURL & url ) window_close(); // notify the user what's going on - KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").arg(url.prettyURL())); + KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").tqarg(url.prettyURL())); return true; } return false; @@ -262,8 +262,8 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption, TQString filter = ArchiveFormatInfo::self()->filter(); if ( !suggestedName.isEmpty() ) { - filter = TQString::null; - combo->setCurrentItem( list.findIndex( ArchiveFormatInfo::self()->descriptionForMimeType( + filter = TQString(); + combo->setCurrentItem( list.tqfindIndex( ArchiveFormatInfo::self()->descriptionForMimeType( KMimeType::findByPath( suggestedName, 0, true )->name() ) ) ); } @@ -296,7 +296,7 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption, m_widget->setOpenAsMimeType( ArchiveFormatInfo::self()->mimeTypeForDescription( combo->currentText() ) ); else - m_widget->setOpenAsMimeType( TQString::null ); + m_widget->setOpenAsMimeType( TQString() ); return url; } @@ -446,11 +446,11 @@ void MainWindow::startProgressDialog( const TQString & text ) { if ( !progressDialog ) - progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false ); + progressDialog = new KProgressDialog( this, "progress_dialog", TQString(), text, false ); else progressDialog->setLabel( text ); -// progressDialog->setWFlags( Qt::WType_TopLevel ); +// progressDialog->setWFlags( TQt::WType_TopLevel ); progressDialog->setAllowCancel( true ); progressDialog->setPlainCaption( i18n( "Please Wait" ) ); diff --git a/ark/mainwindow.h b/ark/mainwindow.h index 428167e..28989c0 100644 --- a/ark/mainwindow.h +++ b/ark/mainwindow.h @@ -41,13 +41,14 @@ class MainWindow: public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: - MainWindow( TQWidget *parent=0, const char *name=0 ); + MainWindow( TQWidget *tqparent=0, const char *name=0 ); virtual ~MainWindow(); void setExtractOnly ( bool b ); void extractTo( const KURL & targetDirectory, const KURL & archive, bool guessName ); - void addToArchive( const KURL::List & filesToAdd, const TQString & cwd = TQString::null, + void addToArchive( const KURL::List & filesToAdd, const TQString & cwd = TQString(), const KURL & archive = KURL(), bool askForName = false ); public slots: @@ -84,9 +85,9 @@ private: // methods void newCaption(const TQString & filename); bool arkAlreadyOpen( const KURL & url ); - KURL getOpenURL( bool addOnly = false , const TQString & caption = TQString::null, - const TQString & startDir = TQString::null, - const TQString & suggestedName = TQString::null ); + KURL getOpenURL( bool addOnly = false , const TQString & caption = TQString(), + const TQString & startDir = TQString(), + const TQString & suggestedName = TQString() ); void startProgressDialog( const TQString & text ); diff --git a/ark/rar.cpp b/ark/rar.cpp index 87f9ab4..056e6c4 100644 --- a/ark/rar.cpp +++ b/ark/rar.cpp @@ -90,10 +90,10 @@ RarArch::RarArch( ArkWidget *_gui, const TQString & _fileName ) bool RarArch::processLine( const TQCString &line ) { - TQString unicode_line; + TQString tqunicode_line; TQTextCodec *codec = TQTextCodec::codecForLocale(); - unicode_line = codec->toUnicode( line ); + tqunicode_line = codec->toUnicode( line ); if ( m_isFirstLine ) { @@ -153,7 +153,7 @@ void RarArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -291,7 +291,7 @@ void RarArch::unarchFileInternal() bool RarArch::passwordRequired() { - return m_lastShellOutput.findRev("password incorrect ?)")+1; + return m_lastShellOutput.tqfindRev("password incorrect ?)")+1; } void RarArch::remove( TQStringList *list ) @@ -35,6 +35,7 @@ class ArkWidget; class RarArch : public Arch { Q_OBJECT + TQ_OBJECT public: RarArch( ArkWidget *_gui, const TQString & _fileName ); virtual ~RarArch() {} diff --git a/ark/searchbar.cpp b/ark/searchbar.cpp index 40fb522..fce4576 100644 --- a/ark/searchbar.cpp +++ b/ark/searchbar.cpp @@ -32,12 +32,12 @@ #include <tqapplication.h> #include <tqvaluelist.h> -SearchBar::SearchBar( TQWidget* parent, KActionCollection* aC, const char * name ) - : KListViewSearchLine( parent, 0, name ) +SearchBar::SearchBar( TQWidget* tqparent, KActionCollection* aC, const char * name ) + : KListViewSearchLine( tqparent, 0, name ) { - KAction *resetSearch = new KAction( i18n( "Reset Search" ), TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, this, TQT_SLOT( clear() ), aC, "reset_search" ); + KAction *resetSearch = new KAction( i18n( "Reset Search" ), TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(this), TQT_SLOT( clear() ), aC, "reset_search" ); - resetSearch->plug( parent ); + resetSearch->plug( tqparent ); resetSearch->setWhatsThis( i18n( "Reset Search\n" "Resets the search bar, so that all archive entries are shown again." ) ); } diff --git a/ark/searchbar.h b/ark/searchbar.h index c21b4d4..2e245ab 100644 --- a/ark/searchbar.h +++ b/ark/searchbar.h @@ -32,8 +32,9 @@ class KActionCollection; class SearchBar: public KListViewSearchLine { Q_OBJECT + TQ_OBJECT public: - SearchBar( TQWidget* parent, KActionCollection* aC, const char * name = 0 ); + SearchBar( TQWidget* tqparent, KActionCollection* aC, const char * name = 0 ); ~SearchBar(); }; diff --git a/ark/sevenzip.cpp b/ark/sevenzip.cpp index 99170ac..2292214 100644 --- a/ark/sevenzip.cpp +++ b/ark/sevenzip.cpp @@ -110,7 +110,7 @@ void SevenZipArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -283,13 +283,13 @@ bool SevenZipArch::processLine( const TQCString& _line ) : columns[ m_fixYear ]; TQString month = ( m_repairMonth >= 0 ) ? TQString( "%1" ) - .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) + .tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) : columns[ m_fixMonth ]; - TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) - .arg( year ) - .arg( month ) - .arg( columns[ m_fixDay ] ) - .arg( columns[ m_fixTime ] ); + TQString timestamp = TQString::tqfromLatin1( "%1-%2-%3 %4" ) + .tqarg( year ) + .tqarg( month ) + .tqarg( columns[ m_fixDay ] ) + .tqarg( columns[ m_fixTime ] ); columns[ m_dateCol ] = timestamp; } @@ -330,11 +330,11 @@ void SevenZipArch::slotReceivedTOC( KProcess*, char* data, int length ) startChar = lfChar + 1; // Check if the header was found - if ( m_buffer.find( m_headerString ) != -1 ) + if ( m_buffer.tqfind( m_headerString.data() ) != -1 ) { if ( !m_header_removed ) { - m_nameColumnPos = m_buffer.findRev( ' ' ) + 1; + m_nameColumnPos = m_buffer.tqfindRev( ' ' ) + 1; m_header_removed = true; } else diff --git a/ark/sevenzip.h b/ark/sevenzip.h index f728768..535ea53 100644 --- a/ark/sevenzip.h +++ b/ark/sevenzip.h @@ -29,6 +29,7 @@ class SevenZipArch : public Arch { Q_OBJECT + TQ_OBJECT public: SevenZipArch( ArkWidget *, const TQString & ); virtual ~SevenZipArch(); diff --git a/ark/tar.cpp b/ark/tar.cpp index 7de54f9..4bc6c0a 100644 --- a/ark/tar.cpp +++ b/ark/tar.cpp @@ -48,7 +48,7 @@ #include <stdio.h> #include <stdlib.h> -// Qt includes +// TQt includes #include <tqdir.h> #include <tqregexp.h> #include <tqeventloop.h> @@ -106,12 +106,12 @@ TarArch::TarArch( ArkWidget *_gui, { compressed = true; m_tmpDir = new KTempDir( _gui->tmpDir() - + TQString::fromLatin1( "temp_tar" ) ); + + TQString::tqfromLatin1( "temp_tar" ) ); m_tmpDir->setAutoDelete( true ); m_tmpDir->qDir()->cd( m_tmpDir->name() ); // build the temp file name KTempFile *pTempFile = new KTempFile( m_tmpDir->name(), - TQString::fromLatin1(".tar") ); + TQString::tqfromLatin1(".tar") ); tmpfile = pTempFile->name(); delete pTempFile; @@ -217,7 +217,7 @@ TQString TarArch::getCompressor() if( m_fileMimeType == "application/x-tzo" ) return TQString( "lzop" ); - return TQString::null; + return TQString(); } @@ -241,7 +241,7 @@ TQString TarArch::getUnCompressor() if( m_fileMimeType == "application/x-tzo" ) return TQString( "lzop" ); - return TQString::null; + return TQString(); } void @@ -322,14 +322,14 @@ void TarArch::slotListingDone(KProcess *_kp) if (flv!=NULL && flv->totalFiles()>0) { const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName(); - if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").arg(firstfile)))>=0) + if (list.tqfind(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0) { m_dotslash = true; kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl; } else { - if (list.find(TQRegExp(TQString("\\s%1[/\\n]").arg(firstfile)))>=0) + if (list.tqfind(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0) { // archive doesn't have dot-slash m_dotslash = false; @@ -418,7 +418,7 @@ void TarArch::createTmp() if (kp->start(KProcess::NotifyOnExit, flag ) == false) { KMessageBox::error(0, i18n("Unable to fork a decompressor")); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } else @@ -772,7 +772,7 @@ void TarArch::customEvent( TQCustomEvent *ev ) m_listingThread->wait(); delete m_listingThread; m_listingThread = 0; - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); break; case ListingEvent::ListingFinished: @@ -56,6 +56,7 @@ class TarListingThread; class TarArch : public Arch { Q_OBJECT + TQ_OBJECT public: TarArch( ArkWidget *_gui, const TQString & _filename, const TQString & _openAsMimeType ); diff --git a/ark/tarlistingthread.cpp b/ark/tarlistingthread.cpp index 3045c4a..4b09bfd 100644 --- a/ark/tarlistingthread.cpp +++ b/ark/tarlistingthread.cpp @@ -78,8 +78,8 @@ static char *makeAccessString(mode_t mode) return buffer; } -TarListingThread::TarListingThread( TQObject *parent, const TQString& filename ) - : TQThread(), m_parent( parent ) +TarListingThread::TarListingThread( TQObject *tqparent, const TQString& filename ) + : TQThread(), m_parent( tqparent ) { Q_ASSERT( m_parent ); m_archive = new KTar( filename ); @@ -96,7 +96,7 @@ void TarListingThread::run() if (!m_archive->open( IO_ReadOnly )) { ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::Error ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); return; } @@ -104,7 +104,7 @@ void TarListingThread::run() // Send an empty TQStringList in an Event to signal the listing end. ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::ListingFinished ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); } void TarListingThread::processDir( const KTarDirectory *tardir, const TQString & root ) @@ -144,12 +144,12 @@ void TarListingThread::processDir( const KTarDirectory *tardir, const TQString & strSize.sprintf("%d", ((KTarFile *)tarEntry)->size()); } col_list.append(strSize); - TQString timestamp = tarEntry->datetime().toString(ISODate); + TQString timestamp = tarEntry->datetime().toString(Qt::ISODate); col_list.append(timestamp); col_list.append(tarEntry->symlink()); ListingEvent *ev = new ListingEvent( col_list ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); // if it's a directory, process it. // remember that name is root + / + the name of the directory diff --git a/ark/tarlistingthread.h b/ark/tarlistingthread.h index 25ce188..b6f1dea 100644 --- a/ark/tarlistingthread.h +++ b/ark/tarlistingthread.h @@ -29,25 +29,25 @@ class TQString; class KArchive; -class ListingEvent: public QCustomEvent +class ListingEvent: public TQCustomEvent { public: - enum Status { Normal, Error, ListingFinished }; - ListingEvent( const TQStringList& data, Status st = Normal ) + enum tqStatus { Normal, Error, ListingFinished }; + ListingEvent( const TQStringList& data, tqStatus st = Normal ) : TQCustomEvent( 65442 ), m_data( data ), m_status( st ) {} const TQStringList& columns() const { return m_data; } - Status status() const { return m_status; } + tqStatus status() const { return m_status; } private: TQStringList m_data; - Status m_status; + tqStatus m_status; }; -class TarListingThread: public QThread +class TarListingThread: public TQThread { public: - TarListingThread( TQObject *parent, const TQString& filename ); + TarListingThread( TQObject *tqparent, const TQString& filename ); ~TarListingThread(); protected: diff --git a/ark/zip.cpp b/ark/zip.cpp index f223016..59db0c9 100644 --- a/ark/zip.cpp +++ b/ark/zip.cpp @@ -26,7 +26,7 @@ */ -// Qt includes +// TQt includes #include <tqdir.h> // KDE includes @@ -103,7 +103,7 @@ void ZipArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -240,7 +240,7 @@ void ZipArch::unarchFileInternal() bool ZipArch::passwordRequired() { - return m_lastShellOutput.findRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.findRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); + return m_lastShellOutput.tqfindRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.tqfindRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); } void ZipArch::remove( TQStringList *list ) @@ -38,6 +38,7 @@ class ArkWidget; class ZipArch : public Arch { Q_OBJECT + TQ_OBJECT public: ZipArch( ArkWidget *_gui, const TQString & _fileName ); virtual ~ZipArch() { } diff --git a/ark/zoo.cpp b/ark/zoo.cpp index 8896251..6f9a53e 100644 --- a/ark/zoo.cpp +++ b/ark/zoo.cpp @@ -120,7 +120,7 @@ void ZooArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -287,9 +287,9 @@ TQString fixTime( const TQString &_strTime ) // +3 or -3 etc. TQString strTime = _strTime; - if ( strTime.contains("+") || strTime.contains("-") ) + if ( strTime.tqcontains("+") || strTime.tqcontains("-") ) { - TQCharRef c = strTime.at( 8 ); + TQCharRef c = strTime.tqat( 8 ); int offset = strTime.right( strTime.length() - 9 ).toInt(); TQString strHour = strTime.left( 2 ); int nHour = strHour.toInt(); @@ -36,6 +36,7 @@ class ArkWidget; class ZooArch : public Arch { Q_OBJECT + TQ_OBJECT public: ZooArch( ArkWidget *, const TQString & ); virtual ~ZooArch() { } diff --git a/charselectapplet/charselectapplet.cpp b/charselectapplet/charselectapplet.cpp index 24cc55a..1ccfaf8 100644 --- a/charselectapplet/charselectapplet.cpp +++ b/charselectapplet/charselectapplet.cpp @@ -41,12 +41,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kcharselectapplet"); return new CharSelectApplet(configFile, KPanelApplet::Normal, KPanelApplet::About | KPanelApplet::Preferences, - parent, "kcharselectapplet"); + tqparent, "kcharselectapplet"); } } @@ -55,8 +55,8 @@ static int cell_height = 16; static int char_count = 0; CharSelectApplet::CharSelectApplet(const TQString& configFile, Type type, int actions, - TQWidget *parent, const char *name) - : KPanelApplet(configFile, type, actions, parent, name), + TQWidget *tqparent, const char *name) + : KPanelApplet(configFile, type, actions, tqparent, name), _aboutData(0), _configDialog(0) { // read configuration @@ -64,9 +64,9 @@ CharSelectApplet::CharSelectApplet(const TQString& configFile, Type type, int ac c->setGroup("General"); cell_width = c->readNumEntry("CellWidth", cell_width); cell_height = c->readNumEntry("CellHeight", cell_height); - TQString characters = c->readEntry("Characters", "ÄäÖöÜüß©®§"); + TQString characters = c->readEntry("Characters", "������ߩ��"); - // setup layout + // setup tqlayout TQHBoxLayout *_layout = new TQHBoxLayout(this); _layout->setAutoAdd(true); @@ -151,13 +151,13 @@ void CharSelectApplet::about() dialog.exec(); } -CharTable::CharTable(TQWidget* parent, const char* name) - : TQFrame(parent, name), _rows(2), _cols(2), +CharTable::CharTable(TQWidget* tqparent, const char* name) + : TQFrame(tqparent, name), _rows(2), _cols(2), _activeRow(-1), _activeCol(-1), _cWidth(cell_width), _cHeight(cell_height) { setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - setFocusPolicy(TQWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); setBackgroundMode(TQWidget::NoBackground); } @@ -228,7 +228,7 @@ void CharTable::paintEvent(TQPaintEvent* e) TQFrame::paintEvent(e); } -void CharTable::repaintCell(int r, int c) +void CharTable::tqrepaintCell(int r, int c) { TQPainter p(this); @@ -251,16 +251,16 @@ void CharTable::paintCell(TQPainter* p, int row, int col) // draw background if (active) { - p->setBrush(TQBrush(colorGroup().highlight())); + p->setBrush(TQBrush(tqcolorGroup().highlight())); p->setPen(NoPen); p->drawRect(0, 0, w, h); - p->setPen(colorGroup().highlightedText()); + p->setPen(tqcolorGroup().highlightedText()); } else { - p->setBrush(TQBrush(colorGroup().base())); + p->setBrush(TQBrush(tqcolorGroup().base())); p->setPen(NoPen); p->drawRect(0, 0, w, h); - p->setPen(colorGroup().text()); + p->setPen(tqcolorGroup().text()); } // set font @@ -285,7 +285,7 @@ void CharTable::mousePressEvent(TQMouseEvent *e) void CharTable::mouseMoveEvent(TQMouseEvent *e) { - if(!(e->state() & (LeftButton | RightButton | MidButton))) return; + if(!(e->state() & (Qt::LeftButton | Qt::RightButton | Qt::MidButton))) return; int row = findRow(e->y()); if (row == -1) return; @@ -307,10 +307,10 @@ void CharTable::selectCell(int row, int col) _activeRow = row; _activeCol = col; - repaintCell(oldRow, oldCol); - repaintCell(_activeRow, _activeCol); + tqrepaintCell(oldRow, oldCol); + tqrepaintCell(_activeRow, _activeCol); - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQObject::disconnect( cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); TQString text = TQString(_map[col + row * _cols]); bool oldMode = cb->selectionModeEnabled(); @@ -330,14 +330,14 @@ void CharTable::clearCell() _activeRow = -1; _activeCol = -1; - repaintCell(oldRow, oldCol); + tqrepaintCell(oldRow, oldCol); - TQObject::disconnect( TQApplication::clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); + TQObject::disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); } -ConfigDialog::ConfigDialog(TQWidget* parent, const char* name) - : KDialogBase(parent, name, true, i18n("Configuration"), +ConfigDialog::ConfigDialog(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, true, i18n("Configuration"), Ok | Cancel, Ok, true) { TQVBox *page = makeVBoxMainWidget(); diff --git a/charselectapplet/charselectapplet.h b/charselectapplet/charselectapplet.h index b223b53..332c18c 100644 --- a/charselectapplet/charselectapplet.h +++ b/charselectapplet/charselectapplet.h @@ -36,9 +36,10 @@ class KAboutData; class ConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ConfigDialog(TQWidget* parent = 0, const char* name = 0); + ConfigDialog(TQWidget* tqparent = 0, const char* name = 0); void setCharacters(const TQString& s) { _characterInput->setText(s); } void setCellWidth(int w) { _widthSpinBox->setValue(w); } @@ -54,12 +55,13 @@ private: KLineEdit *_characterInput; }; -class CharTable : public QFrame +class CharTable : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CharTable(TQWidget* parent = 0, const char* name = 0); + CharTable(TQWidget* tqparent = 0, const char* name = 0); void setRowsAndColumns(int, int); @@ -73,7 +75,7 @@ protected: void mouseMoveEvent(TQMouseEvent*); void paintCell(TQPainter*, int, int); - void repaintCell(int, int); + void tqrepaintCell(int, int); void selectCell(int row, int col); void insertString(TQString s); @@ -95,10 +97,11 @@ private: class CharSelectApplet : public KPanelApplet { Q_OBJECT + TQ_OBJECT public: CharSelectApplet(const TQString& configFile, Type t = Stretch, int actions = 0, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); int widthForHeight(int height) const; int heightForWidth(int width) const; diff --git a/kcalc/colors.ui b/kcalc/colors.ui index 26f4b28..e6b4513 100644 --- a/kcalc/colors.ui +++ b/kcalc/colors.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Colors</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Colors</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -41,7 +41,7 @@ <cstring>kcfg_ForeColor</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -62,7 +62,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>20</height> @@ -101,7 +101,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -112,7 +112,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -123,7 +123,7 @@ <cstring>kcfg_FunctionButtonsColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -134,7 +134,7 @@ <cstring>kcfg_HexButtonsColor</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -179,7 +179,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -202,7 +202,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -221,7 +221,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -232,7 +232,7 @@ <cstring>kcfg_StatButtonsColor</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -255,7 +255,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -274,5 +274,5 @@ <tabstop>kcfg_MemoryButtonsColor</tabstop> <tabstop>kcfg_OperationButtonsColor</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcalc/constants.ui b/kcalc/constants.ui index f7c734e..82fe7d2 100644 --- a/kcalc/constants.ui +++ b/kcalc/constants.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>Constants</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Constants</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>mainGroupBox</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox0</cstring> </property> @@ -41,7 +41,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant0</cstring> </property> @@ -59,14 +59,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant0</cstring> </property> @@ -84,7 +84,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -101,7 +101,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -112,7 +112,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant1</cstring> </property> @@ -130,14 +130,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant1</cstring> </property> @@ -155,7 +155,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -172,7 +172,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -183,7 +183,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant2</cstring> </property> @@ -201,14 +201,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant2</cstring> </property> @@ -226,7 +226,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -243,7 +243,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -254,7 +254,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant3</cstring> </property> @@ -272,14 +272,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant3</cstring> </property> @@ -297,7 +297,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -314,7 +314,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -325,7 +325,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant4</cstring> </property> @@ -343,14 +343,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant4</cstring> </property> @@ -368,7 +368,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -385,7 +385,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -396,7 +396,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_nameConstant5</cstring> </property> @@ -414,14 +414,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_valueConstant5</cstring> </property> @@ -439,7 +439,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> @@ -468,7 +468,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -479,7 +479,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kcalc/dlabel.cpp b/kcalc/dlabel.cpp index c4dbb17..5591655 100644 --- a/kcalc/dlabel.cpp +++ b/kcalc/dlabel.cpp @@ -2,7 +2,7 @@ $Id$ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -34,9 +34,9 @@ -DispLogic::DispLogic(TQWidget *parent, const char *name, +DispLogic::DispLogic(TQWidget *tqparent, const char *name, KActionCollection *coll) - :KCalcDisplay(parent,name), _history_index(0) + :KCalcDisplay(tqparent,name), _history_index(0) { KNumber::setDefaultFloatOutput(true); KNumber::setDefaultFractionalInput(true); diff --git a/kcalc/dlabel.h b/kcalc/dlabel.h index 0a7c386..e2d0395 100644 --- a/kcalc/dlabel.h +++ b/kcalc/dlabel.h @@ -38,9 +38,10 @@ class KActionCollection; class DispLogic : public KCalcDisplay { Q_OBJECT + TQ_OBJECT public: - DispLogic(TQWidget *parent, const char *name, + DispLogic(TQWidget *tqparent, const char *name, KActionCollection *coll); ~DispLogic(); diff --git a/kcalc/general.ui b/kcalc/general.ui index 7ec8b15..59ba2f3 100644 --- a/kcalc/general.ui +++ b/kcalc/general.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>General</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>General</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_Fixed</cstring> </property> @@ -41,7 +41,7 @@ <string>Set &decimal precision</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -55,7 +55,7 @@ <cstring>kcfg_FixedPrecision</cstring> </property> </widget> - <widget class="QSpinBox" row="2" column="2"> + <widget class="TQSpinBox" row="2" column="2"> <property name="name"> <cstring>kcfg_FixedPrecision</cstring> </property> @@ -73,14 +73,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -101,21 +101,21 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>20</height> </size> </property> </spacer> - <widget class="QSpinBox" row="0" column="2"> + <widget class="TQSpinBox" row="0" column="2"> <property name="name"> <cstring>kcfg_Precision</cstring> </property> </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -126,7 +126,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_Beep</cstring> </property> @@ -137,7 +137,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_CaptionResult</cstring> </property> @@ -145,7 +145,7 @@ <string>Show &result in window title</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_GroupDigits</cstring> </property> @@ -165,7 +165,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -195,5 +195,5 @@ <tabstop>kcfg_Beep</tabstop> <tabstop>kcfg_CaptionResult</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcalc/kcalc.cpp b/kcalc/kcalc.cpp index 515536f..df773b2 100644 --- a/kcalc/kcalc.cpp +++ b/kcalc/kcalc.cpp @@ -78,8 +78,8 @@ static const char description[] = I18N_NOOP("KDE Calculator"); static const char version[] = KCALCVERSION; -KCalculator::KCalculator(TQWidget *parent, const char *name) - : KMainWindow(parent, name), inverse(false), +KCalculator::KCalculator(TQWidget *tqparent, const char *name) + : KMainWindow(tqparent, name), inverse(false), hyp_mode(false), memory_num(0.0), calc_display(NULL), mInternalSpacing(4), core() { @@ -106,7 +106,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) // Create Button to select BaseMode BaseChooseGroup = new TQHButtonGroup(i18n("Base"), central); connect(BaseChooseGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotBaseSelected(int))); - BaseChooseGroup->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, false); + BaseChooseGroup->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, false); pbBaseChoose[0] = new TQRadioButton(i18n("He&x"), BaseChooseGroup, @@ -155,7 +155,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) // Create Calculator Buttons // - // First the widgets that are the parents of the buttons + // First the widgets that are the tqparents of the buttons mSmallPage = new TQWidget(central); mLargePage = new TQWidget(central); mNumericPage = setupNumericKeys(central); @@ -228,7 +228,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) // - // All these layouts are needed because all the groups have their + // All these tqlayouts are needed because all the groups have their // own size per row so we can't use one huge TQGridLayout (mosfet) // TQGridLayout *smallBtnLayout = new TQGridLayout(mSmallPage, 6, 4, 0, @@ -246,54 +246,54 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) mainLayout->addLayout(topLayout); mainLayout->addLayout(btnLayout); - // button layout + // button tqlayout btnLayout->addWidget(mSmallPage, 0, AlignTop); btnLayout->addSpacing(2*mInternalSpacing); btnLayout->addWidget(mNumericPage, 0, AlignTop); btnLayout->addSpacing(2*mInternalSpacing); btnLayout->addWidget(mLargePage, 0, AlignTop); - // small button layout + // small button tqlayout smallBtnLayout->addWidget(pbStat["NumData"], 0, 0); smallBtnLayout->addWidget(pbScientific["HypMode"], 0, 1); smallBtnLayout->addWidget(pbLogic["AND"], 0, 2); smallBtnLayout->addWidget(pbMod, 0, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xA), 0, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xA), 0, 4); smallBtnLayout->addWidget(pbConstant[0], 0, 5); smallBtnLayout->addWidget(pbStat["Mean"], 1, 0); smallBtnLayout->addWidget(pbScientific["Sine"], 1, 1); smallBtnLayout->addWidget(pbLogic["OR"], 1, 2); smallBtnLayout->addWidget(pbReci, 1, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xB), 1, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xB), 1, 4); smallBtnLayout->addWidget(pbConstant[1], 1, 5); smallBtnLayout->addWidget(pbStat["StandardDeviation"], 2, 0); smallBtnLayout->addWidget(pbScientific["Cosine"], 2, 1); smallBtnLayout->addWidget(pbLogic["XOR"], 2, 2); smallBtnLayout->addWidget(pbFactorial, 2, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xC), 2, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xC), 2, 4); smallBtnLayout->addWidget(pbConstant[2], 2, 5); smallBtnLayout->addWidget(pbStat["Median"], 3, 0); smallBtnLayout->addWidget(pbScientific["Tangent"], 3, 1); smallBtnLayout->addWidget(pbLogic["LeftShift"], 3, 2); smallBtnLayout->addWidget(pbSquare, 3, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xD), 3, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xD), 3, 4); smallBtnLayout->addWidget(pbConstant[3], 3, 5); smallBtnLayout->addWidget(pbStat["InputData"], 4, 0); smallBtnLayout->addWidget(pbScientific["Log10"], 4, 1); smallBtnLayout->addWidget(pbLogic["RightShift"], 4, 2); smallBtnLayout->addWidget(pbRoot, 4, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xE), 4, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xE), 4, 4); smallBtnLayout->addWidget(pbConstant[4], 4, 5); smallBtnLayout->addWidget(pbStat["ClearData"], 5, 0); smallBtnLayout->addWidget(pbScientific["LogNatural"], 5, 1); smallBtnLayout->addWidget(pbLogic["One-Complement"], 5, 2); smallBtnLayout->addWidget(pbPower, 5, 3); - smallBtnLayout->addWidget(NumButtonGroup->find(0xF), 5, 4); + smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xF), 5, 4); smallBtnLayout->addWidget(pbConstant[5], 5, 5); smallBtnLayout->setRowStretch(0, 0); @@ -303,7 +303,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) smallBtnLayout->setRowStretch(4, 0); smallBtnLayout->setRowStretch(5, 0); - // large button layout + // large button tqlayout largeBtnLayout->addWidget(pbClear, 0, 0); largeBtnLayout->addWidget(pbAC, 0, 1); @@ -319,7 +319,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) largeBtnLayout->addWidget(pbPercent, 4, 0); largeBtnLayout->addWidget(pbPlusMinus, 4, 1); - // top layout + // top tqlayout topLayout->addWidget(pbAngleChoose); topLayout->addWidget(BaseChooseGroup); topLayout->addStretch(); @@ -381,7 +381,7 @@ KCalculator::KCalculator(TQWidget *parent, const char *name) updateGeometry(); adjustSize(); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); UpdateDisplay(true); @@ -457,7 +457,7 @@ actionCollection()); void KCalculator::setupStatusbar(void) { - // Status bar contents + // tqStatus bar contents statusBar()->insertFixedItem(" NORM ", 0, true); statusBar()->setItemAlignment(0, AlignCenter); @@ -471,12 +471,12 @@ void KCalculator::setupStatusbar(void) statusBar()->setItemAlignment(3, AlignCenter); } -TQWidget* KCalculator::setupNumericKeys(TQWidget *parent) +TQWidget* KCalculator::setupNumericKeys(TQWidget *tqparent) { Q_CHECK_PTR(mSmallPage); Q_CHECK_PTR(mLargePage); - TQWidget *thisPage = new TQWidget(parent); + TQWidget *thisPage = new TQWidget(tqparent); KCalcButton *tmp_pb; @@ -608,28 +608,28 @@ TQWidget* KCalculator::setupNumericKeys(TQWidget *parent) TQGridLayout *thisLayout = new TQGridLayout(thisPage, 5, 4, 0, mInternalSpacing); - // large button layout + // large button tqlayout thisLayout->addWidget(pbEE, 0, 0); thisLayout->addWidget(pbDivision, 0, 1); thisLayout->addWidget(pbX, 0, 2); thisLayout->addWidget(pbMinus, 0, 3); - thisLayout->addWidget(NumButtonGroup->find(7), 1, 0); - thisLayout->addWidget(NumButtonGroup->find(8), 1, 1); - thisLayout->addWidget(NumButtonGroup->find(9), 1, 2); + thisLayout->addWidget(NumButtonGroup->tqfind(7), 1, 0); + thisLayout->addWidget(NumButtonGroup->tqfind(8), 1, 1); + thisLayout->addWidget(NumButtonGroup->tqfind(9), 1, 2); thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3); - thisLayout->addWidget(NumButtonGroup->find(4), 2, 0); - thisLayout->addWidget(NumButtonGroup->find(5), 2, 1); - thisLayout->addWidget(NumButtonGroup->find(6), 2, 2); + thisLayout->addWidget(NumButtonGroup->tqfind(4), 2, 0); + thisLayout->addWidget(NumButtonGroup->tqfind(5), 2, 1); + thisLayout->addWidget(NumButtonGroup->tqfind(6), 2, 2); //thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3); - thisLayout->addWidget(NumButtonGroup->find(1), 3, 0); - thisLayout->addWidget(NumButtonGroup->find(2), 3, 1); - thisLayout->addWidget(NumButtonGroup->find(3), 3, 2); + thisLayout->addWidget(NumButtonGroup->tqfind(1), 3, 0); + thisLayout->addWidget(NumButtonGroup->tqfind(2), 3, 1); + thisLayout->addWidget(NumButtonGroup->tqfind(3), 3, 2); thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3); - thisLayout->addMultiCellWidget(NumButtonGroup->find(0), 4, 4, 0, 1); + thisLayout->addMultiCellWidget(NumButtonGroup->tqfind(0), 4, 4, 0, 1); thisLayout->addWidget(pbPeriod, 4, 2); //thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3); @@ -741,33 +741,33 @@ TQWidget* KCalculator::setupNumericKeys(TQWidget *parent) return thisPage; } -void KCalculator::setupLogicKeys(TQWidget *parent) +void KCalculator::setupLogicKeys(TQWidget *tqparent) { - Q_CHECK_PTR(parent); + Q_CHECK_PTR(tqparent); KCalcButton *tmp_pb; - tmp_pb = new KCalcButton("AND", parent, "AND-Button", i18n("Bitwise AND")); + tmp_pb = new KCalcButton("AND", tqparent, "AND-Button", i18n("Bitwise AND")); pbLogic.insert("AND", tmp_pb); tmp_pb->setAccel(Key_Ampersand); connect(this, TQT_SIGNAL(switchShowAccels(bool)), tmp_pb, TQT_SLOT(slotSetAccelDisplayMode(bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotANDclicked(void))); - tmp_pb = new KCalcButton("OR", parent, "OR-Button", i18n("Bitwise OR")); + tmp_pb = new KCalcButton("OR", tqparent, "OR-Button", i18n("Bitwise OR")); pbLogic.insert("OR", tmp_pb); tmp_pb->setAccel(Key_Bar); connect(this, TQT_SIGNAL(switchShowAccels(bool)), tmp_pb, TQT_SLOT(slotSetAccelDisplayMode(bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotORclicked(void))); - tmp_pb = new KCalcButton("XOR", parent, "XOR-Button", i18n("Bitwise XOR")); + tmp_pb = new KCalcButton("XOR", tqparent, "XOR-Button", i18n("Bitwise XOR")); pbLogic.insert("XOR", tmp_pb); connect(this, TQT_SIGNAL(switchShowAccels(bool)), tmp_pb, TQT_SLOT(slotSetAccelDisplayMode(bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotXORclicked(void))); - tmp_pb = new KCalcButton("Cmp", parent, "One-Complement-Button", + tmp_pb = new KCalcButton("Cmp", tqparent, "One-Complement-Button", i18n("One's complement")); pbLogic.insert("One-Complement", tmp_pb); tmp_pb->setAccel(Key_AsciiTilde); @@ -775,7 +775,7 @@ void KCalculator::setupLogicKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetAccelDisplayMode(bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotNegateclicked(void))); - tmp_pb = new KCalcButton("Lsh", parent, "LeftBitShift-Button", + tmp_pb = new KCalcButton("Lsh", tqparent, "LeftBitShift-Button", i18n("Left bit shift")); tmp_pb->setAccel(Key_Less); pbLogic.insert("LeftShift", tmp_pb); @@ -784,7 +784,7 @@ void KCalculator::setupLogicKeys(TQWidget *parent) connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotLeftShiftclicked(void))); - tmp_pb = new KCalcButton("Rsh", parent, "RightBitShift-Button", + tmp_pb = new KCalcButton("Rsh", tqparent, "RightBitShift-Button", i18n("Right bit shift")); tmp_pb->setAccel(Key_Greater); pbLogic.insert("RightShift", tmp_pb); @@ -794,13 +794,13 @@ void KCalculator::setupLogicKeys(TQWidget *parent) TQT_SLOT(slotRightShiftclicked(void))); } -void KCalculator::setupScientificKeys(TQWidget *parent) +void KCalculator::setupScientificKeys(TQWidget *tqparent) { - Q_CHECK_PTR(parent); + Q_CHECK_PTR(tqparent); KCalcButton *tmp_pb; - tmp_pb = new KCalcButton("Hyp", parent, "Hyp-Button", i18n("Hyperbolic mode")); + tmp_pb = new KCalcButton("Hyp", tqparent, "Hyp-Button", i18n("Hyperbolic mode")); pbScientific.insert("HypMode", tmp_pb); tmp_pb->setAccel(Key_H); connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -808,7 +808,7 @@ void KCalculator::setupScientificKeys(TQWidget *parent) connect(tmp_pb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotHyptoggled(bool))); tmp_pb->setToggleButton(true); - tmp_pb = new KCalcButton(parent, "Sin-Button"); + tmp_pb = new KCalcButton(tqparent, "Sin-Button"); pbScientific.insert("Sine", tmp_pb); tmp_pb->addMode(ModeNormal, "Sin", i18n("Sine")); tmp_pb->addMode(ModeInverse, "Asin", i18n("Arc sine")); @@ -822,7 +822,7 @@ void KCalculator::setupScientificKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotSinclicked(void))); - tmp_pb = new KCalcButton(parent, "Cos-Button"); + tmp_pb = new KCalcButton(tqparent, "Cos-Button"); pbScientific.insert("Cosine", tmp_pb); tmp_pb->addMode(ModeNormal, "Cos", i18n("Cosine")); tmp_pb->addMode(ModeInverse, "Acos", i18n("Arc cosine")); @@ -836,7 +836,7 @@ void KCalculator::setupScientificKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotCosclicked(void))); - tmp_pb = new KCalcButton(parent, "Tan-Button"); + tmp_pb = new KCalcButton(tqparent, "Tan-Button"); pbScientific.insert("Tangent", tmp_pb); tmp_pb->addMode(ModeNormal, "Tan", i18n("Tangent")); tmp_pb->addMode(ModeInverse, "Atan", i18n("Arc tangent")); @@ -850,7 +850,7 @@ void KCalculator::setupScientificKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)),TQT_SLOT(slotTanclicked(void))); - tmp_pb = new KCalcButton(parent, "Ln-Button"); + tmp_pb = new KCalcButton(tqparent, "Ln-Button"); tmp_pb->addMode(ModeNormal, "Ln", i18n("Natural log")); tmp_pb->addMode(ModeInverse, "e<sup> x </sup>", i18n("Exponential function"), true); @@ -862,7 +862,7 @@ void KCalculator::setupScientificKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotLnclicked(void))); - tmp_pb = new KCalcButton(parent, "Log-Button"); + tmp_pb = new KCalcButton(tqparent, "Log-Button"); tmp_pb->addMode(ModeNormal, "Log", i18n("Logarithm to base 10")); tmp_pb->addMode(ModeInverse, "10<sup> x </sup>", i18n("10 to the power of x"), true); @@ -876,13 +876,13 @@ void KCalculator::setupScientificKeys(TQWidget *parent) } -void KCalculator::setupStatisticKeys(TQWidget *parent) +void KCalculator::setupStatisticKeys(TQWidget *tqparent) { - Q_CHECK_PTR(parent); + Q_CHECK_PTR(tqparent); KCalcButton *tmp_pb; - tmp_pb = new KCalcButton(parent, "Stat.NumData-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.NumData-Button"); tmp_pb->addMode(ModeNormal, "N", i18n("Number of data entered")); tmp_pb->addMode(ModeInverse, TQString::fromUtf8("\xce\xa3") + "x", i18n("Sum of all data items")); @@ -894,7 +894,7 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatNumclicked(void))); - tmp_pb = new KCalcButton(parent, "Stat.Median-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.Median-Button"); tmp_pb->addMode(ModeNormal, "Med", i18n("Median")); pbStat.insert("Median", tmp_pb); mStatButtonList.append(tmp_pb); @@ -903,7 +903,7 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetAccelDisplayMode(bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatMedianclicked(void))); - tmp_pb = new KCalcButton(parent, "Stat.Mean-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.Mean-Button"); tmp_pb->addMode(ModeNormal, "Mea", i18n("Mean")); tmp_pb->addMode(ModeInverse, TQString::fromUtf8("\xce\xa3") + "x<sup>2</sup>", @@ -916,7 +916,7 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatMeanclicked(void))); - tmp_pb = new KCalcButton(parent, "Stat.StandardDeviation-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.StandardDeviation-Button"); tmp_pb->addMode(ModeNormal, TQString::fromUtf8("σ",-1) + "<sub>N-1</sub>", i18n("Sample standard deviation"), true); tmp_pb->addMode(ModeInverse, TQString::fromUtf8("σ",-1) + "<sub>N</sub>", @@ -929,7 +929,7 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatStdDevclicked(void))); - tmp_pb = new KCalcButton(parent, "Stat.DataInput-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.DataInput-Button"); tmp_pb->addMode(ModeNormal, "Dat", i18n("Enter data")); tmp_pb->addMode(ModeInverse, "CDat", i18n("Delete last data item")); pbStat.insert("InputData", tmp_pb); @@ -940,7 +940,7 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatDataInputclicked(void))); - tmp_pb = new KCalcButton(parent, "Stat.ClearData-Button"); + tmp_pb = new KCalcButton(tqparent, "Stat.ClearData-Button"); tmp_pb->addMode(ModeNormal, "CSt", i18n("Clear data store")); pbStat.insert("ClearData", tmp_pb); mStatButtonList.append(tmp_pb); @@ -949,16 +949,16 @@ void KCalculator::setupStatisticKeys(TQWidget *parent) connect(tmp_pb, TQT_SIGNAL(clicked(void)), TQT_SLOT(slotStatClearDataclicked(void))); } -void KCalculator::setupConstantsKeys(TQWidget *parent) +void KCalculator::setupConstantsKeys(TQWidget *tqparent) { - Q_CHECK_PTR(parent); + Q_CHECK_PTR(tqparent); ConstButtonGroup = new TQButtonGroup(0, "Const-Button-Group"); connect(ConstButtonGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotConstclicked(int))); KCalcConstButton *tmp_pb; - tmp_pb = new KCalcConstButton(parent, 0, "C1"); + tmp_pb = new KCalcConstButton(tqparent, 0, "C1"); tmp_pb->setAccel(ALT + Key_1); pbConstant[0] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -967,7 +967,7 @@ void KCalculator::setupConstantsKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); ConstButtonGroup->insert(tmp_pb, 0); - tmp_pb = new KCalcConstButton(parent, 1, "C2"); + tmp_pb = new KCalcConstButton(tqparent, 1, "C2"); tmp_pb->setAccel(ALT + Key_2); pbConstant[1] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -976,7 +976,7 @@ void KCalculator::setupConstantsKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); ConstButtonGroup->insert(tmp_pb, 1); - tmp_pb = new KCalcConstButton(parent, 2, "C3"); + tmp_pb = new KCalcConstButton(tqparent, 2, "C3"); tmp_pb->setAccel(ALT + Key_3); pbConstant[2] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -985,7 +985,7 @@ void KCalculator::setupConstantsKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); ConstButtonGroup->insert(tmp_pb, 2); - tmp_pb = new KCalcConstButton(parent, 3, "C4"); + tmp_pb = new KCalcConstButton(tqparent, 3, "C4"); tmp_pb->setAccel(ALT + Key_4); pbConstant[3] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -994,7 +994,7 @@ void KCalculator::setupConstantsKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); ConstButtonGroup->insert(tmp_pb, 3); - tmp_pb = new KCalcConstButton(parent, 4, "C5"); + tmp_pb = new KCalcConstButton(tqparent, 4, "C5"); tmp_pb->setAccel(ALT + Key_5); pbConstant[4] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -1003,7 +1003,7 @@ void KCalculator::setupConstantsKeys(TQWidget *parent) tmp_pb, TQT_SLOT(slotSetMode(ButtonModeFlags,bool))); ConstButtonGroup->insert(tmp_pb, 4); - tmp_pb = new KCalcConstButton(parent, 5, "C6"); + tmp_pb = new KCalcConstButton(tqparent, 5, "C6"); tmp_pb->setAccel(ALT + Key_6); pbConstant[5] = tmp_pb; connect(this, TQT_SIGNAL(switchShowAccels(bool)), @@ -1041,7 +1041,7 @@ void KCalculator::updateGeometry(void) s.setHeight(mSmallPage->fontMetrics().lineSpacing()); // why this stupid cast! - l = const_cast<TQObjectList *>(mSmallPage->children()); + l = const_cast<TQObjectList *>(mSmallPage->tqchildren()); for(uint i=0; i < l->count(); i++) { @@ -1050,7 +1050,7 @@ void KCalculator::updateGeometry(void) { TQWidget *tmp_widget = dynamic_cast<TQWidget *>(o); margin = TQApplication::style(). - pixelMetric(TQStyle::PM_ButtonMargin, (tmp_widget))*2; + tqpixelMetric(TQStyle::PM_ButtonMargin, (tmp_widget))*2; tmp_widget->setFixedSize(s.width()+margin, s.height()+margin); //tmp_widget->setMinimumSize(s.width()+margin, s.height()+margin); tmp_widget->installEventFilter( this ); @@ -1059,13 +1059,13 @@ void KCalculator::updateGeometry(void) } // why this stupic cast !! - l = const_cast<TQObjectList*>(mLargePage->children()); + l = const_cast<TQObjectList*>(mLargePage->tqchildren()); - int h1 = (NumButtonGroup->find(0x0F))->minimumSize().height(); + int h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height(); int h2 = static_cast<int>( (static_cast<float>(h1) + 4.0) / 5.0 ); s.setWidth(mLargePage->fontMetrics().width("MMM") + TQApplication::style(). - pixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2); + tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2); s.setHeight(h1 + h2); for(uint i = 0; i < l->count(); i++) @@ -1086,13 +1086,13 @@ void KCalculator::updateGeometry(void) - l = (TQObjectList*)mNumericPage->children(); // silence please + l = (TQObjectList*)mNumericPage->tqchildren(); // silence please - h1 = (NumButtonGroup->find(0x0F))->minimumSize().height(); + h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height(); h2 = (int)((((float)h1 + 4.0) / 5.0)); s.setWidth(mLargePage->fontMetrics().width("MMM") + TQApplication::style(). - pixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2); + tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2); s.setHeight(h1 + h2); for(uint i = 0; i < l->count(); i++) @@ -1110,7 +1110,7 @@ void KCalculator::updateGeometry(void) // Set Buttons of double size TQSize t(s); t.setWidth(2*s.width()); - NumButtonGroup->find(0x00)->setFixedSize(t); + NumButtonGroup->tqfind(0x00)->setFixedSize(t); t = s; t.setHeight(2*s.height()); pbEqual->setFixedSize(t); @@ -1152,11 +1152,11 @@ void KCalculator::slotBaseSelected(int base) // Enable the buttons not available in this base for (int i=0; i<current_base; i++) - NumButtonGroup->find(i)->setEnabled (true); + NumButtonGroup->tqfind(i)->setEnabled (true); // Disable the buttons not available in this base for (int i=current_base; i<16; i++) - NumButtonGroup->find(i)->setEnabled (false); + NumButtonGroup->tqfind(i)->setEnabled (false); // Only enable the decimal point in decimal pbPeriod->setEnabled(current_base == NB_DECIMAL); @@ -1271,7 +1271,7 @@ void KCalculator::slotInvtoggled(bool flag) else { statusBar()->changeItem("NORM", 0); - calc_display->setStatusText(0, TQString::null); + calc_display->setStatusText(0, TQString()); } } @@ -1544,7 +1544,7 @@ void KCalculator::slotMCclicked(void) { memory_num = 0; statusBar()->changeItem(" \xa0\xa0 ",3); - calc_display->setStatusText(3, TQString::null); + calc_display->setStatusText(3, TQString()); pbMemRecall->setDisabled(true); } @@ -1951,7 +1951,7 @@ void KCalculator::slotStatshow(bool toggled) pbStat["ClearData"]->hide(); } adjustSize(); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); KCalcSettings::setShowStat(toggled); } @@ -1983,10 +1983,10 @@ void KCalculator::slotScientificshow(bool toggled) pbAngleChoose->hide(); if(statusBar()->hasItem(2)) statusBar()->removeItem(2); - calc_display->setStatusText(2, TQString::null); + calc_display->setStatusText(2, TQString()); } adjustSize(); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); KCalcSettings::setShowScientific(toggled); } @@ -2007,7 +2007,7 @@ void KCalculator::slotLogicshow(bool toggled) resetBase(); BaseChooseGroup->show(); for (int i=10; i<16; i++) - (NumButtonGroup->find(i))->show(); + (NumButtonGroup->tqfind(i))->show(); } else { @@ -2022,12 +2022,12 @@ void KCalculator::slotLogicshow(bool toggled) BaseChooseGroup->hide(); if(statusBar()->hasItem(1)) statusBar()->removeItem(1); - calc_display->setStatusText(1, TQString::null); + calc_display->setStatusText(1, TQString()); for (int i=10; i<16; i++) - (NumButtonGroup->find(i))->hide(); + (NumButtonGroup->tqfind(i))->hide(); } adjustSize(); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); KCalcSettings::setShowLogic(toggled); } @@ -2053,7 +2053,7 @@ void KCalculator::slotConstantsShow(bool toggled) pbConstant[5]->hide(); } adjustSize(); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); KCalcSettings::setShowConstants(toggled); } @@ -2104,12 +2104,12 @@ void KCalculator::updateSettings() } else { - setCaption(TQString::null); + setCaption(TQString()); } calc_display->changeSettings(); updateGeometry(); - resize(minimumSize()); + resize(tqminimumSize()); // // 1999-10-31 Espen Sand: Don't ask me why ;) @@ -2145,7 +2145,7 @@ void KCalculator::set_colors() TQPalette numPal(KCalcSettings::numberButtonsColor(), bg); for(int i=0; i<10; i++) { - (NumButtonGroup->find(i))->setPalette(numPal); + (NumButtonGroup->tqfind(i))->setPalette(numPal); } TQPalette funcPal(KCalcSettings::functionButtonsColor(), bg); @@ -2164,7 +2164,7 @@ void KCalculator::set_colors() TQPalette hexPal(KCalcSettings::hexButtonsColor(), bg); for(int i=10; i<16; i++) { - (NumButtonGroup->find(i))->setPalette(hexPal); + (NumButtonGroup->tqfind(i))->setPalette(hexPal); } TQPalette memPal(KCalcSettings::memoryButtonsColor(), bg); @@ -2218,26 +2218,26 @@ bool KCalculator::eventFilter(TQObject *o, TQEvent *e) // Was it hex-button or normal digit?? if (num_but <10) for(int i=0; i<10; i++) - (NumButtonGroup->find(i))->setPalette(pal); + (NumButtonGroup->tqfind(i))->setPalette(pal); else for(int i=10; i<16; i++) - (NumButtonGroup->find(i))->setPalette(pal); + (NumButtonGroup->tqfind(i))->setPalette(pal); return true; } - else if( mFunctionButtonList.findRef((KCalcButton*)o) != -1) + else if( mFunctionButtonList.tqfindRef((KCalcButton*)o) != -1) { list = &mFunctionButtonList; } - else if( mStatButtonList.findRef((KCalcButton*)o) != -1) + else if( mStatButtonList.tqfindRef((KCalcButton*)o) != -1) { list = &mStatButtonList; } - else if( mMemButtonList.findRef((KCalcButton*)o) != -1) + else if( mMemButtonList.tqfindRef((KCalcButton*)o) != -1) { list = &mMemButtonList; } - else if( mOperationButtonList.findRef((KCalcButton*)o) != -1) + else if( mOperationButtonList.tqfindRef((KCalcButton*)o) != -1) { list = &mOperationButtonList; } @@ -2296,7 +2296,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) KCalculator *calc = new KCalculator; app.setTopWidget(calc); - calc->setCaption(TQString::null); + calc->setCaption(TQString()); calc->show(); int exitCode = app.exec(); diff --git a/kcalc/kcalc.h b/kcalc/kcalc.h index 87f389e..f135a3c 100644 --- a/kcalc/kcalc.h +++ b/kcalc/kcalc.h @@ -1,6 +1,6 @@ /* KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -61,9 +61,10 @@ class Constants; class KCalculator : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KCalculator(TQWidget *parent = 0, const char *name = 0); + KCalculator(TQWidget *tqparent = 0, const char *name = 0); ~KCalculator(); signals: @@ -76,16 +77,16 @@ private: void updateGeometry(); void setupMainActions(void); void setupStatusbar(void); - TQWidget *setupNumericKeys(TQWidget *parent); - void setupLogicKeys(TQWidget *parent); - void setupScientificKeys(TQWidget *parent); - void setupStatisticKeys(TQWidget *parent); - void setupConstantsKeys(TQWidget *parent); + TQWidget *setupNumericKeys(TQWidget *tqparent); + void setupLogicKeys(TQWidget *tqparent); + void setupScientificKeys(TQWidget *tqparent); + void setupStatisticKeys(TQWidget *tqparent); + void setupConstantsKeys(TQWidget *tqparent); void keyPressEvent(TQKeyEvent *e); void keyReleaseEvent(TQKeyEvent *e); void set_precision(); void set_style(); - void resetBase(void) { (BaseChooseGroup->find(1))->animateClick();}; + void resetBase(void) { (BaseChooseGroup->tqfind(1))->animateClick();}; void UpdateDisplay(bool get_amount_from_core = false, bool store_result_in_history = false); diff --git a/kcalc/kcalc_button.cpp b/kcalc/kcalc_button.cpp index 7472f92..0bde80d 100644 --- a/kcalc/kcalc_button.cpp +++ b/kcalc/kcalc_button.cpp @@ -30,16 +30,16 @@ #include "kcalc_button.h" -KCalcButton::KCalcButton(TQWidget * parent, const char * name) - : KPushButton(parent, name), _show_accel_mode(false), +KCalcButton::KCalcButton(TQWidget * tqparent, const char * name) + : KPushButton(tqparent, name), _show_accel_mode(false), _mode_flags(ModeNormal) { setAutoDefault(false); } -KCalcButton::KCalcButton(const TQString &label, TQWidget * parent, +KCalcButton::KCalcButton(const TQString &label, TQWidget * tqparent, const char * name, const TQString &tooltip) - : KPushButton(label, parent, name), _show_accel_mode(false), _mode_flags(ModeNormal) + : KPushButton(label, tqparent, name), _show_accel_mode(false), _mode_flags(ModeNormal) { setAutoDefault(false); addMode(ModeNormal, label, tooltip); @@ -47,7 +47,7 @@ KCalcButton::KCalcButton(const TQString &label, TQWidget * parent, void KCalcButton::addMode(ButtonModeFlags mode, TQString label, TQString tooltip, bool is_label_richtext) { - if (_mode.contains(mode)) _mode.remove(mode); + if (_mode.tqcontains(mode)) _mode.remove(mode); _mode[mode] = ButtonMode(label, tooltip, is_label_richtext); @@ -67,7 +67,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag) return; // nothing to do } - if (_mode.contains(new_mode)) { + if (_mode.tqcontains(new_mode)) { // save accel, because setting label erases accel TQKeySequence _accel = accel(); @@ -92,7 +92,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag) static TQString escape(TQString str) { - str.replace('&', "&&"); + str.tqreplace('&', "&&"); return str; } @@ -118,7 +118,7 @@ void KCalcButton::paintLabel(TQPainter *paint) { if (_mode[_mode_flags].is_label_richtext) { TQSimpleRichText _text(_label, font()); - _text.draw(paint, width()/2-_text.width()/2, 0, childrenRegion(), colorGroup()); + _text.draw(paint, width()/2-_text.width()/2, 0, tqchildrenRegion(), tqcolorGroup()); } else { KPushButton::drawButtonLabel(paint); } @@ -128,7 +128,7 @@ void KCalcButton::drawButtonLabel(TQPainter *paint) { if (_show_accel_mode) { KPushButton::drawButtonLabel(paint); - } else if (_mode.contains(_mode_flags)) { + } else if (_mode.tqcontains(_mode_flags)) { paintLabel(paint); } } @@ -159,7 +159,7 @@ void KSquareButton::drawButtonLabel(TQPainter *paint) { if (_show_accel_mode) { KPushButton::drawButtonLabel(paint); - } else if (_mode.contains(_mode_flags)) { + } else if (_mode.tqcontains(_mode_flags)) { paintLabel(paint); } } diff --git a/kcalc/kcalc_button.h b/kcalc/kcalc_button.h index f1a060f..60a7c30 100644 --- a/kcalc/kcalc_button.h +++ b/kcalc/kcalc_button.h @@ -1,6 +1,6 @@ /* KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -61,10 +61,11 @@ public: class KCalcButton : public KPushButton { Q_OBJECT + TQ_OBJECT public: - KCalcButton(TQWidget *parent, const char * name = 0); - KCalcButton(const TQString &label, TQWidget *parent, const char * name = 0, + KCalcButton(TQWidget *tqparent, const char * name = 0); + KCalcButton(const TQString &label, TQWidget *tqparent, const char * name = 0, const TQString &tooltip = TQString()); void addMode(ButtonModeFlags mode, TQString label, TQString tooltip, bool is_label_richtext = false); @@ -89,13 +90,14 @@ protected: class KSquareButton : public KCalcButton { Q_OBJECT + TQ_OBJECT public: - KSquareButton(TQWidget *parent, const char * name = 0) - : KCalcButton(parent, name) { }; - KSquareButton(const TQString &label, TQWidget *parent, const char * name = 0, + KSquareButton(TQWidget *tqparent, const char * name = 0) + : KCalcButton(tqparent, name) { }; + KSquareButton(const TQString &label, TQWidget *tqparent, const char * name = 0, const TQString &tooltip = TQString()) - : KCalcButton(label, parent, name, tooltip) { }; + : KCalcButton(label, tqparent, name, tooltip) { }; protected: virtual void drawButtonLabel(TQPainter *paint); diff --git a/kcalc/kcalc_const_button.cpp b/kcalc/kcalc_const_button.cpp index 071bb71..a8eb989 100644 --- a/kcalc/kcalc_const_button.cpp +++ b/kcalc/kcalc_const_button.cpp @@ -31,8 +31,8 @@ #include "kcalc_settings.h" -KCalcConstButton::KCalcConstButton(TQWidget *parent, int but_num, const char * name) - : KCalcButton(parent, name), _button_num(but_num) +KCalcConstButton::KCalcConstButton(TQWidget *tqparent, int but_num, const char * name) + : KCalcButton(tqparent, name), _button_num(but_num) { addMode(ModeInverse, "Store", i18n("Write display data into memory")); @@ -40,9 +40,9 @@ KCalcConstButton::KCalcConstButton(TQWidget *parent, int but_num, const char * n } -KCalcConstButton::KCalcConstButton(const TQString &label, TQWidget *parent, int but_num, +KCalcConstButton::KCalcConstButton(const TQString &label, TQWidget *tqparent, int but_num, const char * name, const TQString &tooltip) - : KCalcButton(label, parent, name, tooltip), _button_num(but_num) + : KCalcButton(label, tqparent, name, tooltip), _button_num(but_num) { addMode(ModeInverse, "Store", i18n("Write display data into memory")); diff --git a/kcalc/kcalc_const_button.h b/kcalc/kcalc_const_button.h index 110df3c..916d7f6 100644 --- a/kcalc/kcalc_const_button.h +++ b/kcalc/kcalc_const_button.h @@ -1,6 +1,6 @@ /* KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -31,12 +31,13 @@ class KCalcConstButton : public KCalcButton { Q_OBJECT + TQ_OBJECT public: - KCalcConstButton(TQWidget *parent, int but_num, const char * name = 0); + KCalcConstButton(TQWidget *tqparent, int but_num, const char * name = 0); - KCalcConstButton(const TQString &label, TQWidget *parent, int but_num, const char * name = 0, + KCalcConstButton(const TQString &label, TQWidget *tqparent, int but_num, const char * name = 0, const TQString &tooltip = TQString()); TQString constant(void) const; diff --git a/kcalc/kcalc_const_menu.cpp b/kcalc/kcalc_const_menu.cpp index f758c9f..7984daf 100644 --- a/kcalc/kcalc_const_menu.cpp +++ b/kcalc/kcalc_const_menu.cpp @@ -49,8 +49,8 @@ const struct science_constant KCalcConstMenu::Constants[] = { {"N_A", I18N_NOOP("Avogadro's Number"), "", "6.0221415e23", Thermodynamics} }; -KCalcConstMenu::KCalcConstMenu(TQWidget * parent, const char * name) - : TQPopupMenu(parent, name) +KCalcConstMenu::KCalcConstMenu(TQWidget * tqparent, const char * name) + : TQPopupMenu(tqparent, name) { TQPopupMenu *math_menu = new TQPopupMenu(this, "mathematical constants"); TQPopupMenu *em_menu = new TQPopupMenu(this, "electromagnetic constants"); diff --git a/kcalc/kcalc_const_menu.h b/kcalc/kcalc_const_menu.h index 94c8412..331a6a1 100644 --- a/kcalc/kcalc_const_menu.h +++ b/kcalc/kcalc_const_menu.h @@ -1,6 +1,6 @@ /* KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 2004 Klaus Niederkruger @@ -36,12 +36,12 @@ struct science_constant{ ConstantCategory category; }; -class KCalcConstMenu : public QPopupMenu +class KCalcConstMenu : public TQPopupMenu { -Q_OBJECT +TQ_OBJECT public: - KCalcConstMenu(TQWidget * parent = 0, const char * name = 0); + KCalcConstMenu(TQWidget * tqparent = 0, const char * name = 0); static const struct science_constant Constants[]; diff --git a/kcalc/kcalc_core.cpp b/kcalc/kcalc_core.cpp index 4270895..89a2438 100644 --- a/kcalc/kcalc_core.cpp +++ b/kcalc/kcalc_core.cpp @@ -1,6 +1,6 @@ /* kCalculator, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no The stack engine contained in this file was take from Martin Bartlett's xfrmcalc @@ -209,7 +209,7 @@ CalcEngine::CalcEngine() struct sigaction fpe_trap; - sigemptyset(&fpe_trap.sa_mask); + sigemptyset(&fpe_trap.sa_tqmask); fpe_trap.sa_handler = &fpe_handler; #ifdef SA_RESTART fpe_trap.sa_flags = SA_RESTART; diff --git a/kcalc/kcalc_core.h b/kcalc/kcalc_core.h index fe818e9..f02d880 100644 --- a/kcalc/kcalc_core.h +++ b/kcalc/kcalc_core.h @@ -1,7 +1,7 @@ /* KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kcalc/kcalcdisplay.cpp b/kcalc/kcalcdisplay.cpp index 1f90e03..fb0595e 100644 --- a/kcalc/kcalcdisplay.cpp +++ b/kcalc/kcalcdisplay.cpp @@ -2,7 +2,7 @@ $Id$ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -39,17 +39,17 @@ #include "kcalcdisplay.moc" -KCalcDisplay::KCalcDisplay(TQWidget *parent, const char *name) - :TQLabel(parent,name), _beep(false), _groupdigits(false), _button(0), _lit(false), +KCalcDisplay::KCalcDisplay(TQWidget *tqparent, const char *name) + :TQLabel(tqparent,name), _beep(false), _groupdigits(false), _button(0), _lit(false), _num_base(NB_DECIMAL), _precision(9), _fixed_precision(-1), _display_amount(0), selection_timer(new TQTimer) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - setAlignment(AlignRight | AlignVCenter); + tqsetAlignment(AlignRight | AlignVCenter); setFocus(); - setFocusPolicy(TQWidget::StrongFocus); - setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, false); + setFocusPolicy(TQ_StrongFocus); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, false); connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDisplaySelected())); @@ -71,7 +71,7 @@ bool KCalcDisplay::sendEvent(Event const event) case EventReset: _display_amount = 0; _str_int = "0"; - _str_int_exp = TQString::null; + _str_int_exp = TQString(); _eestate = false; _period = false; @@ -105,13 +105,13 @@ void KCalcDisplay::slotCopy(void) TQString txt = TQLabel::text(); if (_num_base == NB_HEX) txt.prepend( "0x" ); - (TQApplication::clipboard())->setText(txt, QClipboard::Clipboard); - (TQApplication::clipboard())->setText(txt, QClipboard::Selection); + (TQApplication::tqclipboard())->setText(txt, TQClipboard::Clipboard); + (TQApplication::tqclipboard())->setText(txt, TQClipboard::Selection); } void KCalcDisplay::slotPaste(bool bClipboard) { - TQString tmp_str = (TQApplication::clipboard())->text(bClipboard ? QClipboard::Clipboard : QClipboard::Selection); + TQString tmp_str = (TQApplication::tqclipboard())->text(bClipboard ? TQClipboard::Clipboard : TQClipboard::Selection); if (tmp_str.isNull()) { @@ -226,7 +226,7 @@ bool KCalcDisplay::setAmount(KNumber const & new_amount) TQString display_str; _str_int = "0"; - _str_int_exp = TQString::null; + _str_int_exp = TQString(); _period = false; _neg_sign = false; _eestate = false; @@ -243,7 +243,7 @@ bool KCalcDisplay::setAmount(KNumber const & new_amount) { _display_amount = new_amount; - display_str = _display_amount.toQString(KCalcSettings::precision(), _fixed_precision); + display_str = _display_amount.toTQString(KCalcSettings::precision(), _fixed_precision); #if 0 else if (_display_amount > 1.0e+16) display_str = TQCString().sprintf(PRINT_LONG_BIG, _precision + 1, _display_amount); @@ -281,7 +281,7 @@ TQString KCalcDisplay::text() const { if (_num_base != NB_DECIMAL) return TQLabel::text(); - TQString display_str = _display_amount.toQString(KCalcSettings::precision()); + TQString display_str = _display_amount.toTQString(KCalcSettings::precision()); return display_str; // return TQCString().sprintf(PRINT_LONG_BIG, 40, _display_amount); @@ -584,7 +584,7 @@ void KCalcDisplay::drawContents(TQPainter *p) // draw the status texts using half of the normal // font size but not smaller than 7pt TQFont f(font()); - f.setPointSize(QMAX((f.pointSize() / 2), 7)); + f.setPointSize(TQMAX((f.pointSize() / 2), 7)); p->setFont(f); TQFontMetrics fm(f); uint w = fm.width("_____"); @@ -596,13 +596,13 @@ void KCalcDisplay::drawContents(TQPainter *p) } } -// Return the QLabel's normal size hint vertically expanded +// Return the TQLabel's normal size hint vertically expanded // by half the font height to make room for the status texts -TQSize KCalcDisplay::sizeHint() const +TQSize KCalcDisplay::tqsizeHint() const { TQFont f(font()); - f.setPointSize(QMAX((f.pointSize() / 2), 7)); + f.setPointSize(TQMAX((f.pointSize() / 2), 7)); TQFontMetrics fm(f); - return TQLabel::sizeHint() + TQSize(0, fm.height()); + return TQLabel::tqsizeHint() + TQSize(0, fm.height()); } diff --git a/kcalc/kcalcdisplay.h b/kcalc/kcalcdisplay.h index 6f7233c..4c0371c 100644 --- a/kcalc/kcalcdisplay.h +++ b/kcalc/kcalcdisplay.h @@ -76,12 +76,13 @@ enum NumBase { }; -class KCalcDisplay : public QLabel +class KCalcDisplay : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KCalcDisplay(TQWidget *parent=0, const char *name=0); + KCalcDisplay(TQWidget *tqparent=0, const char *name=0); ~KCalcDisplay(); protected: @@ -109,7 +110,7 @@ public: TQString text() const; bool updateDisplay(void); void setStatusText(uint i, const TQString& text); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; private: bool _beep; bool _groupdigits; diff --git a/kcalc/kcalctype.h b/kcalc/kcalctype.h index 8223e87..6c69aec 100644 --- a/kcalc/kcalctype.h +++ b/kcalc/kcalctype.h @@ -2,7 +2,7 @@ $Id$ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kcalc/knumber/knumber.cpp b/kcalc/knumber/knumber.cpp index 80bae1f..123fee7 100644 --- a/kcalc/knumber/knumber.cpp +++ b/kcalc/knumber/knumber.cpp @@ -276,7 +276,7 @@ static void _inc_by_one(TQString &str, int position) // Cut off if more digits in fractional part than 'precision' static void _round(TQString &str, int precision) { - int decimalSymbolPos = str.find('.'); + int decimalSymbolPos = str.tqfind('.'); if (decimalSymbolPos == -1) if (precision == 0) return; @@ -312,7 +312,7 @@ static void _round(TQString &str, int precision) break; } - decimalSymbolPos = str.find('.'); + decimalSymbolPos = str.tqfind('.'); str.truncate(decimalSymbolPos + precision + 1); // if precision == 0 delete also '.' @@ -349,7 +349,7 @@ static TQString roundNumber(const TQString &numStr, int precision) } -TQString const KNumber::toQString(int width, int prec) const +TQString const KNumber::toTQString(int width, int prec) const { TQString tmp_str; @@ -360,7 +360,7 @@ TQString const KNumber::toQString(int width, int prec) const if (width > 0) { //result needs to be cut-off bool tmp_bool = _fraction_input; // stupid work-around _fraction_input = false; - tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1); + tmp_str = (KNumber("1.0")*(*this)).toTQString(width, -1); _fraction_input = tmp_bool; } else tmp_str = TQString(_num->ascii()); @@ -369,7 +369,7 @@ TQString const KNumber::toQString(int width, int prec) const if (_float_output) { bool tmp_bool = _fraction_input; // stupid work-around _fraction_input = false; - tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1); + tmp_str = (KNumber("1.0")*(*this)).toTQString(width, -1); _fraction_input = tmp_bool; } else { // _float_output == false if(_splitoffinteger_output) { @@ -378,9 +378,9 @@ TQString const KNumber::toQString(int width, int prec) const if (int_part == Zero) tmp_str = TQString(_num->ascii()); else if (int_part < Zero) - tmp_str = int_part.toQString() + " " + (int_part - *this)._num->ascii(); + tmp_str = int_part.toTQString() + " " + (int_part - *this)._num->ascii(); else - tmp_str = int_part.toQString() + " " + (*this - int_part)._num->ascii(); + tmp_str = int_part.toTQString() + " " + (*this - int_part)._num->ascii(); } else tmp_str = TQString(_num->ascii()); @@ -388,7 +388,7 @@ TQString const KNumber::toQString(int width, int prec) const //result needs to be cut-off bool tmp_bool = _fraction_input; // stupid work-around _fraction_input = false; - tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1); + tmp_str = (KNumber("1.0")*(*this)).toTQString(width, -1); _fraction_input = tmp_bool; } } diff --git a/kcalc/knumber/knumber.h b/kcalc/knumber/knumber.h index 02fce32..2ca3b5c 100644 --- a/kcalc/knumber/knumber.h +++ b/kcalc/knumber/knumber.h @@ -36,8 +36,8 @@ class TQString; * KNumber is based on the GMP (GNU Multiprecision) library and * provides transparent support to integer, fractional and floating * point number. It contains rudimentary error handling, and also - * includes methods for converting the numbers to QStrings for - * output, and to read QStrings to obtain a KNumber. + * includes methods for converting the numbers to TQStrings for + * output, and to read TQStrings to obtain a KNumber. * * The different types of numbers that can be represented by objects * of this class will be described below: @@ -130,7 +130,7 @@ class KDE_EXPORT KNumber NumType type(void) const; /** - * Set whether the output of numbers (with KNumber::toQString) + * Set whether the output of numbers (with KNumber::toTQString) * should happen as floating point numbers or not. This method has * in fact only an effect on numbers of type @p * NumType::FractionType, which can be either displayed as fractions @@ -179,7 +179,7 @@ class KDE_EXPORT KNumber * is ignored. * */ - TQString const toQString(int width = -1, int prec = -1) const; + TQString const toTQString(int width = -1, int prec = -1) const; /** * Compute the absolute value, i.e. @p x.abs() returns the value diff --git a/kcalc/knumber/knumber_priv.cpp b/kcalc/knumber/knumber_priv.cpp index 56de7d3..8f69a5d 100644 --- a/kcalc/knumber/knumber_priv.cpp +++ b/kcalc/knumber/knumber_priv.cpp @@ -190,7 +190,7 @@ TQString const _knumerror::ascii(int prec) const case MinusInfinity: return TQString("-inf"); default: - return TQString::null; + return TQString(); } } diff --git a/kcalc/knumber/tests/knumbertest.cpp b/kcalc/knumber/tests/knumbertest.cpp index e34d94d..0d45355 100644 --- a/kcalc/knumber/tests/knumbertest.cpp +++ b/kcalc/knumber/tests/knumbertest.cpp @@ -32,13 +32,13 @@ void checkResult(TQString const &string, KNumber const & result, { std::cout << "Testing result of: " << string.ascii() << " should give " << desired_string.ascii() << " and gives " << - result.toQString(8).ascii() << "....\n"; + result.toTQString(8).ascii() << "....\n"; std::cout << "The type of the result should be " << numtypeToString(desired).ascii() << " and gives " << numtypeToString(result.type()).ascii() << ".... "; if (result.type() == desired && - result.toQString(8) == desired_string) { + result.toTQString(8) == desired_string) { std::cout << "OK\n"; return; } diff --git a/kcalc/stats.cpp b/kcalc/stats.cpp index 45da5c3..57b3d55 100644 --- a/kcalc/stats.cpp +++ b/kcalc/stats.cpp @@ -2,7 +2,7 @@ $Id$ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kcalc/stats.h b/kcalc/stats.h index aba11f4..e8d1037 100644 --- a/kcalc/stats.h +++ b/kcalc/stats.h @@ -2,7 +2,7 @@ $Id$ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kcharselect/kcharselectdia.cc b/kcharselect/kcharselectdia.cc index fec2f86..6537090 100644 --- a/kcharselect/kcharselectdia.cc +++ b/kcharselect/kcharselectdia.cc @@ -21,12 +21,12 @@ /******************************************************************/ //================================================================== -KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name, +KCharSelectDia::KCharSelectDia(TQWidget *tqparent,const char *name, const TQChar &_chr,const TQString &_font, int _tableNum, bool direction) - : KMainWindow(parent,name), vChr(_chr), vFont(_font) + : KMainWindow(tqparent,name), vChr(_chr), vFont(_font) { - setCaption(TQString::null); // Standard caption + setCaption(TQString()); // Standard caption TQWidget *mainWidget = new TQWidget(this); setCentralWidget(mainWidget); @@ -35,7 +35,7 @@ KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name, // Add character selection widget from library kdeui charSelect = new KCharSelect(mainWidget,"",vFont,vChr,_tableNum); - charSelect->resize(charSelect->sizeHint()); + charSelect->resize(charSelect->tqsizeHint()); connect(charSelect,TQT_SIGNAL(highlighted(const TQChar &)), TQT_SLOT(charChanged(const TQChar &))); connect(charSelect,TQT_SIGNAL(activated(const TQChar &)), @@ -46,7 +46,7 @@ KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name, // Build line editor lined = new TQLineEdit(mainWidget); - lined->resize(lined->sizeHint()); + lined->resize(lined->tqsizeHint()); TQFont font = lined->font(); font.setFamily( vFont ); @@ -59,7 +59,7 @@ KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name, // Build some buttons bHelp = new KPushButton( KStdGuiItem::help(), mainWidget ); connect(bHelp,TQT_SIGNAL(clicked()),this,TQT_SLOT(help())); - bHelp->setFixedSize( bHelp->sizeHint() ); + bHelp->setFixedSize( bHelp->tqsizeHint() ); grid->addWidget( bHelp, 2, 0 ); TQSpacerItem *space = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding ); @@ -67,46 +67,46 @@ KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name, bClear = new KPushButton( KStdGuiItem::clear(), mainWidget ); connect(bClear,TQT_SIGNAL(clicked()),this,TQT_SLOT(clear())); - bClear->setFixedSize( bClear->sizeHint() ); + bClear->setFixedSize( bClear->tqsizeHint() ); grid->addWidget( bClear, 2, 2 ); bClip = new KPushButton( KGuiItem( i18n( "&To Clipboard" ), "editcopy" ), mainWidget ); - bClip->setFixedSize( bClip->sizeHint() ); + bClip->setFixedSize( bClip->tqsizeHint() ); connect(bClip,TQT_SIGNAL(clicked()),this,TQT_SLOT(toClip())); grid->addWidget( bClip, 2, 3 ); // Build menu - KStdAction::quit( this, TQT_SLOT(_exit()), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(_exit()), actionCollection() ); new KAction(i18n("&To Clipboard"), "editcopy", - KStdAccel::shortcut(KStdAccel::Copy), this, TQT_SLOT(toClip()), actionCollection(), "copy_clip" ); + KStdAccel::shortcut(KStdAccel::Copy), TQT_TQOBJECT(this), TQT_SLOT(toClip()), actionCollection(), "copy_clip" ); - (void)new KAction(i18n("To Clipboard &UTF-8"), 0, this, + (void)new KAction(i18n("To Clipboard &UTF-8"), 0, TQT_TQOBJECT(this), TQT_SLOT(toClipUTF8()), actionCollection(), "copy_utf_8" ); - (void)new KAction(i18n("To Clipboard &HTML"), 0, this, + (void)new KAction(i18n("To Clipboard &HTML"), 0, TQT_TQOBJECT(this), TQT_SLOT(toClipHTML()), actionCollection(), "copy_html" ); new KAction(i18n("&From Clipboard"), "editpaste", - KStdAccel::shortcut(KStdAccel::Paste), this, TQT_SLOT(fromClip()), actionCollection(), "from_clip" ); - (void)new KAction(i18n("From Clipboard UTF-8"), 0, this, + KStdAccel::shortcut(KStdAccel::Paste), TQT_TQOBJECT(this), TQT_SLOT(fromClip()), actionCollection(), "from_clip" ); + (void)new KAction(i18n("From Clipboard UTF-8"), 0, TQT_TQOBJECT(this), TQT_SLOT(fromClipUTF8()), actionCollection(), "from_clip_utf8" ); i18n("From Clipboard HTML"); // Intended for future use - KStdAction::clear(this, TQT_SLOT(clear()), actionCollection(), "clear"); - (void)new KAction(i18n("&Flip"), 0, this, + KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(clear()), actionCollection(), "clear"); + (void)new KAction(i18n("&Flip"), 0, TQT_TQOBJECT(this), TQT_SLOT(flipText()), actionCollection(), "flip" ); - (void)new KAction(i18n("&Alignment"), 0, this, - TQT_SLOT(toggleEntryDirection()), actionCollection(), "alignment" ); + (void)new KAction(i18n("&Alignment"), 0, TQT_TQOBJECT(this), + TQT_SLOT(toggleEntryDirection()), actionCollection(), "tqalignment" ); charSelect->setFocus(); entryDirection = direction; if( entryDirection ) - lined->setAlignment( Qt::AlignRight ); + lined->tqsetAlignment( TQt::AlignRight ); else - lined->setAlignment( Qt::AlignLeft ); + lined->tqsetAlignment( TQt::AlignLeft ); setupGUI(Keys|StatusBar|Save|Create); } @@ -148,7 +148,7 @@ void KCharSelectDia::add(const TQChar &_chr) //================================================================== void KCharSelectDia::toClip() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setSelectionMode( true ); cb->setText(lined->text()); cb->setSelectionMode( false ); @@ -161,7 +161,7 @@ void KCharSelectDia::toClip() // void KCharSelectDia::toClipUTF8() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQString str = lined->text(); cb->setText(str.utf8()); } @@ -174,7 +174,7 @@ void KCharSelectDia::toClipUTF8() // void KCharSelectDia::toClipHTML() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQString input; TQString html; TQString tempstring; @@ -185,13 +185,13 @@ void KCharSelectDia::toClipHTML() for(i=0; i< input.length(); i++ ) { tempchar = input.at(i); - if( tempchar.latin1() && ((tempchar.unicode() < 128) || (tempchar.unicode() >= 128+32)) ) + if( tempchar.latin1() && ((tempchar.tqunicode() < 128) || (tempchar.tqunicode() >= 128+32)) ) { html.append(input.at(i)); } else { - html.append(tempstring.sprintf("&#x%x;", tempchar.unicode())); + html.append(tempstring.sprintf("&#x%x;", tempchar.tqunicode())); } } cb->setText(html); @@ -201,7 +201,7 @@ void KCharSelectDia::toClipHTML() // void KCharSelectDia::fromClip() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); lined->setText( cb->text() ); } @@ -213,7 +213,7 @@ void KCharSelectDia::fromClip() // void KCharSelectDia::fromClipUTF8() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQString str = cb->text(); lined->setText( str.fromUtf8( str.latin1() ) ); @@ -244,9 +244,9 @@ void KCharSelectDia::toggleEntryDirection() { entryDirection ^= 1; if( entryDirection ) - lined->setAlignment( Qt::AlignRight ); + lined->tqsetAlignment( TQt::AlignRight ); else - lined->setAlignment( Qt::AlignLeft ); + lined->tqsetAlignment( TQt::AlignLeft ); } //================================================================== @@ -266,7 +266,7 @@ void KCharSelectDia::_exit() config->setGroup("General"); config->writeEntry("selectedFont",vFont); - config->writeEntry("char",static_cast<int>(vChr.unicode())); + config->writeEntry("char",static_cast<int>(vChr.tqunicode())); config->writeEntry("table",charSelect->tableNum()); config->writeEntry("entryDirection",entryDirection); config->sync(); diff --git a/kcharselect/kcharselectdia.h b/kcharselect/kcharselectdia.h index 6427c40..3ba9c93 100644 --- a/kcharselect/kcharselectdia.h +++ b/kcharselect/kcharselectdia.h @@ -25,9 +25,10 @@ static const char *version = "v1.1"; class KCharSelectDia : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KCharSelectDia(TQWidget *parent,const char *name,const TQChar &_chr,const TQString &_font,int _tableNum, bool direction); + KCharSelectDia(TQWidget *tqparent,const char *name,const TQChar &_chr,const TQString &_font,int _tableNum, bool direction); static bool selectChar(TQString &_font,TQChar &_chr,int _tableNum); diff --git a/kdelirc/irkick/irkick.cpp b/kdelirc/irkick/irkick.cpp index fdcfa3a..036974c 100644 --- a/kdelirc/irkick/irkick.cpp +++ b/kdelirc/irkick/irkick.cpp @@ -44,10 +44,10 @@ void IRKTrayIcon::mousePressEvent(TQMouseEvent *e) { - KSystemTray::mousePressEvent(new TQMouseEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == LeftButton ? RightButton : e->button(), e->state())); + KSystemTray::mousePressEvent(new TQMouseEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == Qt::LeftButton ? Qt::RightButton : e->button(), e->state())); } -IRKick::IRKick(const TQCString &obj) : TQObject(), DCOPObject(obj), npApp(TQString::null) +IRKick::IRKick(const TQCString &obj) : TQObject(), DCOPObject(obj), npApp(TQString()) { kapp->dcopClient()->setDefaultObject(obj); theClient = new KLircClient(); @@ -195,7 +195,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs) for(QCStringList::iterator i = buf.begin(); i != buf.end(); ++i) { TQString program = TQString::fromUtf8(*i); - if(program.contains(r)) + if(program.tqcontains(r)) programs += program; } if(programs.size() > 1 && action.ifMulti() == IM_DONTSEND) @@ -206,7 +206,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs) for(TQValueList<WId>::iterator i = s.fromLast(); i != s.end(); i--) { int p = KWin::info(*i).pid; TQString id = action.program() + "-" + TQString().setNum(p); - if(programs.contains(id)) + if(programs.tqcontains(id)) { programs.clear(); programs += id; break; @@ -220,7 +220,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs) for(TQValueList<WId>::iterator i = s.begin(); i != s.end(); ++i) { int p = KWin::info(*i).pid; TQString id = action.program() + "-" + TQString().setNum(p); - if(programs.contains(id)) + if(programs.tqcontains(id)) { programs.clear(); programs += id; break; @@ -244,7 +244,7 @@ void IRKick::executeAction(const IRAction &action) { TQString sname = ProfileServer::profileServer()->getServiceName(action.program()); if(!sname.isNull()) { - KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon); + KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").tqarg(action.application()), SmallIcon("irkick"), theTrayIcon); KApplication::startServiceByDesktopName(sname); } } @@ -282,7 +282,7 @@ void IRKick::gotMessage(const TQString &theRemote, const TQString &theButton, in if(!npApp.isNull()) { TQString theApp = npApp; - npApp = TQString::null; + npApp = TQString(); // send notifier by DCOP to npApp/npModule/npMethod(theRemote, theButton); TQByteArray data; TQDataStream arg(data, IO_WriteOnly); arg << theRemote << theButton; @@ -330,7 +330,7 @@ void IRKick::stealNextPress(TQString app, TQString module, TQString method) void IRKick::dontStealNextPress() { - npApp = TQString::null; + npApp = TQString(); } #include "irkick.moc" diff --git a/kdelirc/irkick/irkick.h b/kdelirc/irkick/irkick.h index 92c2d9c..d55dcee 100644 --- a/kdelirc/irkick/irkick.h +++ b/kdelirc/irkick/irkick.h @@ -36,12 +36,13 @@ public: KPopupMenu* contextMenu() const { return KSystemTray::contextMenu(); } KActionCollection* actionCollection() { return KSystemTray::actionCollection(); } - IRKTrayIcon(TQWidget *parent = 0, const char *name = 0): KSystemTray(parent, name) {} + IRKTrayIcon(TQWidget *tqparent = 0, const char *name = 0): KSystemTray(tqparent, name) {} }; class IRKick: public TQObject, public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP TQString npApp, npModule, npMethod; diff --git a/kdelirc/irkick/klircclient.cpp b/kdelirc/irkick/klircclient.cpp index 3ce33d6..544eb2a 100644 --- a/kdelirc/irkick/klircclient.cpp +++ b/kdelirc/irkick/klircclient.cpp @@ -43,7 +43,7 @@ #include "klircclient.h" -KLircClient::KLircClient(TQWidget *parent, const char *name) : TQObject(parent, name), theSocket(0), listIsUpToDate(false) +KLircClient::KLircClient(TQWidget *tqparent, const char *name) : TQObject(tqparent, name), theSocket(0), listIsUpToDate(false) { connectToLirc(); } @@ -177,14 +177,14 @@ void KLircClient::slotRead() { // <code> <repeat> <button name> <remote control name> line.remove(0, 17); // strip code - int pos = line.find(' '); + int pos = line.tqfind(' '); if (pos < 0) return; bool ok; int repeat = line.left(pos).toInt(&ok, 16); if (!ok) return; line.remove(0, pos + 1); - pos = line.find(' '); + pos = line.tqfind(' '); if (pos < 0) return; TQString btn = line.left(pos); if(btn.startsWith("'") && btn.endsWith("'")) @@ -223,7 +223,7 @@ const TQString KLircClient::readLine() theSocket->waitForMore(500, &timeout); if (timeout) { // something's wrong. there ain't no line comin! - return TQString::null; + return TQString(); } } TQString line = theSocket->readLine(); diff --git a/kdelirc/irkick/klircclient.h b/kdelirc/irkick/klircclient.h index e271b23..24089c8 100644 --- a/kdelirc/irkick/klircclient.h +++ b/kdelirc/irkick/klircclient.h @@ -26,9 +26,10 @@ class TQSocketNotifier; @author Gav Wood */ -class KLircClient: public QObject +class KLircClient: public TQObject { Q_OBJECT + TQ_OBJECT private: struct lirc_config *theConfig; @@ -107,7 +108,7 @@ public: */ bool connectToLirc(); - KLircClient(TQWidget *parent = 0, const char *name = 0); + KLircClient(TQWidget *tqparent = 0, const char *name = 0); ~KLircClient(); }; diff --git a/kdelirc/kcmlirc/addaction.cpp b/kdelirc/kcmlirc/addaction.cpp index f2d6ad3..1d13f19 100644 --- a/kdelirc/kcmlirc/addaction.cpp +++ b/kdelirc/kcmlirc/addaction.cpp @@ -32,7 +32,7 @@ #include "profileserver.h" #include "remoteserver.h" -AddAction::AddAction(TQWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) +AddAction::AddAction(TQWidget *tqparent, const char *name, const Mode &mode): AddActionBase(tqparent, name), theMode(mode) { connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( updateForPageChange() )); connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( slotCorrectPage() )); @@ -92,12 +92,12 @@ void AddAction::updateButton(const TQString &remote, const TQString &button) { if(theMode.remote() == remote) { // note this isn't the "correct" way of doing it; really i should iterate throughg the items and try to find the item which when put through buttonMap[item] returns the current button name. but i cant be arsed. - theButtons->setCurrentItem(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); - theButtons->ensureItemVisible(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->setCurrentItem(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->ensureItemVisible(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); } else KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, " - "or revert back to select a different mode." ).arg( theMode.remoteName() ), + "or revert back to select a different mode." ).tqarg( theMode.remoteName() ), i18n( "Incorrect Remote Control Detected" )); if(indexOf(currentPage()) == 1) @@ -149,7 +149,7 @@ const TQStringList AddAction::getFunctions(const TQString app, const TQString ob if( *i != "QCStringList interfaces()" && *i != "QCStringList functions()" && *i != "QCStringList objects()" && - *i != "QCStringList find(TQCString)" ) + *i != "QCStringList tqfind(TQCString)" ) ret += TQString::fromUtf8(*i); return ret; } @@ -180,7 +180,7 @@ void AddAction::updateOptions() else if(theUseDCOP->isChecked()) { if(!theObjects->selectedItem()) return; - TQListViewItem* i = theObjects->selectedItem()->parent(); + TQListViewItem* i = theObjects->selectedItem()->tqparent(); if(!i) return; isUnique = uniqueProgramMap[i]; TQRegExp r("(.*)-[0-9]+"); @@ -262,19 +262,19 @@ void AddAction::updateParameter() if(theParameters->currentItem()) { TQString type = theParameters->currentItem()->text(2); int index = theParameters->currentItem()->text(3).toInt() - 1; - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) { theValue->raiseWidget(2); theValueIntNumInput->setValue(theArguments[index].toInt()); } - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) { theValue->raiseWidget(3); theValueDoubleNumInput->setValue(theArguments[index].toDouble()); } - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) { theValue->raiseWidget(1); theValueCheckBox->setChecked(theArguments[index].toBool()); } - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) { theValue->raiseWidget(4); TQStringList backup = theArguments[index].toStringList(); // backup needed because calling clear will kill what ever has been saved. @@ -307,13 +307,13 @@ void AddAction::slotParameterChanged() if(!theParameters->currentItem()) return; int index = theParameters->currentItem()->text(3).toInt() - 1; TQString type = theParameters->currentItem()->text(2); - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) theArguments[index].asInt() = theValueIntNumInput->value(); - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) theArguments[index].asDouble() = theValueDoubleNumInput->value(); - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) theArguments[index].asBool() = theValueCheckBox->isChecked(); - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) theArguments[index].asStringList() = theValueEditListBox->items(); else theArguments[index].asString() = theValueLineEdit->text(); @@ -339,11 +339,11 @@ void AddAction::updateObjects() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!TQString(*i).find("anonymous")) continue; - if(!TQString(*i).find(i18n( "anonymous" ))) continue; + if(!TQString(*i).tqfind("anonymous")) continue; + if(!TQString(*i).tqfind(i18n( "anonymous" ))) continue; TQRegExp r("(.*)-[0-9]+"); TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; + if(names.tqcontains(name)) continue; names += name; KListViewItem *a = new KListViewItem(theObjects, name); @@ -361,8 +361,8 @@ void AddAction::updateObjects() void AddAction::updateFunctions() { theFunctions->clear(); - if(theObjects->currentItem() && theObjects->currentItem()->parent()) - { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], theObjects->currentItem()->text(0)); + if(theObjects->currentItem() && theObjects->currentItem()->tqparent()) + { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->tqparent()], theObjects->currentItem()->text(0)); for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) { Prototype p((TQString)(*i)); new KListViewItem(theFunctions, p.name(), p.argumentList(), *i); diff --git a/kdelirc/kcmlirc/addaction.h b/kdelirc/kcmlirc/addaction.h index 821c6b5..b95fd17 100644 --- a/kdelirc/kcmlirc/addaction.h +++ b/kdelirc/kcmlirc/addaction.h @@ -27,6 +27,7 @@ class TQListViewItem; class AddAction : public AddActionBase { Q_OBJECT + TQ_OBJECT int curPage; Mode theMode; @@ -66,7 +67,7 @@ public: TQMap<TQListViewItem *, bool> uniqueProgramMap; TQMap<TQListViewItem *, TQString> nameProgramMap; - AddAction(TQWidget *parent, const char *name, const Mode &mode); + AddAction(TQWidget *tqparent, const char *name, const Mode &mode); ~AddAction(); }; diff --git a/kdelirc/kcmlirc/addactionbase.ui b/kdelirc/kcmlirc/addactionbase.ui index 092463a..e60a89f 100644 --- a/kdelirc/kcmlirc/addactionbase.ui +++ b/kdelirc/kcmlirc/addactionbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>AddActionBase</class> <author>Gav Wood</author> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>AddActionBase</cstring> </property> @@ -16,7 +16,7 @@ <property name="caption"> <string>Add Action</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -52,7 +52,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theUseProfile</cstring> </property> @@ -63,9 +63,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> @@ -81,7 +81,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>31</height> @@ -125,7 +125,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>31</height> @@ -144,14 +144,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>311</width> <height>20</height> </size> </property> </spacer> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theUseDCOP</cstring> </property> @@ -169,14 +169,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>321</width> <height>21</height> </size> </property> </spacer> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theChangeMode</cstring> </property> @@ -194,7 +194,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -205,7 +205,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -216,20 +216,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theButtonText</cstring> </property> <property name="text"> <string>You are attempting to configure an action for a button on [remote] (in mode [mode]). Press a button on this remote control or select from the list.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -245,7 +245,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>41</height> @@ -289,7 +289,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>31</height> @@ -300,7 +300,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -311,7 +311,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter8</cstring> </property> @@ -412,9 +412,9 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> @@ -474,7 +474,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -485,7 +485,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup4</cstring> </property> @@ -499,7 +499,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theNotJustStart</cstring> </property> @@ -510,9 +510,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout37</cstring> + <cstring>tqlayout37</cstring> </property> <hbox> <property name="name"> @@ -528,7 +528,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -586,7 +586,7 @@ </widget> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theJustStart</cstring> </property> @@ -604,7 +604,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>81</height> @@ -615,7 +615,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -675,17 +675,17 @@ <cstring>theParameters</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout34</cstring> + <cstring>tqlayout34</cstring> </property> <vbox> <property name="name"> @@ -701,14 +701,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>111</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theCurParameter</cstring> </property> @@ -739,14 +739,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>146</width> <height>21</height> </size> </property> </spacer> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>theValue</cstring> </property> @@ -761,7 +761,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -785,7 +785,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>61</height> @@ -802,7 +802,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -826,14 +826,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>61</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theValueCheckBox</cstring> </property> @@ -846,7 +846,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -870,7 +870,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>61</height> @@ -884,7 +884,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -908,7 +908,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>51</height> @@ -922,7 +922,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -957,7 +957,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>147</width> <height>21</height> @@ -968,7 +968,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -979,7 +979,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -1006,7 +1006,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theRepeat</cstring> </property> @@ -1014,7 +1014,7 @@ <string>This action is &repeatable if the button is held down</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theAutoStart</cstring> </property> @@ -1035,14 +1035,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>670</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theIMTop</cstring> </property> @@ -1075,7 +1075,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theIMLabel</cstring> </property> @@ -1085,11 +1085,11 @@ <property name="text"> <string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>theIMGroup</cstring> </property> @@ -1112,7 +1112,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theDontSend</cstring> </property> @@ -1126,7 +1126,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToTop</cstring> </property> @@ -1137,7 +1137,7 @@ <string>Send the action to the instance hi&ghest in the window stacking order</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToBottom</cstring> </property> @@ -1148,7 +1148,7 @@ <string>Send the action to the instance &lowest in window stacking order</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToAll</cstring> </property> @@ -1171,7 +1171,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>170</height> @@ -1180,7 +1180,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -1191,7 +1191,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -1208,7 +1208,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSwitchMode</cstring> </property> @@ -1216,9 +1216,9 @@ <string>&Switch to mode:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> @@ -1234,7 +1234,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>131</width> <height>31</height> @@ -1278,7 +1278,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>131</width> <height>31</height> @@ -1287,7 +1287,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theExitMode</cstring> </property> @@ -1308,14 +1308,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>551</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -1337,7 +1337,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theDoBefore</cstring> </property> @@ -1348,7 +1348,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theDoAfter</cstring> </property> @@ -1366,7 +1366,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>30</height> @@ -1574,7 +1574,7 @@ <slot>accept()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>updateFunctions()</slot> <slot>updateParameter()</slot> <slot>updateParameters()</slot> @@ -1587,8 +1587,8 @@ <slot>updateForPageChange()</slot> <slot>slotParameterChanged()</slot> <slot>updateOptions()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klistview.h</includehint> diff --git a/kdelirc/kcmlirc/editaction.cpp b/kdelirc/kcmlirc/editaction.cpp index 594e4a2..a48ece9 100644 --- a/kdelirc/kcmlirc/editaction.cpp +++ b/kdelirc/kcmlirc/editaction.cpp @@ -35,7 +35,7 @@ #include "editaction.h" #include "addaction.h" -EditAction::EditAction(IRAIt action, TQWidget *parent, const char *name) : EditActionBase(parent, name) +EditAction::EditAction(IRAIt action, TQWidget *tqparent, const char *name) : EditActionBase(tqparent, name) { theAction = action; @@ -175,7 +175,7 @@ void EditAction::updateArguments() } theArguments->setEnabled(p.count()); for(unsigned i = 0; i < p.count(); i++) - { theArguments->insertItem(TQString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")")); + { theArguments->insertItem(TQString(TQString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")"))); arguments[i].cast(TQVariant::nameToType(p.type(i).utf8())); } if(p.count()) updateArgument(0); else updateArgument(-1); @@ -319,10 +319,10 @@ void EditAction::updateDCOPApplications() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!TQString(*i).find("anonymous")) continue; + if(!TQString(*i).tqfind("anonymous")) continue; TQRegExp r("(.*)-[0-9]+"); TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; + if(names.tqcontains(name)) continue; names += name; theDCOPApplications->insertItem(name); diff --git a/kdelirc/kcmlirc/editaction.h b/kdelirc/kcmlirc/editaction.h index 7efa7ca..b3d3939 100644 --- a/kdelirc/kcmlirc/editaction.h +++ b/kdelirc/kcmlirc/editaction.h @@ -26,6 +26,7 @@ class EditAction : public EditActionBase { Q_OBJECT + TQ_OBJECT IRAIt theAction; TQMap<TQString, TQString> applicationMap, functionMap; TQMap<TQString, TQString> nameProgramMap; @@ -48,7 +49,7 @@ public: virtual void updateDCOPObjects(); virtual void updateDCOPFunctions(); - EditAction(IRAIt action, TQWidget *parent = 0, const char *name = 0); + EditAction(IRAIt action, TQWidget *tqparent = 0, const char *name = 0); ~EditAction(); }; diff --git a/kdelirc/kcmlirc/editactionbase.ui b/kdelirc/kcmlirc/editactionbase.ui index 02e238c..df4576f 100644 --- a/kdelirc/kcmlirc/editactionbase.ui +++ b/kdelirc/kcmlirc/editactionbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>EditActionBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>EditActionBase</cstring> </property> @@ -22,11 +22,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget3</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -37,7 +37,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -54,15 +54,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout40</cstring> + <cstring>tqlayout40</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="2" column="3"> + <widget class="TQComboBox" row="2" column="3"> <property name="name"> <cstring>theDCOPApplications</cstring> </property> @@ -78,7 +78,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="3" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4_3</cstring> </property> @@ -92,7 +92,7 @@ <cstring>theDCOPObjects</cstring> </property> </widget> - <widget class="QButtonGroup" row="1" column="1" rowspan="1" colspan="3"> + <widget class="TQButtonGroup" row="1" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>buttonGroup5</cstring> </property> @@ -109,7 +109,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>theNotJustStart</cstring> </property> @@ -128,7 +128,7 @@ <bool>true</bool> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>theFunctions</cstring> </property> @@ -141,7 +141,7 @@ </sizepolicy> </property> </widget> - <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>theJustStart</cstring> </property> @@ -151,7 +151,7 @@ </widget> </grid> </widget> - <widget class="QLabel" row="4" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -165,7 +165,7 @@ <cstring>theDCOPFunctions</cstring> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -176,7 +176,7 @@ <cstring>theApplications</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="2" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="0" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>theApplications</cstring> </property> @@ -189,7 +189,7 @@ </sizepolicy> </property> </widget> - <widget class="QComboBox" row="4" column="3"> + <widget class="TQComboBox" row="4" column="3"> <property name="name"> <cstring>theDCOPFunctions</cstring> </property> @@ -197,7 +197,7 @@ <bool>false</bool> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>theUseProfile</cstring> </property> @@ -208,7 +208,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -222,7 +222,7 @@ <cstring>theDCOPApplications</cstring> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>theUseDCOP</cstring> </property> @@ -230,7 +230,7 @@ <string>Use &DCOP:</string> </property> </widget> - <widget class="QComboBox" row="3" column="3"> + <widget class="TQComboBox" row="3" column="3"> <property name="name"> <cstring>theDCOPObjects</cstring> </property> @@ -240,15 +240,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="2" rowspan="2" colspan="1"> + <widget class="TQWidgetStack" row="0" column="2" rowspan="2" colspan="1"> <property name="name"> <cstring>theValue</cstring> </property> @@ -263,7 +263,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -295,7 +295,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>91</height> @@ -304,7 +304,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -318,7 +318,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theValueCheckBox</cstring> </property> @@ -339,7 +339,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>101</height> @@ -348,7 +348,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -377,7 +377,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>101</height> @@ -386,7 +386,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -415,7 +415,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>101</height> @@ -424,7 +424,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -467,14 +467,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>111</height> </size> </property> </spacer> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>theArguments</cstring> </property> @@ -486,7 +486,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>106</width> <height>0</height> @@ -503,14 +503,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>101</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -533,22 +533,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>481</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theChangeMode</cstring> </property> @@ -556,7 +556,7 @@ <string>Change &mode to:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>theModes</cstring> </property> @@ -584,7 +584,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>30</height> @@ -595,7 +595,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -606,7 +606,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -628,7 +628,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theRepeat</cstring> </property> @@ -636,7 +636,7 @@ <string>&Action repeats if button is held down</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theAutoStart</cstring> </property> @@ -654,14 +654,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>491</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -683,7 +683,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theDoBefore</cstring> </property> @@ -697,7 +697,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theDoAfter</cstring> </property> @@ -718,14 +718,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>670</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theIMTop</cstring> </property> @@ -758,7 +758,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theIMLabel</cstring> </property> @@ -768,11 +768,11 @@ <property name="text"> <string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>theIMGroup</cstring> </property> @@ -795,7 +795,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theDontSend</cstring> </property> @@ -809,7 +809,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToTop</cstring> </property> @@ -820,7 +820,7 @@ <string>Send the action to the instance hi&ghest in window stacking order</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToBottom</cstring> </property> @@ -831,7 +831,7 @@ <string>Send the action to the instance &lowest in window stacking order</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>theSendToAll</cstring> </property> @@ -854,7 +854,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>150</height> @@ -864,7 +864,7 @@ </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -878,7 +878,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -902,14 +902,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -923,7 +923,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -1263,7 +1263,7 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>updateFunctions()</slot> <slot>updateApplications()</slot> <slot>updateDCOPApplications()</slot> @@ -1273,8 +1273,8 @@ <slot>updateArgument(int)</slot> <slot>slotParameterChanged()</slot> <slot>updateOptions()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kdelirc/kcmlirc/editmode.cpp b/kdelirc/kcmlirc/editmode.cpp index aad27da..6092e96 100644 --- a/kdelirc/kcmlirc/editmode.cpp +++ b/kdelirc/kcmlirc/editmode.cpp @@ -16,7 +16,7 @@ #include "editmode.h" -EditMode::EditMode(TQWidget *parent, const char *name, bool modal, WFlags fl) : EditModeBase(parent, name, modal, fl) +EditMode::EditMode(TQWidget *tqparent, const char *name, bool modal, WFlags fl) : EditModeBase(tqparent, name, modal, fl) { theIcon->setIconType(KIcon::Panel, KIcon::Any); } diff --git a/kdelirc/kcmlirc/editmode.h b/kdelirc/kcmlirc/editmode.h index df3c888..8ea0c45 100644 --- a/kdelirc/kcmlirc/editmode.h +++ b/kdelirc/kcmlirc/editmode.h @@ -21,12 +21,13 @@ class EditMode : public EditModeBase { Q_OBJECT + TQ_OBJECT public: void slotCheckText(const TQString &newText); void slotClearIcon(); - EditMode(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); + EditMode(TQWidget *tqparent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); ~EditMode(); }; diff --git a/kdelirc/kcmlirc/editmodebase.ui b/kdelirc/kcmlirc/editmodebase.ui index dd26940..a0f4b27 100644 --- a/kdelirc/kcmlirc/editmodebase.ui +++ b/kdelirc/kcmlirc/editmodebase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>EditModeBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>EditModeBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -41,15 +41,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -60,9 +60,9 @@ <cstring>theIcon</cstring> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <hbox> <property name="name"> @@ -78,7 +78,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>21</height> @@ -114,7 +114,7 @@ </widget> </hbox> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>theName</cstring> </property> @@ -122,7 +122,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -145,14 +145,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>410</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -174,7 +174,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>theDefault</cstring> </property> @@ -192,7 +192,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -213,9 +213,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> @@ -231,7 +231,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>231</width> <height>20</height> @@ -289,11 +289,11 @@ <slot>slotClearIcon()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>slotCheckText(const QString &)</slot> <slot>slotClearIcon()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kicondialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kdelirc/kcmlirc/kcmlirc.cpp b/kdelirc/kcmlirc/kcmlirc.cpp index b248127..2fc7313 100644 --- a/kdelirc/kcmlirc/kcmlirc.cpp +++ b/kdelirc/kcmlirc/kcmlirc.cpp @@ -49,7 +49,7 @@ typedef KGenericFactory<KCMLirc, TQWidget> theFactory; K_EXPORT_COMPONENT_FACTORY(kcmlirc, theFactory("kcmlirc")) -KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(parent, name) +KCMLirc::KCMLirc(TQWidget *tqparent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue( "kcmlirc" ); setAboutData(new KAboutData("kcmlirc", I18N_NOOP("KDE Lirc"), VERSION, I18N_NOOP("The KDE IR Remote Control System"), KAboutData::License_GPL_V2, "Copyright (c)2003 Gav Wood", I18N_NOOP("Use this to configure KDE's infrared remote control system in order to control any KDE application with your infrared remote control."), "http://www.kde.org")); @@ -74,8 +74,8 @@ KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DC (new TQHBoxLayout(this))->setAutoAdd(true); theKCMLircBase = new KCMLircBase(this); connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateActions() )); - connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateModesStatus(TQListViewItem *) )); - connect(theKCMLircBase->theActions, TQT_SIGNAL( currentChanged(TQListViewItem *) ), this, TQT_SLOT( updateActionsStatus(TQListViewItem *) )); + connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateModestqStatus(TQListViewItem *) )); + connect(theKCMLircBase->theActions, TQT_SIGNAL( currentChanged(TQListViewItem *) ), this, TQT_SLOT( updateActionstqStatus(TQListViewItem *) )); connect(theKCMLircBase->theExtensions, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateInformation() )); connect(theKCMLircBase->theModes, TQT_SIGNAL( itemRenamed(TQListViewItem *) ), this, TQT_SLOT( slotRenamed(TQListViewItem *) )); connect(theKCMLircBase->theModes, TQT_SIGNAL(dropped(KListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*)), this, TQT_SLOT(slotDrop(KListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*))); @@ -94,17 +94,17 @@ KCMLirc::~KCMLirc() { } -void KCMLirc::updateModesStatus(TQListViewItem *item) +void KCMLirc::updateModestqStatus(TQListViewItem *item) { - theKCMLircBase->theModes->setItemsRenameable(item && item->parent()); + theKCMLircBase->theModes->setItemsRenameable(item && item->tqparent()); theKCMLircBase->theAddActions->setEnabled(ProfileServer::profileServer()->profiles().count() && theKCMLircBase->theModes->selectedItem() && RemoteServer::remoteServer()->remotes()[modeMap[theKCMLircBase->theModes->selectedItem()].remote()]); theKCMLircBase->theAddAction->setEnabled(item); theKCMLircBase->theAddMode->setEnabled(item); - theKCMLircBase->theRemoveMode->setEnabled(item && item->parent()); + theKCMLircBase->theRemoveMode->setEnabled(item && item->tqparent()); theKCMLircBase->theEditMode->setEnabled(item); } -void KCMLirc::updateActionsStatus(TQListViewItem *item) +void KCMLirc::updateActionstqStatus(TQListViewItem *item) { theKCMLircBase->theRemoveAction->setEnabled(item); theKCMLircBase->theEditAction->setEnabled(item); @@ -114,7 +114,7 @@ void KCMLirc::slotRenamed(TQListViewItem *item) { if(!item) return; - if(item->parent() && item->text(0) != modeMap[item].name()) + if(item->tqparent() && item->text(0) != modeMap[item].name()) { allActions.renameMode(modeMap[item], item->text(0)); allModes.rename(modeMap[item], item->text(0)); emit changed(true); @@ -128,7 +128,7 @@ void KCMLirc::slotEditAction() EditAction theDialog(actionMap[theKCMLircBase->theActions->currentItem()], this); TQListViewItem *item = theKCMLircBase->theModes->currentItem(); - if(item->parent()) item = item->parent(); + if(item->tqparent()) item = item->tqparent(); theDialog.theModes->insertItem(i18n("[Exit current mode]")); for(item = item->firstChild(); item; item = item->nextSibling()) theDialog.theModes->insertItem(item->text(0)); @@ -166,7 +166,7 @@ void KCMLirc::slotAddAction() // populate the modes list box TQListViewItem *item = theKCMLircBase->theModes->selectedItem(); - if(item->parent()) item = item->parent(); + if(item->tqparent()) item = item->tqparent(); theDialog.theModes->setEnabled(item->firstChild()); theDialog.theSwitchMode->setEnabled(item->firstChild()); for(item = item->firstChild(); item; item = item->nextSibling()) @@ -202,7 +202,7 @@ void KCMLirc::slotAddAction() a.setRepeat(false); } // DCOP? - else if(theDialog.theUseDCOP->isChecked() && theDialog.theObjects->selectedItem() && theDialog.theObjects->selectedItem()->parent() && theDialog.theFunctions->selectedItem()) + else if(theDialog.theUseDCOP->isChecked() && theDialog.theObjects->selectedItem() && theDialog.theObjects->selectedItem()->tqparent() && theDialog.theFunctions->selectedItem()) { a.setProgram(theDialog.program); a.setObject(theDialog.theObjects->selectedItem()->text(0)); @@ -267,7 +267,8 @@ void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const T Arguments l; // argument count should be either 0 or 1. undefined if > 1. if(Prototype(pa->prototype()).argumentCount() == 1) - { l.append(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier())); + { + l.append(TQString(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier()))); l.back().cast(TQVariant::nameToType(Prototype(pa->prototype()).type(0).utf8())); } a.setArguments(l); @@ -283,7 +284,7 @@ void KCMLirc::slotAddMode() NewMode theDialog(this, 0); TQMap<TQListViewItem *, TQString> remoteMap; TQListViewItem *tr = theKCMLircBase->theModes->selectedItem(); - if(tr) if(tr->parent()) tr = tr->parent(); + if(tr) if(tr->tqparent()) tr = tr->tqparent(); for(TQListViewItem *i = theKCMLircBase->theModes->firstChild(); i; i = i->nextSibling()) { KListViewItem *a = new KListViewItem(theDialog.theRemotes, i->text(0)); remoteMap[a] = modeMap[i].remote(); @@ -304,7 +305,7 @@ void KCMLirc::slotEditMode() EditMode theDialog(this, 0); Mode &mode = modeMap[theKCMLircBase->theModes->selectedItem()]; - theDialog.theName->setEnabled(theKCMLircBase->theModes->selectedItem()->parent()); + theDialog.theName->setEnabled(theKCMLircBase->theModes->selectedItem()->tqparent()); theDialog.theName->setText(mode.name().isEmpty() ? mode.remoteName() : mode.name()); if(!mode.iconFile().isNull()) theDialog.theIcon->setIcon(mode.iconFile()); @@ -315,7 +316,7 @@ void KCMLirc::slotEditMode() if(theDialog.exec() == TQDialog::Accepted) { kdDebug() << "Setting icon : " << theDialog.theIcon->icon() << endl; - mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString::null : theDialog.theIcon->icon()); + mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString() : theDialog.theIcon->icon()); allModes.updateMode(mode); if(!mode.name().isEmpty()) { allActions.renameMode(mode, theDialog.theName->text()); @@ -330,9 +331,9 @@ void KCMLirc::slotEditMode() void KCMLirc::slotRemoveMode() { if(!theKCMLircBase->theModes->selectedItem()) return; - if(!theKCMLircBase->theModes->selectedItem()->parent()) return; + if(!theKCMLircBase->theModes->selectedItem()->tqparent()) return; - if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").arg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) + if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").tqarg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) { allModes.erase(modeMap[theKCMLircBase->theModes->selectedItem()]); updateModes(); @@ -373,10 +374,10 @@ void KCMLirc::updateActions() theKCMLircBase->theActions->clear(); actionMap.clear(); - if(!theKCMLircBase->theModes->selectedItem()) { updateActionsStatus(0); return; } + if(!theKCMLircBase->theModes->selectedItem()) { updateActionstqStatus(0); return; } Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; - theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions <i>always</i> available") : i18n("Actions available only in mode <b>%1</b>").arg(m.name()))); + theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions <i>always</i> available") : i18n("Actions available only in mode <b>%1</b>").tqarg(m.name()))); IRAItList l = allActions.findByMode(m); for(IRAItList::iterator i = l.begin(); i != l.end(); ++i) { TQListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); @@ -386,7 +387,7 @@ void KCMLirc::updateActions() if(theKCMLircBase->theActions->currentItem()) theKCMLircBase->theActions->currentItem()->setSelected(true); - updateActionsStatus(theKCMLircBase->theActions->currentItem()); + updateActionstqStatus(theKCMLircBase->theActions->currentItem()); } void KCMLirc::gotButton(TQString remote, TQString button) @@ -428,7 +429,7 @@ void KCMLirc::updateModes() } if(theKCMLircBase->theModes->currentItem()) theKCMLircBase->theModes->currentItem()->setSelected(true); - updateModesStatus(theKCMLircBase->theModes->currentItem()); + updateModestqStatus(theKCMLircBase->theModes->currentItem()); updateActions(); } @@ -464,15 +465,15 @@ void KCMLirc::updateInformation() if(!theKCMLircBase->theExtensions->selectedItem()) return; - if(!theKCMLircBase->theExtensions->selectedItem()->parent()) + if(!theKCMLircBase->theExtensions->selectedItem()->tqparent()) { - theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(theKCMLircBase->theExtensions->selectedItem()->text(0))); + theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(theKCMLircBase->theExtensions->selectedItem()->text(0))); if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications")) new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); else if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Remote Controls")) new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Remote Controls"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Applications")) + else if(theKCMLircBase->theExtensions->selectedItem()->tqparent()->text(0) == i18n("Applications")) { ProfileServer *theServer = ProfileServer::profileServer(); const Profile *p = theServer->profiles()[profileMap[theKCMLircBase->theExtensions->selectedItem()]]; @@ -480,9 +481,9 @@ void KCMLirc::updateInformation() new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), TQString().setNum(p->actions().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(p->name())); + theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(p->name())); } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls")) + else if(theKCMLircBase->theExtensions->selectedItem()->tqparent()->text(0) == i18n("Remote Controls")) { RemoteServer *theServer = RemoteServer::remoteServer(); const Remote *p = theServer->remotes()[remoteMap[theKCMLircBase->theExtensions->selectedItem()]]; @@ -490,7 +491,7 @@ void KCMLirc::updateInformation() new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), TQString().setNum(p->buttons().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(p->name())); + theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(p->name())); } } @@ -533,9 +534,9 @@ void KCMLirc::configChanged() // TODO: Take this out when I know how extern "C" { - KDE_EXPORT KCModule *create_kcmlirc(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_kcmlirc(TQWidget *tqparent, const char *) { KGlobal::locale()->insertCatalogue("kcmlirc"); - return new KCMLirc(parent, "KCMLirc"); + return new KCMLirc(tqparent, "KCMLirc"); } } diff --git a/kdelirc/kcmlirc/kcmlirc.h b/kdelirc/kcmlirc/kcmlirc.h index 468302b..4af2347 100644 --- a/kdelirc/kcmlirc/kcmlirc.h +++ b/kdelirc/kcmlirc/kcmlirc.h @@ -31,6 +31,7 @@ class Remote; class KCMLirc: public KCModule, virtual public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP private: @@ -45,8 +46,8 @@ private: public slots: void updateActions(); - void updateModesStatus(TQListViewItem *); - void updateActionsStatus(TQListViewItem *); + void updateModestqStatus(TQListViewItem *); + void updateActionstqStatus(TQListViewItem *); void updateModes(); void updateExtensions(); void updateInformation(); @@ -61,10 +62,11 @@ public slots: void slotRenamed(TQListViewItem *item); void slotEditMode(); - -// MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN +// QMOC_SKIP_BEGIN k_dcop: -// MOC_SKIP_END +// QMOC_SKIP_END +#endif // now just used as a proxy to AddAction class virtual void gotButton(TQString remote, TQString button); signals: @@ -76,7 +78,7 @@ public: virtual void defaults(); virtual void configChanged(); - KCMLirc(TQWidget *parent = 0, const char *name = 0, TQStringList args = TQStringList()); + KCMLirc(TQWidget *tqparent = 0, const char *name = 0, TQStringList args = TQStringList()); ~KCMLirc(); }; diff --git a/kdelirc/kcmlirc/kcmlircbase.ui b/kdelirc/kcmlirc/kcmlircbase.ui index c4b0b81..eca2753 100644 --- a/kdelirc/kcmlirc/kcmlircbase.ui +++ b/kdelirc/kcmlirc/kcmlircbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KCMLircBase</class> <author>Gav Wood</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCMLircBase</cstring> </property> @@ -23,14 +23,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> <property name="margin"> <number>0</number> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -41,7 +41,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theMainLabel</cstring> </property> @@ -74,18 +74,18 @@ <property name="text"> <string>There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter4</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>modeLayout</cstring> </property> @@ -96,7 +96,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theRemotesLabel</cstring> </property> @@ -140,7 +140,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>modeButtonLayout</cstring> </property> @@ -158,7 +158,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>17</width> <height>20</height> @@ -202,9 +202,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -213,7 +213,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theModeLabel</cstring> </property> @@ -298,9 +298,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -316,16 +316,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>240</width> <height>21</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -356,7 +356,7 @@ <string>A&dd...</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>theEditAction</cstring> </property> @@ -387,7 +387,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -398,7 +398,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter" row="0" column="0"> + <widget class="TQSplitter" row="0" column="0"> <property name="name"> <cstring>splitter5</cstring> </property> @@ -427,9 +427,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -438,7 +438,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>theInformationLabel</cstring> </property> @@ -490,7 +490,7 @@ <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kdelirc/kcmlirc/kcmlircbase.ui.h b/kdelirc/kcmlirc/kcmlircbase.ui.h index 124ab3f..42faaab 100644 --- a/kdelirc/kcmlirc/kcmlircbase.ui.h +++ b/kdelirc/kcmlirc/kcmlircbase.ui.h @@ -12,7 +12,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -23,7 +23,7 @@ void KCMLircBase::init() { delete theModes; modeLayout->removeItem(modeButtonLayout); - theModes = new ModesList(dynamic_cast<TQWidget *>(modeLayout->parent()), "theModes"); + theModes = new ModesList(TQT_TQWIDGET(modeLayout->parent()), "theModes"); theModes->addColumn(i18n("Remote Control")); theModes->addColumn(i18n("Default")); theModes->addColumn(i18n("Icon")); @@ -32,6 +32,6 @@ void KCMLircBase::init() theModes->setItemsRenameable(true); modeLayout->addWidget(theModes); modeLayout->addLayout(modeButtonLayout); - modeLayout->invalidate(); + modeLayout->tqinvalidate(); modeLayout->activate(); } diff --git a/kdelirc/kcmlirc/modeslist.cpp b/kdelirc/kcmlirc/modeslist.cpp index 83678d1..a182129 100644 --- a/kdelirc/kcmlirc/modeslist.cpp +++ b/kdelirc/kcmlirc/modeslist.cpp @@ -16,7 +16,7 @@ #include "modeslist.h" -ModesList::ModesList(TQWidget *parent, const char *name) : KListView(parent, name) +ModesList::ModesList(TQWidget *tqparent, const char *name) : KListView(tqparent, name) { setAcceptDrops(true); setDropVisualizer(false); diff --git a/kdelirc/kcmlirc/modeslist.h b/kdelirc/kcmlirc/modeslist.h index 22e6cc0..5cc77a8 100644 --- a/kdelirc/kcmlirc/modeslist.h +++ b/kdelirc/kcmlirc/modeslist.h @@ -25,9 +25,10 @@ class ModesList : public KListView { Q_OBJECT + TQ_OBJECT public: virtual bool acceptDrag(TQDropEvent *) const; - ModesList(TQWidget *parent = 0, const char *name = 0); + ModesList(TQWidget *tqparent = 0, const char *name = 0); }; #endif diff --git a/kdelirc/kcmlirc/newmode.ui b/kdelirc/kcmlirc/newmode.ui index e3da8ef..90e91e8 100644 --- a/kdelirc/kcmlirc/newmode.ui +++ b/kdelirc/kcmlirc/newmode.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>NewMode</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>NewMode</cstring> </property> @@ -38,15 +38,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -54,7 +54,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>theName</cstring> </property> @@ -75,9 +75,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -93,7 +93,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -138,18 +138,18 @@ </connection> <connection> <sender>theName</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>NewMode</receiver> - <slot>slotTextChanged(const QString&)</slot> + <slot>slotTextChanged(const TQString&)</slot> </connection> </connections> <includes> <include location="local" impldecl="in implementation">newmode.ui.h</include> </includes> -<slots> - <slot>slotTextChanged( const QString & newText )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +<Q_SLOTS> + <slot>slotTextChanged( const TQString & newText )</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kdelirc/kcmlirc/newmode.ui.h b/kdelirc/kcmlirc/newmode.ui.h index 2bb2f54..29c4166 100644 --- a/kdelirc/kcmlirc/newmode.ui.h +++ b/kdelirc/kcmlirc/newmode.ui.h @@ -12,7 +12,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kdelirc/kcmlirc/selectprofile.ui b/kdelirc/kcmlirc/selectprofile.ui index 2d4ac18..ad6867a 100644 --- a/kdelirc/kcmlirc/selectprofile.ui +++ b/kdelirc/kcmlirc/selectprofile.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SelectProfile</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SelectProfile</cstring> </property> @@ -52,9 +52,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout47</cstring> + <cstring>tqlayout47</cstring> </property> <hbox> <property name="name"> @@ -70,7 +70,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -119,7 +119,7 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kdelirc/kdelirc/iraction.cpp b/kdelirc/kdelirc/iraction.cpp index ad558b5..f774bc4 100644 --- a/kdelirc/kdelirc/iraction.cpp +++ b/kdelirc/kdelirc/iraction.cpp @@ -97,7 +97,7 @@ const TQString IRAction::function() const if(theObject.isEmpty()) return i18n("Exit mode"); else - return i18n("Switch to %1").arg(theObject); + return i18n("Switch to %1").tqarg(theObject); else if(theObject.isEmpty()) return i18n("Just start"); diff --git a/kdelirc/kdelirc/iraction.h b/kdelirc/kdelirc/iraction.h index 8fdd44e..7d70d6c 100644 --- a/kdelirc/kdelirc/iraction.h +++ b/kdelirc/kdelirc/iraction.h @@ -82,7 +82,7 @@ public: void setUnique(const bool a) { theUnique = a; } IRAction(const TQString &newProgram, const TQString &newObject, const TQString &newMethod, const Arguments &newArguments, const TQString &newRemote, const TQString &newMode, const TQString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti); - IRAction() { theProgram = TQString::null; } + IRAction() { theProgram = TQString(); } }; #endif diff --git a/kdelirc/kdelirc/mode.cpp b/kdelirc/kdelirc/mode.cpp index 71deea8..cd0dc4c 100644 --- a/kdelirc/kdelirc/mode.cpp +++ b/kdelirc/kdelirc/mode.cpp @@ -16,7 +16,7 @@ #include "modes.h" #include "mode.h" -Mode::Mode() : theName(TQString::null) +Mode::Mode() : theName(TQString()) { } @@ -37,7 +37,7 @@ const Mode &Mode::loadFromConfig(KConfig &theConfig, int index) theName = theConfig.readEntry(Prefix + "Name"); theRemote = theConfig.readEntry(Prefix + "Remote"); theIconFile = theConfig.readEntry(Prefix + "IconFile"); - if(theIconFile.isEmpty()) theIconFile = TQString::null; + if(theIconFile.isEmpty()) theIconFile = TQString(); return *this; } diff --git a/kdelirc/kdelirc/mode.h b/kdelirc/kdelirc/mode.h index 9a73fbc..a2fa477 100644 --- a/kdelirc/kdelirc/mode.h +++ b/kdelirc/kdelirc/mode.h @@ -43,7 +43,7 @@ public: bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; } Mode(); - Mode(const TQString &remote, const TQString &name, const TQString &iconFile = TQString::null); + Mode(const TQString &remote, const TQString &name, const TQString &iconFile = TQString()); ~Mode(); }; diff --git a/kdelirc/kdelirc/modes.cpp b/kdelirc/kdelirc/modes.cpp index 5346837..5ecd418 100644 --- a/kdelirc/kdelirc/modes.cpp +++ b/kdelirc/kdelirc/modes.cpp @@ -41,8 +41,8 @@ void Modes::loadFromConfig(KConfig &theConfig) void Modes::generateNulls(const TQStringList &theRemotes) { for(TQStringList::const_iterator i = theRemotes.begin(); i != theRemotes.end(); ++i) - { if(!contains(*i) || !operator[](*i).contains("")) operator[](*i)[""] = Mode(*i, ""); - if(!theDefaults.contains(*i)) theDefaults[*i].isEmpty(); + { if(!tqcontains(*i) || !operator[](*i).tqcontains("")) operator[](*i)[""] = Mode(*i, ""); + if(!theDefaults.tqcontains(*i)) theDefaults[*i].isEmpty(); } } @@ -59,8 +59,8 @@ const Mode Modes::getDefault(const TQString &remote) const { // if(theDefaults[remote] == TQString()) // return Mode(remote, ""); - if(contains(remote)) - if(operator[](remote).contains(theDefaults[remote])) + if(tqcontains(remote)) + if(operator[](remote).tqcontains(theDefaults[remote])) return operator[](remote)[theDefaults[remote]]; else return Mode(remote, ""); else return Mode(remote, ""); diff --git a/kdelirc/kdelirc/profileserver.cpp b/kdelirc/kdelirc/profileserver.cpp index 7a72c4d..d95c5d5 100644 --- a/kdelirc/kdelirc/profileserver.cpp +++ b/kdelirc/kdelirc/profileserver.cpp @@ -66,7 +66,7 @@ void Profile::loadFromFile(const TQString &fileName) curPAA = 0; TQFile xmlFile(fileName); - TQXmlInputSource source(&xmlFile); + TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile)); TQXmlSimpleReader reader; reader.setContentHandler(this); reader.parse(source); @@ -84,7 +84,7 @@ const TQString &ProfileServer::getServiceName(const TQString &appId) const { if(theProfiles[appId]) return theProfiles[appId]->serviceName(); - return TQString::null; + return TQString(); } const ProfileAction *ProfileServer::getAction(const TQString &appId, const TQString &objId, const TQString &prototype) const @@ -124,7 +124,7 @@ bool Profile::startElement(const TQString &, const TQString &, const TQString &n curPAA->setType(attributes.value("type")); } else if(name == "range" && curPAA) - curPAA->setRange(qMakePair(attributes.value("min").toInt(), attributes.value("max").toInt())); + curPAA->setRange(tqMakePair(attributes.value("min").toInt(), attributes.value("max").toInt())); charBuffer = ""; return true; diff --git a/kdelirc/kdelirc/profileserver.h b/kdelirc/kdelirc/profileserver.h index 0228082..f049ad4 100644 --- a/kdelirc/kdelirc/profileserver.h +++ b/kdelirc/kdelirc/profileserver.h @@ -26,7 +26,7 @@ enum IfMulti {IM_DONTSEND, IM_SENDTOALL, IM_SENDTOTOP, IM_SENDTOBOTTOM}; -typedef QPair<int,int> Range; +typedef TQPair<int,int> Range; class ProfileAction; class Profile; @@ -35,8 +35,8 @@ class ProfileActionArgument { TQString theComment, theType; Range theRange; - TQString theDefault; // should be QVariant? - const ProfileAction *parent; + TQString theDefault; // should be TQVariant? + const ProfileAction *tqparent; friend class Profile; public: @@ -49,15 +49,15 @@ public: const Range &range() const { return theRange; } void setRange(const Range &a) { theRange = a; } - const ProfileAction *action() const { return parent; } - void setAction(const ProfileAction *a) { parent = a; } + const ProfileAction *action() const { return tqparent; } + void setAction(const ProfileAction *a) { tqparent = a; } }; class ProfileAction { TQString theObjId, thePrototype, theName, theComment, theClass; float theMultiplier; - const Profile *parent; + const Profile *tqparent; bool theRepeat, theAutoStart; TQValueList<ProfileActionArgument> theArguments; @@ -81,11 +81,11 @@ public: void setAutoStart(bool a) { theAutoStart = a; } const TQValueList<ProfileActionArgument> &arguments() const { return theArguments; } - const Profile *profile() const { return parent; } - void setProfile(const Profile *a) { parent = a; } + const Profile *profile() const { return tqparent; } + void setProfile(const Profile *a) { tqparent = a; } }; -class Profile : public QXmlDefaultHandler +class Profile : public TQXmlDefaultHandler { TQString theId, theName, theAuthor, theServiceName; IfMulti theIfMulti; @@ -112,7 +112,7 @@ public: void setUnique(const bool a) { theUnique = a; } const IfMulti ifMulti() const { return theIfMulti; } void setIfMulti(const IfMulti a) { theIfMulti = a; } - const TQString &serviceName() const { if(theServiceName != TQString::null) return theServiceName; return theName; } + const TQString &serviceName() const { if(theServiceName != TQString()) return theServiceName; return theName; } void setServiceName(const TQString &a) { theServiceName = a; } const TQDict<ProfileAction> &actions() const { return theActions; } const ProfileAction *searchClass(const TQString &c) const; diff --git a/kdelirc/kdelirc/prototype.h b/kdelirc/kdelirc/prototype.h index 0a963f7..fa101b7 100644 --- a/kdelirc/kdelirc/prototype.h +++ b/kdelirc/kdelirc/prototype.h @@ -30,7 +30,7 @@ class Prototype public: unsigned count() const{ return theTypes.count(); } - const QPair<TQString, TQString> operator[](int i) const { return qMakePair(theTypes[i], theNames[i]); } + const TQPair<TQString, TQString> operator[](int i) const { return tqMakePair(theTypes[i], theNames[i]); } const TQString &name(int i) const { return theNames[i]; } const TQString &type(int i) const { return theTypes[i]; } const TQString &returnType() const { return theReturn; } diff --git a/kdelirc/kdelirc/remoteserver.cpp b/kdelirc/kdelirc/remoteserver.cpp index db33591..04fb290 100644 --- a/kdelirc/kdelirc/remoteserver.cpp +++ b/kdelirc/kdelirc/remoteserver.cpp @@ -58,7 +58,7 @@ void Remote::loadFromFile(const TQString &fileName) curRB = 0; TQFile xmlFile(fileName); - TQXmlInputSource source(&xmlFile); + TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile)); TQXmlSimpleReader reader; reader.setContentHandler(this); reader.parse(source); diff --git a/kdelirc/kdelirc/remoteserver.h b/kdelirc/kdelirc/remoteserver.h index e74b02e..80891ba 100644 --- a/kdelirc/kdelirc/remoteserver.h +++ b/kdelirc/kdelirc/remoteserver.h @@ -38,7 +38,7 @@ public: const TQString &id(void) const { return theId; } }; -class Remote : public QXmlDefaultHandler +class Remote : public TQXmlDefaultHandler { TQString theName, theId, theAuthor; TQDict<RemoteButton> theButtons; diff --git a/kdelirc/profiles/klauncher.profile.xml b/kdelirc/profiles/klauncher.profile.xml index 436a04d..87f9035 100644 --- a/kdelirc/profiles/klauncher.profile.xml +++ b/kdelirc/profiles/klauncher.profile.xml @@ -6,13 +6,13 @@ <action objid="default" prototype="void kdeinit_exec(QString, QStringList)" repeat="0" autostart="0"> <name>Execute</name> <comment>Runs a program or script</comment> - <argument type="QString"><comment>The executable name and path of the program or script to run</comment></argument> - <argument type="QStringList"><comment>Parameters for the program or script</comment></argument> + <argument type=TQSTRING_OBJECT_NAME_STRING><comment>The executable name and path of the program or script to run</comment></argument> + <argument type=TQSTRINGLIST_OBJECT_NAME_STRING><comment>Parameters for the program or script</comment></argument> </action> <action objid="default" prototype="void kdeinit_exec_wait(QString, QStringList)" repeat="0" autostart="0"> <name>Execute and Wait</name> <comment>Runs a program or script and waits for it to finish</comment> - <argument type="QString"><comment>The executable name and path of the program or script to run</comment></argument> - <argument type="QStringList"><comment>Parameters for the program or script</comment></argument> + <argument type=TQSTRING_OBJECT_NAME_STRING><comment>The executable name and path of the program or script to run</comment></argument> + <argument type=TQSTRINGLIST_OBJECT_NAME_STRING><comment>Parameters for the program or script</comment></argument> </action> </profile> diff --git a/kdelirc/profiles/konqueror.profile.xml b/kdelirc/profiles/konqueror.profile.xml index 7dfd78c..0fdfdba 100644 --- a/kdelirc/profiles/konqueror.profile.xml +++ b/kdelirc/profiles/konqueror.profile.xml @@ -8,7 +8,7 @@ <action objid="KonquerorIface" prototype="void createNewWindow(QString)" repeat="0" autostart="0"> <name>Create New Window</name> <comment>Creates a new window and loads an arbitrary URL.</comment> - <argument type="QString"><comment>The URL to load in the window initially.</comment></argument> + <argument type=TQSTRING_OBJECT_NAME_STRING><comment>The URL to load in the window initially.</comment></argument> </action> <action objid="MainApplication-Interface" prototype="void quit()" repeat="0" autostart="0"> <name>Quit</name> diff --git a/kdessh/kdessh.cpp b/kdessh/kdessh.cpp index c449004..438aa33 100644 --- a/kdessh/kdessh.cpp +++ b/kdessh/kdessh.cpp @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) KCmdLineArgs::usage(i18n("No command or host specified.")); // Check if ssh is available - if (KStandardDirs::findExe(TQString::fromLatin1("ssh")).isEmpty()) + if (KStandardDirs::findExe(TQString::tqfromLatin1("ssh")).isEmpty()) { kdError(1511) << "ssh not found\n"; exit(1); @@ -151,8 +151,8 @@ int main(int argc, char *argv[]) // Read configuration KConfig *config = KGlobal::config(); - config->setGroup(TQString::fromLatin1("Passwords")); - int timeout = config->readNumEntry(TQString::fromLatin1("Timeout"), defTimeout); + config->setGroup(TQString::tqfromLatin1("Passwords")); + int timeout = config->readNumEntry(TQString::tqfromLatin1("Timeout"), defTimeout); SshProcess proc(host, user); proc.setStub(stub); diff --git a/kdessh/sshdlg.cpp b/kdessh/sshdlg.cpp index bffc694..f95d04b 100644 --- a/kdessh/sshdlg.cpp +++ b/kdessh/sshdlg.cpp @@ -21,12 +21,12 @@ KDEsshDialog::KDEsshDialog(TQCString host, TQCString user, TQCString stub, m_User = user; m_Stub = stub; - setCaption(TQString::fromLatin1("%1@%2").arg(m_User).arg(m_Host)); + setCaption(TQString::tqfromLatin1("%1@%2").tqarg(m_User.data()).tqarg(m_Host.data())); // Make the prompt a little more polite :-) - if (prompt.lower().left(6) == TQString::fromLatin1("enter ")) + if (prompt.lower().left(6) == TQString::tqfromLatin1("enter ")) prompt.remove(0, 6); - int pos = prompt.find(':'); + int pos = prompt.tqfind(':'); if (pos != -1) prompt.remove(pos, 10); prompt += '.'; diff --git a/kdessh/sshdlg.h b/kdessh/sshdlg.h index c552548..644662f 100644 --- a/kdessh/sshdlg.h +++ b/kdessh/sshdlg.h @@ -15,6 +15,7 @@ class KDEsshDialog : public KPasswordDialog { Q_OBJECT + TQ_OBJECT public: KDEsshDialog(TQCString host, TQCString user, TQCString stub, diff --git a/kdf/disklist.cpp b/kdf/disklist.cpp index 3326320..b6c07b7 100644 --- a/kdf/disklist.cpp +++ b/kdf/disklist.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -37,8 +37,8 @@ /*************************************************************************** * constructor **/ -DiskList::DiskList(TQObject *parent, const char *name) - : TQObject(parent,name) +DiskList::DiskList(TQObject *tqparent, const char *name) + : TQObject(tqparent,name) { kdDebug() << k_funcinfo << endl; @@ -183,27 +183,27 @@ TQFile f(FSTAB); while (! t.eof()) { s=t.readLine(); s=s.simplifyWhiteSpace(); - if ( (!s.isEmpty() ) && (s.find(DELIMITER)!=0) ) { + if ( (!s.isEmpty() ) && (s.tqfind(DELIMITER)!=0) ) { // not empty or commented out by '#' // kdDebug() << "GOT: [" << s << "]" << endl; disk = new DiskEntry();// Q_CHECK_PTR(disk); disk->setMounted(FALSE); - disk->setDeviceName(expandEscapes(s.left(s.find(BLANK)))); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setDeviceName(expandEscapes(s.left(s.tqfind(BLANK)))); + s=s.remove(0,s.tqfind(BLANK)+1 ); // kdDebug() << " deviceName: [" << disk->deviceName() << "]" << endl; #ifdef _OS_SOLARIS_ //device to fsck - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); #endif - disk->setMountPoint(expandEscapes(s.left(s.find(BLANK)))); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setMountPoint(expandEscapes(s.left(s.tqfind(BLANK)))); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl; //kdDebug() << " Icon: [" << disk->iconName() << "]" << endl; - disk->setFsType(s.left(s.find(BLANK)) ); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setFsType(s.left(s.tqfind(BLANK)) ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl; - disk->setMountOptions(s.left(s.find(BLANK)) ); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setMountOptions(s.left(s.tqfind(BLANK)) ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " Mount-Options: [" << disk->mountOptions() << "]" << endl; if ( (disk->deviceName() != "none") && (disk->fsType() != "swap") @@ -211,7 +211,7 @@ TQFile f(FSTAB); && (disk->mountPoint() != "/dev/swap") && (disk->mountPoint() != "/dev/pts") && (disk->mountPoint() != "/dev/shm") - && (disk->mountPoint().find("/proc") == -1 ) ) + && (disk->mountPoint().tqfind("/proc") == -1 ) ) replaceDeviceEntry(disk); else delete disk; @@ -243,7 +243,7 @@ void DiskList::receivedDFStdErrOut(KProcess *, char *data, int len ) */ - TQString tmp = TQString::fromLatin1(data, len); + TQString tmp = TQString::tqfromLatin1(data, len); dfStringErrOut.append(tmp); } @@ -295,7 +295,7 @@ void DiskList::dfDone() if ( !s.isEmpty() ) { disk = new DiskEntry(); Q_CHECK_PTR(disk); - if (s.find(BLANK)<0) // devicename was too long, rest in next line + if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line if ( !t.eof() ) { // just appends the next line v=t.readLine(); s=s.append(v.latin1() ); @@ -305,37 +305,37 @@ void DiskList::dfDone() //kdDebug() << "EFFECTIVELY GOT " << s.length() << " chars: [" << s << "]" << endl; - disk->setDeviceName(s.left(s.find(BLANK)) ); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setDeviceName(s.left(s.tqfind(BLANK)) ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " DeviceName: [" << disk->deviceName() << "]" << endl; if (NO_FS_TYPE) { //kdDebug() << "THERE IS NO FS_TYPE_FIELD!" << endl; disk->setFsType("?"); } else { - disk->setFsType(s.left(s.find(BLANK)) ); - s=s.remove(0,s.find(BLANK)+1 ); + disk->setFsType(s.left(s.tqfind(BLANK)) ); + s=s.remove(0,s.tqfind(BLANK)+1 ); }; //kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl; //kdDebug() << " Icon: [" << disk->iconName() << "]" << endl; - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); disk->setKBSize(u.toInt() ); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " Size: [" << disk->kBSize() << "]" << endl; - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); disk->setKBUsed(u.toInt() ); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " Used: [" << disk->kBUsed() << "]" << endl; - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); disk->setKBAvail(u.toInt() ); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug() << " Avail: [" << disk->kBAvail() << "]" << endl; - s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94% + s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94% disk->setMountPoint(s); //kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl; @@ -346,7 +346,7 @@ void DiskList::dfDone() && (disk->mountPoint() != "/dev/swap") && (disk->mountPoint() != "/dev/pts") && (disk->mountPoint() != "/dev/shm") - && (disk->mountPoint().find("/proc") == -1 ) ) { + && (disk->mountPoint().tqfind("/proc") == -1 ) ) { disk->setMounted(TRUE); // its now mounted (df lists only mounted) replaceDeviceEntry(disk); } else @@ -391,10 +391,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk) // // 1999-27-11 Espen Sand: - // I can't get find() to work. The Disks::compareItems(..) is + // I can't get tqfind() to work. The Disks::compareItems(..) is // never called. // - //int pos=disks->find(disk); + //int pos=disks->tqfind(disk); TQString deviceRealName = disk->deviceRealName(); TQString realMountPoint = disk->realMountPoint(); @@ -426,13 +426,13 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk) // eg. /cache/cache/.cfs_mnt_points/srv:_home_jesus // ^ ^ TQString odiskName = olddisk->deviceName(); - int ci=odiskName.find(':'); // goto host-column - while ((ci =odiskName.find('/',ci)) > 0) { - odiskName.replace(ci,1,"_"); + int ci=odiskName.tqfind(':'); // goto host-column + while ((ci =odiskName.tqfind('/',ci)) > 0) { + odiskName.tqreplace(ci,1,"_"); }//while // check if there is something that is exactly the tail // eg. [srv:/tmp3] is exact tail of [/cache/.cfs_mnt_points/srv:_tmp3] - if ( ( (p=disk->deviceName().findRev(odiskName + if ( ( (p=disk->deviceName().tqfindRev(odiskName ,disk->deviceName().length()) ) != -1) && (p + odiskName.length() @@ -455,10 +455,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk) } #endif - if (pos != -1) { // replace + if (pos != -1) { // tqreplace DiskEntry * olddisk = disks->at(pos); - if ( (-1!=olddisk->mountOptions().find("user")) && - (-1==disk->mountOptions().find("user")) ) { + if ( (-1!=olddisk->mountOptions().tqfind("user")) && + (-1==disk->mountOptions().tqfind("user")) ) { // add "user" option to new diskEntry TQString s=disk->mountOptions(); if (s.length()>0) s.append(","); diff --git a/kdf/disklist.h b/kdf/disklist.h index cd9613c..4f01d87 100644 --- a/kdf/disklist.h +++ b/kdf/disklist.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -93,14 +93,15 @@ private: }; /***************************************************************************/ -class DiskList : public QObject +class DiskList : public TQObject { Q_OBJECT + TQ_OBJECT public: - DiskList( TQObject *parent=0, const char *name=0 ); + DiskList( TQObject *tqparent=0, const char *name=0 ); ~DiskList(); int readFSTAB(); int readDF(); - int find(const DiskEntry* disk) {return disks->find(disk);} + int tqfind(const DiskEntry* disk) {return disks->tqfind(disk);} DiskEntry* at(uint index) {return disks->at(index);} DiskEntry* first() {return disks->first();} DiskEntry* next() {return disks->next();} diff --git a/kdf/disks.cpp b/kdf/disks.cpp index ca8f263..0ae7c2b 100644 --- a/kdf/disks.cpp +++ b/kdf/disks.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -65,14 +65,14 @@ void DiskEntry::init() } -DiskEntry::DiskEntry(TQObject *parent, const char *name) - : TQObject (parent, name) +DiskEntry::DiskEntry(TQObject *tqparent, const char *name) + : TQObject (tqparent, name) { init(); } -DiskEntry::DiskEntry(const TQString & deviceName, TQObject *parent, const char *name) - : TQObject (parent, name) +DiskEntry::DiskEntry(const TQString & deviceName, TQObject *tqparent, const char *name) + : TQObject (tqparent, name) { init(); @@ -104,13 +104,13 @@ int DiskEntry::mount() { // FreeBSD's mount(8) is picky: -o _must_ go before // the device and mountpoint. - cmdS=TQString::fromLatin1("mount -t%t -o%o %d %m"); + cmdS=TQString::tqfromLatin1("mount -t%t -o%o %d %m"); } - cmdS.replace(TQString::fromLatin1("%d"),deviceName()); - cmdS.replace(TQString::fromLatin1("%m"),mountPoint()); - cmdS.replace(TQString::fromLatin1("%t"),fsType()); - cmdS.replace(TQString::fromLatin1("%o"),mountOptions()); + cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName()); + cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint()); + cmdS.tqreplace(TQString::tqfromLatin1("%t"),fsType()); + cmdS.tqreplace(TQString::tqfromLatin1("%o"),mountOptions()); kdDebug() << "mount-cmd: [" << cmdS << "]" << endl; int e=sysCall(cmdS); @@ -126,8 +126,8 @@ int DiskEntry::umount() if (cmdS.isEmpty()) // generate default umount cmd cmdS="umount %d"; - cmdS.replace(TQString::fromLatin1("%d"),deviceName()); - cmdS.replace(TQString::fromLatin1("%m"),mountPoint()); + cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName()); + cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint()); kdDebug() << "umount-cmd: [" << cmdS << "]" << endl; int e=sysCall(cmdS); @@ -193,23 +193,23 @@ TQString DiskEntry::guessIconName() { TQString iconName; // try to be intelligent - if (-1!=mountPoint().find("cdrom",0,FALSE)) iconName+="cdrom"; - else if (-1!=deviceName().find("cdrom",0,FALSE)) iconName+="cdrom"; - else if (-1!=mountPoint().find("writer",0,FALSE)) iconName+="cdwriter"; - else if (-1!=deviceName().find("writer",0,FALSE)) iconName+="cdwriter"; - else if (-1!=mountPoint().find("mo",0,FALSE)) iconName+="mo"; - else if (-1!=deviceName().find("mo",0,FALSE)) iconName+="mo"; - else if (-1!=deviceName().find("fd",0,FALSE)) { - if (-1!=deviceName().find("360",0,FALSE)) iconName+="5floppy"; - if (-1!=deviceName().find("1200",0,FALSE)) iconName+="5floppy"; + if (-1!=mountPoint().tqfind("cdrom",0,FALSE)) iconName+="cdrom"; + else if (-1!=deviceName().tqfind("cdrom",0,FALSE)) iconName+="cdrom"; + else if (-1!=mountPoint().tqfind("writer",0,FALSE)) iconName+="cdwriter"; + else if (-1!=deviceName().tqfind("writer",0,FALSE)) iconName+="cdwriter"; + else if (-1!=mountPoint().tqfind("mo",0,FALSE)) iconName+="mo"; + else if (-1!=deviceName().tqfind("mo",0,FALSE)) iconName+="mo"; + else if (-1!=deviceName().tqfind("fd",0,FALSE)) { + if (-1!=deviceName().tqfind("360",0,FALSE)) iconName+="5floppy"; + if (-1!=deviceName().tqfind("1200",0,FALSE)) iconName+="5floppy"; else iconName+="3floppy"; } - else if (-1!=mountPoint().find("floppy",0,FALSE)) iconName+="3floppy"; - else if (-1!=mountPoint().find("zip",0,FALSE)) iconName+="zip"; - else if (-1!=fsType().find("nfs",0,FALSE)) iconName+="nfs"; + else if (-1!=mountPoint().tqfind("floppy",0,FALSE)) iconName+="3floppy"; + else if (-1!=mountPoint().tqfind("zip",0,FALSE)) iconName+="zip"; + else if (-1!=fsType().tqfind("nfs",0,FALSE)) iconName+="nfs"; else iconName+="hdd"; mounted() ? iconName+="_mount" : iconName+="_unmount"; -// if ( -1==mountOptions().find("user",0,FALSE) ) +// if ( -1==mountOptions().tqfind("user",0,FALSE) ) // iconName.prepend("root_"); // special root icon, normal user can´t mount //debug("device %s is %s",deviceName().latin1(),iconName.latin1()); @@ -226,11 +226,11 @@ int DiskEntry::sysCall(const TQString & command) { if (readingSysStdErrOut || sysProc->isRunning() ) return -1; - sysStringErrOut=i18n("Called: %1\n\n").arg(command); // put the called command on ErrOut + sysStringErrOut=i18n("Called: %1\n\n").tqarg(command); // put the called command on ErrOut sysProc->clearArguments(); (*sysProc) << command; if (!sysProc->start( KProcess::Block, KProcess::AllOutput )) - kdFatal() << i18n("could not execute %1").arg(command.local8Bit().data()) << endl; + kdFatal() << i18n("could not execute %1").tqarg(command.local8Bit().data()) << endl; if (sysProc->exitStatus()!=0) emit sysCallError(this, sysProc->exitStatus()); diff --git a/kdf/disks.h b/kdf/disks.h index ed80c3d..d27bc0b 100644 --- a/kdf/disks.h +++ b/kdf/disks.h @@ -3,7 +3,7 @@ * * Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -37,12 +37,13 @@ #include <kprocess.h> #include <klocale.h> -class DiskEntry : public QObject +class DiskEntry : public TQObject { Q_OBJECT + TQ_OBJECT public: - DiskEntry(TQObject *parent=0, const char *name=0); - DiskEntry(const TQString & deviceName, TQObject *parent=0, const char *name=0); + DiskEntry(TQObject *tqparent=0, const char *name=0); + DiskEntry(const TQString & deviceName, TQObject *tqparent=0, const char *name=0); ~DiskEntry(); TQString lastSysError() {return sysStringErrOut; } TQString deviceName() const { return device; } diff --git a/kdf/kcmdf.cpp b/kdf/kcmdf.cpp index 2e26113..72389ef 100644 --- a/kdf/kcmdf.cpp +++ b/kdf/kcmdf.cpp @@ -32,8 +32,8 @@ #include "kcmdf.h" -KDiskFreeWidget::KDiskFreeWidget( TQWidget *parent, const char *name ) - : KCModule( parent, name ) +KDiskFreeWidget::KDiskFreeWidget( TQWidget *tqparent, const char *name ) + : KCModule( tqparent, name ) { setButtons(Help); @@ -57,9 +57,9 @@ TQString KDiskFreeWidget::quickHelp() const extern "C" { - KDE_EXPORT KCModule* create_kdf( TQWidget *parent, const char * /*name*/ ) + KDE_EXPORT KCModule* create_kdf( TQWidget *tqparent, const char * /*name*/ ) { - return new KDiskFreeWidget( parent , "kdf" ); + return new KDiskFreeWidget( tqparent , "kdf" ); } } diff --git a/kdf/kcmdf.h b/kdf/kcmdf.h index 030b7dd..a33739c 100644 --- a/kdf/kcmdf.h +++ b/kdf/kcmdf.h @@ -33,9 +33,10 @@ class KDiskFreeWidget : public KCModule { Q_OBJECT + TQ_OBJECT public: - KDiskFreeWidget( TQWidget *parent=0, const char *name=0 ); + KDiskFreeWidget( TQWidget *tqparent=0, const char *name=0 ); ~KDiskFreeWidget(); TQString quickHelp() const; diff --git a/kdf/kconftest.cpp b/kdf/kconftest.cpp index 6ee63f0..7c0d0a9 100644 --- a/kdf/kconftest.cpp +++ b/kdf/kconftest.cpp @@ -27,7 +27,7 @@ /* compile with -* gcc -I$QTDIR/include -I$KDEDIR/include -L/opt/kde/lib -L/usr/X11R6/lib -lkfm -lkdeui -lkdecore -lqt -lX11 -lXext -fno-rtti kconftest.cpp +* gcc -I$TQTDIR/include -I$KDEDIR/include -L/opt/kde/lib -L/usr/X11R6/lib -lkfm -lkdeui -lkdecore -lqt -lX11 -lXext -fno-rtti kconftest.cpp */ diff --git a/kdf/kdf.cpp b/kdf/kdf.cpp index 606c44e..f963a12 100644 --- a/kdf/kdf.cpp +++ b/kdf/kdf.cpp @@ -41,15 +41,15 @@ KDFTopLevel::KDFTopLevel(TQWidget *, const char *name) { kdf = new KDFWidget(this,"kdf",FALSE); Q_CHECK_PTR(kdf); - (void) new KAction( i18n( "&Update" ), 0, kdf, TQT_SLOT( updateDF() ), actionCollection(), "updatedf" ); + (void) new KAction( i18n( "&Update" ), 0, TQT_TQOBJECT(kdf), TQT_SLOT( updateDF() ), actionCollection(), "updatedf" ); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); - KStdAction::preferences(kdf, TQT_SLOT(settingsBtnClicked()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(kdf), TQT_SLOT(settingsBtnClicked()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); setCentralWidget(kdf); - // kdf->setMinimumSize(kdf->sizeHint()); - kdf->resize(kdf->sizeHint()); + // kdf->setMinimumSize(kdf->tqsizeHint()); + kdf->resize(kdf->tqsizeHint()); setupGUI(KMainWindow::Keys | StatusBar | Save | Create); } @@ -31,9 +31,10 @@ class KDFTopLevel : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KDFTopLevel(TQWidget *parent=0, const char *name=0); + KDFTopLevel(TQWidget *tqparent=0, const char *name=0); ~KDFTopLevel() { }; protected slots: diff --git a/kdf/kdfconfig.cpp b/kdf/kdfconfig.cpp index e13ebcd..2478d28 100644 --- a/kdf/kdfconfig.cpp +++ b/kdf/kdfconfig.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -50,8 +50,8 @@ static bool GUI; #endif -KDFConfigWidget::KDFConfigWidget(TQWidget *parent, const char *name, bool init) - : TQWidget( parent, name) +KDFConfigWidget::KDFConfigWidget(TQWidget *tqparent, const char *name, bool init) + : TQWidget( tqparent, name) { mTabName.resize(8); @@ -99,7 +99,7 @@ KDFConfigWidget::KDFConfigWidget(TQWidget *parent, const char *name, bool init) mScroll = new TQScrollBar( this ); Q_CHECK_PTR(mScroll); - mScroll->setOrientation( TQScrollBar::Horizontal ); + mScroll->setOrientation( Qt::Horizontal ); mScroll->setSteps(1,20); mScroll->setRange(0, 180 ); gl->addWidget( mScroll, 1, 1 ); diff --git a/kdf/kdfconfig.h b/kdf/kdfconfig.h index 832738a..b1d8821 100644 --- a/kdf/kdfconfig.h +++ b/kdf/kdfconfig.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -39,9 +39,10 @@ class TQScrollBar; class CListView; -class KDFConfigWidget : public QWidget +class KDFConfigWidget : public TQWidget { Q_OBJECT + TQ_OBJECT class CTabName { @@ -59,7 +60,7 @@ class KDFConfigWidget : public QWidget }; public: - KDFConfigWidget( TQWidget *parent=0, const char *name=0, bool init=false); + KDFConfigWidget( TQWidget *tqparent=0, const char *name=0, bool init=false); ~KDFConfigWidget(); public slots: diff --git a/kdf/kdfwidget.cpp b/kdf/kdfwidget.cpp index 00f1968..8fcc576 100644 --- a/kdf/kdfwidget.cpp +++ b/kdf/kdfwidget.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1998-2001 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -56,8 +56,8 @@ static bool GUI; /**************************************************************/ -CListViewItem::CListViewItem( CListView * parent, TQListViewItem * after ) - :TQListViewItem( parent, after ) +CListViewItem::CListViewItem( CListView * tqparent, TQListViewItem * after ) + :TQListViewItem( tqparent, after ) {} int CListViewItem::compare ( TQListViewItem *i, int column, bool ) const @@ -92,8 +92,8 @@ void CListViewItem::setKeys (int kb_size, int kb_avail, float percent_full) /**************************************************************/ -KDFWidget::KDFWidget( TQWidget *parent, const char *name, bool init ) - : TQWidget(parent, name), mOptionDialog(0), mPopup(0), mTimer(0) +KDFWidget::KDFWidget( TQWidget *tqparent, const char *name, bool init ) + : TQWidget(tqparent, name), mOptionDialog(0), mPopup(0), mTimer(0) { connect(&mDiskList , TQT_SIGNAL(readDFDone() ), this, TQT_SLOT (updateDFDone()) ); @@ -131,7 +131,7 @@ KDFWidget::KDFWidget( TQWidget *parent, const char *name, bool init ) this, TQT_SLOT(columnSizeChanged(int, int, int)) ); makeColumns(); - mIsTopLevel = TQString(parent->className()) == "KDFTopLevel" ? true : false; + mIsTopLevel = TQString(tqparent->className()) == "KDFTopLevel" ? true : false; } loadSettings(); @@ -156,9 +156,9 @@ void KDFWidget::makeColumns( void ) // 1999-11-29 Espen Sand // This smells like a bad hack but I need to remove the headers // first. If I don't, the list look like shit afterwards. The iterator - // is just used to prevent an endless loop. With my Qt (1999-11-10 ?) + // is just used to prevent an endless loop. With my TQt (1999-11-10 ?) // I only need as many iterations as there are header items but who knows - // what a new Qt can do! + // what a new TQt can do! // for( i=1000; mList->header()->count() > 0 && i>0; i-- ) { @@ -283,7 +283,7 @@ void KDFWidget::setUpdateFrequency( int frequency ) // Kill current timer and restart it if the frequency is // larger than zero. // - killTimers(); + TQT_TQOBJECT(this)->killTimers(); if( frequency > 0 ) { startTimer( frequency * 1000 ); @@ -343,7 +343,7 @@ void KDFWidget::updateDFDone( void ){ int k=0; item = new CListViewItem( mList, item ); - bool root = disk->mountOptions().find("user",0,false)==-1 ? true : false; + bool root = disk->mountOptions().tqfind("user",0,false)==-1 ? true : false; item->setPixmap( k++, mList->icon( disk->iconName(), root ) ); item->setText( k++, disk->deviceName() ); item->setText( k++, disk->fsType() ); @@ -377,7 +377,7 @@ void KDFWidget::criticallyFull( DiskEntry *disk ) if( mStd.popupIfFull() == true ) { TQString msg = i18n("Device [%1] on [%2] is getting critically full!"). - arg(disk->deviceName()).arg(disk->mountPoint()); + tqarg(disk->deviceName()).tqarg(disk->mountPoint()); KMessageBox::sorry( this, msg, i18n("Warning")); } } @@ -400,10 +400,10 @@ DiskEntry *KDFWidget::selectedDisk( TQListViewItem *item ) DiskEntry disk(item->text(deviceCol)); disk.setMountPoint(item->text(mntCol)); - // I can't get find() to work. The Disks::compareItems(..) is + // I can't get tqfind() to work. The Disks::compareItems(..) is // never called. // - //int pos=mDiskList->find(disk); + //int pos=mDiskList->tqfind(disk); int pos = -1; for( u_int i=0; i<mDiskList.count(); i++ ) @@ -515,10 +515,10 @@ void KDFWidget::popupMenu( TQListViewItem *item, const TQPoint &p ) if( mStd.fileManager().isEmpty() == false ) { TQString cmd = mStd.fileManager(); - int pos = cmd.find("%m"); + int pos = cmd.tqfind("%m"); if( pos > 0 ) { - cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &"; + cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &"; } else { @@ -543,7 +543,7 @@ void KDFWidget::popupMenu( TQListViewItem *item, const TQPoint &p ) /************************************************************************** - * recalculates and repaints the pixBars + * recalculates and tqrepaints the pixBars **/ void KDFWidget::updateDiskBarPixmaps( void ) { @@ -569,10 +569,10 @@ void KDFWidget::updateDiskBarPixmaps( void ) int i=0; for(TQListViewItem *it=mList->firstChild(); it!=0;it=it->nextSibling(),i++ ) { - // I can't get find() to work. The Disks::compareItems(..) is + // I can't get tqfind() to work. The Disks::compareItems(..) is // never called. // - //int pos=mDiskList->find(disk); + //int pos=mDiskList->tqfind(disk); DiskEntry dummy(it->text(deviceCol)); dummy.setMountPoint(it->text(mntCol)); @@ -609,8 +609,8 @@ void KDFWidget::updateDiskBarPixmaps( void ) p.setPen(black); p.drawRect(0,0,w,h); TQColor c; - if ( (disk->iconName().find("cdrom") != -1) - || (disk->iconName().find("writer") != -1) ) + if ( (disk->iconName().tqfind("cdrom") != -1) + || (disk->iconName().tqfind("writer") != -1) ) c = gray; else c = disk->percentFull() > FULL_PERCENT ? red : darkGreen; diff --git a/kdf/kdfwidget.h b/kdf/kdfwidget.h index 8c16fb9..af2daa5 100644 --- a/kdf/kdfwidget.h +++ b/kdf/kdfwidget.h @@ -3,7 +3,7 @@ * * Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -72,10 +72,10 @@ class CTabEntry // columns with a numeric value are sorted by numerical value. // -class CListViewItem : public QListViewItem +class CListViewItem : public TQListViewItem { public: - CListViewItem ( CListView * parent, TQListViewItem * after ); + CListViewItem ( CListView * tqparent, TQListViewItem * after ); virtual int compare ( TQListViewItem* i, int col, bool) const; @@ -89,9 +89,10 @@ class CListViewItem : public QListViewItem /**************************************************************/ -class KDFWidget : public QWidget +class KDFWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum ColId @@ -107,7 +108,7 @@ class KDFWidget : public QWidget }; public: - KDFWidget( TQWidget *parent=0, const char *name=0, bool init=false); + KDFWidget( TQWidget *tqparent=0, const char *name=0, bool init=false); ~KDFWidget( void ); public slots: diff --git a/kdf/kwikdisk.cpp b/kdf/kwikdisk.cpp index 5ca97f5..e6c4020 100644 --- a/kdf/kwikdisk.cpp +++ b/kdf/kwikdisk.cpp @@ -134,7 +134,7 @@ void KwikDisk::setUpdateFrequency(int frequency) // Kill current timer and restart it if the frequency is // larger than zero. // - killTimers(); + TQT_TQOBJECT(this)->killTimers(); if( frequency > 0 ) { startTimer(frequency * 1000); @@ -176,13 +176,13 @@ void KwikDisk::updateDFDone() { // FIXME: tool tips are unused atm TQString toolTipText = i18n("%1 (%2) %3 on %4") - .arg( disk->mounted() ? i18n("Unmount") : i18n("Mount")) - .arg(disk->fsType()).arg(disk->deviceName()).arg(disk->mountPoint()); + .tqarg( disk->mounted() ? i18n("Unmount") : i18n("Mount")) + .tqarg(disk->fsType()).tqarg(disk->deviceName()).tqarg(disk->mountPoint()); TQString entryName = disk->mountPoint(); if( disk->mounted() ) { - entryName += TQString("\t\t\t[%1]").arg(disk->prettyKBAvail()); + entryName += TQString("\t\t\t[%1]").tqarg(disk->prettyKBAvail()); } int id = contextMenu()->insertItem("", this, TQT_SLOT(toggleMount(int)) ); contextMenu()->setItemParameter(id, itemNo); @@ -190,18 +190,18 @@ void KwikDisk::updateDFDone() TQPixmap *pix = new TQPixmap(KSystemTray::loadIcon(disk->iconName())); - if( getuid() !=0 && disk->mountOptions().find("user",0, false) == -1 ) + if( getuid() !=0 && disk->mountOptions().tqfind("user",0, false) == -1 ) { // // Special root icon, normal user cant mount. // // 2000-01-23 Espen Sand - // Careful here: If the mask has not been defined we can - // not use TQPixmap::mask() because it returns 0 => segfault + // Careful here: If the tqmask has not been defined we can + // not use TQPixmap::tqmask() because it returns 0 => segfault // - if( pix->mask() != 0 ) + if( pix->tqmask() != 0 ) { - TQBitmap *bm = new TQBitmap(*(pix->mask())); + TQBitmap *bm = new TQBitmap(*(pix->tqmask())); if( bm != 0 ) { TQPainter qp( bm ); @@ -264,10 +264,10 @@ void KwikDisk::toggleMount(int item) if( m_options.fileManager().isEmpty() == false ) { TQString cmd = m_options.fileManager(); - int pos = cmd.find("%m"); + int pos = cmd.tqfind("%m"); if( pos > 0 ) { - cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &"; + cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &"; } else { @@ -286,7 +286,7 @@ void KwikDisk::criticallyFull(DiskEntry *disk) if( m_options.popupIfFull() == true ) { TQString msg = i18n("Device [%1] on [%2] is getting critically full!") - .arg(disk->deviceName()).arg(disk->mountPoint()); + .tqarg(disk->deviceName()).tqarg(disk->mountPoint()); KMessageBox::sorry( this, msg, i18n("Warning")); } } diff --git a/kdf/kwikdisk.h b/kdf/kwikdisk.h index c404e84..7ac9576 100644 --- a/kdf/kwikdisk.h +++ b/kdf/kwikdisk.h @@ -42,6 +42,7 @@ class KwikDisk : public KSystemTray { Q_OBJECT + TQ_OBJECT public: KwikDisk(); diff --git a/kdf/listview.cpp b/kdf/listview.cpp index 0334101..fc2dde6 100644 --- a/kdf/listview.cpp +++ b/kdf/listview.cpp @@ -20,7 +20,7 @@ // // 1999-11-28 Espen Sand // The purpose of this class is: -// 1) Easily set minimum number of visible items and to adjust the sizeHint() +// 1) Easily set minimum number of visible items and to adjust the tqsizeHint() // 2) Provide a pixmap collection // @@ -34,8 +34,8 @@ template class TQDict<TQPixmap>; -CListView::CListView( TQWidget *parent, const char *name, int visibleItem ) - :KListView( parent, name ), mVisibleItem(QMAX( 1, visibleItem )) +CListView::CListView( TQWidget *tqparent, const char *name, int visibleItem ) + :KListView( tqparent, name ), mVisibleItem(TQMAX( 1, visibleItem )) { setVisibleItem(visibleItem); mPixDict.setAutoDelete(true); @@ -43,23 +43,23 @@ CListView::CListView( TQWidget *parent, const char *name, int visibleItem ) void CListView::setVisibleItem( int visibleItem, bool updateSize ) { - mVisibleItem = QMAX( 1, visibleItem ); + mVisibleItem = TQMAX( 1, visibleItem ); if( updateSize == true ) { - TQSize s = sizeHint(); - setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() + + TQSize s = tqsizeHint(); + setMinimumSize( s.width() + verticalScrollBar()->tqsizeHint().width() + lineWidth() * 2, s.height() ); } } -TQSize CListView::sizeHint( void ) const +TQSize CListView::tqsizeHint( void ) const { - TQSize s = TQListView::sizeHint(); + TQSize s = TQListView::tqsizeHint(); int h = fontMetrics().height() + 2*itemMargin(); if( h % 2 > 0 ) { h++; } - s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->sizeHint().height()); + s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->tqsizeHint().height()); return( s ); } @@ -76,12 +76,12 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder ) { // // 2000-01-23 Espen Sand - // Careful here: If the mask has not been defined we can - // not use TQPixmap::mask() because it returns 0 => segfault + // Careful here: If the tqmask has not been defined we can + // not use TQPixmap::tqmask() because it returns 0 => segfault // - if( pix->mask() != 0 ) + if( pix->tqmask() != 0 ) { - TQBitmap *bm = new TQBitmap(*(pix->mask())); + TQBitmap *bm = new TQBitmap(*(pix->tqmask())); if( bm != 0 ) { TQPainter qp(bm); @@ -99,7 +99,7 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder ) } } - mPixDict.replace( iconName, pix ); + mPixDict.tqreplace( iconName, pix ); } return( *pix ); diff --git a/kdf/listview.h b/kdf/listview.h index d051fdf..c937539 100644 --- a/kdf/listview.h +++ b/kdf/listview.h @@ -28,12 +28,13 @@ class CListView : public KListView { Q_OBJECT + TQ_OBJECT public: - CListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 ); + CListView( TQWidget *tqparent=0, const char *name=0, int visibleItem=10 ); void setVisibleItem( int visibleItem, bool updateSize=true ); - virtual TQSize sizeHint( void ) const; + virtual TQSize tqsizeHint( void ) const; const TQPixmap &icon( const TQString &iconName, bool drawBorder ); private: diff --git a/kdf/mntconfig.cpp b/kdf/mntconfig.cpp index 0186cc4..caf584c 100644 --- a/kdf/mntconfig.cpp +++ b/kdf/mntconfig.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -47,8 +47,8 @@ static bool GUI; #endif -MntConfigWidget::MntConfigWidget(TQWidget *parent, const char *name, bool init) - : TQWidget(parent, name) +MntConfigWidget::MntConfigWidget(TQWidget *tqparent, const char *name, bool init) + : TQWidget(tqparent, name) { mInitializing = false; @@ -102,7 +102,7 @@ MntConfigWidget::MntConfigWidget(TQWidget *parent, const char *name, bool init) mIconButton = new KIconButton(mGroupBox); mIconButton->setIconType(KIcon::Small, KIcon::Device); Q_CHECK_PTR(mIconButton); - mIconButton->setFixedWidth( mIconButton->sizeHint().height() ); + mIconButton->setFixedWidth( mIconButton->tqsizeHint().height() ); connect(mIconButton,TQT_SIGNAL(iconChanged(TQString)),this,TQT_SLOT(iconChangedButton(TQString))); gl->addWidget( mIconButton, 2, 1 ); @@ -164,7 +164,7 @@ void MntConfigWidget::readDFDone( void ) TQListViewItem *item = 0; for( DiskEntry *disk=mDiskList.first(); disk!=0; disk=mDiskList.next(),++i ) { - item = new TQListViewItem( mList, item, TQString::null, disk->deviceName(), + item = new TQListViewItem( mList, item, TQString(), disk->deviceName(), disk->mountPoint(), disk->mountCommand(), disk->umountCommand() ); item->setPixmap( ICONCOL, SmallIcon( disk->iconName() ) ); mDiskLookup[i] = item; @@ -251,14 +251,14 @@ void MntConfigWidget::iconChangedButton(TQString iconName) } void MntConfigWidget::iconChanged(const TQString &iconName) { - if( iconName.findRev('_') == 0 || - (iconName.right(iconName.length()-iconName.findRev('_'))!="_mount" && - iconName.right(iconName.length()-iconName.findRev('_'))!="_unmount")) + if( iconName.tqfindRev('_') == 0 || + (iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_mount" && + iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_unmount")) { TQString msg = i18n("" "This filename is not valid: %1\n" "It must end with " - "\"_mount\" or \"_unmount\".").arg(iconName); + "\"_mount\" or \"_unmount\".").tqarg(iconName); KMessageBox::sorry( this, msg ); return; } diff --git a/kdf/mntconfig.h b/kdf/mntconfig.h index 931a109..f3f0d56 100644 --- a/kdf/mntconfig.h +++ b/kdf/mntconfig.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -43,9 +43,10 @@ class TQListViewItem; /**************************************************************/ -class MntConfigWidget : public QWidget +class MntConfigWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum ColType @@ -58,7 +59,7 @@ class MntConfigWidget : public QWidget }; public: - MntConfigWidget( TQWidget *parent=0, const char *name=0, bool init=false ); + MntConfigWidget( TQWidget *tqparent=0, const char *name=0, bool init=false ); ~MntConfigWidget(); public slots: diff --git a/kdf/optiondialog.cpp b/kdf/optiondialog.cpp index 8da8dc2..39df7a0 100644 --- a/kdf/optiondialog.cpp +++ b/kdf/optiondialog.cpp @@ -23,11 +23,11 @@ #include "mntconfig.h" #include "optiondialog.h" -COptionDialog::COptionDialog( TQWidget *parent, const char *name, bool modal ) +COptionDialog::COptionDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Tabbed, i18n("Configure"), Help|Apply|Ok|Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { - setHelp( "kcontrol/kdf/index.html", TQString::null ); + setHelp( "kcontrol/kdf/index.html", TQString() ); TQFrame *f1 = addPage( i18n("General Settings") ); TQVBoxLayout *l1 = new TQVBoxLayout( f1 ); diff --git a/kdf/optiondialog.h b/kdf/optiondialog.h index 6a4bb74..ea3f4c3 100644 --- a/kdf/optiondialog.h +++ b/kdf/optiondialog.h @@ -28,9 +28,10 @@ class MntConfigWidget; class COptionDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - COptionDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); + COptionDialog( TQWidget *tqparent=0, const char *name=0, bool modal=true ); ~COptionDialog( void ); protected slots: diff --git a/kedit/color.ui b/kedit/color.ui index e171491..00f11c3 100644 --- a/kedit/color.ui +++ b/kedit/color.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Color</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Color</cstring> </property> @@ -29,7 +29,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>111</height> @@ -58,7 +58,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_CustomColor</cstring> </property> @@ -66,7 +66,7 @@ <string>Use &custom colors</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -80,7 +80,7 @@ <cstring>kcfg_TextColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -122,7 +122,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> </includehints> diff --git a/kedit/kedit.cpp b/kedit/kedit.cpp index eb3c8af..d374987 100644 --- a/kedit/kedit.cpp +++ b/kedit/kedit.cpp @@ -84,7 +84,7 @@ TopLevel::TopLevel (TQWidget *, const char *name) setupEditWidget(); if (!initialGeometrySet()) - resize( TQSize(550, 400).expandedTo(minimumSizeHint())); + resize( TQSize(550, 400).expandedTo(tqminimumSizeHint())); setupGUI(ToolBar | Keys | StatusBar | Create); setAutoSaveSettings(); @@ -195,42 +195,42 @@ void TopLevel::slotSelectionChanged() void TopLevel::setupActions() { // setup File menu - KStdAction::openNew(this, TQT_SLOT(file_new()), actionCollection()); - KStdAction::open(this, TQT_SLOT(file_open()), actionCollection()); - recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(file_new()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(file_open()), actionCollection()); + recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openRecent(const KURL&)), actionCollection()); - KStdAction::save(this, TQT_SLOT(file_save()), actionCollection()); - KStdAction::saveAs(this, TQT_SLOT(file_save_as()), actionCollection()); - KStdAction::close(this, TQT_SLOT(file_close()), actionCollection()); - KStdAction::print(this, TQT_SLOT(print()), actionCollection()); - KStdAction::mail(this, TQT_SLOT(mail()), actionCollection()); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(file_save()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(file_save_as()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(file_close()), actionCollection()); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(print()), actionCollection()); + KStdAction::mail(TQT_TQOBJECT(this), TQT_SLOT(mail()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); // setup edit menu - undoAction = KStdAction::undo(this, TQT_SLOT(undo()), actionCollection()); - redoAction = KStdAction::redo(this, TQT_SLOT(redo()), actionCollection()); - cutAction = KStdAction::cut(this, TQT_SLOT(cut()), actionCollection()); - copyAction = KStdAction::copy(this, TQT_SLOT(copy()), actionCollection()); - KStdAction::pasteText(this, TQT_SLOT(paste()), actionCollection()); - KStdAction::selectAll(this, TQT_SLOT(select_all()), actionCollection()); - KStdAction::find(this, TQT_SLOT(search()), actionCollection()); - KStdAction::findNext(this, TQT_SLOT(search_again()), actionCollection()); - KStdAction::replace(this, TQT_SLOT(replace()), actionCollection()); - - (void)new KAction(i18n("&Insert File..."), 0, this, TQT_SLOT(file_insert()), + undoAction = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); + redoAction = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection()); + cutAction = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), actionCollection()); + copyAction = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); + KStdAction::pasteText(TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); + KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(select_all()), actionCollection()); + KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(search()), actionCollection()); + KStdAction::findNext(TQT_TQOBJECT(this), TQT_SLOT(search_again()), actionCollection()); + KStdAction::replace(TQT_TQOBJECT(this), TQT_SLOT(tqreplace()), actionCollection()); + + (void)new KAction(i18n("&Insert File..."), 0, TQT_TQOBJECT(this), TQT_SLOT(file_insert()), actionCollection(), "insert_file"); - (void)new KAction(i18n("In&sert Date"), 0, this, TQT_SLOT(insertDate()), + (void)new KAction(i18n("In&sert Date"), 0, TQT_TQOBJECT(this), TQT_SLOT(insertDate()), actionCollection(), "insert_date"); - (void)new KAction(i18n("Cl&ean Spaces"), 0, this, TQT_SLOT(clean_space()), + (void)new KAction(i18n("Cl&ean Spaces"), 0, TQT_TQOBJECT(this), TQT_SLOT(clean_space()), actionCollection(), "clean_spaces"); // setup Tools menu - KStdAction::spelling(this, TQT_SLOT(spellcheck()), actionCollection()); + KStdAction::spelling(TQT_TQOBJECT(this), TQT_SLOT(spellcheck()), actionCollection()); // setup Go menu - KStdAction::gotoLine(this, TQT_SLOT(gotoLine()), actionCollection()); + KStdAction::gotoLine(TQT_TQOBJECT(this), TQT_SLOT(gotoLine()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection()); } void TopLevel::setupStatusBar() @@ -265,7 +265,7 @@ void TopLevel::saveProperties(KConfig* config) { TQString name = m_url.url(); if (name.isEmpty()) - name = TQString("kedit%1-%2").arg(getpid()).arg((long)this); + name = TQString("kedit%1-%2").tqarg(getpid()).tqarg((long)this); TQString tmplocation = kapp->tempSaveName(m_url.url()); config->writeEntry("saved_to",tmplocation); saveFile(tmplocation, false, m_url.fileEncoding()); @@ -341,7 +341,7 @@ void TopLevel::insertDate(){ int line, column; TQString string; - TQDate dt = TQDate::currentDate(); + TQDate dt = TQDate::tqcurrentDate(); string = KGlobal::locale()->formatDate(dt); eframe->getCursorPosition(&line,&column); @@ -390,7 +390,7 @@ void TopLevel::spellcheck() statusBar()->changeItem(i18n("Spellcheck: Started."), ID_GENERAL); initSpellConfig(); - kspell = new KSpell(this, i18n("Spellcheck"), this, + kspell = new KSpell(this, i18n("Spellcheck"), TQT_TQOBJECT(this), TQT_SLOT( spell_started(KSpell *)), kspellconfigOptions); connect (kspell, TQT_SIGNAL ( death()), @@ -418,7 +418,7 @@ void TopLevel::spell_started( KSpell *) void TopLevel::spell_progress (unsigned int percent) { TQString s; - s = i18n("Spellcheck: %1% complete").arg(percent); + s = i18n("Spellcheck: %1% complete").tqarg(percent); statusBar()->changeItem (s, ID_GENERAL); } @@ -445,11 +445,11 @@ TQString TopLevel::replaceISpell(TQString msg, int client) { switch(client) { - case KS_CLIENT_ISPELL: msg.replace("ISpell", "<b>ispell</b>"); break; - case KS_CLIENT_ASPELL: msg.replace("ISpell", "<b>aspell</b>"); break; - case KS_CLIENT_HSPELL: msg.replace("ISpell", "<b>hspell</b>"); break; + case KS_CLIENT_ISPELL: msg.tqreplace("ISpell", "<b>ispell</b>"); break; + case KS_CLIENT_ASPELL: msg.tqreplace("ISpell", "<b>aspell</b>"); break; + case KS_CLIENT_HSPELL: msg.tqreplace("ISpell", "<b>hspell</b>"); break; } - msg.replace("\n", "<p>"); + msg.tqreplace("\n", "<p>"); return "<qt>"+msg+"</qt>"; } @@ -479,7 +479,7 @@ void TopLevel::file_open( void ) while( 1 ) { KURL url = KTextFileDialog::getOpenURLwithEncoding( - TQString::null, TQString::null, this, + TQString(), TQString(), this, i18n("Open File")); if( url.isEmpty() ) { @@ -549,7 +549,7 @@ void TopLevel::file_insert() while( 1 ) { KURL url = KTextFileDialog::getOpenURLwithEncoding( - TQString::null, TQString::null, this, + TQString(), TQString(), this, i18n("Insert File"), "", KStdGuiItem::insert().text()); if( url.isEmpty() ) { @@ -597,7 +597,7 @@ bool TopLevel::queryClose() TQString msg = i18n("" "This document has been modified.\n" "Would you like to save it?" ); - switch( KMessageBox::warningYesNoCancel( this, msg, TQString::null, + switch( KMessageBox::warningYesNoCancel( this, msg, TQString(), KStdGuiItem::save(), KStdGuiItem::discard() ) ) { case KMessageBox::Yes: // Save, then exit @@ -618,7 +618,7 @@ bool TopLevel::queryClose() msg = i18n("" "Could not save the file.\n" "Exit anyways?"); - switch( KMessageBox::warningContinueCancel( this, msg, TQString::null, KStdGuiItem::quit() ) ) + switch( KMessageBox::warningContinueCancel( this, msg, TQString(), KStdGuiItem::quit() ) ) { case KMessageBox::Continue: return true; // Exit. @@ -660,7 +660,7 @@ void TopLevel::file_close() { TQString msg = i18n("This document has been modified.\n" "Would you like to save it?" ); - switch( KMessageBox::warningYesNoCancel( this, msg, TQString::null, + switch( KMessageBox::warningYesNoCancel( this, msg, TQString(), KStdGuiItem::save(), KStdGuiItem::discard() ) ) { case KMessageBox::Yes: // Save, then close @@ -699,7 +699,7 @@ void TopLevel::file_save() if ( result == KEDIT_OK ){ TQString string; - string = i18n("Wrote: %1").arg(m_caption); + string = i18n("Wrote: %1").tqarg(m_caption); setGeneralStatusField(string); } } @@ -721,7 +721,7 @@ void TopLevel::file_save_as() while(true) { u = KTextFileDialog::getSaveURLwithEncoding( - m_url.url(), TQString::null, this, + m_url.url(), TQString(), this, i18n("Save File As"), m_url.fileEncoding()); @@ -732,7 +732,7 @@ void TopLevel::file_save_as() { int result = KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. " - "Are you sure you want to overwrite it?" ).arg( u.prettyURL() ), + "Are you sure you want to overwrite it?" ).tqarg( u.prettyURL() ), i18n( "Overwrite File?" ), i18n( "Overwrite" ) ); @@ -748,7 +748,7 @@ void TopLevel::file_save_as() { m_url = u; setFileCaption(); - TQString string = i18n("Saved as: %1").arg(m_caption); + TQString string = i18n("Saved as: %1").tqarg(m_caption); setGeneralStatusField(string); recent->addURL( u ); } @@ -762,11 +762,11 @@ void TopLevel::mail() // Default subject string // TQString defaultsubject = name(); - int index = defaultsubject.findRev('/'); + int index = defaultsubject.tqfindRev('/'); if( index != -1) defaultsubject = defaultsubject.right(defaultsubject.length() - index - 1 ); - kapp->invokeMailer( TQString::null, TQString::null, TQString::null, + kapp->invokeMailer( TQString(), TQString(), TQString(), defaultsubject, eframe->text() ); } @@ -788,7 +788,7 @@ void TopLevel::fancyprint(){ y += fm.ascent(); TQString line; line = eframe->textLine(i); - line.replace( TQRegExp("\t"), " " ); + line.tqreplace( TQRegExp("\t"), " " ); strncpy(buf,line.local8Bit(),160); for (int j = 0 ; j <150; j++){ if (!isprint(buf[j])) @@ -818,7 +818,7 @@ void TopLevel::search(){ statusbar_slot(); } -void TopLevel::replace(){ +void TopLevel::tqreplace(){ eframe->replace(); statusbar_slot(); } @@ -867,12 +867,12 @@ void TopLevel::setFileCaption() else { KURL url(m_url); - url.setQuery(TQString::null); + url.setQuery(TQString()); m_caption = url.prettyURL(); } TQString encoding = m_url.fileEncoding(); if (!encoding.isEmpty()) - m_caption += TQString(" (%1)").arg(encoding); + m_caption += TQString(" (%1)").tqarg(encoding); } setCaption(m_caption, eframe->isModified()); } @@ -887,8 +887,8 @@ void TopLevel::statusbar_slot(){ TQString linenumber; linenumber = i18n("Line: %1 Col: %2") - .arg(eframe->currentLine() + 1) - .arg(eframe->currentColumn() +1); + .tqarg(eframe->currentLine() + 1) + .tqarg(eframe->currentColumn() +1); statusBar()->changeItem(linenumber,ID_LINE_COLUMN); } @@ -896,8 +896,8 @@ void TopLevel::statusbar_slot(){ void TopLevel::print() { bool aborted = false; - TQString headerLeft = i18n("Date: %1").arg(KGlobal::locale()->formatDate(TQDate::currentDate(),true)); - TQString headerMid = i18n("File: %1").arg(m_caption); + TQString headerLeft = i18n("Date: %1").tqarg(KGlobal::locale()->formatDate(TQDate::tqcurrentDate(),true)); + TQString headerMid = i18n("File: %1").tqarg(m_caption); TQString headerRight; TQFont printFont = eframe->font(); @@ -908,7 +908,7 @@ void TopLevel::print() TQFontMetrics headerFontMetrics(headerFont); KPrinter *printer = new KPrinter; - if(printer->setup(this, i18n("Print %1").arg(m_caption))) { + if(printer->setup(this, i18n("Print %1").tqarg(m_caption))) { // set up KPrinter printer->setFullPage(false); printer->setCreator("KEdit"); @@ -932,13 +932,13 @@ void TopLevel::print() while(true) { - headerRight = TQString("#%1").arg(page); + headerRight = TQString("#%1").tqarg(page); dy = headerFontMetrics.lineSpacing(); TQRect body( 0, dy*2, metrics.width(), metrics.height()-dy*2); - p->drawText(0, 0, metrics.width(), dy, Qt::AlignLeft, headerLeft); - p->drawText(0, 0, metrics.width(), dy, Qt::AlignHCenter, headerMid); - p->drawText(0, 0, metrics.width(), dy, Qt::AlignRight, headerRight); + p->drawText(0, 0, metrics.width(), dy, TQt::AlignLeft, headerLeft); + p->drawText(0, 0, metrics.width(), dy, TQt::AlignHCenter, headerMid); + p->drawText(0, 0, metrics.width(), dy, TQt::AlignRight, headerRight); TQPen pen; pen.setWidth(3); @@ -1125,7 +1125,7 @@ void TopLevel::openURL( const KURL& _url, int _mode ) if ( !_url.isValid() ) { TQString string; - string = i18n( "Malformed URL\n%1").arg(_url.url()); + string = i18n( "Malformed URL\n%1").tqarg(_url.url()); KMessageBox::sorry(this, string); return; @@ -1204,7 +1204,7 @@ void TopLevel::timer_slot(){ void TopLevel::set_colors() { - TQPalette mypalette = (eframe->palette()).copy(); + TQPalette mypalette = TQPalette((eframe->tqpalette())); TQColorGroup ncgrp( mypalette.active() ); @@ -1317,8 +1317,8 @@ extern "C" KDE_EXPORT int kdemain (int argc, char **argv) return a.exec (); } -SettingsDialog::SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleton *config, KSpellConfig *_spellConfig) - : KConfigDialog(parent, name, config), +SettingsDialog::SettingsDialog(TQWidget *tqparent, const char *name,KConfigSkeleton *config, KSpellConfig *_spellConfig) + : KConfigDialog(tqparent, name, config), spellConfig(_spellConfig), spellConfigChanged(false) { // Font diff --git a/kedit/kedit.h b/kedit/kedit.h index 5e075c1..4ea6f36 100644 --- a/kedit/kedit.h +++ b/kedit/kedit.h @@ -48,6 +48,7 @@ namespace KIO { class Job; } class TopLevel : public KMainWindow { Q_OBJECT + TQ_OBJECT public: enum { KEDIT_OK = 0, @@ -61,7 +62,7 @@ public: OPEN_INSERT = 4, OPEN_NEW = 8 }; - TopLevel( TQWidget *parent=0, const char *name=0 ); + TopLevel( TQWidget *tqparent=0, const char *name=0 ); ~TopLevel(); /** @@ -176,7 +177,7 @@ public slots: void file_save_as(); void helpselected(); void search(); - void replace(); + void tqreplace(); void search_again(); void toggle_overwrite(); @@ -205,9 +206,10 @@ private slots: class SettingsDialog: public KConfigDialog { Q_OBJECT + TQ_OBJECT public: - SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleton *config, KSpellConfig *_spellConfig); + SettingsDialog(TQWidget *tqparent, const char *name,KConfigSkeleton *config, KSpellConfig *_spellConfig); protected slots: void updateSettings(); diff --git a/kedit/ktextfiledlg.cpp b/kedit/ktextfiledlg.cpp index 794fff9..11649a4 100644 --- a/kedit/ktextfiledlg.cpp +++ b/kedit/ktextfiledlg.cpp @@ -32,9 +32,9 @@ KTextFileDialog::KTextFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char* name, + TQWidget *tqparent, const char* name, bool modal) - : KFileDialog(startDir, filter, parent, name, modal) + : KFileDialog(startDir, filter, tqparent, name, modal) { /* // insert encoding action into toolbar @@ -50,7 +50,7 @@ KTextFileDialog::KTextFileDialog(const TQString& startDir, TQStringList::Iterator it; int i = 0; for( it = encodings.begin(); it != encodings.end(); ++it) { - if ( (*it).contains( encodingStr ) ) { + if ( (*it).tqcontains( encodingStr ) ) { mEncoding->setCurrentItem( i ); break; } @@ -63,9 +63,9 @@ KTextFileDialog::KTextFileDialog(const TQString& startDir, KAction* mEncoding = new KAction( i18n("Select Encoding..."), 0, - this, TQT_SLOT( slotShowEncCombo() ), this, "encoding"); + TQT_TQOBJECT(this), TQT_SLOT( slotShowEncCombo() ), TQT_TQOBJECT(this), "encoding"); - mEncoding->setIcon( TQString::fromLatin1("charset") ); + mEncoding->setIcon( TQString::tqfromLatin1("charset") ); KToolBar *tb = toolBar(); mEncoding->plug( tb, pathComboIndex() - 1 ); @@ -88,7 +88,7 @@ void KTextFileDialog::slotShowEncCombo() TQComboBox *encCombo; TQVBox *vbox; - // Create widgets, and display using geometry management + // Create widgets, and display using tqgeometry management encDlg = new KDialogBase( this, "Encoding Dialog", true, i18n("Select Encoding"), KDialogBase::Ok | KDialogBase::Cancel ); @@ -96,7 +96,7 @@ void KTextFileDialog::slotShowEncCombo() vbox->setSpacing( KDialog::spacingHint() ); encDlg->setMainWidget( vbox ); label = new TQLabel( vbox ); - label->setAlignment( AlignLeft | AlignVCenter ); + label->tqsetAlignment( AlignLeft | AlignVCenter ); label->setText(i18n("Select encoding for text file: ")); encCombo = new TQComboBox(vbox); @@ -111,7 +111,7 @@ void KTextFileDialog::slotShowEncCombo() int i = 1; for( it = encodings.begin(); it != encodings.end(); ++it) { - if ( (*it).contains( encoding() ) ) { + if ( (*it).tqcontains( encoding() ) ) { encCombo->setCurrentItem( i ); break; } @@ -144,12 +144,12 @@ void KTextFileDialog::slotShowEncCombo() KURL KTextFileDialog::getOpenURLwithEncoding( const TQString& startDir, const TQString& filter, - TQWidget *parent, + TQWidget *tqparent, const TQString& caption, const TQString& encoding, const TQString& buttontext) { - KTextFileDialog dlg(startDir, filter, parent, "filedialog", true); + KTextFileDialog dlg(startDir, filter, tqparent, "filedialog", true); dlg.setEncoding(encoding); dlg.setOperationMode( Opening ); @@ -175,11 +175,11 @@ KURL KTextFileDialog::getOpenURLwithEncoding( KURL KTextFileDialog::getSaveURLwithEncoding( const TQString& dir, const TQString& filter, - TQWidget *parent, + TQWidget *tqparent, const TQString& caption, const TQString& encoding) { - KTextFileDialog dlg(dir, filter, parent, "filedialog", true); + KTextFileDialog dlg(dir, filter, tqparent, "filedialog", true); dlg.setEncoding(encoding); dlg.setOperationMode( Saving ); diff --git a/kedit/ktextfiledlg.h b/kedit/ktextfiledlg.h index ba9ab4a..eda651a 100644 --- a/kedit/ktextfiledlg.h +++ b/kedit/ktextfiledlg.h @@ -38,27 +38,28 @@ class KURL; class KTextFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT public: KTextFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char *name, + TQWidget *tqparent, const char *name, bool modal); ~KTextFileDialog(); static KURL getOpenURLwithEncoding( - const TQString& startDir = TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null, - const TQString& encoding = TQString::null, - const TQString& buttonText = TQString::null); + const TQString& startDir = TQString(), + const TQString& filter= TQString(), + TQWidget *tqparent= 0, + const TQString& caption = TQString(), + const TQString& encoding = TQString(), + const TQString& buttonText = TQString()); static KURL getSaveURLwithEncoding( const TQString& dir, const TQString& filter, - TQWidget *parent, + TQWidget *tqparent, const TQString& caption, - const TQString& encoding = TQString::null); + const TQString& encoding = TQString()); TQString &encoding() { return enc; } void setEncoding(const TQString& encoding); diff --git a/kedit/misc.ui b/kedit/misc.ui index 2a30333..fa1ac30 100644 --- a/kedit/misc.ui +++ b/kedit/misc.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Misc</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Misc</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -30,7 +30,7 @@ <cstring>kcfg_WrapMode</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_WrapColumn</cstring> </property> @@ -41,7 +41,7 @@ <number>999999999</number> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_BackupCopies</cstring> </property> @@ -52,7 +52,7 @@ <bool>true</bool> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Disable Wrapping</string> @@ -82,14 +82,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>101</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>wrapLabel</cstring> </property> @@ -116,8 +116,8 @@ <includes> <include location="local" impldecl="in implementation">misc.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>settingsWrapMode( int mode )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kedit/misc.ui.h b/kedit/misc.ui.h index 339c944..1a87350 100644 --- a/kedit/misc.ui.h +++ b/kedit/misc.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kfloppy/floppy.cpp b/kfloppy/floppy.cpp index 5075025..110bc20 100644 --- a/kfloppy/floppy.cpp +++ b/kfloppy/floppy.cpp @@ -48,8 +48,8 @@ #include "floppy.h" #include "format.h" -FloppyData::FloppyData(TQWidget * parent, const char * name) - : KDialog( parent, name ), +FloppyData::FloppyData(TQWidget * tqparent, const char * name) + : KDialog( tqparent, name ), formatActions(0L), m_canLowLevel(false), m_canZeroOut( false ) { @@ -288,7 +288,7 @@ FloppyData::FloppyData(TQWidget * parent, const char * name) frame = new TQLabel( this, "NewsWindow" ); frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - frame->setAlignment(WordBreak|ExpandTabs); + frame->tqsetAlignment(WordBreak|ExpandTabs); TQWhatsThis::add( frame, i18n("<qt>This is the status window, where error messages are displayed.</qt>") ); @@ -334,7 +334,7 @@ void FloppyData::closeEvent(TQCloseEvent*) void FloppyData::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { - case Qt::Key_F1: + case TQt::Key_F1: kapp->invokeHelp(); break; default: @@ -497,7 +497,7 @@ void FloppyData::format(){ if (KMessageBox::warningContinueCancel( this, i18n("<qt>Formatting will erase all data on the device:<br/><b>%1</b><br/>" "(Please check the correctness of the device name.)<br/>" - "Are you sure you wish to proceed?</qt>").arg( currentComboBoxDevice ) + "Are you sure you wish to proceed?</qt>").tqarg( currentComboBoxDevice ) , i18n("Proceed?") ) != KMessageBox::Continue) { return; @@ -524,7 +524,7 @@ void FloppyData::format(){ setEnabled(false); // Erase text box - frame->setText( TQString::null ); + frame->setText( TQString() ); if ( !userDevice ) { @@ -536,10 +536,10 @@ void FloppyData::format(){ } if (formatActions) delete formatActions; - formatActions = new KFActionQueue(this); + formatActions = new KFActionQueue(TQT_TQOBJECT(this)); connect(formatActions,TQT_SIGNAL(status(const TQString &,int)), - this,TQT_SLOT(formatStatus(const TQString &,int))); + this,TQT_SLOT(formattqStatus(const TQString &,int))); connect(formatActions,TQT_SIGNAL(done(KFAction *,bool)), this,TQT_SLOT(reset())); @@ -550,7 +550,7 @@ void FloppyData::format(){ } else if ( zerooutformat->isChecked() ) { - DDZeroOut* f = new DDZeroOut( this ); + DDZeroOut* f = new DDZeroOut( TQT_TQOBJECT(this) ); if ( userDevice ) { f->configureDevice( currentComboBoxDevice ); @@ -569,7 +569,7 @@ void FloppyData::format(){ } else { - FDFormat *f = new FDFormat(this); + FDFormat *f = new FDFormat(TQT_TQOBJECT(this)); f->configureDevice(drive,blocks); f->configure(verifylabel->isChecked()); formatActions->queue(f); @@ -577,7 +577,7 @@ void FloppyData::format(){ if ( filesystemComboBox->currentText() == i18n("DOS") ) { - FATFilesystem *f = new FATFilesystem(this); + FATFilesystem *f = new FATFilesystem(TQT_TQOBJECT(this)); f->configure(verifylabel->isChecked(), labellabel->isChecked(), lineedit->text()); @@ -594,7 +594,7 @@ void FloppyData::format(){ else if ( filesystemComboBox->currentText() == i18n("ext2") ) { - Ext2Filesystem *f = new Ext2Filesystem(this); + Ext2Filesystem *f = new Ext2Filesystem(TQT_TQOBJECT(this)); f->configure(verifylabel->isChecked(), labellabel->isChecked(), lineedit->text()); @@ -612,7 +612,7 @@ void FloppyData::format(){ #ifdef ANY_BSD else if ( filesystemComboBox->currentText() == i18n("UFS") ) { - FloppyAction *f = new UFSFilesystem(this); + FloppyAction *f = new UFSFilesystem(TQT_TQOBJECT(this)); f->configureDevice(drive,blocks); formatActions->queue(f); } @@ -621,7 +621,7 @@ void FloppyData::format(){ #ifdef ANY_LINUX else if ( filesystemComboBox->currentText() == i18n("Minix") ) { - MinixFilesystem *f = new MinixFilesystem(this); + MinixFilesystem *f = new MinixFilesystem(TQT_TQOBJECT(this)); f->configure(verifylabel->isChecked(), labellabel->isChecked(), lineedit->text()); @@ -642,9 +642,9 @@ void FloppyData::format(){ formatActions->exec(); } -void FloppyData::formatStatus(const TQString &s,int p) +void FloppyData::formattqStatus(const TQString &s,int p) { - kdDebug(2002) << "FloppyData::formatStatus: " << s << " : " << p << endl; + kdDebug(2002) << "FloppyData::formattqStatus: " << s << " : " << p << endl; if (!s.isEmpty()) { const TQString oldText ( frame->text() ); diff --git a/kfloppy/floppy.h b/kfloppy/floppy.h index 49b0766..c95dbc6 100644 --- a/kfloppy/floppy.h +++ b/kfloppy/floppy.h @@ -44,9 +44,10 @@ class KFActionQueue; class FloppyData : public KDialog { Q_OBJECT + TQ_OBJECT public: - FloppyData(TQWidget* parent = 0, const char * name = 0); + FloppyData(TQWidget* tqparent = 0, const char * name = 0); virtual ~FloppyData(); /// Need to overload normal show() in order to mangle caption @@ -64,7 +65,7 @@ public: void readSettings(); /// Map stored settings to widget status void setWidgets(); - /// A kind of TQString::find() + /// A kind of TQString::tqfind() int findKeyWord(TQString &, const TQString &); /// Enable/disable all UI elements void setEnabled(bool); @@ -74,7 +75,7 @@ public slots: void format(); void reset(); - void formatStatus(const TQString &,int); + void formattqStatus(const TQString &,int); protected slots: diff --git a/kfloppy/format.cpp b/kfloppy/format.cpp index 485acc3..ea98530 100644 --- a/kfloppy/format.cpp +++ b/kfloppy/format.cpp @@ -34,7 +34,7 @@ #include "format.h" -static TQString extPath = TQString::null; +static TQString extPath = TQString(); /* static */ TQString findExecutable(const TQString &e) { @@ -51,8 +51,8 @@ static TQString extPath = TQString::null; -KFAction::KFAction(TQObject *parent) : - TQObject(parent) +KFAction::KFAction(TQObject *tqparent) : + TQObject(tqparent) { DEBUGSETUP; } @@ -79,8 +79,8 @@ public: TQPtrList<KFAction> list; } ; -KFActionQueue::KFActionQueue(TQObject *parent) : - KFAction(parent), +KFActionQueue::KFActionQueue(TQObject *tqparent) : + KFAction(tqparent), d(new KFActionQueue_p) { DEBUGSETUP; @@ -262,11 +262,11 @@ bool FloppyAction::configureDevice(int drive,int density) const char *devicename = 0L; deviceInfo=0L; - deviceName = TQString::null; + deviceName = TQString(); if ((drive<0) || (drive>1)) { - emit status(i18n("Unexpected drive number %1.").arg(drive),-1); + emit status(i18n("Unexpected drive number %1.").tqarg(drive),-1); return false; } @@ -278,7 +278,7 @@ bool FloppyAction::configureDevice(int drive,int density) } if (!deviceinfo) { - emit status(i18n("Unexpected density number %1.").arg(density),-1); + emit status(i18n("Unexpected density number %1.").tqarg(density),-1); return false; } @@ -294,7 +294,7 @@ bool FloppyAction::configureDevice(int drive,int density) if (!deviceinfo || !deviceinfo->devices) { emit status(i18n("Cannot find a device for drive %1 and density %2.") - .arg(drive).arg(density),-1); + .tqarg(drive).tqarg(density),-1); return false; } @@ -313,7 +313,7 @@ bool FloppyAction::configureDevice(int drive,int density) { const TQString str = i18n( "Cannot access %1\nMake sure that the device exists and that " - "you have write permission to it.").arg(deviceinfo->devices[0]); + "you have write permission to it.").tqarg(deviceinfo->devices[0]); emit status(str,-1); return false; } @@ -338,18 +338,18 @@ void FloppyAction::processDone(KProcess *p) { if (p->exitStatus() == 0) { - emit status(TQString::null,100); + emit status(TQString(),100); emit done(this,true); } else { - emit status(i18n("The program %1 terminated with an error.").arg(theProcessName),100); + emit status(i18n("The program %1 terminated with an error.").tqarg(theProcessName),100); emit done(this,false); } } else { - emit status(i18n("The program %1 terminated abnormally.").arg(theProcessName),100); + emit status(i18n("The program %1 terminated abnormally.").tqarg(theProcessName),100); emit done(this,false); } } @@ -358,7 +358,7 @@ void FloppyAction::processStdOut(KProcess *, char *b, int l) { Q_UNUSED(b); Q_UNUSED(l); - kdDebug(KFAREA) << "stdout:" << TQString::fromLatin1(b,l) << endl; + kdDebug(KFAREA) << "stdout:" << TQString::tqfromLatin1(b,l) << endl; } void FloppyAction::processStdErr(KProcess *p, char *b, int l) @@ -383,14 +383,14 @@ bool FloppyAction::startProcess() } -/* static */ TQString FDFormat::fdformatName = TQString::null; +/* static */ TQString FDFormat::fdformatName = TQString(); FDFormat::FDFormat(TQObject *p) : FloppyAction(p), doVerify(true) { DEBUGSETUP; - theProcessName = TQString::fromLatin1("fdformat"); + theProcessName = TQString::tqfromLatin1("fdformat"); setName("FDFormat"); } @@ -473,17 +473,17 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) if (b[0]=='F') { formatTrackCount++; - emit status(TQString::null, + emit status(TQString(), formatTrackCount * 100 / deviceInfo->tracks); } else if (b[0]=='E') { - emit status(i18n("Error formatting track %1.").arg(formatTrackCount),-1); + emit status(i18n("Error formatting track %1.").tqarg(formatTrackCount),-1); } else { - s = TQString::fromLatin1(b,l); - if (s.contains("ioctl(FD_FORM)")) + s = TQString::tqfromLatin1(b,l); + if (s.tqcontains("ioctl(FD_FORM)")) { emit status (i18n( "Cannot access floppy or floppy drive.\n" @@ -491,7 +491,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) "have selected a valid floppy drive."),-1); return; } - if (s.find("/dev/")>=0) + if (s.tqfind("/dev/")>=0) { emit status(s,-1); return; @@ -499,24 +499,24 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) DEBUGS(s); } #elif defined(ANY_LINUX) - s = TQString::fromLatin1(b,l); + s = TQString::tqfromLatin1(b,l); DEBUGS(s); TQRegExp regexp( "([0-9]+)" ); - if ( s.startsWith( "bad data at cyl" ) || ( s.find( "Problem reading cylinder" ) != -1 ) ) + if ( s.startsWith( "bad data at cyl" ) || ( s.tqfind( "Problem reading cylinder" ) != -1 ) ) { if ( regexp.search( s ) > -1 ) { const int track = regexp.cap(1).toInt(); - emit status(i18n("Low-level formatting error at track %1.").arg(track), -1); + emit status(i18n("Low-level formatting error at track %1.").tqarg(track), -1); } else { // This error should not happen - emit status(i18n("Low-level formatting error: %1").arg(s), -1); + emit status(i18n("Low-level formatting error: %1").tqarg(s), -1); } return; } - else if (s.find("ioctl(FDFMTBEG)")!=-1) + else if (s.tqfind("ioctl(FDFMTBEG)")!=-1) { emit status (i18n( "Cannot access floppy or floppy drive.\n" @@ -524,15 +524,15 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) "have selected a valid floppy drive."),-1); return; } - else if (s.find("busy")!=-1) // "Device or resource busy" + else if (s.tqfind("busy")!=-1) // "Device or resource busy" { emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1); return; } // Be careful to leave "iotcl" as last before checking numbers - else if (s.find("ioctl")!=-1) + else if (s.tqfind("ioctl")!=-1) { - emit status(i18n("Low-level format error: %1").arg(s),-1); + emit status(i18n("Low-level format error: %1").tqarg(s),-1); return; } // Check for numbers at last (as /dev/fd0u1440 has numbers too) @@ -542,7 +542,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) const int p = regexp.cap(1).toInt(); if ((p>=0) && (p<deviceInfo->tracks)) { - emit status(TQString::null, + emit status(TQString(), p * 100 / deviceInfo->tracks); } } @@ -551,13 +551,13 @@ void FDFormat::processStdOut(KProcess *, char *b, int l) } -/* static */ TQString DDZeroOut::m_ddName = TQString::null; +/* static */ TQString DDZeroOut::m_ddName = TQString(); DDZeroOut::DDZeroOut(TQObject *p) : FloppyAction(p) { kdDebug(KFAREA) << (__PRETTY_FUNCTION__) << endl; - theProcessName = TQString::fromLatin1("dd"); + theProcessName = TQString::tqfromLatin1("dd"); setName("DD"); } @@ -617,16 +617,16 @@ void DDZeroOut::processDone(KProcess *p) * * ### TODO: really check if the exit is not on an other error and then abort the formatting */ - emit status(TQString::null,100); + emit status(TQString(),100); emit done(this,true); } -/* static */ TQString FATFilesystem::newfs_fat = TQString::null ; +/* static */ TQString FATFilesystem::newfs_fat = TQString() ; -FATFilesystem::FATFilesystem(TQObject *parent) : - FloppyAction(parent) +FATFilesystem::FATFilesystem(TQObject *tqparent) : + FloppyAction(tqparent) { DEBUGSETUP; runtimeCheck(); @@ -656,7 +656,7 @@ bool FATFilesystem::configure(bool v,bool l,const TQString &lbl) if (l) label=lbl.simplifyWhiteSpace(); else - label=TQString::null; + label=TQString(); return true; } @@ -720,20 +720,20 @@ void FATFilesystem::processStdOut(KProcess *, char *b, int l) #ifdef ANY_BSD // ### TODO: do some checks #elif defined(ANY_LINUX) - TQString s ( TQString::fromLatin1( b, l ) ); + TQString s ( TQString::tqfromLatin1( b, l ) ); kdDebug(KFAREA) << s << endl; - if (s.find("mounted file system")!=-1) // "/dev/fd0 contains a mounted file system + if (s.tqfind("mounted file system")!=-1) // "/dev/fd0 contains a mounted file system { emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1); return; } - else if (s.find("busy")!=-1) // "Device or resource busy" + else if (s.tqfind("busy")!=-1) // "Device or resource busy" { emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1); return; } # if 0 - else if ( s.find( "mkdosfs" ) != -1 ) // DEBUG: get the program header and show it! + else if ( s.tqfind( "mkdosfs" ) != -1 ) // DEBUG: get the program header and show it! { emit status( s, -1 ); return; @@ -747,10 +747,10 @@ void FATFilesystem::processStdOut(KProcess *, char *b, int l) #ifdef ANY_BSD -/* static */ TQString UFSFilesystem::newfs = TQString::null ; +/* static */ TQString UFSFilesystem::newfs = TQString() ; -UFSFilesystem::UFSFilesystem(TQObject *parent) : - FloppyAction(parent) +UFSFilesystem::UFSFilesystem(TQObject *tqparent) : + FloppyAction(tqparent) { DEBUGSETUP; runtimeCheck(); @@ -792,7 +792,7 @@ void UFSFilesystem::exec() // ### TODO: is it still needed? (FreeBSD 5.3's man page says: "For backward compatibility.") if ( deviceInfo ) - *p << "-T" << TQString("fd%1").arg(deviceInfo->blocks); + *p << "-T" << TQString("fd%1").tqarg(deviceInfo->blocks); *p << deviceName; @@ -806,10 +806,10 @@ void UFSFilesystem::exec() -/* static */ TQString Ext2Filesystem::newfs = TQString::null ; +/* static */ TQString Ext2Filesystem::newfs = TQString() ; -Ext2Filesystem::Ext2Filesystem(TQObject *parent) : - FloppyAction(parent) +Ext2Filesystem::Ext2Filesystem(TQObject *tqparent) : + FloppyAction(tqparent) { DEBUGSETUP; runtimeCheck(); @@ -836,7 +836,7 @@ bool Ext2Filesystem::configure(bool v,bool l,const TQString &lbl) } else { - label=TQString::null; + label=TQString(); } return true; @@ -886,14 +886,14 @@ void Ext2Filesystem::processStdOut(KProcess *, char *b, int l) #ifdef ANY_BSD // ### TODO: do some checks #elif defined(ANY_LINUX) - TQString s ( TQString::fromLatin1( b, l ) ); + TQString s ( TQString::tqfromLatin1( b, l ) ); kdDebug(KFAREA) << s << endl; - if (s.find("mounted")!=-1) // "/dev/fd0 is mounted; will not make a filesystem here!" + if (s.tqfind("mounted")!=-1) // "/dev/fd0 is mounted; will not make a filesystem here!" { emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1); return; } - else if (s.find("busy")!=-1) // "Device or resource busy" + else if (s.tqfind("busy")!=-1) // "Device or resource busy" { emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1); return; @@ -904,10 +904,10 @@ void Ext2Filesystem::processStdOut(KProcess *, char *b, int l) #ifdef ANY_LINUX -/* static */ TQString MinixFilesystem::newfs = TQString::null ; +/* static */ TQString MinixFilesystem::newfs = TQString() ; -MinixFilesystem::MinixFilesystem(TQObject *parent) : - FloppyAction(parent) +MinixFilesystem::MinixFilesystem(TQObject *tqparent) : + FloppyAction(tqparent) { DEBUGSETUP; runtimeCheck(); @@ -934,7 +934,7 @@ bool MinixFilesystem::configure(bool v,bool l,const TQString &lbl) } else { - label=TQString::null; + label=TQString(); } return true; @@ -977,14 +977,14 @@ void MinixFilesystem::exec() void MinixFilesystem::processStdOut(KProcess *, char *b, int l) { - TQString s ( TQString::fromLatin1( b, l ) ); + TQString s ( TQString::tqfromLatin1( b, l ) ); kdDebug(KFAREA) << s << endl; - if (s.find("mounted")!=-1) // "mkfs.minix: /dev/fd0 is mounted; will not make a filesystem here!" + if (s.tqfind("mounted")!=-1) // "mkfs.minix: /dev/fd0 is mounted; will not make a filesystem here!" { emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1); return; } - else if (s.find("busy")!=-1) // "Device or resource busy" + else if (s.tqfind("busy")!=-1) // "Device or resource busy" { emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1); return; diff --git a/kfloppy/format.h b/kfloppy/format.h index 6f8de58..f4c57c8 100644 --- a/kfloppy/format.h +++ b/kfloppy/format.h @@ -63,12 +63,13 @@ * and push a bunch of actions on it, then run exec() * on the stack and wait for the done() signal. */ -class KFAction : public QObject +class KFAction : public TQObject { Q_OBJECT + TQ_OBJECT public: - KFAction(TQObject *parent = 0L); + KFAction(TQObject *tqparent = 0L); virtual ~KFAction(); public slots: @@ -115,9 +116,10 @@ signals: class KFActionQueue : public KFAction { Q_OBJECT + TQ_OBJECT public: - KFActionQueue(TQObject *parent = 0L); + KFActionQueue(TQObject *tqparent = 0L); virtual ~KFActionQueue(); /** @@ -174,9 +176,10 @@ class KProcess; class FloppyAction : public KFAction { Q_OBJECT + TQ_OBJECT public: - FloppyAction(TQObject *parent = 0L); + FloppyAction(TQObject *tqparent = 0L); /** * Kills the running process, if one exists. @@ -249,7 +252,7 @@ protected: class FDFormat : public FloppyAction { public: - FDFormat(TQObject *parent = 0L); + FDFormat(TQObject *tqparent = 0L); virtual void exec(); @@ -285,7 +288,7 @@ protected: class DDZeroOut : public FloppyAction { public: - DDZeroOut(TQObject *parent = 0L); + DDZeroOut(TQObject *tqparent = 0L); virtual void exec(); @@ -315,7 +318,7 @@ protected: class FATFilesystem : public FloppyAction { public: - FATFilesystem(TQObject *parent = 0L); + FATFilesystem(TQObject *tqparent = 0L); virtual void exec(); @@ -346,7 +349,7 @@ protected: class Ext2Filesystem : public FloppyAction { public: - Ext2Filesystem(TQObject *parent = 0L); + Ext2Filesystem(TQObject *tqparent = 0L); virtual void exec(); @@ -374,7 +377,7 @@ protected: class UFSFilesystem : public FloppyAction { public: - UFSFilesystem(TQObject *parent = 0L); + UFSFilesystem(TQObject *tqparent = 0L); virtual void exec(); @@ -396,7 +399,7 @@ protected: class MinixFilesystem : public FloppyAction { public: - MinixFilesystem(TQObject *parent = 0L); + MinixFilesystem(TQObject *tqparent = 0L); virtual void exec(); diff --git a/kfloppy/zip.cpp b/kfloppy/zip.cpp index 51da7ef..e774a8f 100644 --- a/kfloppy/zip.cpp +++ b/kfloppy/zip.cpp @@ -188,7 +188,7 @@ void ZipFormat::transition() << "if=/dev/zero" << "of=/dev/afd0c" << "bs=8192" ; - *p << TQString("count=%1").arg(totalBlocks); + *p << TQString("count=%1").tqarg(totalBlocks); if (!p->start(KProcess::NotifyOnExit,KProcess::AllOutput)) { emit statusMessage(i18n("Cannot start dd to zero disk.")); @@ -250,8 +250,8 @@ void ZipFormat::processResult(KProcess *, char *b, int l) DEBUGSETUP; #ifdef DEBUG - TQString o = TQString::fromLatin1(b,l); - DEBUGS(TQString(" %1").arg(o).latin1()); + TQString o = TQString::tqfromLatin1(b,l); + DEBUGS(TQString(" %1").tqarg(o).latin1()); #endif switch(formatStep) @@ -264,8 +264,8 @@ void ZipFormat::processResult(KProcess *, char *b, int l) if (totalBlocks>10000) { emit statusMessage(i18n("Zeroing block %1 of %2...") - .arg(currentblock) - .arg(totalBlocks)); + .tqarg(currentblock) + .tqarg(totalBlocks)); } } break; @@ -283,7 +283,7 @@ void ZipFormat::processResult(KProcess *, char *b, int l) // emit setProgress(1); - // TQString myBuf = TQString::fromLatin1(b, l); + // TQString myBuf = TQString::tqfromLatin1(b, l); // DEBUGS(myBuf.latin1()); } break; diff --git a/kfloppy/zip.h b/kfloppy/zip.h index 93cb234..b422c92 100644 --- a/kfloppy/zip.h +++ b/kfloppy/zip.h @@ -47,6 +47,7 @@ class KConfig; class ZipFormat : public DiskFormat { Q_OBJECT + TQ_OBJECT public: ZipFormat(TQWidget *w, const char *n); diff --git a/kgpg/adduid.ui b/kgpg/adduid.ui index b7e5b1b..0fbaa39 100644 --- a/kgpg/adduid.ui +++ b/kgpg/adduid.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>AddUid</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AddUid</cstring> </property> @@ -34,7 +34,7 @@ <cstring>kLineEdit3</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -42,7 +42,7 @@ <string>Name (minimum 5 characters):</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -50,7 +50,7 @@ <string>Email:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -60,5 +60,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kgpg/conf_decryption.ui b/kgpg/conf_decryption.ui index bec30e9..4034ba5 100644 --- a/kgpg/conf_decryption.ui +++ b/kgpg/conf_decryption.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Decryption</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Decryption</cstring> </property> @@ -40,14 +40,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>155</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> @@ -62,8 +62,8 @@ </widget> </grid> </widget> -<slots> +<Q_SLOTS> <slot>use_agent_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kgpg/conf_encryption.ui b/kgpg/conf_encryption.ui index c4d9f7f..184acf9 100644 --- a/kgpg/conf_encryption.ui +++ b/kgpg/conf_encryption.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>Encryption</class> <author>bj@altern.org</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Encryption</cstring> </property> @@ -23,7 +23,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_PgpCompatibility</cstring> </property> @@ -38,11 +38,11 @@ <p>Checking this option forces GnuPG to output encrypted packets that are as compliant with PGP (Pretty Good Privacy) 6 standards as possible thus allowing GnuPG users to inter operate with PGP 6 users.</p></qt></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_AsciiArmor</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -56,7 +56,7 @@ <p>Checking this option outputs all encrypted files in a format that can be opened by a text editor and as such the output is suitable for placing in the body of an e-mail message.</p></qt></string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_HideUserID</cstring> </property> @@ -68,7 +68,7 @@ <p>Checking this option will remove the keyid of the recipient from all encrypted packets. The advantage: traffic analysis of the encrypted packets cannot be performed as easily because the recipient is unknown. The disadvantage: the receiver of the encrypted packets is forced to try all secret keys before being able to decrypt the packets. This can be a lengthy process depending on the number of secret keys the receiver holds.</p></qt></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_ShredSource</cstring> </property> @@ -80,7 +80,7 @@ <p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered. But <b>you must be aware that this is not 100% secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt></string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_AllowUntrustedKeys</cstring> </property> @@ -102,22 +102,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>72</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="4"> + <widget class="TQLayoutWidget" row="7" column="0" rowspan="1" colspan="4"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_AllowCustomEncryptionOptions</cstring> </property> @@ -155,7 +155,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_PgpExtension</cstring> </property> @@ -167,7 +167,7 @@ <p>Checking this option will append a .pgp extension to all encrypted files instead of a .gpg extension. This option will maintain compatibility with users of PGP (Pretty Good Privacy) software.</p></qt></string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -193,7 +193,7 @@ <p>Checking this option and selecting a key will force any file encryption operation to use the selected key. KGpg will not query for a recipient and the default key will be bypassed.</p></qt></string> </property> </widget> - <widget class="QToolButton" row="6" column="2"> + <widget class="TQToolButton" row="6" column="2"> <property name="name"> <cstring>clear_fkey</cstring> </property> @@ -225,7 +225,7 @@ <string>Change...</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -267,7 +267,7 @@ <string>Change...</string> </property> </widget> - <widget class="QToolButton" row="5" column="2"> + <widget class="TQToolButton" row="5" column="2"> <property name="name"> <cstring>clear_akey</cstring> </property> @@ -310,10 +310,10 @@ <includes> <include location="local" impldecl="in implementation">conf_encryption.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>allow_custom_option_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kgpg/conf_encryption.ui.h b/kgpg/conf_encryption.ui.h index 15310b6..2221856 100644 --- a/kgpg/conf_encryption.ui.h +++ b/kgpg/conf_encryption.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kgpg/conf_gpg.ui b/kgpg/conf_gpg.ui index 9cbf931..d919ded 100644 --- a/kgpg/conf_gpg.ui +++ b/kgpg/conf_gpg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>GPGConf</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GPGConf</cstring> </property> @@ -24,7 +24,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -35,7 +35,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_5_2</cstring> </property> @@ -43,7 +43,7 @@ <string>Configuration file:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_5_2_2</cstring> </property> @@ -68,7 +68,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>changeHome</cstring> </property> @@ -103,7 +103,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>190</width> <height>20</height> @@ -122,14 +122,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>54</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>use_agent</cstring> </property> @@ -137,7 +137,7 @@ <string>&Use GnuPG agent</string> </property> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox2_2</cstring> </property> @@ -148,7 +148,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_PubKeyring</cstring> </property> @@ -156,7 +156,7 @@ <string>Pu&blic:</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_PrivKeyring</cstring> </property> @@ -164,9 +164,9 @@ <string>Private:</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <vbox> <property name="name"> @@ -190,7 +190,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_OnlyAdditional</cstring> </property> @@ -205,7 +205,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kgpg/conf_misc.ui b/kgpg/conf_misc.ui index bfeb9c8..5b8548d 100644 --- a/kgpg/conf_misc.ui +++ b/kgpg/conf_misc.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MiscConf</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MiscConf</cstring> </property> @@ -19,11 +19,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>miscWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_AutoStart</cstring> </property> @@ -49,11 +49,11 @@ <p>If checked KGpg will start automatically each time that KDE starts up.</p></qt></string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_UseMouseSelection</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -67,11 +67,11 @@ <p>If checked, clipboard operations in KGpg will use the selection clipboard, that means highlighting a text to copy, and middle button (or right+left together) to paste. If this option is not checked, the clipboard will work with Key shortcuts (Ctrl-c, Ctrl-v).</p></qt> </string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_RemoteFileWarn</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -86,7 +86,7 @@ <p></p></qt></string> </property> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>groupShred</cstring> </property> @@ -107,14 +107,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>pushShredder</cstring> </property> @@ -122,7 +122,7 @@ <string>Install Shredder</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -132,18 +132,18 @@ It will shred (overwrite several times before erasing) the files you drop on it, making it almost impossible to recover the original file.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignJustify|AlignTop</set> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>shredInfo</cstring> </property> <property name="text"> <string>textLabel5</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -159,7 +159,7 @@ the original file.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>71</height> @@ -168,7 +168,7 @@ the original file.</string> </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -179,7 +179,7 @@ the original file.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -187,7 +187,7 @@ the original file.</string> <string>Left mouse click opens (restart KGpg to apply):</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Key Manager</string> @@ -220,14 +220,14 @@ the original file.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>91</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox11</cstring> </property> @@ -238,7 +238,7 @@ the original file.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -259,7 +259,7 @@ the original file.</string> </qt></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -325,7 +325,7 @@ the original file.</string> </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -336,7 +336,7 @@ the original file.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_3_2</cstring> </property> @@ -349,7 +349,7 @@ the original file.</string> </qt></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -409,5 +409,5 @@ the original file.</string> </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kgpg/conf_servers.ui b/kgpg/conf_servers.ui index 022eca7..075d782 100644 --- a/kgpg/conf_servers.ui +++ b/kgpg/conf_servers.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ServerConf</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ServerConf</cstring> </property> @@ -80,15 +80,15 @@ </sizepolicy> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -98,7 +98,7 @@ Only the default server will be stored in GnuPG's configuration file, all others will be stored for use by KGpg only.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_UseProxy</cstring> </property> @@ -110,7 +110,7 @@ all others will be stored for use by KGpg only.</string> </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>klistbox.h</includehint> diff --git a/kgpg/conf_ui2.ui b/kgpg/conf_ui2.ui index 98e622b..26e3d79 100644 --- a/kgpg/conf_ui2.ui +++ b/kgpg/conf_ui2.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>UIConf</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>UIConf</cstring> </property> @@ -19,11 +19,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget3</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -42,7 +42,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_3_3</cstring> </property> @@ -65,7 +65,7 @@ </color> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -73,7 +73,7 @@ <string>Trusted keys:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> @@ -81,7 +81,7 @@ <string>Expired/disabled keys:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2_3</cstring> </property> @@ -129,7 +129,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>210</height> @@ -146,7 +146,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>140</width> <height>20</height> @@ -155,7 +155,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -168,7 +168,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kgpg/detailedconsole.cpp b/kgpg/detailedconsole.cpp index 3251056..308eec8 100644 --- a/kgpg/detailedconsole.cpp +++ b/kgpg/detailedconsole.cpp @@ -30,8 +30,8 @@ #include "detailedconsole.h" -KDetailedConsole::KDetailedConsole(TQWidget *parent, const char *name,const TQString &boxLabel,const TQString &errormessage) - : KDialogBase(parent,name,true,i18n("Sorry"),KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok) +KDetailedConsole::KDetailedConsole(TQWidget *tqparent, const char *name,const TQString &boxLabel,const TQString &errormessage) + : KDialogBase(tqparent,name,true,i18n("Sorry"),KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok) { TQWidget *page = new TQWidget( this ); setMainWidget(page); @@ -42,7 +42,7 @@ KDetailedConsole::KDetailedConsole(TQWidget *parent, const char *name,const TQSt TQVGroupBox *detailsGroup = new TQVGroupBox( i18n("Details"), page); (void) new TQLabel(errormessage,detailsGroup); - //labdetails->setMinimumSize(labdetails->sizeHint()); + //labdetails->setMinimumSize(labdetails->tqsizeHint()); setDetailsWidget(detailsGroup); vbox->addWidget(lab1); @@ -51,12 +51,12 @@ KDetailedConsole::KDetailedConsole(TQWidget *parent, const char *name,const TQSt KDetailedConsole::~KDetailedConsole() {} -KDetailedInfo::KDetailedInfo(TQWidget *parent, const char *name , const TQString &boxLabel,const TQString &errormessage,TQStringList keysList) - : KDialogBase(Swallow, i18n("Info"),KDialogBase::Details|KDialogBase::Ok, KDialogBase::Ok,parent,name,true) +KDetailedInfo::KDetailedInfo(TQWidget *tqparent, const char *name , const TQString &boxLabel,const TQString &errormessage,TQStringList keysList) + : KDialogBase(Swallow, i18n("Info"),KDialogBase::Details|KDialogBase::Ok, KDialogBase::Ok,tqparent,name,true) { bool checkboxResult; KMessageBox::createKMessageBox(this, TQMessageBox::Information, - boxLabel, keysList,TQString::null,&checkboxResult, 0,errormessage); + boxLabel, keysList,TQString(),&checkboxResult, 0,errormessage); } KDetailedInfo::~KDetailedInfo() diff --git a/kgpg/detailedconsole.h b/kgpg/detailedconsole.h index 282516c..ef91446 100644 --- a/kgpg/detailedconsole.h +++ b/kgpg/detailedconsole.h @@ -24,7 +24,7 @@ class KDetailedConsole : public KDialogBase { public: - KDetailedConsole(TQWidget *parent=0, const char *name=0,const TQString &boxLabel=TQString::null,const TQString &errormessage=TQString::null); + KDetailedConsole(TQWidget *tqparent=0, const char *name=0,const TQString &boxLabel=TQString(),const TQString &errormessage=TQString()); ~KDetailedConsole(); }; @@ -34,7 +34,7 @@ class KDetailedInfo : public KDialogBase { public: - KDetailedInfo(TQWidget *parent=0, const char *name=0,const TQString &boxLabel=TQString::null,const TQString &errormessage=TQString::null,TQStringList keysList=TQStringList()); + KDetailedInfo(TQWidget *tqparent=0, const char *name=0,const TQString &boxLabel=TQString(),const TQString &errormessage=TQString(),TQStringList keysList=TQStringList()); ~KDetailedInfo(); }; diff --git a/kgpg/groupedit.ui b/kgpg/groupedit.ui index ca96e4b..41e66fe 100644 --- a/kgpg/groupedit.ui +++ b/kgpg/groupedit.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>groupEdit</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>groupEdit</cstring> </property> @@ -85,7 +85,7 @@ </color> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -101,7 +101,7 @@ <string>Available Trusted Keys</string> </property> </widget> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>buttonAdd</cstring> </property> @@ -109,7 +109,7 @@ <string></string> </property> </widget> - <widget class="QPushButton" row="2" column="2"> + <widget class="TQPushButton" row="2" column="2"> <property name="name"> <cstring>buttonRemove</cstring> </property> @@ -127,7 +127,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -205,7 +205,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kactivelabel.h</includehint> </includehints> diff --git a/kgpg/keyexport.ui b/kgpg/keyexport.ui index 35f4128..6ac8100 100644 --- a/kgpg/keyexport.ui +++ b/kgpg/keyexport.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KeyExport</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KeyExport</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>350</width> <height>0</height> @@ -33,7 +33,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>exportAttributes</cstring> </property> @@ -54,14 +54,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -72,7 +72,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>checkMail</cstring> </property> @@ -80,7 +80,7 @@ <string>Email</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>checkServer</cstring> </property> @@ -88,7 +88,7 @@ <string>Default key server</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>checkClipboard</cstring> </property> @@ -104,7 +104,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>checkFile</cstring> </property> @@ -132,10 +132,10 @@ <includes> <include location="local" impldecl="in implementation">keyexport.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>checkFile_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> </includehints> diff --git a/kgpg/keyexport.ui.h b/kgpg/keyexport.ui.h index 89ef491..ac06c1f 100644 --- a/kgpg/keyexport.ui.h +++ b/kgpg/keyexport.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kgpg/keygener.cpp b/kgpg/keygener.cpp index 26ecebe..5dfd9c7 100644 --- a/kgpg/keygener.cpp +++ b/kgpg/keygener.cpp @@ -34,7 +34,7 @@ #include "keygener.h" /////////////////////// main window -keyGenerate::keyGenerate(TQWidget *parent, const char *name):KDialogBase( parent, name, true,i18n("Key Generation"),Apply | Ok | Cancel) +keyGenerate::keyGenerate(TQWidget *tqparent, const char *name):KDialogBase( tqparent, name, true,i18n("Key Generation"),Apply | Ok | Cancel) { expert=false; setButtonApply(i18n("Expert Mode")); @@ -64,7 +64,7 @@ keyGenerate::keyGenerate(TQWidget *parent, const char *name):KDialogBase( parent keyexp->insertItem(i18n("Weeks"),2); keyexp->insertItem(i18n("Months"),3); keyexp->insertItem(i18n("Years"),4); - keyexp->setMinimumSize(keyexp->sizeHint()); + keyexp->setMinimumSize(keyexp->tqsizeHint()); connect(keyexp,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activateexp(int))); (void) new TQLabel(i18n("Key size:"),bgroup1); @@ -74,17 +74,17 @@ keyGenerate::keyGenerate(TQWidget *parent, const char *name):KDialogBase( parent keysize->insertItem("2048"); keysize->insertItem("4096"); keysize->setCurrentItem("1024"); - keysize->setMinimumSize(keysize->sizeHint()); + keysize->setMinimumSize(keysize->tqsizeHint()); (void) new TQLabel(i18n("Algorithm:"),bgroup1); keykind = new KComboBox(bgroup1); keykind->insertItem("DSA & ElGamal"); keykind->insertItem("RSA"); - keykind->setMinimumSize(keykind->sizeHint()); + keykind->setMinimumSize(keykind->tqsizeHint()); vbox->addWidget(bgroup1); page->show(); - page->resize(page->maximumSize()); + page->resize(page->tqmaximumSize()); setMainWidget(page); } @@ -99,7 +99,7 @@ void keyGenerate::slotOk() { if (KMessageBox::warningContinueCancel(this,i18n("You are about to create a key with no email address"))!=KMessageBox::Continue) return; } - else if ((vmail.find(" ")!=-1) || (vmail.find(".")==-1) || (vmail.find("@")==-1)) { + else if ((vmail.tqfind(" ")!=-1) || (vmail.tqfind(".")==-1) || (vmail.tqfind("@")==-1)) { KMessageBox::sorry(this,i18n("Email address not valid")); return; } diff --git a/kgpg/keygener.h b/kgpg/keygener.h index f9d662d..ba8c03c 100644 --- a/kgpg/keygener.h +++ b/kgpg/keygener.h @@ -25,8 +25,9 @@ class KLineEdit; class keyGenerate : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - keyGenerate(TQWidget *parent=0, const char *name=0); + keyGenerate(TQWidget *tqparent=0, const char *name=0); KComboBox *keykind,*keysize,*keyexp; KLineEdit *numb,*comment,*kname,*mail; diff --git a/kgpg/keyinfowidget.cpp b/kgpg/keyinfowidget.cpp index 21dbb1c..1264673 100644 --- a/kgpg/keyinfowidget.cpp +++ b/kgpg/keyinfowidget.cpp @@ -43,7 +43,7 @@ #include "kgpgsettings.h" #include "kgpginterface.h" -KgpgKeyInfo::KgpgKeyInfo(TQWidget *parent, const char *name,TQString sigkey):KDialogBase( Swallow, i18n("Key Properties"), Close, Close, parent, name,true) +KgpgKeyInfo::KgpgKeyInfo(TQWidget *tqparent, const char *name,TQString sigkey):KDialogBase( Swallow, i18n("Key Properties"), Close, Close, tqparent, name,true) { FILE *pass; @@ -85,7 +85,7 @@ KgpgKeyInfo::KgpgKeyInfo(TQWidget *parent, const char *name,TQString sigkey):KDi connect(prop->kCOwnerTrust,TQT_SIGNAL(activated (int)),this,TQT_SLOT(slotChangeTrust(int))); connect(this,TQT_SIGNAL(changeMainPhoto(const TQPixmap&)),this,TQT_SLOT(slotSetPhoto(const TQPixmap&))); - //prop->setMinimumSize(prop->sizeHint()); + //prop->setMinimumSize(prop->tqsizeHint()); } void KgpgKeyInfo::slotDisableKey(bool isOn) @@ -107,7 +107,7 @@ keyWasChanged=true; void KgpgKeyInfo::loadKey(TQString Keyid) { TQColor trustColor; -TQString fingervalue=TQString::null; +TQString fingervalue=TQString(); FILE *pass; char line[200]=""; TQString gpgOutput,fullID; @@ -188,7 +188,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin break; } - if (gpgOutput.section(':',11,11).find("D",0,true)!=-1) // disabled key + if (gpgOutput.section(':',11,11).tqfind("D",0,true)!=-1) // disabled key { tr=i18n("Disabled"); trustColor=KGpgSettings::colorBad(); @@ -241,15 +241,15 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin } prop->kCOwnerTrust->setCurrentItem(ownerTrust); - if (fullname.find("<")!=-1) { + if (fullname.tqfind("<")!=-1) { TQString kmail=fullname; - if (fullname.find(")")!=-1) + if (fullname.tqfind(")")!=-1) kmail=kmail.section(')',1); kmail=kmail.section('<',1); kmail.truncate(kmail.length()-1); - if (kmail.find("<")!=-1) //////// several email addresses in the same key + if (kmail.tqfind("<")!=-1) //////// several email addresses in the same key { - kmail=kmail.replace(">",";"); + kmail=kmail.tqreplace(">",";"); kmail.remove("<"); } prop->tLMail->setText("<qt><a href=mailto:"+kmail+">"+kmail+"</a></qt>"); @@ -257,7 +257,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin prop->tLMail->setText(i18n("none")); TQString kname=fullname.section('<',0,0); - if (fullname.find("(")!=-1) { + if (fullname.tqfind("(")!=-1) { kname=kname.section('(',0,0); TQString comment=fullname.section('(',1,1); comment=comment.section(')',0,0); @@ -265,7 +265,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin } else prop->tLComment->setText(i18n("none")); - prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).replace(TQRegExp("<"),"<")+"</b></qt>"); + prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).tqreplace(TQRegExp("<"),"<")+"</b></qt>"); } if (gpgOutput.startsWith("fpr") && (fingervalue.isNull())) { @@ -294,7 +294,7 @@ void KgpgKeyInfo::reloadMainPhoto(const TQString &uid) kgpginfotmp->setAutoDelete(true); TQString pgpgOutput="cp %i "+kgpginfotmp->name(); KProcIO *p=new KProcIO(); - *p<<"gpg"<<"--no-tty"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput); + *p<<"gpg"<<"--no-tty"<<"--show-photos"<<"--photo-viewer"<<TQString(TQFile::encodeName(pgpgOutput)); *p<<"--edit-key"<<displayedKeyID<<"uid"<<uid<<"showphoto"; TQObject::connect(p, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(finishphotoreadprocess(KProcIO *))); TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotMainImageRead(KProcess *))); @@ -321,7 +321,7 @@ void KgpgKeyInfo::slotSetPhoto(const TQPixmap &pix) { TQImage dup=pix.convertToImage(); TQPixmap dup2; -dup2.convertFromImage(dup.scale(prop->pLPhoto->width(),prop->pLPhoto->height(),TQImage::ScaleMin)); +dup2.convertFromImage(dup.scale(prop->pLPhoto->width(),prop->pLPhoto->height(),TQ_ScaleMin)); prop->pLPhoto->setPixmap(dup2); } @@ -330,10 +330,10 @@ prop->pLPhoto->setPixmap(dup2); void KgpgKeyInfo::finishphotoreadprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) - if (required.find("keyedit.prompt")!=-1) { - p->writeStdin("quit"); + if (required.tqfind("keyedit.prompt")!=-1) { + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -346,7 +346,7 @@ void KgpgKeyInfo::openPhoto() KService::Ptr ptr = offers.first(); //KMessageBox::sorry(0,ptr->desktopEntryName()); KProcIO *p=new KProcIO(); - *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(ptr->desktopEntryName()+" %i")<<"--list-keys"<<displayedKeyID; + *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQString(TQFile::encodeName(ptr->desktopEntryName()+" %i"))<<"--list-keys"<<displayedKeyID; p->start(KProcess::DontCare,true); } @@ -378,14 +378,14 @@ chdate->show(); void KgpgKeyInfo::slotCheckDate(TQDate date) { -chdate->enableButtonOK(date>=TQDate::currentDate ()); +chdate->enableButtonOK(date>=TQDate::tqcurrentDate ()); } void KgpgKeyInfo::slotChangeDate() { KgpgInterface *KeyExpirationProcess=new KgpgInterface(); if (kb->isChecked()) - KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,TQDate::currentDate(),true); + KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,TQDate::tqcurrentDate(),true); else KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,kdt->date(),false); connect(KeyExpirationProcess,TQT_SIGNAL(expirationFinished(int)),this,TQT_SLOT(slotInfoExpirationChanged(int))); @@ -401,7 +401,7 @@ chdate->enableButtonOK(true); else { kdt->setEnabled(true); -chdate->enableButtonOK(kdt->date()>=TQDate::currentDate ()); +chdate->enableButtonOK(kdt->date()>=TQDate::tqcurrentDate ()); } } @@ -430,14 +430,14 @@ void KgpgKeyInfo::slotChangeTrust(int newTrust) void KgpgKeyInfo::slotInfoPasswordChanged() { -KPassivePopup::message(i18n("Passphrase for the key was changed"),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this); +KPassivePopup::message(i18n("Passphrase for the key was changed"),TQString(),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this); } void KgpgKeyInfo::slotInfoTrustChanged() { keyWasChanged=true; loadKey(displayedKeyID); -//KPassivePopup::message(i18n("Owner trust of the key was changed"),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this,0,600); +//KPassivePopup::message(i18n("Owner trust of the key was changed"),TQString(),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this,0,600); } void KgpgKeyInfo::slotInfoExpirationChanged(int res) diff --git a/kgpg/keyinfowidget.h b/kgpg/keyinfowidget.h index 0c90955..8d9bc3f 100644 --- a/kgpg/keyinfowidget.h +++ b/kgpg/keyinfowidget.h @@ -33,10 +33,11 @@ class KProcIO; class KgpgKeyInfo : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KgpgKeyInfo( TQWidget *parent = 0, const char *name = 0,TQString sigkey=0); + KgpgKeyInfo( TQWidget *tqparent = 0, const char *name = 0,TQString sigkey=0); ~KgpgKeyInfo(); KeyProperties *prop; diff --git a/kgpg/keyproperties.ui b/kgpg/keyproperties.ui index 4a44ea9..873b8ea 100644 --- a/kgpg/keyproperties.ui +++ b/kgpg/keyproperties.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KeyProperties</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KeyProperties</cstring> </property> @@ -30,15 +30,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="0" column="3" rowspan="7" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="3" rowspan="7" colspan="1"> <property name="name"> - <cstring>layout39</cstring> + <cstring>tqlayout39</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pLPhoto</cstring> </property> @@ -50,13 +50,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>120</width> <height>140</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>140</height> @@ -81,7 +81,7 @@ <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="whatsThis" stdset="0"> @@ -90,15 +90,15 @@ </qt></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -115,15 +115,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="7" column="3" rowspan="4" colspan="1"> + <widget class="TQLayoutWidget" row="7" column="3" rowspan="4" colspan="1"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbDisabled</cstring> </property> @@ -131,7 +131,7 @@ <string>Disable key</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>changeExp</cstring> </property> @@ -150,7 +150,7 @@ <string>Change Expiration...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>changePass</cstring> </property> @@ -171,7 +171,7 @@ </widget> </vbox> </widget> - <widget class="QLabel" row="9" column="0"> + <widget class="TQLabel" row="9" column="0"> <property name="name"> <cstring>labelLength</cstring> </property> @@ -182,7 +182,7 @@ <string>Length:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>labelCreation</cstring> </property> @@ -193,7 +193,7 @@ <string>Creation:</string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>labelID</cstring> </property> @@ -204,7 +204,7 @@ <string>Key ID:</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>tLTrust_2</cstring> </property> @@ -223,7 +223,7 @@ <string>Owner trust:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>tLMail2_2</cstring> </property> @@ -234,7 +234,7 @@ <string>Email:</string> </property> </widget> - <widget class="QLabel" row="8" column="0"> + <widget class="TQLabel" row="8" column="0"> <property name="name"> <cstring>labelAlgo</cstring> </property> @@ -245,7 +245,7 @@ <string>Algorithm:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>labelExpiration</cstring> </property> @@ -256,7 +256,7 @@ <string>Expiration:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>txtTrust</cstring> </property> @@ -275,7 +275,7 @@ <string>Trust:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>tLComment2_2</cstring> </property> @@ -286,7 +286,7 @@ <string>Comment:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>tLName2_2</cstring> </property> @@ -308,7 +308,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="10" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="10" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>tLID_2</cstring> </property> @@ -329,7 +329,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="5" column="2"> + <widget class="TQLabel" row="5" column="2"> <property name="name"> <cstring>pixmapTrust</cstring> </property> @@ -417,7 +417,7 @@ <cstring>kCOwnerTrust</cstring> </property> </widget> - <widget class="QLabel" row="5" column="1"> + <widget class="TQLabel" row="5" column="1"> <property name="name"> <cstring>kLTrust</cstring> </property> @@ -433,7 +433,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="9" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="9" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>tLLength</cstring> </property> @@ -449,7 +449,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="8" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="8" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>tLAlgo</cstring> </property> @@ -495,7 +495,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kactivelabel.h</includehint> <includehint>kactivelabel.h</includehint> diff --git a/kgpg/keyserver.ui b/kgpg/keyserver.ui index 44d42c9..097702d 100644 --- a/kgpg/keyserver.ui +++ b/kgpg/keyserver.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>keyServerWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>keyServerWidget</cstring> </property> @@ -19,11 +19,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -67,7 +67,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <cstring>kLEimportid</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -78,7 +78,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <string><qt><b>Key Server:</b><br /> <p>A Key Server is a centralized repository of PGP/GnuPG keys connected to the Internet which can be conveniently accessed in order to obtain or deposit keys. Select from the drop down list to specify which key server should be used.</p> <p>Often these keys are held by people whom the user has never met and as such the authenticity is dubious at best. Refer to the GnuPG manual covering "Web-of-Trust" relationships to find out how GnuPG works around the problem of verifying authenticity.</p> </qt></string> </property> </widget> - <widget class="QPushButton" row="6" column="0"> + <widget class="TQPushButton" row="6" column="0"> <property name="name"> <cstring>Buttonsearch</cstring> </property> @@ -89,7 +89,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="6" column="1" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="6" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>Buttonimport</cstring> </property> @@ -107,7 +107,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -124,7 +124,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -141,14 +141,14 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>160</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>cBproxyI</cstring> </property> @@ -180,7 +180,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -191,7 +191,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="7" column="0"> + <widget class="TQPushButton" row="7" column="0"> <property name="name"> <cstring>Buttonexport</cstring> </property> @@ -214,7 +214,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>250</width> <height>20</height> @@ -231,7 +231,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <cstring>kCBexportkey</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -239,7 +239,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <string>Key server:</string> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -262,7 +262,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -279,7 +279,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -305,7 +305,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>cBproxyE</cstring> </property> @@ -316,7 +316,7 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG <string>Honor HTTP proxy:</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>exportAttributes</cstring> </property> @@ -332,5 +332,5 @@ Allows the user to select the Key Server which will be used to import PGP/GnuPG </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kgpg/keyservers.cpp b/kgpg/keyservers.cpp index bbe22bd..ce16dc1 100644 --- a/kgpg/keyservers.cpp +++ b/kgpg/keyservers.cpp @@ -52,7 +52,7 @@ #include "detailedconsole.h" #include "keyservers.h" -keyServer::keyServer(TQWidget *parent, const char *name,bool modal,bool autoClose):KDialogBase( Swallow, i18n("Key Server"), Close, Close, parent, name,modal) +keyServer::keyServer(TQWidget *tqparent, const char *name,bool modal,bool autoClose):KDialogBase( Swallow, i18n("Key Server"), Close, Close, tqparent, name,modal) { autoCloseWindow=autoClose; config=new KSimpleConfig ("kgpgrc"); @@ -88,7 +88,7 @@ keyServer::keyServer(TQWidget *parent, const char *name,bool modal,bool autoClos encid->start(KProcess::NotifyOnExit,true); page->Buttonimport->setEnabled( !page->kLEimportid->text().isEmpty()); page->Buttonsearch->setEnabled( !page->kLEimportid->text().isEmpty()); -setMinimumSize(sizeHint()); +setMinimumSize(tqsizeHint()); } @@ -184,7 +184,7 @@ void keyServer::slotSearch() connect( listpop , TQT_SIGNAL( destroyed() ) , this, TQT_SLOT( abortSearch())); count=0; cycle=false; - readmessage=TQString::null; + readmessage=TQString(); searchproc=new KProcIO(TQTextCodec::codecForLocale()); TQString keyserv=page->kCBimportks->currentText(); *searchproc<<"gpg"<<"--utf8-strings"; @@ -199,9 +199,9 @@ void keyServer::slotSearch() TQObject::connect(searchproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotsearchresult(KProcess *))); TQObject::connect(searchproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotsearchread(KProcIO *))); searchproc->start(KProcess::NotifyOnExit,true); - TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::BusyCursor)); dialogServer->setMainWidget(listpop); - listpop->setMinimumSize(listpop->sizeHint()); + listpop->setMinimumSize(listpop->tqsizeHint()); listpop->setMinimumWidth(550); dialogServer->exec(); } @@ -261,8 +261,8 @@ void keyServer::slotsearchresult(KProcess *) dialogServer->enableButtonOK(true); TQApplication::restoreOverrideCursor(); nb=nb.setNum(keyNumbers); - //listpop->kLVsearch->setColumnText(0,i18n("Found %1 matching keys").arg(nb)); - listpop->statusText->setText(i18n("Found %1 matching keys").arg(nb)); + //listpop->kLVsearch->setColumnText(0,i18n("Found %1 matching keys").tqarg(nb)); + listpop->statusText->setText(i18n("Found %1 matching keys").tqarg(nb)); if (listpop->kLVsearch->firstChild()!=NULL) { listpop->kLVsearch->setSelected(listpop->kLVsearch->firstChild(),true); @@ -278,41 +278,41 @@ void keyServer::slotsearchread(KProcIO *p) while (p->readln(required,true)!=-1) { //required=TQString::fromUtf8(required); - if (required.find("keysearch.prompt")!=-1) { + if (required.tqfind("keysearch.prompt")!=-1) { if (count<4) - p->writeStdin("N"); + p->writeStdin(TQString("N")); else { - p->writeStdin("Q"); + p->writeStdin(TQString("Q")); p->closeWhenDone(); } - required=TQString::null; + required=TQString(); } - if (required.find("GOT_IT")!=-1) { + if (required.tqfind("GOT_IT")!=-1) { count++; - required=TQString::null; + required=TQString(); } - if (required.find("(")==0) { + if (required.tqfind("(")==0) { cycle=true; - TQString fullname=required.remove(0,required.find(")")+1).stripWhiteSpace(); - if (fullname.find("<")!=-1) { + TQString fullname=required.remove(0,required.tqfind(")")+1).stripWhiteSpace(); + if (fullname.tqfind("<")!=-1) { keymail=fullname.section('<',-1,-1); if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1); keyname=fullname.section('<',0,0); } else { - keymail=TQString::null; + keymail=TQString(); keyname=fullname; } - kitem=new KListViewItem(listpop->kLVsearch,keyname,keymail,TQString::null,TQString::null); + kitem=new KListViewItem(listpop->kLVsearch,keyname,keymail,TQString(),TQString()); keyNumbers++; count=0; - required=TQString::null; + required=TQString(); } if ((cycle) && (!required.isEmpty())) { TQString subkey=required.stripWhiteSpace(); - if (subkey.find(" key ")!=-1 && subkey.at(0).isDigit ()) + if (subkey.tqfind(" key ")!=-1 && subkey.at(0).isDigit ()) { TQString kid=subkey.section(",",0,0).stripWhiteSpace(); kid=kid.right(8); @@ -324,18 +324,18 @@ void keyServer::slotsearchread(KProcIO *p) } else { - if (subkey.find("<")!=-1) { + if (subkey.tqfind("<")!=-1) { keymail=subkey.section('<',-1,-1); if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1); keyname=subkey.section('<',0,0); } else { - keymail=TQString::null; + keymail=TQString(); keyname=subkey; } - KListViewItem *subk = new KListViewItem(kitem,keyname,keymail,TQString::null,TQString::null); + KListViewItem *subk = new KListViewItem(kitem,keyname,keymail,TQString(),TQString()); subk->setSelectable(false); } - required=TQString::null; + required=TQString(); } } } @@ -349,7 +349,7 @@ void keyServer::slotExport(TQStringList keyIds) { if (page->kCBexportks->currentText().isEmpty()) return; - readmessage=TQString::null; + readmessage=TQString(); exportproc=new KProcIO(TQTextCodec::codecForLocale()); TQString keyserv=page->kCBexportks->currentText(); @@ -367,8 +367,8 @@ void keyServer::slotExport(TQStringList keyIds) TQObject::connect(exportproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotexportresult(KProcess *))); TQObject::connect(exportproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotimportread(KProcIO *))); exportproc->start(KProcess::NotifyOnExit,true); - TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor)); - importpop = new TQDialog( this,0,true,Qt::WDestructiveClose); + TQApplication::setOverrideCursor(TQCursor(TQt::BusyCursor)); + importpop = new TQDialog( this,0,true,TQt::WDestructiveClose); TQVBoxLayout *vbox=new TQVBoxLayout(importpop,3); TQLabel *tex=new TQLabel(importpop); tex->setText(i18n("<b>Connecting to the server...</b>")); @@ -409,7 +409,7 @@ void keyServer::slotImport() KMessageBox::sorry(this,i18n("You must enter a search string.")); return; } - readmessage=TQString::null; + readmessage=TQString(); importproc=new KProcIO(TQTextCodec::codecForLocale()); TQString keyserv=page->kCBimportks->currentText(); @@ -428,15 +428,15 @@ void keyServer::slotImport() TQString fkeyNames=keyNames.section(' ',0,0); keyNames.remove(0,fkeyNames.length()); keyNames=keyNames.stripWhiteSpace(); - *importproc<<TQFile::encodeName(fkeyNames); + *importproc<<TQString(TQFile::encodeName(fkeyNames)); } TQObject::connect(importproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotimportresult(KProcess *))); TQObject::connect(importproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotimportread(KProcIO *))); importproc->start(KProcess::NotifyOnExit,true); importproc->closeWhenDone(); - TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor)); - importpop = new TQDialog( this,0,true,Qt::WDestructiveClose); + TQApplication::setOverrideCursor(TQCursor(TQt::BusyCursor)); + importpop = new TQDialog( this,0,true,TQt::WDestructiveClose); TQVBoxLayout *vbox=new TQVBoxLayout(importpop,3); TQLabel *tex=new TQLabel(importpop); tex->setText(i18n("<b>Connecting to the server...</b>")); @@ -457,7 +457,7 @@ void keyServer::abortImport() { disconnect(importproc,0,0,0); importproc->kill(); - emit importFinished(TQString::null); + emit importFinished(TQString()); } if (autoCloseWindow) close(); } @@ -472,12 +472,12 @@ void keyServer::slotimportresult(KProcess*) parsedOutput=readmessage; TQStringList importedKeys; - while (parsedOutput.find("IMPORTED")!=-1) { - parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8); + while (parsedOutput.tqfind("IMPORTED")!=-1) { + parsedOutput.remove(0,parsedOutput.tqfind("IMPORTED")+8); importedKeys+=parsedOutput.section("\n",0,0).stripWhiteSpace(); } - if (readmessage.find("IMPORT_RES")!=-1) { + if (readmessage.tqfind("IMPORT_RES")!=-1) { importedNb=readmessage.section("IMPORT_RES",-1,-1); importedNb=importedNb.stripWhiteSpace(); importedNbProcess=importedNb.section(" ",0,0); diff --git a/kgpg/keyservers.h b/kgpg/keyservers.h index c1935f3..9b28c11 100644 --- a/kgpg/keyservers.h +++ b/kgpg/keyservers.h @@ -31,8 +31,9 @@ class searchRes; class keyServer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - keyServer(TQWidget *parent=0, const char *name=0,bool modal=false,bool autoClose=false); + keyServer(TQWidget *tqparent=0, const char *name=0,bool modal=false,bool autoClose=false); ~keyServer(); keyServerWidget *page; diff --git a/kgpg/kgpg.cpp b/kgpg/kgpg.cpp index 223d7bd..33e86ec 100644 --- a/kgpg/kgpg.cpp +++ b/kgpg/kgpg.cpp @@ -74,16 +74,16 @@ #include "kgpglibrary.h" #include "kgpgwizard.h" -MyView::MyView( TQWidget *parent, const char *name ) - : TQLabel( parent, name ) +MyView::MyView( TQWidget *tqparent, const char *name ) + : TQLabel( tqparent, name ) { setBackgroundMode( X11ParentRelative ); openTasks=0; - KAction *saveDecrypt=new KAction(i18n("&Decrypt && Save File"),"decrypted",0,this, TQT_SLOT(decryptDroppedFile()),this,"decrypt_file"); - KAction *showDecrypt=new KAction(i18n("&Show Decrypted File"),"edit",0,this, TQT_SLOT(showDroppedFile()),this,"show_file"); - KAction *encrypt=new KAction(i18n("&Encrypt File"),"encrypted",0,this, TQT_SLOT(encryptDroppedFile()),this,"encrypt_file"); - KAction *sign=new KAction(i18n("&Sign File"), "signature",0,this, TQT_SLOT(signDroppedFile()),this,"sign_file"); + KAction *saveDecrypt=new KAction(i18n("&Decrypt && Save File"),"decrypted",0,TQT_TQOBJECT(this), TQT_SLOT(decryptDroppedFile()),TQT_TQOBJECT(this),"decrypt_file"); + KAction *showDecrypt=new KAction(i18n("&Show Decrypted File"),"edit",0,TQT_TQOBJECT(this), TQT_SLOT(showDroppedFile()),TQT_TQOBJECT(this),"show_file"); + KAction *encrypt=new KAction(i18n("&Encrypt File"),"encrypted",0,TQT_TQOBJECT(this), TQT_SLOT(encryptDroppedFile()),TQT_TQOBJECT(this),"encrypt_file"); + KAction *sign=new KAction(i18n("&Sign File"), "signature",0,TQT_TQOBJECT(this), TQT_SLOT(signDroppedFile()),TQT_TQOBJECT(this),"sign_file"); //TQToolTip::add(this,i18n("KGpg drag & drop encryption applet")); readOptions(); @@ -114,24 +114,24 @@ MyView::~MyView() void MyView::clipEncrypt() { popupPublic *dialoguec=new popupPublic(0, "public_keys", 0,false,goDefaultKey); - connect(dialoguec,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(encryptClipboard(TQStringList,TQStringList,bool,bool))); + connect(dialoguec,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),TQT_TQOBJECT(this),TQT_SLOT(encryptClipboard(TQStringList,TQStringList,bool,bool))); dialoguec->exec(); delete dialoguec; } void MyView::clipDecrypt() { - TQString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace(); + TQString clippie=kapp->tqclipboard()->text(clipboardMode).stripWhiteSpace(); droppedtext(clippie,false); } void MyView::clipSign(bool openEditor) { - TQString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace(); + TQString clippie=kapp->tqclipboard()->text(clipboardMode).stripWhiteSpace(); if (!clippie.isEmpty()) { KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey); connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont))); - connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List))); + connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),TQT_TQOBJECT(this),TQT_SLOT(encryptFiles(KURL::List))); if (!openEditor) connect(kgpgtxtedit->view,TQT_SIGNAL(verifyFinished()),kgpgtxtedit,TQT_SLOT(closeWindow())); kgpgtxtedit->view->editor->setText(clippie); @@ -145,9 +145,9 @@ void MyView::clipSign(bool openEditor) void MyView::encryptDroppedFolder() { compressionScheme=0; - kgpgfoldertmp=new KTempFile(TQString::null); + kgpgfoldertmp=new KTempFile(TQString()); kgpgfoldertmp->setAutoDelete(true); - if (KMessageBox::warningContinueCancel(0,i18n("<qt>KGpg will now create a temporary archive file:<br><b>%1</b> to process the encryption. The file will be deleted after the encryption is finished.</qt>").arg(kgpgfoldertmp->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpFile")==KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0,i18n("<qt>KGpg will now create a temporary archive file:<br><b>%1</b> to process the encryption. The file will be deleted after the encryption is finished.</qt>").tqarg(kgpgfoldertmp->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpFile")==KMessageBox::Cancel) return; dialogue=new popupPublic(0,"Public keys",droppedUrls.first().fileName(),true,goDefaultKey); @@ -160,8 +160,8 @@ void MyView::encryptDroppedFolder() optionbx->insertItem(i18n("Bzip2")); bGroup->show(); connect(dialogue,TQT_SIGNAL(keyListFilled ()),dialogue,TQT_SLOT(slotSetVisible())); - connect(optionbx,TQT_SIGNAL(activated (int)),this,TQT_SLOT(slotSetCompression(int))); - connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(startFolderEncode(TQStringList,TQStringList,bool,bool))); + connect(optionbx,TQT_SIGNAL(activated (int)),TQT_TQOBJECT(this),TQT_SLOT(slotSetCompression(int))); + connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),TQT_TQOBJECT(this),TQT_SLOT(startFolderEncode(TQStringList,TQStringList,bool,bool))); dialogue->CBshred->setEnabled(false); dialogue->exec(); dialogue=0L; @@ -183,7 +183,7 @@ if (compressionScheme==0) else extension=".tar.bz2"; -if (encryptOptions.find("armor")!=encryptOptions.end () ) +if (encryptOptions.tqfind("armor")!=encryptOptions.end () ) extension+=".asc"; else if (KGpgSettings::pgpExtension()) extension+=".pgp"; @@ -194,7 +194,7 @@ KURL encryptedFile(droppedUrls.first().path()+extension); TQFile encryptedFolder(droppedUrls.first().path()+extension); if (encryptedFolder.exists()) { dialogue->hide(); - KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,encryptedFile.path(),KIO::M_OVERWRITE); + KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString(),encryptedFile.path(),KIO::M_OVERWRITE); if (over->exec()==TQDialog::Rejected) { delete over; @@ -232,8 +232,8 @@ pop = new KPassivePopup(); KgpgInterface *folderprocess=new KgpgInterface(); folderprocess->KgpgEncryptFile(selec,KURL(kgpgfoldertmp->name()),encryptedFile,encryptOptions,symetric); - connect(folderprocess,TQT_SIGNAL(encryptionfinished(KURL)),this,TQT_SLOT(slotFolderFinished(KURL))); - connect(folderprocess,TQT_SIGNAL(errormessage(TQString)),this,TQT_SLOT(slotFolderFinishedError(TQString))); + connect(folderprocess,TQT_SIGNAL(encryptionfinished(KURL)),TQT_TQOBJECT(this),TQT_SLOT(slotFolderFinished(KURL))); + connect(folderprocess,TQT_SIGNAL(errormessage(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotFolderFinishedError(TQString))); } void MyView::slotFolderFinished(KURL) @@ -276,8 +276,8 @@ void MyView::encryptDroppedFile() { TQStringList opts; KgpgLibrary *lib=new KgpgLibrary(this,KGpgSettings::pgpExtension()); - connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool))); - if (KGpgSettings::fileKey()!=TQString::null) { + connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),TQT_TQOBJECT(this),TQT_SLOT(busyMessage(TQString,bool))); + if (KGpgSettings::fileKey()!=TQString()) { if (KGpgSettings::allowUntrustedKeys()) opts<<"--always-trust"; if (KGpgSettings::asciiArmor()) @@ -288,7 +288,7 @@ void MyView::encryptDroppedFile() opts<<"--pgp6"; lib->slotFileEnc(droppedUrls,opts,TQStringList::split(" ",KGpgSettings::fileKey()),goDefaultKey); } else - lib->slotFileEnc(droppedUrls,TQString::null,TQString::null,goDefaultKey); + lib->slotFileEnc(droppedUrls,TQString(),TQString(),goDefaultKey); } void MyView::encryptFiles(KURL::List urls) @@ -302,16 +302,16 @@ void MyView::shredDroppedFile() KDialogBase *shredConfirm=new KDialogBase( this, "confirm_shred", true,i18n("Shred Files"),KDialogBase::Ok | KDialogBase::Cancel); TQWidget *page = new TQWidget(shredConfirm); shredConfirm->setMainWidget(page); -TQBoxLayout *layout=new TQBoxLayout(page,TQBoxLayout::TopToBottom,0); -layout->setAutoAdd(true); +TQBoxLayout *tqlayout=new TQBoxLayout(page,TQBoxLayout::TopToBottom,0); +tqlayout->setAutoAdd(true); -(void) new KActiveLabel( i18n("Do you really want to <a href=\"whatsthis:%1\">shred</a> these files?").arg(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>")),page); +(void) new KActiveLabel( i18n("Do you really want to <a href=\"whatsthis:%1\">shred</a> these files?").tqarg(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>")),page); KListBox *lb=new KListBox(page); lb->insertStringList(droppedUrls.toStringList()); if (shredConfirm->exec()==TQDialog::Accepted) { KgpgLibrary *lib=new KgpgLibrary(this); - connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool))); + connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),TQT_TQOBJECT(this),TQT_SLOT(busyMessage(TQString,bool))); lib->shredprocessenc(droppedUrls); } delete shredConfirm; @@ -324,7 +324,7 @@ void MyView::slotVerifyFile() if (droppedUrl.isEmpty()) return; - TQString sigfile=TQString::null; + TQString sigfile=TQString(); ////////////////////////////////////// try to find detached signature. if (!droppedUrl.fileName().endsWith(".sig")) { sigfile=droppedUrl.path()+".sig"; @@ -334,7 +334,7 @@ void MyView::slotVerifyFile() TQFile fsig(sigfile); ////////////// if no .asc or .sig signature file included, assume the file is internally signed if (!fsig.exists()) - sigfile=TQString::null; + sigfile=TQString(); } } else { sigfile=droppedUrl.path(); @@ -344,7 +344,7 @@ void MyView::slotVerifyFile() ///////////////////////// pipe gpg command KgpgInterface *verifyFileProcess=new KgpgInterface(); verifyFileProcess->KgpgVerifyFile(droppedUrl,KURL(sigfile)); - connect (verifyFileProcess,TQT_SIGNAL(verifyquerykey(TQString)),this,TQT_SLOT(importSignature(TQString))); + connect (verifyFileProcess,TQT_SIGNAL(verifyquerykey(TQString)),TQT_TQOBJECT(this),TQT_SLOT(importSignature(TQString))); } void MyView::importSignature(TQString ID) @@ -397,16 +397,16 @@ void MyView::decryptDroppedFile() /* if (oldname.endsWith(".tar.gz")) { isFolder=true; - kgpgFolderExtract=new KTempFile(TQString::null,".tar.gz"); + kgpgFolderExtract=new KTempFile(TQString(),".tar.gz"); kgpgFolderExtract->setAutoDelete(true); swapname=KURL(kgpgFolderExtract->name()); - if (KMessageBox::warningContinueCancel(0,i18n("<qt>The file to decrypt is an archive. KGpg will create a temporary unencrypted archive file:<br><b>%1</b> before processing the archive extraction. This temporary file will be deleted after the decryption is finished.</qt>").arg(kgpgFolderExtract->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpDecFile")==KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0,i18n("<qt>The file to decrypt is an archive. KGpg will create a temporary unencrypted archive file:<br><b>%1</b> before processing the archive extraction. This temporary file will be deleted after the decryption is finished.</qt>").tqarg(kgpgFolderExtract->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpDecFile")==KMessageBox::Cancel) return; } else*/ { swapname=KURL(droppedUrls.first().directory(0,0)+oldname); TQFile fgpg(swapname.path()); if (fgpg.exists()) { - KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,swapname.path(),KIO::M_OVERWRITE); + KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString(),swapname.path(),KIO::M_OVERWRITE); if (over->exec()==TQDialog::Rejected) { delete over; @@ -419,10 +419,10 @@ void MyView::decryptDroppedFile() } KgpgLibrary *lib=new KgpgLibrary(this); lib->slotFileDec(droppedUrls.first(),swapname,KGpgSettings::customDecrypt()); - connect(lib,TQT_SIGNAL(importOver(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList))); - connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool))); + connect(lib,TQT_SIGNAL(importOver(TQStringList)),TQT_TQOBJECT(this),TQT_SIGNAL(importedKeys(TQStringList))); + connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),TQT_TQOBJECT(this),TQT_SLOT(busyMessage(TQString,bool))); // if (isFolder) - connect(lib,TQT_SIGNAL(decryptionOver()),this,TQT_SLOT(decryptNextFile())); + connect(lib,TQT_SIGNAL(decryptionOver()),TQT_TQOBJECT(this),TQT_SLOT(decryptNextFile())); } @@ -462,10 +462,10 @@ void MyView::showDroppedFile() kdDebug(2100)<<"------Show dropped file"<<endl; KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey); kgpgtxtedit->view->editor->slotDroppedFile(droppedUrls.first()); - connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List))); + connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),TQT_TQOBJECT(this),TQT_SLOT(encryptFiles(KURL::List))); connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont))); - connect(kgpgtxtedit,TQT_SIGNAL(refreshImported(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList))); - connect(kgpgtxtedit->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList))); + connect(kgpgtxtedit,TQT_SIGNAL(refreshImported(TQStringList)),TQT_TQOBJECT(this),TQT_SIGNAL(importedKeys(TQStringList))); + connect(kgpgtxtedit->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),TQT_TQOBJECT(this),TQT_SIGNAL(importedKeys(TQStringList))); kgpgtxtedit->show(); } @@ -519,7 +519,7 @@ void MyView::droppedtext (TQString inputText,bool allowEncrypt) if (inputText.startsWith("-----BEGIN PGP MESSAGE")) { KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey); - connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List))); + connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),TQT_TQOBJECT(this),TQT_SLOT(encryptFiles(KURL::List))); connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont))); kgpgtxtedit->view->editor->setText(inputText); kgpgtxtedit->view->slotdecode(); @@ -533,7 +533,7 @@ void MyView::droppedtext (TQString inputText,bool allowEncrypt) else { KgpgInterface *importKeyProcess=new KgpgInterface(); importKeyProcess->importKey(inputText); - connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList))); + connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),TQT_TQOBJECT(this),TQT_SIGNAL(importedKeys(TQStringList))); return; } } @@ -560,7 +560,7 @@ void MyView::dropEvent (TQDropEvent *o) droppedfile(list); else if ( TQTextDrag::decode(o, text) ) { - TQApplication::clipboard()->setText(text,clipboardMode); + TQApplication::tqclipboard()->setText(text,clipboardMode); droppedtext(text); } } @@ -568,16 +568,16 @@ void MyView::dropEvent (TQDropEvent *o) void MyView::readOptions() { - clipboardMode=QClipboard::Clipboard; - if ( KGpgSettings::useMouseSelection() && kapp->clipboard()->supportsSelection()) - clipboardMode=QClipboard::Selection; + clipboardMode=TQClipboard::Clipboard; + if ( KGpgSettings::useMouseSelection() && kapp->tqclipboard()->supportsSelection()) + clipboardMode=TQClipboard::Selection; if (KGpgSettings::firstRun()) { firstRun(); } else { TQString path = KGpgSettings::gpgConfigPath(); if (path.isEmpty()) { - if (KMessageBox::questionYesNo(0,i18n("<qt>You have not set a path to your GnuPG config file.<br>This may cause some surprising results in KGpg's execution.<br>Would you like to start KGpg's Wizard to fix this problem?</qt>"),TQString::null,i18n("Start Wizard"),i18n("Do Not Start"))==KMessageBox::Yes) + if (KMessageBox::questionYesNo(0,i18n("<qt>You have not set a path to your GnuPG config file.<br>This may cause some surprising results in KGpg's execution.<br>Would you like to start KGpg's Wizard to fix this problem?</qt>"),TQString(),i18n("Start Wizard"),i18n("Do Not Start"))==KMessageBox::Yes) startWizard(); } else { TQStringList groups=KgpgInterface::getGpgGroupNames(path); @@ -602,7 +602,7 @@ static TQString getGpgHome() char *env=getenv("GNUPGHOME"); TQString gpgHome(env ? env : TQDir::homeDirPath()+"/.gnupg/"); - gpgHome.replace("//", "/"); + gpgHome.tqreplace("//", "/"); if(!gpgHome.endsWith("/")) gpgHome.append('/'); @@ -621,7 +621,7 @@ void MyView::startWizard() if (!TQFile(confPath).exists()) { confPath=gpgHome+"gpg.conf"; if (!TQFile(confPath).exists()) { - if (KMessageBox::questionYesNo(this,i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed. Should KGpg try to create a config file ?</qt>"),TQString::null,i18n("Create Config"),i18n("Do Not Create"))==KMessageBox::Yes) { + if (KMessageBox::questionYesNo(this,i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed. Should KGpg try to create a config file ?</qt>"),TQString(),i18n("Create Config"),i18n("Do Not Create"))==KMessageBox::Yes) { confPath=gpgHome+"options"; TQFile file(confPath); if ( file.open( IO_WriteOnly ) ) { @@ -631,14 +631,14 @@ void MyView::startWizard() } } else { wiz->text_optionsfound->setText(i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed and give the path to the config file.</qt>")); - confPath=TQString::null; + confPath=TQString(); } } } int gpgVersion=KgpgInterface::getGpgVersion(); if (gpgVersion<120) wiz->txtGpgVersion->setText(i18n("Your GnuPG version seems to be older than 1.2.0. Photo Id's and Key Groups will not work properly. Please consider upgrading GnuPG (http://gnupg.org).")); - else wiz->txtGpgVersion->setText(TQString::null); + else wiz->txtGpgVersion->setText(TQString()); wiz->kURLRequester1->setURL(confPath); /* @@ -647,7 +647,7 @@ void MyView::startWizard() FILE *fp,*fp2; TQString tst,tst2,name,trustedvals="idre-"; - TQString firstKey=TQString::null; + TQString firstKey=TQString(); char line[300]; bool counter=false; @@ -660,7 +660,7 @@ void MyView::startWizard() fp2 = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-keys "+TQFile::encodeName(tst.section(':',4,4)), "r"); while ( fgets( line, sizeof(line), fp2)) { tst2=TQString::fromUtf8(line); - if (tst2.startsWith("pub") && (trustedvals.find(tst2.section(':',1,1))==-1)) { + if (tst2.startsWith("pub") && (trustedvals.tqfind(tst2.section(':',1,1))==-1)) { counter=true; wiz->CBdefault->insertItem(tst.section(':',4,4).right(8)+": "+name); if (firstKey.isEmpty()) @@ -674,17 +674,17 @@ void MyView::startWizard() } pclose(fp); wiz->CBdefault->setCurrentItem(firstKey); - //connect(wiz->pushButton4,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotGenKey())); + //connect(wiz->pushButton4,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(slotGenKey())); if (!counter) - connect(wiz->finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotGenKey())); + connect(wiz->finishButton(),TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(slotGenKey())); else { wiz->textGenerate->hide(); wiz->setTitle(wiz->page_4,i18n("Step Three: Select your Default Private Key")); - connect(wiz->finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSaveOptionsPath())); + connect(wiz->finishButton(),TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(slotSaveOptionsPath())); } - connect(wiz->nextButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotWizardChange())); + connect(wiz->nextButton(),TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(slotWizardChange())); connect( wiz , TQT_SIGNAL( destroyed() ) , this, TQT_SLOT( slotWizardClose())); - connect(wiz,TQT_SIGNAL(helpClicked()),this,TQT_SLOT(help())); + connect(wiz,TQT_SIGNAL(helpClicked()),TQT_TQOBJECT(this),TQT_SLOT(help())); wiz->setFinishEnabled(wiz->page_4,true); wiz->show(); @@ -771,25 +771,25 @@ void MyView::help() kapp->invokeHelp(0,"kgpg"); } -kgpgapplet::kgpgapplet(TQWidget *parent, const char *name) - : KSystemTray(parent,name) +kgpgapplet::kgpgapplet(TQWidget *tqparent, const char *name) + : KSystemTray(tqparent,name) { w=new MyView(this); w->show(); KPopupMenu *conf_menu=contextMenu(); - KgpgEncryptClipboard = new KAction(i18n("&Encrypt Clipboard"), "kgpg", 0,w, TQT_SLOT(clipEncrypt()),actionCollection(),"clip_encrypt"); - KgpgDecryptClipboard = new KAction(i18n("&Decrypt Clipboard"), 0, 0,w, TQT_SLOT(clipDecrypt()),actionCollection(),"clip_decrypt"); - KgpgSignClipboard = new KAction(i18n("&Sign/Verify Clipboard"), "signature", 0,w, TQT_SLOT(clipSign()),actionCollection(),"clip_sign"); + KgpgEncryptClipboard = new KAction(i18n("&Encrypt Clipboard"), "kgpg", 0,TQT_TQOBJECT(w), TQT_SLOT(clipEncrypt()),actionCollection(),"clip_encrypt"); + KgpgDecryptClipboard = new KAction(i18n("&Decrypt Clipboard"), 0, 0,TQT_TQOBJECT(w), TQT_SLOT(clipDecrypt()),actionCollection(),"clip_decrypt"); + KgpgSignClipboard = new KAction(i18n("&Sign/Verify Clipboard"), "signature", 0,TQT_TQOBJECT(w), TQT_SLOT(clipSign()),actionCollection(),"clip_sign"); KAction *KgpgOpenEditor; if (KGpgSettings::leftClick()==KGpgSettings::EnumLeftClick::KeyManager) - KgpgOpenEditor = new KAction(i18n("&Open Editor"), "edit", 0,parent, TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor"); + KgpgOpenEditor = new KAction(i18n("&Open Editor"), "edit", 0,TQT_TQOBJECT(tqparent), TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor"); else - KgpgOpenEditor = new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, TQT_SLOT(slotOpenKeyManager()),actionCollection(),"kgpg_editor"); + KgpgOpenEditor = new KAction(i18n("&Open Key Manager"), "kgpg", 0,TQT_TQOBJECT(this), TQT_SLOT(slotOpenKeyManager()),actionCollection(),"kgpg_editor"); - KAction *KgpgOpenServer = new KAction(i18n("&Key Server Dialog"), "network", 0,this, TQT_SLOT(slotOpenServerDialog()),actionCollection(),"kgpg_server"); - KAction *KgpgPreferences=KStdAction::preferences(this, TQT_SLOT(showOptions()), actionCollection()); + KAction *KgpgOpenServer = new KAction(i18n("&Key Server Dialog"), "network", 0,TQT_TQOBJECT(this), TQT_SLOT(slotOpenServerDialog()),actionCollection(),"kgpg_server"); + KAction *KgpgPreferences=KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showOptions()), actionCollection()); - connect (conf_menu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(checkMenu())); + connect (conf_menu,TQT_SIGNAL(aboutToShow()),TQT_TQOBJECT(this),TQT_SLOT(checkMenu())); KgpgEncryptClipboard->plug(conf_menu); KgpgDecryptClipboard->plug(conf_menu); @@ -804,7 +804,7 @@ kgpgapplet::kgpgapplet(TQWidget *parent, const char *name) void kgpgapplet::checkMenu() { KgpgDecryptClipboard->setEnabled(false); - if ((kapp->clipboard()->text(w->clipboardMode).isEmpty())) + if ((kapp->tqclipboard()->text(w->clipboardMode).isEmpty())) { KgpgEncryptClipboard->setEnabled(false); KgpgSignClipboard->setEnabled(false); @@ -812,7 +812,7 @@ void kgpgapplet::checkMenu() else { KgpgEncryptClipboard->setEnabled(true); - if (kapp->clipboard()->text(w->clipboardMode).stripWhiteSpace().startsWith("-----BEGIN")) + if (kapp->tqclipboard()->text(w->clipboardMode).stripWhiteSpace().startsWith("-----BEGIN")) KgpgDecryptClipboard->setEnabled(true); KgpgSignClipboard->setEnabled(true); } @@ -915,7 +915,7 @@ int KgpgAppletApp::newInstance() connect( kgpg_applet, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotHandleQuit())); connect(s_keyManager,TQT_SIGNAL(readAgainOptions()),kgpg_applet->w,TQT_SLOT(readOptions())); - connect(kgpg_applet->w,TQT_SIGNAL(updateDefault(TQString)),this,TQT_SLOT(wizardOver(TQString))); + connect(kgpg_applet->w,TQT_SIGNAL(updateDefault(TQString)),TQT_TQOBJECT(this),TQT_SLOT(wizardOver(TQString))); connect(kgpg_applet->w,TQT_SIGNAL(createNewKey()),s_keyManager,TQT_SLOT(slotgenkey())); connect(s_keyManager,TQT_SIGNAL(fontChanged(TQFont)),kgpg_applet->w,TQT_SIGNAL(setFont(TQFont))); connect(kgpg_applet->w,TQT_SIGNAL(importedKeys(TQStringList)),s_keyManager->keysList2,TQT_SLOT(slotReloadKeys(TQStringList))); @@ -926,7 +926,7 @@ int KgpgAppletApp::newInstance() if ((KgpgInterface::getGpgBoolSetting("use-agent",gpgPath)) && (!getenv("GPG_AGENT_INFO"))) KMessageBox::sorry(0,i18n("<qt>The use of <b>GnuPG Agent</b> is enabled in GnuPG's configuration file (%1).<br>" "However, the agent does not seem to be running. This could result in problems with signing/decryption.<br>" - "Please disable GnuPG Agent from KGpg settings, or fix the agent.</qt>").arg(gpgPath)); + "Please disable GnuPG Agent from KGpg settings, or fix the agent.</qt>").tqarg(gpgPath)); } } @@ -1008,8 +1008,8 @@ int KgpgAppletApp::newInstance() void MyView::encryptClipboard(TQStringList selec,TQStringList encryptOptions,bool,bool symmetric) { - if (kapp->clipboard()->text(clipboardMode).isEmpty()) { - KPassivePopup::message(i18n("Clipboard is empty."),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this); + if (kapp->tqclipboard()->text(clipboardMode).isEmpty()) { + KPassivePopup::message(i18n("Clipboard is empty."),TQString(),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this); return; } if (KGpgSettings::pgpCompatibility()) @@ -1018,19 +1018,19 @@ void MyView::encryptClipboard(TQStringList selec,TQStringList encryptOptions,boo if (symmetric) selec.clear(); KgpgInterface *txtEncrypt=new KgpgInterface(); - connect (txtEncrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),this,TQT_SLOT(slotSetClip(TQString))); - connect (txtEncrypt,TQT_SIGNAL(txtencryptionstarted()),this,TQT_SLOT(slotPassiveClip())); - txtEncrypt->KgpgEncryptText(kapp->clipboard()->text(clipboardMode),selec,encryptOptions); + connect (txtEncrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotSetClip(TQString))); + connect (txtEncrypt,TQT_SIGNAL(txtencryptionstarted()),TQT_TQOBJECT(this),TQT_SLOT(slotPassiveClip())); + txtEncrypt->KgpgEncryptText(kapp->tqclipboard()->text(clipboardMode),selec,encryptOptions); } void MyView::slotPassiveClip() { -TQString newtxt=kapp->clipboard()->text(clipboardMode); +TQString newtxt=kapp->tqclipboard()->text(clipboardMode); if (newtxt.length()>300) newtxt=TQString(newtxt.left(250).stripWhiteSpace())+"...\n"+TQString(newtxt.right(40).stripWhiteSpace()); - newtxt.replace(TQRegExp("<"),"<"); ///// disable html tags - newtxt.replace(TQRegExp("\n"),"<br>"); + newtxt.tqreplace(TQRegExp("<"),"<"); ///// disable html tags + newtxt.tqreplace(TQRegExp("\n"),"<br>"); pop = new KPassivePopup( this); pop->setView(i18n("Encrypted following text:"),newtxt,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); @@ -1045,7 +1045,7 @@ pop = new KPassivePopup( this); void MyView::slotSetClip(TQString newtxt) { if (newtxt.isEmpty()) return; - TQApplication::clipboard()->setText(newtxt,clipboardMode);//,QClipboard::Clipboard); QT 3.1 only + TQApplication::tqclipboard()->setText(newtxt,clipboardMode);//,TQClipboard::Clipboard); QT 3.1 only } diff --git a/kgpg/kgpg.h b/kgpg/kgpg.h index 05be7e4..f3648f6 100644 --- a/kgpg/kgpg.h +++ b/kgpg/kgpg.h @@ -40,20 +40,21 @@ class KPassivePopup; class KgpgWizard; class popupPublic; -class MyView : public QLabel +class MyView : public TQLabel { Q_OBJECT + TQ_OBJECT public: - MyView( TQWidget *parent = 0, const char *name = 0); + MyView( TQWidget *tqparent = 0, const char *name = 0); ~MyView(); KURL droppedUrl; KURL::List droppedUrls; KTempFile *kgpgfoldertmp; KShortcut goDefaultKey; - QClipboard::Mode clipboardMode; + TQClipboard::Mode clipboardMode; private: TQPopupMenu *droppopup,*udroppopup; @@ -121,9 +122,10 @@ signals: class kgpgapplet : public KSystemTray//KUniqueApplication { Q_OBJECT + TQ_OBJECT public: - kgpgapplet( TQWidget *parent = 0, const char *name = 0); + kgpgapplet( TQWidget *tqparent = 0, const char *name = 0); /** destructor */ ~kgpgapplet(); MyView *w; @@ -144,6 +146,7 @@ class KCmdLineArgs; class KgpgAppletApp : public KUniqueApplication { Q_OBJECT + TQ_OBJECT friend class kgpgapplet; public: KgpgAppletApp(); diff --git a/kgpg/kgpgeditor.cpp b/kgpg/kgpgeditor.cpp index 269f5ea..bb6c76a 100644 --- a/kgpg/kgpgeditor.cpp +++ b/kgpg/kgpgeditor.cpp @@ -53,10 +53,10 @@ #include "listkeys.h" #include "kgpglibrary.h" -KgpgApp::KgpgApp(TQWidget *parent, const char *name, WFlags f,KShortcut goHome,bool mainWindow):KMainWindow(parent, name,f) +KgpgApp::KgpgApp(TQWidget *tqparent, const char *name, WFlags f,KShortcut goHome,bool mainWindow):KMainWindow(tqparent, name,f) { isMainWindow=mainWindow; - textEncoding=TQString::null; + textEncoding=TQString(); readOptions(); goDefaultKey=goHome; // call inits to invoke all other construction parts @@ -126,30 +126,30 @@ void KgpgApp::readOptions(bool doresize) void KgpgApp::initActions() { - KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection()); - KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection()); - KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); - KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection()); - KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection()); - KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotOptions()), actionCollection(),"kgpg_config"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); + KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); + KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotOptions()), actionCollection(),"kgpg_config"); //KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - //KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection()); - - fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection()); - (void) new KAction(i18n("&Encrypt File..."), "encrypted", 0,this, TQT_SLOT(slotFilePreEnc()), actionCollection(),"file_encrypt"); - (void) new KAction(i18n("&Decrypt File..."), "decrypted", 0,this, TQT_SLOT(slotFilePreDec()), actionCollection(),"file_decrypt"); - (void) new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, TQT_SLOT(slotKeyManager()), actionCollection(),"key_manage"); - editUndo = KStdAction::undo(this, TQT_SLOT(slotundo()), actionCollection()); - editRedo = KStdAction::redo(this, TQT_SLOT(slotredo()), actionCollection()); - //(void) new KAction(i18n("&Manage Keys"), "kgpg_manage", CTRL+Key_K,this, TQT_SLOT(slotManageKey()), actionCollection(),"keys_manage"); - (void) new KAction(i18n("&Generate Signature..."),0, this, TQT_SLOT(slotPreSignFile()), actionCollection(), "sign_generate"); - (void) new KAction(i18n("&Verify Signature..."),0, this, TQT_SLOT(slotPreVerifyFile()), actionCollection(), "sign_verify"); - (void) new KAction(i18n("&Check MD5 Sum..."), 0,this, TQT_SLOT(slotCheckMd5()), actionCollection(), "sign_check"); - KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + //KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbars()), actionCollection()); + + fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + (void) new KAction(i18n("&Encrypt File..."), "encrypted", 0,TQT_TQOBJECT(this), TQT_SLOT(slotFilePreEnc()), actionCollection(),"file_encrypt"); + (void) new KAction(i18n("&Decrypt File..."), "decrypted", 0,TQT_TQOBJECT(this), TQT_SLOT(slotFilePreDec()), actionCollection(),"file_decrypt"); + (void) new KAction(i18n("&Open Key Manager"), "kgpg", 0,TQT_TQOBJECT(this), TQT_SLOT(slotKeyManager()), actionCollection(),"key_manage"); + editUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotundo()), actionCollection()); + editRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(slotredo()), actionCollection()); + //(void) new KAction(i18n("&Manage Keys"), "kgpg_manage", CTRL+Key_K,TQT_TQOBJECT(this), TQT_SLOT(slotManageKey()), actionCollection(),"keys_manage"); + (void) new KAction(i18n("&Generate Signature..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotPreSignFile()), actionCollection(), "sign_generate"); + (void) new KAction(i18n("&Verify Signature..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotPreVerifyFile()), actionCollection(), "sign_verify"); + (void) new KAction(i18n("&Check MD5 Sum..."), 0,TQT_TQOBJECT(this), TQT_SLOT(slotCheckMd5()), actionCollection(), "sign_check"); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); // comment out for now, only confusing //encodingAction=new KToggleAction(i18n("&Unicode (utf-8) Encoding"), 0, 0,this, TQT_SLOT(slotSetCharset()),actionCollection(),"charsets"); @@ -204,19 +204,19 @@ void KgpgApp::slotFileNew() { ////// delete all text from editor - view->editor->setText(TQString::null); + view->editor->setText(TQString()); editRedo->setEnabled(false); editUndo->setEnabled(false); setCaption(i18n("Untitled"), false); fileSave->setEnabled(false); - Docname=TQString::null; + Docname=TQString(); slotResetEncoding(false); } void KgpgApp::slotFilePreEnc() { TQStringList opts; - KURL::List urls=KFileDialog::getOpenURLs(TQString::null, + KURL::List urls=KFileDialog::getOpenURLs(TQString(), i18n("*|All Files"), this, i18n("Open File to Encode")); if (urls.isEmpty()) return; @@ -226,7 +226,7 @@ void KgpgApp::slotFilePreEnc() void KgpgApp::slotFilePreDec() { - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*|All Files"), this, i18n("Open File to Decode")); if (url.isEmpty()) @@ -250,8 +250,8 @@ void KgpgApp::slotFilePreDec() page->newFilename->setCaption(i18n("Save File")); page->checkClipboard->setText(i18n("Editor")); - page->resize(page->minimumSize()); - popn->resize(popn->minimumSize()); + page->resize(page->tqminimumSize()); + popn->resize(popn->tqminimumSize()); if (popn->exec()==TQDialog::Accepted) { if (page->checkFile->isChecked()) newname=page->newFilename->url(); @@ -265,7 +265,7 @@ void KgpgApp::slotFilePreDec() if (!newname.isEmpty()) { TQFile fgpg(newname); if (fgpg.exists()) { - KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,newname,KIO::M_OVERWRITE); + KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString(),newname,KIO::M_OVERWRITE); if (over->exec()==TQDialog::Rejected) { delete over; @@ -284,7 +284,7 @@ void KgpgApp::slotFilePreDec() void KgpgApp::slotFileOpen() { KEncodingFileDialog::Result loadResult; - loadResult=KEncodingFileDialog::getOpenURLAndEncoding(TQString::null,TQString::null,TQString::null,this); + loadResult=KEncodingFileDialog::getOpenURLAndEncoding(TQString(),TQString(),TQString(),this); KURL url=loadResult.URLs.first(); textEncoding=loadResult.encoding; @@ -314,7 +314,7 @@ void KgpgApp::slotFileSave() TQTextCodec*cod=TQTextCodec::codecForName (textEncoding.ascii()); // slotStatusMsg(i18n("Saving file...")); if (!checkEncoding(cod)) { - KMessageBox::sorry(this,i18n("The document could not been saved, as the selected encoding cannot encode every unicode character in it.")); + KMessageBox::sorry(this,i18n("The document could not been saved, as the selected encoding cannot encode every tqunicode character in it.")); return; } @@ -366,7 +366,7 @@ void KgpgApp::slotFileSaveAs() //KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),i18n("*|All Files"), this, i18n("Save As")); KEncodingFileDialog::Result saveResult; - saveResult=KEncodingFileDialog::getSaveURLAndEncoding (TQString::null,TQString::null,TQString::null,this); + saveResult=KEncodingFileDialog::getSaveURLAndEncoding (TQString(),TQString(),TQString(),this); KURL url=saveResult.URLs.first(); TQString selectedEncoding=saveResult.encoding; @@ -376,7 +376,7 @@ void KgpgApp::slotFileSaveAs() TQString filn=url.path(); TQFile f(filn); if (f.exists()) { - TQString message=i18n("Overwrite existing file %1?").arg(url.fileName()); + TQString message=i18n("Overwrite existing file %1?").tqarg(url.fileName()); int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite")); if (result==KMessageBox::Cancel) return; @@ -385,7 +385,7 @@ void KgpgApp::slotFileSaveAs() } else if (KIO::NetAccess::exists(url,false,this)) { - TQString message=i18n("Overwrite existing file %1?").arg(url.fileName()); + TQString message=i18n("Overwrite existing file %1?").tqarg(url.fileName()); int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite")); if (result==KMessageBox::Cancel) return; @@ -463,7 +463,7 @@ void KgpgApp::slotCheckMd5() { ///////////////////////////////////////////////////////////////////////// display md5 sum for a chosen file - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*|All Files"), this, i18n("Open File to Verify")); if (!url.isEmpty()) { @@ -478,7 +478,7 @@ void KgpgApp::slotCheckMd5() void KgpgApp::slotPreSignFile() { ////////////////////////////////////// create a detached signature for a chosen file - KURL url=KFileDialog::getOpenURL(TQString::null,i18n("*|All Files"), this, i18n("Open File to Sign")); + KURL url=KFileDialog::getOpenURL(TQString(),i18n("*|All Files"), this, i18n("Open File to Sign")); if (!url.isEmpty()) slotSignFile(url); } @@ -509,7 +509,7 @@ void KgpgApp::slotSignFile(KURL url) void KgpgApp::slotPreVerifyFile() { - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*|All Files"), this, i18n("Open File to Verify")); slotVerifyFile(url); } @@ -517,7 +517,7 @@ void KgpgApp::slotPreVerifyFile() void KgpgApp::slotVerifyFile(KURL url) { /////////////////////////////////// check file signature - TQString sigfile=TQString::null; + TQString sigfile=TQString(); if (!url.isEmpty()) { ////////////////////////////////////// try to find detached signature. if (!url.fileName().endsWith(".sig")) { @@ -528,7 +528,7 @@ void KgpgApp::slotVerifyFile(KURL url) TQFile fsig(sigfile); ////////////// if no .asc or .sig signature file included, assume the file is internally signed if (!fsig.exists()) - sigfile=TQString::null; + sigfile=TQString(); } } ///////////////////////// pipe gpg command diff --git a/kgpg/kgpgeditor.h b/kgpg/kgpgeditor.h index 31af386..c037a91 100644 --- a/kgpg/kgpgeditor.h +++ b/kgpg/kgpgeditor.h @@ -36,17 +36,18 @@ class KgpgView; class KgpgApp : public KMainWindow { Q_OBJECT + TQ_OBJECT friend class KgpgView; public: /** construtor of KgpgApp, calls all init functions to create the application. */ - KgpgApp(TQWidget *parent=0, const char *name=0,WFlags f = 0,KShortcut goHome=TQKeySequence(CTRL+Qt::Key_Home),bool mainWindow=false); + KgpgApp(TQWidget *tqparent=0, const char *name=0,WFlags f = 0,KShortcut goHome=TQKeySequence(CTRL+TQt::Key_Home),bool mainWindow=false); ~KgpgApp(); /** opens a file specified by commandline option */ - void openDocumentFile(const KURL& url,TQString encoding=TQString::null); + void openDocumentFile(const KURL& url,TQString encoding=TQString()); void openEncryptedDocumentFile(const KURL& url); /** returns a pointer to the current document connected to the KTMainWindow instance and is used by * the View class to access the document object's methods diff --git a/kgpg/kgpginterface.cpp b/kgpg/kgpginterface.cpp index d02c2a5..a564a41 100644 --- a/kgpg/kgpginterface.cpp +++ b/kgpg/kgpginterface.cpp @@ -76,12 +76,12 @@ FILE *fp; void KgpgInterface::updateIDs(TQString txtString) { - int cut=txtString.find(' ',22,false); + int cut=txtString.tqfind(' ',22,false); txtString.remove(0,cut); - if (txtString.find("(",0,false)!=-1) + if (txtString.tqfind("(",0,false)!=-1) txtString=txtString.section('(',0,0)+txtString.section(')',-1); - txtString.replace(TQRegExp("<"),"<"); - if (userIDs.find(txtString)==-1) + txtString.tqreplace(TQRegExp("<"),"<"); + if (userIDs.tqfind(txtString)==-1) { if (!userIDs.isEmpty()) userIDs+=i18n(" or "); @@ -92,14 +92,14 @@ void KgpgInterface::updateIDs(TQString txtString) void KgpgInterface::KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL destUrl, TQStringList Options, bool symetrical) { sourceFile=srcUrl; - message=TQString::null; + message=TQString(); KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); - *proc<<"--output"<<TQFile::encodeName(destUrl.path()); + *proc<<"--output"<<TQString(TQFile::encodeName(destUrl.path())); if (!symetrical) { *proc<<"-e"; @@ -108,7 +108,7 @@ void KgpgInterface::KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL de } else //////////// symetrical encryption, prompt for password *proc<<"-c"; - *proc<<TQFile::encodeName(srcUrl.path()); + *proc<<TQString(TQFile::encodeName(srcUrl.path())); ///////// when process ends, update dialog infos TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(encryptfin(KProcess *))); @@ -123,7 +123,7 @@ KgpgInterface::~KgpgInterface() void KgpgInterface::encryptfin(KProcess *) { - if (message.find("END_ENCRYPTION")!=-1) + if (message.tqfind("END_ENCRYPTION")!=-1) emit encryptionfinished(sourceFile); else { emit errormessage(message); @@ -134,12 +134,12 @@ void KgpgInterface::readencprocess(KProcIO *p) { TQString required; while (p->readln(required,true)!=-1) { - if (required.find("BEGIN_ENCRYPTION",0,false)!=-1) + if (required.tqfind("BEGIN_ENCRYPTION",0,false)!=-1) emit processstarted(sourceFile.path()); - if (required.find("GET_")!=-1) { - if (required.find("openfile.overwrite.okay")!=-1) - p->writeStdin("Yes"); - else if ((required.find("passphrase.enter")!=-1)) { + if (required.tqfind("GET_")!=-1) { + if (required.tqfind("openfile.overwrite.okay")!=-1) + p->writeStdin(TQString("Yes")); + else if ((required.tqfind("passphrase.enter")!=-1)) { TQCString passphrase; int code=KPasswordDialog::getNewPassword(passphrase,i18n("Enter passphrase for your file (symmetrical encryption):")); if (code!=TQDialog::Accepted) { @@ -149,7 +149,7 @@ void KgpgInterface::readencprocess(KProcIO *p) } p->writeStdin(passphrase,true); } else { - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } } @@ -162,10 +162,10 @@ void KgpgInterface::readencprocess(KProcIO *p) void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Options) { - message=TQString::null; + message=TQString(); step=3; decryptUrl=srcUrl.path(); - userIDs=TQString::null; + userIDs=TQString(); anonymous=false; KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); @@ -173,12 +173,12 @@ void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Option *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); if (!destUrl.fileName().isEmpty()) // a filename was entered - *proc<<"-o"<<TQFile::encodeName(destUrl.path()); + *proc<<"-o"<<TQString(TQFile::encodeName(destUrl.path())); - *proc<<"-d"<<TQFile::encodeName(srcUrl.path()); + *proc<<"-d"<<TQString(TQFile::encodeName(srcUrl.path())); TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(decryptfin(KProcess *))); TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readdecprocess(KProcIO *))); @@ -187,7 +187,7 @@ void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Option void KgpgInterface::decryptfin(KProcess *) { - if ((message.find("DECRYPTION_OKAY")!=-1) && (message.find("END_DECRYPTION")!=-1)) //&& (message.find("GOODMDC")!=-1) + if ((message.tqfind("DECRYPTION_OKAY")!=-1) && (message.tqfind("END_DECRYPTION")!=-1)) //&& (message.tqfind("GOODMDC")!=-1) emit decryptionfinished(); else emit errormessage(message); @@ -198,30 +198,30 @@ void KgpgInterface::readdecprocess(KProcIO *p) { TQString required; while (p->readln(required,true)!=-1) { - if (required.find("BEGIN_DECRYPTION",0,false)!=-1) + if (required.tqfind("BEGIN_DECRYPTION",0,false)!=-1) emit processstarted(decryptUrl); - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("ENC_TO")!=-1) { - if (required.find("0000000000000000")!=-1) + if (required.tqfind("ENC_TO")!=-1) { + if (required.tqfind("0000000000000000")!=-1) anonymous=true; } - if (required.find("GET_")!=-1) { - if (required.find("openfile.overwrite.okay")!=-1) - p->writeStdin("Yes"); - else if ((required.find("passphrase.enter")!=-1)) { + if (required.tqfind("GET_")!=-1) { + if (required.tqfind("openfile.overwrite.okay")!=-1) + p->writeStdin(TQString("Yes")); + else if ((required.tqfind("passphrase.enter")!=-1)) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); - userIDs.replace(TQRegExp("<"),"<"); + userIDs.tqreplace(TQRegExp("<"),"<"); TQCString passphrase; TQString passdlgmessage; if (anonymous) passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); if ((step<3) && (!anonymous)) - passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step); + passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); - passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs); + passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); if (code!=TQDialog::Accepted) { p->deleteLater(); @@ -229,11 +229,11 @@ void KgpgInterface::readdecprocess(KProcIO *p) return; } p->writeStdin(passphrase,true); - userIDs=TQString::null; + userIDs=TQString(); if (step>1) step--; else step=3; } else { - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } } @@ -247,7 +247,7 @@ void KgpgInterface::readdecprocess(KProcIO *p) void KgpgInterface::KgpgEncryptText(TQString text,TQStringList userIDs, TQStringList Options) { - message=TQString::null; + message=TQString(); //TQTextCodec *codec = KGlobal::charsets()->codecForName(KGlobal::locale()->encoding()); TQTextCodec *codec =TQTextCodec::codecForLocale (); if (codec->canEncode(text)) txtToEncrypt=text; @@ -257,7 +257,7 @@ void KgpgInterface::KgpgEncryptText(TQString text,TQStringList userIDs, TQString *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=1"<<"--utf8-strings"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); if (!userIDs.isEmpty()) { @@ -282,21 +282,21 @@ void KgpgInterface::txtencryptfin(KProcess *) if (!message.isEmpty()) emit txtencryptionfinished(message); else - emit txtencryptionfinished(TQString::null); + emit txtencryptionfinished(TQString()); } void KgpgInterface::txtreadencprocess(KProcIO *p) { TQString required; while (p->readln(required,true)!=-1) { - if (required.find("BEGIN_ENCRYPTION",0,false)!=-1) + if (required.tqfind("BEGIN_ENCRYPTION",0,false)!=-1) { p->writeStdin(txtToEncrypt,false); - txtToEncrypt=TQString::null; + txtToEncrypt=TQString(); p->closeWhenDone(); } else - if ((required.find("passphrase.enter")!=-1)) + if ((required.tqfind("passphrase.enter")!=-1)) { TQCString passphrase; TQString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)"); @@ -318,11 +318,11 @@ void KgpgInterface::txtreadencprocess(KProcIO *p) void KgpgInterface::KgpgDecryptText(TQString text,TQStringList Options) { - gpgOutput=TQString::null; - log=TQString::null; + gpgOutput=TQString(); + log=TQString(); - message=TQString::null; - userIDs=TQString::null; + message=TQString(); + userIDs=TQString(); step=3; anonymous=false; decfinished=false; @@ -331,7 +331,7 @@ void KgpgInterface::KgpgDecryptText(TQString text,TQStringList Options) KProcess *proc=new KProcess(); *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=2"<<"--no-batch"<<"--utf8-strings"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); *proc<<"-d"; ///////// when process ends, update dialog infos @@ -370,23 +370,23 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int ) log.append(data); int pos; - while ((pos=gpgOutput.find("\n"))!=-1) + while ((pos=gpgOutput.tqfind("\n"))!=-1) { TQString required=gpgOutput.left(pos); gpgOutput.remove(0,pos+2); - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("ENC_TO")!=-1) + if (required.tqfind("ENC_TO")!=-1) { - if (required.find("0000000000000000")!=-1) + if (required.tqfind("0000000000000000")!=-1) anonymous=true; } - if (required.find("GET_")!=-1) + if (required.tqfind("GET_")!=-1) { - if ((required.find("passphrase.enter")!=-1)) + if ((required.tqfind("passphrase.enter")!=-1)) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); @@ -395,8 +395,8 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int ) if (anonymous) passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); if ((step<3) && (!anonymous)) - passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step); - passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs); + passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); + passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); if (code!=TQDialog::Accepted) { @@ -406,7 +406,7 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int ) } passphrase.append("\n"); p->writeStdin(passphrase,passphrase.length()); - userIDs=TQString::null; + userIDs=TQString(); if (step>1) step--; else step=3; } @@ -417,16 +417,16 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int ) } } - if (required.find("BEGIN_DECRYPTION")!=-1) + if (required.tqfind("BEGIN_DECRYPTION")!=-1) { p->closeStdin(); - required=TQString::null; + required=TQString(); } - if (required.find("END_DECRYPTION")!=-1) decfinished=true; - if (required.find("DECRYPTION_OKAY")!=-1) decok=true; - if (required.find("DECRYPTION_FAILED")!=-1) decok=false; - if (required.find("BADMDC")!=-1) badmdc=true; + if (required.tqfind("END_DECRYPTION")!=-1) decfinished=true; + if (required.tqfind("DECRYPTION_OKAY")!=-1) decok=true; + if (required.tqfind("DECRYPTION_FAILED")!=-1) decok=false; + if (required.tqfind("BADMDC")!=-1) badmdc=true; } } ////////////////////////////////////////////////////////////////////////////////////////////////////////// Text signing @@ -434,7 +434,7 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int ) void KgpgInterface::KgpgSignText(TQString text,TQString userIDs, TQStringList Options) { - message=TQString::null; + message=TQString(); step=4; TQString txtprocess; TQTextCodec *codec =TQTextCodec::codecForLocale (); @@ -445,7 +445,7 @@ void KgpgInterface::KgpgSignText(TQString text,TQString userIDs, TQStringList Op *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=1"<<"--utf8-strings"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); *proc<<"--clearsign"<<"-u"<<userIDs; ///////// when process ends, update dialog infos @@ -473,7 +473,7 @@ void KgpgInterface::txtsignfin(KProcess *) if (!message.isEmpty()) emit txtSignOver(message); else - emit txtSignOver(TQString::null); + emit txtSignOver(TQString()); } void KgpgInterface::txtsignprocess(KProcIO *p) @@ -482,17 +482,17 @@ void KgpgInterface::txtsignprocess(KProcIO *p) while (p->readln(required,true)!=-1) { // kdDebug(2100)<<"SIGNING: "<<required<<endl; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("GOOD_PASSPHRASE")!=-1) + if (required.tqfind("GOOD_PASSPHRASE")!=-1) { p->writeStdin(message,true); - message=TQString::null; + message=TQString(); p->closeWhenDone(); } - if ((required.find("passphrase.enter")!=-1)) + if ((required.tqfind("passphrase.enter")!=-1)) { if (step>1) step--; else step=3; @@ -501,8 +501,8 @@ void KgpgInterface::txtsignprocess(KProcIO *p) TQCString passphrase; TQString passdlgmessage; if (step<3) - passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step); - passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs); + passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); + passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); if (code!=TQDialog::Accepted) { @@ -522,8 +522,8 @@ void KgpgInterface::txtsignprocess(KProcIO *p) void KgpgInterface::KgpgDecryptFileToText(KURL srcUrl,TQStringList Options) { - message=TQString::null; - userIDs=TQString::null; + message=TQString(); + userIDs=TQString(); step=3; anonymous=false; decfinished=false; @@ -533,9 +533,9 @@ badmdc=false; KProcess *proc=new KProcess(); *proc<<"gpg"<<"--no-tty"<<"--utf8-strings"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=2"<<"--no-batch"<<"-o"<<"-"; for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) { - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); } - *proc<<"-d"<<TQFile::encodeName(srcUrl.path()); + *proc<<"-d"<<TQString(TQFile::encodeName(srcUrl.path())); ///////// when process ends, update dialog infos @@ -555,8 +555,8 @@ void KgpgInterface::KgpgVerifyText(TQString text) TQTextCodec *codec =TQTextCodec::codecForLocale (); if (!codec->canEncode(text)) text=text.utf8(); signmiss=false; - signID=TQString::null; - message=TQString::null; + signID=TQString(); + message=TQString(); KProcIO *verifyproc=new KProcIO(TQTextCodec::codecForLocale()); *verifyproc<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"<<"--verify"; connect(verifyproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotverifyresult(KProcess *))); @@ -586,13 +586,13 @@ TQString required; required=required.section("]",1,-1).stripWhiteSpace(); if (required.startsWith("GOODSIG")) { - TQString userName=required.section(" ",2,-1).replace(TQRegExp("<"),"<"); + TQString userName=required.section(" ",2,-1).tqreplace(TQRegExp("<"),"<"); userName=checkForUtf8(userName); - signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(userName).arg("0x"+required.section(" ",1,1).right(8)); + signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(userName).tqarg("0x"+required.section(" ",1,1).right(8)); } if (required.startsWith("BADSIG")) { - signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"<")).arg("0x"+required.section(" ",1,1).right(8)); + signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"<")).tqarg("0x"+required.section(" ",1,1).right(8)); } if (required.startsWith("NO_PUBKEY")) { @@ -611,15 +611,15 @@ TQString required; /////////////////////////////////////////////////////////////////////////////////////////////////// MD5 -Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( parent, name, true,i18n("MD5 Checksum"),Apply | Close) +Md5Widget::Md5Widget(TQWidget *tqparent, const char *name,KURL url):KDialogBase( tqparent, name, true,i18n("MD5 Checksum"),Apply | Close) { setButtonApply(i18n("Compare MD5 with Clipboard")); - mdSum=TQString::null; + mdSum=TQString(); TQFile f(url.path()); f.open( IO_ReadOnly); KMD5 checkfile; checkfile.reset(); - checkfile.update(f); + checkfile.update(*TQT_TQIODEVICE(&f)); mdSum=checkfile.hexDigest().data(); f.close(); TQWidget *page = new TQWidget(this); @@ -628,7 +628,7 @@ Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( p TQGridLayout *MyDialogLayout = new TQGridLayout( page, 1, 1, 5, 6, "MyDialogLayout"); TQLabel *TextLabel1 = new TQLabel( page, "TextLabel1" ); - TextLabel1->setText(i18n("MD5 sum for <b>%1</b> is:").arg(url.fileName())); + TextLabel1->setText(i18n("MD5 sum for <b>%1</b> is:").tqarg(url.fileName())); MyDialogLayout->addWidget( TextLabel1, 0, 0 ); KLineEdit *KRestrictedLine1 = new KLineEdit(mdSum,page); @@ -641,7 +641,7 @@ Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( p KLed1=new KLed(TQColor(80,80,80),KLed::Off,KLed::Sunken,KLed::Circular,page,"KLed1"); KLed1->off(); - KLed1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, KLed1->sizePolicy().hasHeightForWidth() ) ); + KLed1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, KLed1->sizePolicy().hasHeightForWidth() ) ); Layout4->addWidget( KLed1 ); TextLabel1_2 = new TQLabel( page, "TextLabel1_2" ); @@ -653,7 +653,7 @@ Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( p MyDialogLayout->addItem( spacer, 3, 0 ); page->show(); - page->resize(page->minimumSize()); + page->resize(page->tqminimumSize()); setMainWidget(page); @@ -664,14 +664,14 @@ Md5Widget::~Md5Widget() void Md5Widget::slotApply() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQString text; // Copy text from the clipboard (paste) - text = cb->text(QClipboard::Clipboard); + text = cb->text(TQClipboard::Clipboard); if ( !text.isEmpty() ) { text=text.stripWhiteSpace(); - while (text.find(' ')!=-1) - text.remove(text.find(' '),1); + while (text.tqfind(' ')!=-1) + text.remove(text.tqfind(' '),1); if (text==mdSum) { TextLabel1_2->setText(i18n("<b>Correct checksum</b>, file is ok.")); KLed1->setColor(TQColor(0,255,0)); @@ -693,17 +693,17 @@ void Md5Widget::slotApply() void KgpgInterface::KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options) { ////////////////////////////////////// create a detached signature for a chosen file - message=TQString::null; + message=TQString(); step=3; ///////////// create gpg command KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); keyID=keyID.stripWhiteSpace(); *proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--utf8-strings"<<"--status-fd=2"<<"--command-fd=0"<<"-u"<<keyID.local8Bit(); for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) - if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it); + if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQString(TQFile::encodeName(*it)); - *proc<<"--output"<<TQFile::encodeName(srcUrl.path()+".sig"); - *proc<<"--detach-sig"<<TQFile::encodeName(srcUrl.path()); + *proc<<"--output"<<TQString(TQFile::encodeName(srcUrl.path()+".sig")); + *proc<<"--detach-sig"<<TQString(TQFile::encodeName(srcUrl.path())); TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(signfin(KProcess *))); TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readsignprocess(KProcIO *))); @@ -714,9 +714,9 @@ void KgpgInterface::KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options void KgpgInterface::signfin(KProcess *) { - if (message.find("SIG_CREATED")!=-1) - KMessageBox::information(0,i18n("The signature file %1 was successfully created.").arg(file.fileName())); - else if (message.find("BAD_PASSPHRASE")!=-1) + if (message.tqfind("SIG_CREATED")!=-1) + KMessageBox::information(0,i18n("The signature file %1 was successfully created.").tqarg(file.fileName())); + else if (message.tqfind("BAD_PASSPHRASE")!=-1) KMessageBox::sorry(0,i18n("Bad passphrase, signature was not created.")); else KMessageBox::sorry(0,message); @@ -728,20 +728,20 @@ void KgpgInterface::readsignprocess(KProcIO *p) { TQString required; while (p->readln(required,true)!=-1) { - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("GET_")!=-1) { - if (required.find("openfile.overwrite.okay")!=-1) - p->writeStdin("Yes"); - else if ((required.find("passphrase.enter")!=-1)) { + if (required.tqfind("GET_")!=-1) { + if (required.tqfind("openfile.overwrite.okay")!=-1) + p->writeStdin(TQString("Yes")); + else if ((required.tqfind("passphrase.enter")!=-1)) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); TQCString passphrase; TQString passdlgmessage; if (step<3) - passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").arg(step); - passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs); + passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").tqarg(step); + passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); if (code!=TQDialog::Accepted) { p->deleteLater(); @@ -749,11 +749,11 @@ void KgpgInterface::readsignprocess(KProcIO *p) return; } p->writeStdin(passphrase,true); - userIDs=TQString::null; + userIDs=TQString(); if (step>1) step--; else step=3; } else { - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } } @@ -767,16 +767,16 @@ void KgpgInterface::readsignprocess(KProcIO *p) void KgpgInterface::KgpgVerifyFile(KURL sigUrl,KURL srcUrl) { ////////////////////////////////////// verify signature for a chosen file - message=TQString::null; - signID=TQString::null; + message=TQString(); + signID=TQString(); signmiss=false; ///////////// create gpg command KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); file=sigUrl; *proc<<"gpg"<<"--no-tty"<<"--utf8-strings"<<"--no-secmem-warning"<<"--status-fd=2"<<"--verify"; if (!srcUrl.isEmpty()) - *proc<<TQFile::encodeName(srcUrl.path()); - *proc<<TQFile::encodeName(sigUrl.path()); + *proc<<TQString(TQFile::encodeName(srcUrl.path())); + *proc<<TQString(TQFile::encodeName(sigUrl.path())); TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(verifyfin(KProcess *))); TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readprocess(KProcIO *))); @@ -790,8 +790,8 @@ TQString required; while (p->readln(required,true)!=-1) { message+=required+"\n"; - if (required.find("GET_")!=-1) { - p->writeStdin("quit"); + if (required.tqfind("GET_")!=-1) { + p->writeStdin(TQString("quit")); p->closeWhenDone(); } required=required.section("]",1,-1).stripWhiteSpace(); @@ -799,12 +799,12 @@ TQString required; signID=i18n("No signature found."); if (required.startsWith("GOODSIG")) { - signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"<")).arg("0x"+required.section(" ",1,1).right(8)); + signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"<")).tqarg("0x"+required.section(" ",1,1).right(8)); } if (required.startsWith("BADSIG")) { signID=i18n("<qt><b>BAD signature</b> from:<br> %1<br>Key id: %2<br><br>" - "<b>The file is corrupted!</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"<")).arg("0x"+required.section(" ",1,1).right(8)); + "<b>The file is corrupted!</b></qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"<")).tqarg("0x"+required.section(" ",1,1).right(8)); } if (required.startsWith("NO_PUBKEY")) { @@ -827,7 +827,7 @@ void KgpgInterface::verifyfin(KProcess *) } else { if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>" - "Do you want to import this key from a keyserver?</qt>").arg(signID),file.fileName(),TQString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) + "Do you want to import this key from a keyserver?</qt>").tqarg(signID),file.fileName(),TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) emit verifyquerykey(signID); } emit verifyfinished(); @@ -839,12 +839,12 @@ void KgpgInterface::verifyfin(KProcess *) void KgpgInterface::KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail,bool local,int checking) { - signKeyMail.replace(TQRegExp("<"),"<"); + signKeyMail.tqreplace(TQRegExp("<"),"<"); konsChecked=checking; konsLocal=local; konsSignKey=signKeyID; konsKeyID=keyID; - errMessage=TQString::null; + errMessage=TQString(); if (checkuid(keyID)>0) { openSignConsole(); @@ -853,7 +853,7 @@ void KgpgInterface::KgpgSignKey(TQString keyID,TQString signKeyID,TQString signK signSuccess=0; step=1; - output=TQString::null; + output=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--utf8-strings"<<"--command-fd=0"<<"--status-fd=2"<<"-u"<<signKeyID; *conprocess<<"--edit-key"<<keyID; @@ -866,74 +866,74 @@ void KgpgInterface::KgpgSignKey(TQString keyID,TQString signKeyID,TQString signK void KgpgInterface::sigprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); if (signSuccess==4) { - if (required.find("GET_")!=-1) - p->writeStdin("quit"); + if (required.tqfind("GET_")!=-1) + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } - if ((required.find("GOOD_PASSPHRASE")!=-1)) { + if ((required.tqfind("GOOD_PASSPHRASE")!=-1)) { signSuccess=3; step=2; } - if (required.find("sign_uid.expire")!=-1) { - p->writeStdin("Never"); - required=TQString::null; + if (required.tqfind("sign_uid.expire")!=-1) { + p->writeStdin(TQString("Never")); + required=TQString(); } - if (required.find("sign_uid.class")!=-1) { + if (required.tqfind("sign_uid.class")!=-1) { p->writeStdin(TQString::number(konsChecked)); - required=TQString::null; + required=TQString(); } - if (required.find("sign_uid.okay")!=-1) { - p->writeStdin("Y"); - required=TQString::null; + if (required.tqfind("sign_uid.okay")!=-1) { + p->writeStdin(TQString("Y")); + required=TQString(); } - if (required.find("sign_all.okay")!=-1) { - p->writeStdin("Y"); - required=TQString::null; + if (required.tqfind("sign_all.okay")!=-1) { + p->writeStdin(TQString("Y")); + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString signpass; int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>") - .arg(errMessage).arg(userIDs)); + .tqarg(errMessage).tqarg(userIDs)); if (code!=TQDialog::Accepted) { signSuccess=4; ///// aborted by user mode - required=TQString::null; - p->writeStdin("quit"); + required=TQString(); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(signpass,true); - required=TQString::null; + required=TQString(); // step=2; } - if ((step==2) && (required.find("keyedit.prompt")!=-1)) { - p->writeStdin("save"); - required=TQString::null; + if ((step==2) && (required.tqfind("keyedit.prompt")!=-1)) { + p->writeStdin(TQString("save")); + required=TQString(); } - if (required.find("BAD_PASSPHRASE")!=-1) { + if (required.tqfind("BAD_PASSPHRASE")!=-1) { errMessage=i18n("<b>Bad passphrase</b>. Try again.</br>"); - required=TQString::null; + required=TQString(); signSuccess=2; ///// bad passphrase } - if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode + if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode { if (signSuccess!=2) signSuccess=1; ///// switching to console mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -947,7 +947,7 @@ void KgpgInterface::signover(KProcess *) emit signatureFinished(signSuccess); //// signature successful or bad passphrase else { KDetailedConsole *q=new KDetailedConsole(0,"sign_error",i18n("<qt>Signing key <b>%1</b> with key <b>%2</b> failed.<br>" - "Do you want to try signing the key in console mode?</qt>").arg(konsKeyID).arg(konsSignKey),output); + "Do you want to try signing the key in console mode?</qt>").tqarg(konsKeyID).tqarg(konsSignKey),output); if (q->exec()==TQDialog::Accepted) openSignConsole(); else @@ -997,7 +997,7 @@ void KgpgInterface::KgpgDelSignature(TQString keyID,TQString signKeyID) while ( fgets( buffer, sizeof(buffer), fp)) { encResult=buffer; if (encResult.startsWith("sig")) { - if (encResult.find(message)!=-1) + if (encResult.tqfind(message)!=-1) break; signb++; } else if (encResult.startsWith("rev")) @@ -1016,26 +1016,26 @@ void KgpgInterface::KgpgDelSignature(TQString keyID,TQString signKeyID) void KgpgInterface::delsigprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { - if (required.find("keyedit.delsig")!=-1){ + if (required.tqfind("keyedit.delsig")!=-1){ if ((sigsearch==signb) && (step==0)) { - p->writeStdin("Y"); + p->writeStdin(TQString("Y")); step=1; } else - p->writeStdin("n"); + p->writeStdin(TQString("n")); sigsearch++; - required=TQString::null; + required=TQString(); } - if ((step==1) && (required.find("keyedit.prompt")!=-1)) { - p->writeStdin("save"); - required=TQString::null; + if ((step==1) && (required.tqfind("keyedit.prompt")!=-1)) { + p->writeStdin(TQString("save")); + required=TQString(); deleteSuccess=true; } - if (required.find("GET_LINE")!=-1) { - p->writeStdin("quit"); + if (required.tqfind("GET_LINE")!=-1) { + p->writeStdin(TQString("quit")); p->closeWhenDone(); deleteSuccess=false; } @@ -1079,8 +1079,8 @@ void KgpgInterface::KgpgKeyExpire(TQString keyID,TQDate date,bool unlimited) if (unlimited) expirationDelay=0; else - expirationDelay=TQDate::currentDate().daysTo(date); - output=TQString::null; + expirationDelay=TQDate::tqcurrentDate().daysTo(date); + output=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings"; *conprocess<<"--edit-key"<<keyID<<"expire"; @@ -1092,56 +1092,56 @@ void KgpgInterface::KgpgKeyExpire(TQString keyID,TQDate date,bool unlimited) void KgpgInterface::expprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if ((required.find("GOOD_PASSPHRASE")!=-1)) { + if ((required.tqfind("GOOD_PASSPHRASE")!=-1)) { expSuccess=3; step=2; } - if (required.find("keygen.valid")!=-1) { + if (required.tqfind("keygen.valid")!=-1) { p->writeStdin(TQString::number(expirationDelay)); - required=TQString::null; + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString signpass; - int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); + int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); if (code!=TQDialog::Accepted) { expSuccess=3; ///// aborted by user mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(signpass,true); - required=TQString::null; + required=TQString(); // step=2; } - if ((step==2) && (required.find("keyedit.prompt")!=-1)) { - p->writeStdin("save"); + if ((step==2) && (required.tqfind("keyedit.prompt")!=-1)) { + p->writeStdin(TQString("save")); p->closeWhenDone(); - required=TQString::null; + required=TQString(); } - if ((step==2) && (required.find("keyedit.save.okay")!=-1)) { - p->writeStdin("YES"); + if ((step==2) && (required.tqfind("keyedit.save.okay")!=-1)) { + p->writeStdin(TQString("YES")); p->closeWhenDone(); - required=TQString::null; + required=TQString(); } - if (required.find("BAD_PASSPHRASE")!=-1) { - p->writeStdin("quit"); + if (required.tqfind("BAD_PASSPHRASE")!=-1) { + p->writeStdin(TQString("quit")); p->closeWhenDone(); expSuccess=2; ///// bad passphrase } - if ((required.find("GET_")!=-1) && (expSuccess!=2)) /////// gpg asks for something unusal, turn to konsole mode + if ((required.tqfind("GET_")!=-1) && (expSuccess!=2)) /////// gpg asks for something unusal, turn to konsole mode { expSuccess=1; ///// switching to console mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -1174,7 +1174,7 @@ void KgpgInterface::KgpgTrustExpire(TQString keyID,int keyTrust) trustValue=keyTrust+1; /* Don't know=1; Do NOT trust=2; Marginally=3; Fully=4; Ultimately=5; */ - output=TQString::null; + output=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings"; *conprocess<<"--edit-key"<<keyID<<"trust"; @@ -1186,29 +1186,29 @@ void KgpgInterface::KgpgTrustExpire(TQString keyID,int keyTrust) void KgpgInterface::trustprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("edit_ownertrust.set_ultimate.okay")!=-1) { - p->writeStdin("YES"); - required=TQString::null; + if (required.tqfind("edit_ownertrust.set_ultimate.okay")!=-1) { + p->writeStdin(TQString("YES")); + required=TQString(); } - if (required.find("edit_ownertrust.value")!=-1) { + if (required.tqfind("edit_ownertrust.value")!=-1) { p->writeStdin(TQString::number(trustValue)); - required=TQString::null; + required=TQString(); } - if (required.find("keyedit.prompt")!=-1) { - p->writeStdin("save"); + if (required.tqfind("keyedit.prompt")!=-1) { + p->writeStdin(TQString("save")); p->closeWhenDone(); - required=TQString::null; + required=TQString(); } - if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode + if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode { expSuccess=1; ///// switching to console mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -1229,8 +1229,8 @@ void KgpgInterface::trustover(KProcess *) void KgpgInterface::KgpgChangePass(TQString keyID) { step=1; - output=TQString::null; - message=TQString::null; + output=TQString(); + message=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--no-use-agent"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings"; *conprocess<<"--edit-key"<<keyID<<"passwd"; @@ -1242,43 +1242,43 @@ void KgpgInterface::KgpgChangePass(TQString keyID) void KgpgInterface::passprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if ((step>2) && (required.find("keyedit.prompt")!=-1)) { + if ((step>2) && (required.tqfind("keyedit.prompt")!=-1)) { if (step==3) { emit passwordChanged(); - p->writeStdin("save"); + p->writeStdin(TQString("save")); } - else p->writeStdin("quit"); - required=TQString::null; + else p->writeStdin(TQString("quit")); + required=TQString(); } - if ((required.find("GOOD_PASSPHRASE")!=-1) && (step==2)) + if ((required.tqfind("GOOD_PASSPHRASE")!=-1) && (step==2)) step=3; - if ((required.find("BAD_PASSPHRASE")!=-1) && (step==2)) { + if ((required.tqfind("BAD_PASSPHRASE")!=-1) && (step==2)) { step=1; message=i18n("<b>Bad passphrase</b>. Try again<br>"); } - if ((required.find("passphrase.enter")!=-1)) { + if ((required.tqfind("passphrase.enter")!=-1)) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); - userIDs.replace(TQRegExp("<"),"<"); + userIDs.tqreplace(TQRegExp("<"),"<"); if (step==1) { TQCString passphrase; int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>") - .arg(message).arg(userIDs)); + .tqarg(message).tqarg(userIDs)); if (code!=TQDialog::Accepted) { - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); // p->closeWhenDone(); emit processaborted(true); p->deleteLater(); @@ -1290,26 +1290,26 @@ void KgpgInterface::passprocess(KProcIO *p) if (step==3) { TQCString passphrase; - int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").arg(userIDs)); + int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").tqarg(userIDs)); if (code!=TQDialog::Accepted) { step=4; - p->writeStdin("quit"); - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); + p->writeStdin(TQString("quit")); p->closeWhenDone(); emit processaborted(true); return; } p->writeStdin(passphrase,true); - userIDs=TQString::null; + userIDs=TQString(); } - required=TQString::null; + required=TQString(); } - if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode + if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode { - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -1329,7 +1329,7 @@ void KgpgInterface::passover(KProcess *) TQString KgpgInterface::getKey(TQStringList IDs, bool attributes) { - keyString=TQString::null; + keyString=TQString(); KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); *proc<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--utf8-strings"; *proc<<"--export"<<"--armor"; @@ -1359,7 +1359,7 @@ void KgpgInterface::importKeyURL(KURL url) ///////////// import a key if( KIO::NetAccess::download( url, tempKeyFile,0) ) { - message=TQString::null; + message=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--utf8-strings"<<"--import"; *conprocess<<"--allow-secret-key-import"; @@ -1373,7 +1373,7 @@ void KgpgInterface::importKeyURL(KURL url) void KgpgInterface::importKey(TQString keystr) { ///////////// import a key - message=TQString::null; + message=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--import"; *conprocess<<"--allow-secret-key-import"; @@ -1394,14 +1394,14 @@ kdDebug(2100)<<"Importing is over"<<endl; TQString parsedOutput=message; TQStringList importedKeys; - while (parsedOutput.find("IMPORTED")!=-1) { - parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8); + while (parsedOutput.tqfind("IMPORTED")!=-1) { + parsedOutput.remove(0,parsedOutput.tqfind("IMPORTED")+8); importedKeys<<parsedOutput.section("\n",0,0).stripWhiteSpace(); importedKeysIds<<parsedOutput.stripWhiteSpace().section(' ',0,0); } - if (message.find("IMPORT_RES")!=-1) { + if (message.tqfind("IMPORT_RES")!=-1) { parsedOutput=message.section("IMPORT_RES",-1,-1).stripWhiteSpace(); messageList=TQStringList::split(" ",parsedOutput,true); @@ -1460,7 +1460,7 @@ void KgpgInterface::importprocess(KProcIO *p) { TQString outp; while (p->readln(outp)!=-1) { - if (outp.find("http-proxy")==-1) + if (outp.tqfind("http-proxy")==-1) message+=outp+"\n"; } } @@ -1474,7 +1474,7 @@ void KgpgInterface::KgpgAddUid(TQString keyID,TQString name,TQString email,TQStr uidName=name; uidComment=comment; uidEmail=email; -output=TQString::null; +output=TQString(); addSuccess=true; KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); @@ -1493,52 +1493,52 @@ else emit addUidError(output); void KgpgInterface::adduidprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("keygen.name")!=-1) { + if (required.tqfind("keygen.name")!=-1) { p->writeStdin(uidName); - required=TQString::null; + required=TQString(); } - if (required.find("keygen.email")!=-1) { + if (required.tqfind("keygen.email")!=-1) { p->writeStdin(uidEmail); - required=TQString::null; + required=TQString(); } - if (required.find("keygen.comment")!=-1) { + if (required.tqfind("keygen.comment")!=-1) { p->writeStdin(uidComment); - required=TQString::null; + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString delpass; int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>") - .arg(userIDs)); + .tqarg(userIDs)); if (code!=TQDialog::Accepted) { //addSuccess=false; - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(delpass,true); - required=TQString::null; + required=TQString(); } - if (required.find("keyedit.prompt")!=-1) { - p->writeStdin("save"); - required=TQString::null; + if (required.tqfind("keyedit.prompt")!=-1) { + p->writeStdin(TQString("save")); + required=TQString(); } - if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode + if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode { kdDebug(2100)<<"unknown request"<<endl; addSuccess=false; ///// switching to console mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } } @@ -1557,7 +1557,7 @@ void KgpgInterface::adduidprocess(KProcIO *p) void KgpgInterface::KgpgGetPhotoList(TQString keyID) { photoList.clear(); -output=TQString::null; +output=TQString(); photoCount=1; userIDs=keyID; @@ -1571,7 +1571,7 @@ userIDs=keyID; void KgpgInterface::photoreadprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; if (required.startsWith("uat") || required.startsWith("uid")) photoCount++; @@ -1595,7 +1595,7 @@ KTempFile *kgpginfotmp=new KTempFile(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"; - *conprocess<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput)<<"--edit-key"<<userIDs<<"uid"<<TQString::number(uid)<<"showphoto"; + *conprocess<<"--photo-viewer"<<TQString(TQFile::encodeName(pgpgOutput))<<"--edit-key"<<userIDs<<"uid"<<TQString::number(uid)<<"showphoto"; conprocess->start(KProcess::Block); if (kgpginfotmp->file()->size()>0) { @@ -1609,7 +1609,7 @@ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); void KgpgInterface::KgpgDeletePhoto(TQString keyID,TQString uid) { delSuccess=true; - output=TQString::null; + output=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"; *conprocess<<"--edit-key"<<keyID<<"uid"<<uid<<"deluid"; @@ -1626,41 +1626,41 @@ else emit delPhotoError(output); void KgpgInterface::delphotoprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("keyedit.remove.uid.okay")!=-1) { - p->writeStdin("YES"); - required=TQString::null; + if (required.tqfind("keyedit.remove.uid.okay")!=-1) { + p->writeStdin(TQString("YES")); + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString delpass; - int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); + int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); if (code!=TQDialog::Accepted) { //deleteSuccess=false; - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(delpass,true); - required=TQString::null; + required=TQString(); } - if (required.find("keyedit.prompt")!=-1) { - p->writeStdin("save"); - required=TQString::null; + if (required.tqfind("keyedit.prompt")!=-1) { + p->writeStdin(TQString("save")); + required=TQString(); } - if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode + if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode { kdDebug(2100)<<"unknown request"<<endl; delSuccess=false; - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -1671,7 +1671,7 @@ void KgpgInterface::delphotoprocess(KProcIO *p) void KgpgInterface::KgpgAddPhoto(TQString keyID,TQString imagePath) { photoUrl=imagePath; -output=TQString::null; +output=TQString(); addSuccess=true; KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"; @@ -1689,52 +1689,52 @@ else emit addPhotoError(output); void KgpgInterface::addphotoprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if (required.find("photoid.jpeg.add")!=-1) { + if (required.tqfind("photoid.jpeg.add")!=-1) { p->writeStdin(photoUrl); - required=TQString::null; + required=TQString(); } - if (required.find("photoid.jpeg.size")!=-1) { - if (KMessageBox::questionYesNo(0,i18n("This image is very large. Use it anyway?"), TQString::null, i18n("Use Anyway"), i18n("Do Not Use"))==KMessageBox::Yes) - p->writeStdin("Yes"); + if (required.tqfind("photoid.jpeg.size")!=-1) { + if (KMessageBox::questionYesNo(0,i18n("This image is very large. Use it anyway?"), TQString(), i18n("Use Anyway"), i18n("Do Not Use"))==KMessageBox::Yes) + p->writeStdin(TQString("Yes")); else { - p->writeStdin("No"); - p->writeStdin(""); - p->writeStdin("quit"); + p->writeStdin(TQString("No")); + p->writeStdin(TQString("")); + p->writeStdin(TQString("quit")); } - required=TQString::null; + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString delpass; - int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); + int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); if (code!=TQDialog::Accepted) { //deleteSuccess=false; - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(delpass,true); - required=TQString::null; + required=TQString(); } - if (required.find("keyedit.prompt")!=-1) { - p->writeStdin("save"); - required=TQString::null; + if (required.tqfind("keyedit.prompt")!=-1) { + p->writeStdin(TQString("save")); + required=TQString(); } - if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode + if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode { kdDebug(2100)<<"unknown request"<<endl; - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); addSuccess=false; p->closeWhenDone(); @@ -1751,7 +1751,7 @@ void KgpgInterface::KgpgRevokeKey(TQString keyID,TQString revokeUrl,int reason,T revokeSuccess=false; revokeDescription=description; certificateUrl=revokeUrl; - output=TQString::null; + output=TQString(); KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--logger-fd=2"<<"--command-fd=0"<<"--utf8-strings"; if (!revokeUrl.isEmpty()) @@ -1778,50 +1778,50 @@ void KgpgInterface::revokeover(KProcess *) void KgpgInterface::revokeprocess(KProcIO *p) { - TQString required=TQString::null; + TQString required=TQString(); while (p->readln(required,true)!=-1) { output+=required+"\n"; - if (required.find("USERID_HINT",0,false)!=-1) + if (required.tqfind("USERID_HINT",0,false)!=-1) updateIDs(required); - if ((required.find("GOOD_PASSPHRASE")!=-1)) + if ((required.tqfind("GOOD_PASSPHRASE")!=-1)) revokeSuccess=true; - if ((required.find("gen_revoke.okay")!=-1) || (required.find("ask_revocation_reason.okay")!=-1) || (required.find("openfile.overwrite.okay")!=-1)) { - p->writeStdin("YES"); - required=TQString::null; + if ((required.tqfind("gen_revoke.okay")!=-1) || (required.tqfind("ask_revocation_reason.okay")!=-1) || (required.tqfind("openfile.overwrite.okay")!=-1)) { + p->writeStdin(TQString("YES")); + required=TQString(); } - if (required.find("ask_revocation_reason.code")!=-1) { + if (required.tqfind("ask_revocation_reason.code")!=-1) { p->writeStdin(TQString::number(revokeReason)); - required=TQString::null; + required=TQString(); } - if (required.find("passphrase.enter")!=-1) { + if (required.tqfind("passphrase.enter")!=-1) { TQCString signpass; - int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); + int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); if (code!=TQDialog::Accepted) { expSuccess=3; ///// aborted by user mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); return; } p->writeStdin(signpass,true); - required=TQString::null; + required=TQString(); } - if (required.find("ask_revocation_reason.text")!=-1) { + if (required.tqfind("ask_revocation_reason.text")!=-1) { // kdDebug(2100)<<"description"<<endl; p->writeStdin(revokeDescription); - revokeDescription=TQString::null; - required=TQString::null; + revokeDescription=TQString(); + required=TQString(); } - if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode + if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode { kdDebug(2100)<<"unknown request"<<endl; expSuccess=1; ///// switching to console mode - p->writeStdin("quit"); + p->writeStdin(TQString("quit")); p->closeWhenDone(); } @@ -1850,14 +1850,14 @@ TQString KgpgInterface::getGpgSetting(TQString name,TQString configFile) } qfile.close(); } - return TQString::null; + return TQString(); } TQString KgpgInterface::getGpgMultiSetting(TQString name,TQString configFile) { // get GnuPG setting for item that can have multiple entries (eg. encrypt-to) -TQString parsedResult=TQString::null; +TQString parsedResult=TQString(); name=name.stripWhiteSpace()+" "; TQFile qfile(TQFile::encodeName(configFile)); @@ -1869,7 +1869,7 @@ TQString parsedResult=TQString::null; if (result.stripWhiteSpace().startsWith(name)) { result=result.stripWhiteSpace(); result.remove(0,name.length()); - if (parsedResult!=TQString::null) + if (parsedResult!=TQString()) parsedResult+=" "+result.stripWhiteSpace(); else parsedResult+=result.stripWhiteSpace(); @@ -1896,9 +1896,9 @@ void KgpgInterface::delGpgGroup(TQString name, TQString configFile) result2.remove(0,6); result2=result2.stripWhiteSpace(); if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("="))) - result=TQString::null; + result=TQString(); } - if (result!=TQString::null) textToWrite+=result+"\n"; + if (result!=TQString()) textToWrite+=result+"\n"; result=t.readLine(); } qfile.close(); @@ -1928,7 +1928,7 @@ void KgpgInterface::setGpgGroupSetting(TQString name,TQStringList values, TQStri if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("="))) { // kdDebug(2100)<<"Found group: "<<name<<endl; //kdDebug(2100)<<"New values: "<<values<<endl; - result=TQString("group %1=%2").arg(name).arg(values.join(" ")); + result=TQString("group %1=%2").tqarg(name).tqarg(values.join(" ")); found=true; } } @@ -1937,7 +1937,7 @@ void KgpgInterface::setGpgGroupSetting(TQString name,TQStringList values, TQStri } qfile.close(); if (!found) - textToWrite+="\n"+TQString("group %1=%2").arg(name).arg(values.join(" ")); + textToWrite+="\n"+TQString("group %1=%2").tqarg(name).tqarg(values.join(" ")); if (qfile.open(IO_WriteOnly)) { TQTextStream t( &qfile); @@ -1973,7 +1973,7 @@ TQStringList KgpgInterface::getGpgGroupSetting(TQString name,TQString configFile } qfile.close(); } - return TQString::null; + return TQString(); } TQStringList KgpgInterface::getGpgGroupNames(TQString configFile) @@ -2033,10 +2033,10 @@ void KgpgInterface::setGpgSetting(TQString name,TQString value,TQString url) if (!value.isEmpty()) result=name+" "+value; else - result=TQString::null; + result=TQString(); found=true; } - if (result!=TQString::null) textToWrite+=result+"\n"; + if (result!=TQString()) textToWrite+=result+"\n"; result=t.readLine(); } qfile.close(); @@ -2099,10 +2099,10 @@ void KgpgInterface::setGpgBoolSetting(TQString name,bool enable,TQString url) if (enable) result=name; else - result=TQString::null; + result=TQString(); found=true; } - if (result!=TQString::null) textToWrite+=result+"\n"; + if (result!=TQString()) textToWrite+=result+"\n"; result=t.readLine(); } qfile.close(); @@ -2119,7 +2119,7 @@ void KgpgInterface::setGpgBoolSetting(TQString name,bool enable,TQString url) TQString KgpgInterface::checkForUtf8bis(TQString txt) { - if (strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) + if (strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) txt=checkForUtf8(txt); else { txt=checkForUtf8(txt); @@ -2137,22 +2137,22 @@ TQString KgpgInterface::checkForUtf8(TQString txt) /* Make sure the encoding is UTF-8. * Test structure suggested by Werner Koch */ if (txt.isEmpty()) - return TQString::null; + return TQString(); for (s = txt.ascii(); *s && !(*s & 0x80); s++) ; - if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1)) + if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1)) return txt; /* The string is not in UTF-8 */ //if (strchr (txt.ascii(), 0xc3)) return (txt+" +++"); - if (txt.find("\\x")==-1) + if (txt.tqfind("\\x")==-1) return TQString::fromUtf8(txt.ascii()); - // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) { - for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) { + // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) { + for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); - txt.replace( idx, 4, str ); + txt.tqreplace( idx, 4, str ); } if (!strchr (txt.ascii(), 0xc3)) return TQString::fromUtf8(txt.ascii()); diff --git a/kgpg/kgpginterface.h b/kgpg/kgpginterface.h index 4d97891..92f41fd 100644 --- a/kgpg/kgpginterface.h +++ b/kgpg/kgpginterface.h @@ -33,10 +33,11 @@ class KLed; * Encrypt a file using gpg. */ -class KgpgInterface : public QObject +class KgpgInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -58,7 +59,7 @@ public slots: * @param Options String with the wanted gpg options. ex: "--armor" * @param symetrical bool whether the encryption should be symmetrical. */ - void KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL destUrl,TQStringList Options=TQString::null,bool symetrical=false); + void KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL destUrl,TQStringList Options=TQString(),bool symetrical=false); /**Encrypt file function * @param userIDs the key user identification. @@ -101,7 +102,7 @@ public slots: * @param signKeyMail TQString the name of the signing key (only used to prompt user for passphrase) * @param local bool should the signature be local */ - void KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail=TQString::null,bool local=false,int checking=0); + void KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail=TQString(),bool local=false,int checking=0); /**Key signature deletion function * @param keyID TQString the ID of the key @@ -115,14 +116,14 @@ public slots: * @param Options String with the wanted gpg options. ex: "--armor" * returns the encrypted text or empty string if encyption failed */ - void KgpgEncryptText(TQString text,TQStringList userIDs, TQStringList Options=TQString::null); + void KgpgEncryptText(TQString text,TQStringList userIDs, TQStringList Options=TQString()); /**Decrypt text function * @param text TQString text to be decrypted. * @param userID TQString the name of the decryption key (only used to prompt user for passphrase) */ //static TQString KgpgDecryptText(TQString text,TQString userID); - void KgpgDecryptText(TQString text,TQStringList Options=TQString::null); + void KgpgDecryptText(TQString text,TQStringList Options=TQString()); void txtdecryptfin(KProcess *); /**Extract list of photographic user id's @@ -389,8 +390,9 @@ private: class Md5Widget :public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Md5Widget(TQWidget *parent=0, const char *name=0,KURL url=KURL()); + Md5Widget(TQWidget *tqparent=0, const char *name=0,KURL url=KURL()); ~Md5Widget(); public slots: void slotApply(); diff --git a/kgpg/kgpglibrary.cpp b/kgpg/kgpglibrary.cpp index 419eca0..c0730b3 100644 --- a/kgpg/kgpglibrary.cpp +++ b/kgpg/kgpglibrary.cpp @@ -31,14 +31,14 @@ #include "kgpginterface.h" #include <kio/renamedlg.h> -KgpgLibrary::KgpgLibrary(TQWidget *parent, bool pgpExtension) +KgpgLibrary::KgpgLibrary(TQWidget *tqparent, bool pgpExtension) { if (pgpExtension) extension=".pgp"; else extension=".gpg"; popIsActive=false; - panel=parent; + panel=tqparent; } KgpgLibrary::~KgpgLibrary() @@ -84,7 +84,7 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList e } urlselected=fileToCrypt; KURL dest; - if (encryptOptions.find("--armor")!=encryptOptions.end()) + if (encryptOptions.tqfind("--armor")!=encryptOptions.end()) dest.setPath(urlselected.path()+".asc"); else dest.setPath(urlselected.path()+extension); @@ -92,11 +92,11 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList e TQFile fgpg(dest.path()); if (fgpg.exists()) { - KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,dest.path(),KIO::M_OVERWRITE); + KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString(),dest.path(),KIO::M_OVERWRITE); if (over->exec()==TQDialog::Rejected) { delete over; - emit systemMessage(TQString::null,true); + emit systemMessage(TQString(),true); return; } dest=over->newDestURL(); @@ -104,8 +104,8 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList e } int filesToEncode=urlselecteds.count(); if (filesToEncode>1) - emit systemMessage(i18n("<b>%1 Files left.</b>\nEncrypting </b>%2").arg(filesToEncode).arg(urlselecteds.first().path())); - else emit systemMessage(i18n("<b>Encrypting </b>%2").arg(urlselecteds.first().path())); + emit systemMessage(i18n("<b>%1 Files left.</b>\nEncrypting </b>%2").tqarg(filesToEncode).tqarg(urlselecteds.first().path())); + else emit systemMessage(i18n("<b>Encrypting </b>%2").tqarg(urlselecteds.first().path())); KgpgInterface *cryptFileProcess=new KgpgInterface(); pop = new KPassivePopup(panel); cryptFileProcess->KgpgEncryptFile(selec,urlselected,dest,encryptOptions,symetric); @@ -122,7 +122,7 @@ void KgpgLibrary::processpopup2(TQString fileName) { //pop->setTimeout(0); - pop->setView(i18n("Processing encryption (%1)").arg(fileName),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); + pop->setView(i18n("Processing encryption (%1)").tqarg(fileName),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); pop->show(); /*TQRect qRect(TQApplication::desktop()->screenGeometry()); int iXpos=qRect.width()/2-pop->width()/2; @@ -134,7 +134,7 @@ void KgpgLibrary::processpopup2(TQString fileName) void KgpgLibrary::shredpreprocessenc(KURL fileToShred) { popIsActive=false; - emit systemMessage(TQString::null); + emit systemMessage(TQString()); shredprocessenc(fileToShred); } @@ -149,11 +149,11 @@ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),TQT_SLOT( slotShredResult( KIO: void KgpgLibrary::slotShredResult( KIO::Job * job ) { - emit systemMessage(TQString::null); + emit systemMessage(TQString()); if (job && job->error()) { - job->showErrorDialog( (TQWidget*)parent() ); - emit systemMessage(TQString::null,true); + job->showErrorDialog( (TQWidget*)tqparent() ); + emit systemMessage(TQString(),true); KPassivePopup::message(i18n("KGpg Error"),i18n("Process halted, not all files were shredded."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),panel,"kgpg_error",0); } } @@ -161,7 +161,7 @@ void KgpgLibrary::slotShredResult( KIO::Job * job ) void KgpgLibrary::processenc(KURL) { - emit systemMessage(TQString::null); + emit systemMessage(TQString()); if (_shred) shredprocessenc(urlselecteds.first()); urlselecteds.pop_front (); if (urlselecteds.count()>0) @@ -171,7 +171,7 @@ void KgpgLibrary::processenc(KURL) void KgpgLibrary::processencerror(TQString mssge) { popIsActive=false; - emit systemMessage(TQString::null,true); + emit systemMessage(TQString(),true); KMessageBox::detailedSorry(panel,i18n("<b>Process halted</b>.<br>Not all files were encrypted."),mssge); } @@ -192,7 +192,7 @@ void KgpgLibrary::slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryp void KgpgLibrary::processpopup(TQString fileName) { - emit systemMessage(i18n("Decrypting %1").arg(fileName)); + emit systemMessage(i18n("Decrypting %1").tqarg(fileName)); pop->setTimeout(0); pop->setView(i18n("Processing decryption"),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); pop->show(); @@ -204,7 +204,7 @@ void KgpgLibrary::processpopup(TQString fileName) void KgpgLibrary::processdecover() { - emit systemMessage(TQString::null); + emit systemMessage(TQString()); delete pop; emit decryptionOver(); } @@ -213,7 +213,7 @@ void KgpgLibrary::processdecover() void KgpgLibrary::processdecerror(TQString mssge) { delete pop; - emit systemMessage(TQString::null); + emit systemMessage(TQString()); ///// test if file is a public key TQFile qfile(TQFile::encodeName(urlselected.path())); if (qfile.open(IO_ReadOnly)) { @@ -222,7 +222,7 @@ void KgpgLibrary::processdecerror(TQString mssge) qfile.close(); ////////////// if pgp data found, decode it if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import - int result=KMessageBox::warningContinueCancel(0,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").arg(urlselected.path()),i18n("Warning")); + int result=KMessageBox::warningContinueCancel(0,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").tqarg(urlselected.path()),i18n("Warning")); if (result==KMessageBox::Cancel) return; else { @@ -233,7 +233,7 @@ void KgpgLibrary::processdecerror(TQString mssge) } } else if (result.startsWith("-----BEGIN PGP PRIVATE KEY BLOCK")) {////// dropped file is a public key, ask for import qfile.close(); - KMessageBox::information(0,i18n("<p>The file <b>%1</b> is a private key block. Please use KGpg key manager to import it.</p>").arg(urlselected.path())); + KMessageBox::information(0,i18n("<p>The file <b>%1</b> is a private key block. Please use KGpg key manager to import it.</p>").tqarg(urlselected.path())); return; } } diff --git a/kgpg/kgpglibrary.h b/kgpg/kgpglibrary.h index 7eb7364..2e626d5 100644 --- a/kgpg/kgpglibrary.h +++ b/kgpg/kgpglibrary.h @@ -27,22 +27,23 @@ class KPassivePopup; class KProgress; -class KgpgLibrary : public QObject +class KgpgLibrary : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Initialize the class */ - KgpgLibrary(TQWidget *parent=0,bool pgpExtension=false); + KgpgLibrary(TQWidget *tqparent=0,bool pgpExtension=false); ~KgpgLibrary(); KURL::List urlselecteds; public slots: - void slotFileEnc(KURL::List urls=KURL(""),TQStringList opts=TQString::null,TQStringList defaultKey=TQString::null,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); + void slotFileEnc(KURL::List urls=KURL(""),TQStringList opts=TQString(),TQStringList defaultKey=TQString(),KShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home)); void slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryptOption=TQStringList()); void shredprocessenc(KURL::List filesToShred); diff --git a/kgpg/kgpgoptions.cpp b/kgpg/kgpgoptions.cpp index ff19ccb..ef6c061 100644 --- a/kgpg/kgpgoptions.cpp +++ b/kgpg/kgpgoptions.cpp @@ -62,8 +62,8 @@ class TQTabWidget; /////////////////////// main window -kgpgOptions::kgpgOptions(TQWidget *parent, const char *name) - : KConfigDialog( parent, name, KGpgSettings::self()) +kgpgOptions::kgpgOptions(TQWidget *tqparent, const char *name) + : KConfigDialog( tqparent, name, KGpgSettings::self()) { defaultServerList="hkp://wwwkeys.eu.pgp.net "; defaultServerList+=i18n("(Default)"); @@ -80,7 +80,7 @@ kgpgOptions::kgpgOptions(TQWidget *parent, const char *name) else { if (TQFile(defaultHomePath+"gpg.conf").exists()) defaultConfigPath="gpg.conf"; - else defaultConfigPath=TQString::null; + else defaultConfigPath=TQString(); } kdDebug(2100)<<"Adding pages"<<endl; @@ -211,7 +211,7 @@ if (!gpgHome.endsWith("/")) gpgHome.append("/"); confFile.close(); } } - else confPath=TQString::null; + else confPath=TQString(); } } page4->gpg_conf_path->setText(confPath); @@ -278,9 +278,9 @@ void kgpgOptions::updateWidgetsDefault() page4->gpg_conf_path->setText(defaultConfigPath); page4->gpg_home_path->setText(defaultHomePath); - page4->kcfg_PubKeyringUrl->setURL(TQString::null); + page4->kcfg_PubKeyringUrl->setURL(TQString()); page4->kcfg_PubKeyring->setChecked(false); - page4->kcfg_PrivKeyringUrl->setURL(TQString::null); + page4->kcfg_PrivKeyringUrl->setURL(TQString()); page4->kcfg_PrivKeyring->setChecked(false); page4->kcfg_OnlyAdditional->setChecked(false); @@ -364,7 +364,7 @@ void kgpgOptions::updateSettings() else { if (KgpgInterface::getGpgSetting("keyring", gpgConfigPath)!="") emitReload=true; - KgpgInterface::setGpgSetting("keyring",TQString::null, gpgConfigPath); + KgpgInterface::setGpgSetting("keyring",TQString(), gpgConfigPath); } if (page4->kcfg_PrivKeyring->isChecked()) @@ -375,7 +375,7 @@ void kgpgOptions::updateSettings() else { if (KgpgInterface::getGpgSetting("secret-keyring", gpgConfigPath)!="") emitReload=true; - KgpgInterface::setGpgSetting("secret-keyring",TQString::null, gpgConfigPath); + KgpgInterface::setGpgSetting("secret-keyring",TQString(), gpgConfigPath); } emit changeFont(kfc->font()); @@ -416,7 +416,7 @@ void kgpgOptions::updateSettings() for (uint i=0;i<page6->ServerBox->count();i++) { TQString currItem=page6->ServerBox->text(i); - if (currItem.find(" ")!=-1) // it is the default keyserver + if (currItem.tqfind(" ")!=-1) // it is the default keyserver keyServer=currItem.section(" ",0,0); else { @@ -500,7 +500,7 @@ TQString kgpgOptions::namecode(TQString kid) if (TQString(ids[counter].right(8))==kid) return names[counter]; - return TQString::null; + return TQString(); } @@ -509,7 +509,7 @@ TQString kgpgOptions::idcode(TQString kname) for ( uint counter = 0; counter<names.count(); counter++ ) if (names[counter]==kname) return TQString(ids[counter].right(8)); - return TQString::null; + return TQString(); } @@ -538,7 +538,7 @@ void kgpgOptions::listkey() tst=line; if (tst.startsWith("pub")) { name=KgpgInterface::checkForUtf8(tst.section(':',9,9)); - if ((!name.isEmpty()) && (trustedvals.find(tst.section(':',1,1))==-1)) { + if ((!name.isEmpty()) && (trustedvals.tqfind(tst.section(':',1,1))==-1)) { counter++; //name=name.section('<',-1,-1); // name=name.section('>',0,0); @@ -546,7 +546,7 @@ void kgpgOptions::listkey() ids+=tst.section(':',4,4); if (tst.section(':',4,4).right(8)==alwaysKeyID) alwaysKeyName=tst.section(':',4,4).right(8)+":"+name; - if (issec.find(tst.section(':',4,4).right(8),0,FALSE)!=-1) + if (issec.tqfind(tst.section(':',4,4).right(8),0,FALSE)!=-1) { //*** page1->file_key->insertItem(pixkeyDouble,tst.section(':',4,4).right(8)+":"+name); //*** page1->always_key->insertItem(pixkeyDouble,tst.section(':',4,4).right(8)+":"+name); @@ -572,13 +572,13 @@ void kgpgOptions::slotAddKeyServer() TQString newServer=KInputDialog::getText(i18n("Add New Key Server"),i18n("Server URL:")); if (!newServer.isEmpty()) page6->ServerBox->insertItem(newServer.stripWhiteSpace()); -page6->ServerBox->setSelected(page6->ServerBox->findItem(newServer.stripWhiteSpace()),true); +page6->ServerBox->setSelected(page6->ServerBox->tqfindItem(newServer.stripWhiteSpace()),true); } void kgpgOptions::slotDelKeyServer() { bool defaultDeleted=false; -if (page6->ServerBox->currentText().find(" ")!=-1) defaultDeleted=true; +if (page6->ServerBox->currentText().tqfind(" ")!=-1) defaultDeleted=true; page6->ServerBox->removeItem(page6->ServerBox->currentItem()); page6->ServerBox->setSelected(0,true); if (defaultDeleted) page6->ServerBox->changeItem(page6->ServerBox->currentText().section(" ",0,0)+" "+i18n("(Default)"),0); diff --git a/kgpg/kgpgoptions.h b/kgpg/kgpgoptions.h index 14b0300..1f90559 100644 --- a/kgpg/kgpgoptions.h +++ b/kgpg/kgpgoptions.h @@ -39,8 +39,9 @@ class KSimpleConfig; class kgpgOptions : public KConfigDialog { Q_OBJECT + TQ_OBJECT public: - kgpgOptions(TQWidget *parent=0, const char *name=0); + kgpgOptions(TQWidget *tqparent=0, const char *name=0); ~kgpgOptions(); TQStringList names,ids; Encryption *page1; diff --git a/kgpg/kgpgrevokewidget.ui b/kgpg/kgpgrevokewidget.ui index 0884276..2428d9c 100644 --- a/kgpg/kgpgrevokewidget.ui +++ b/kgpg/kgpgrevokewidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KgpgRevokeWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KgpgRevokeWidget</cstring> </property> @@ -19,18 +19,18 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>keyID</cstring> </property> <property name="text"> <string>key id</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>cbPrint</cstring> </property> @@ -38,7 +38,7 @@ <string>Print certificate</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -46,7 +46,7 @@ <string>Create revocation certificate for</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -54,7 +54,7 @@ <string>Description:</string> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <item> <property name="text"> <string>No Reason</string> @@ -79,7 +79,7 @@ <cstring>comboBox1</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -87,7 +87,7 @@ <string>Reason for revocation:</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>cbSave</cstring> </property> @@ -98,7 +98,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="7" column="0"> + <widget class="TQCheckBox" row="7" column="0"> <property name="name"> <cstring>cbImport</cstring> </property> @@ -109,7 +109,7 @@ <string>Import into keyring</string> </property> </widget> - <widget class="QTextEdit" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQTextEdit" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textDescription</cstring> </property> @@ -142,10 +142,10 @@ <includes> <include location="local" impldecl="in implementation">kgpgrevokewidget.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>cbSave_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> </includehints> diff --git a/kgpg/kgpgrevokewidget.ui.h b/kgpg/kgpgrevokewidget.ui.h index 6d13319..9c7b1c5 100644 --- a/kgpg/kgpgrevokewidget.ui.h +++ b/kgpg/kgpgrevokewidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kgpg/kgpgview.cpp b/kgpg/kgpgview.cpp index 9aa23ea..d94345f 100644 --- a/kgpg/kgpgview.cpp +++ b/kgpg/kgpgview.cpp @@ -17,7 +17,7 @@ ////////////////////////////////////////////////////////////// code for the main view (editor) -// include files for Qt +// include files for TQt //#include <tqprinter.h> // application specific includes @@ -53,8 +53,8 @@ //////////////// configuration for editor -MyEditor::MyEditor( TQWidget *parent, const char *name ) - : KTextEdit( parent, name ) +MyEditor::MyEditor( TQWidget *tqparent, const char *name ) + : KTextEdit( tqparent, name ) { setTextFormat(PlainText); setCheckSpellingEnabled (true); @@ -88,7 +88,7 @@ void MyEditor::slotDroppedFile(KURL url) TQString text; if (!tempFile.isEmpty()) { KIO::NetAccess::removeTempFile(tempFile); - tempFile=TQString::null; + tempFile=TQString(); } if (url.isLocalFile()) @@ -127,14 +127,14 @@ TQFile qfile(fileToCheck); } else if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import qfile.close(); - int result=KMessageBox::warningContinueCancel(this,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").arg(fileToCheck),i18n("Warning")); + int result=KMessageBox::warningContinueCancel(this,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").tqarg(fileToCheck),i18n("Warning")); if (result==KMessageBox::Cancel) { KIO::NetAccess::removeTempFile(fileToCheck); return true; } else { KgpgInterface *importKeyProcess=new KgpgInterface(); importKeyProcess->importKeyURL(KURL(fileToCheck)); - connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SLOT(slotProcessResult(TQStringList))); + connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),TQT_TQOBJECT(this),TQT_SLOT(slotProcessResult(TQStringList))); return true; } } else { @@ -172,8 +172,8 @@ void MyEditor::slotDecodeFile(TQString fname) TQFile qfile(TQFile::encodeName(fname)); if (qfile.open(IO_ReadOnly)) { KgpgInterface *txtDecrypt=new KgpgInterface(); - connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),this,TQT_SLOT(editorUpdateDecryptedtxt(TQString))); - connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),this,TQT_SLOT(editorFailedDecryptedtxt(TQString))); + connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),TQT_TQOBJECT(this),TQT_SLOT(editorUpdateDecryptedtxt(TQString))); + connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),TQT_TQOBJECT(this),TQT_SLOT(editorFailedDecryptedtxt(TQString))); txtDecrypt->KgpgDecryptFileToText(KURL(fname),TQStringList::split(TQString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace())); } else KMessageBox::sorry(this,i18n("Unable to read file.")); @@ -184,18 +184,18 @@ void MyEditor::slotProcessResult(TQStringList iKeys) { emit refreshImported(iKeys); KIO::NetAccess::removeTempFile(tempFile); - tempFile=TQString::null; + tempFile=TQString(); } ////////////////////////// main view configuration -KgpgView::KgpgView(TQWidget *parent, const char *name) : TQWidget(parent, name) +KgpgView::KgpgView(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name) { editor=new MyEditor(this); windowAutoClose=true; - ///// layout + ///// tqlayout TQVBoxLayout *vbox=new TQVBoxLayout(this,3); @@ -205,17 +205,17 @@ KgpgView::KgpgView(TQWidget *parent, const char *name) : TQWidget(parent, name) setAcceptDrops(true); - KButtonBox *boutonbox=new KButtonBox(this,KButtonBox::Horizontal,15,12); + KButtonBox *boutonbox=new KButtonBox(this,Qt::Horizontal,15,12); boutonbox->addStretch(1); - bouton0=boutonbox->addButton(i18n("S&ign/Verify"),this,TQT_SLOT(clearSign()),TRUE); - bouton1=boutonbox->addButton(i18n("En&crypt"),this,TQT_SLOT(popuppublic()),TRUE); - bouton2=boutonbox->addButton(i18n("&Decrypt"),this,TQT_SLOT(slotdecode()),TRUE); + bouton0=boutonbox->addButton(i18n("S&ign/Verify"),TQT_TQOBJECT(this),TQT_SLOT(clearSign()),TRUE); + bouton1=boutonbox->addButton(i18n("En&crypt"),TQT_TQOBJECT(this),TQT_SLOT(popuppublic()),TRUE); + bouton2=boutonbox->addButton(i18n("&Decrypt"),TQT_TQOBJECT(this),TQT_SLOT(slotdecode()),TRUE); - TQObject::connect(editor,TQT_SIGNAL(textChanged()),this,TQT_SLOT(modified())); + TQObject::connect(editor,TQT_SIGNAL(textChanged()),TQT_TQOBJECT(this),TQT_SLOT(modified())); - boutonbox->layout(); - editor->resize(editor->maximumSize()); + boutonbox->tqlayout(); + editor->resize(editor->tqmaximumSize()); vbox->addWidget(editor); vbox->addWidget(boutonbox); } @@ -224,7 +224,7 @@ KgpgView::KgpgView(TQWidget *parent, const char *name) : TQWidget(parent, name) void KgpgView::modified() { /////////////// notify for changes in editor window - KgpgApp *win=(KgpgApp *) parent(); + KgpgApp *win=(KgpgApp *) tqparent(); if (win->fileSave->isEnabled()==false) { TQString capt=win->Docname.fileName(); if (capt.isEmpty()) @@ -239,7 +239,7 @@ void KgpgView::modified() void KgpgView::slotAskForImport(TQString ID) { if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>" - "Do you want to import this key from a keyserver?</qt>").arg(ID),i18n("Missing Key"), TQString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) { + "Do you want to import this key from a keyserver?</qt>").tqarg(ID),i18n("Missing Key"), TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) { keyServer *kser=new keyServer(0,"server_dialog",false,true); kser->page->kLEimportid->setText(ID); kser->slotImport(); @@ -261,8 +261,8 @@ void KgpgView::clearSign() if (mess.startsWith("-----BEGIN PGP SIGNED")) { ////////////////////// this is a signed message, verify it KgpgInterface *verifyProcess=new KgpgInterface(); - connect(verifyProcess,TQT_SIGNAL(missingSignature(TQString)),this,TQT_SLOT(slotAskForImport(TQString))); - connect(verifyProcess,TQT_SIGNAL(verifyOver(TQString,TQString)),this,TQT_SLOT(slotVerifyResult(TQString,TQString))); + connect(verifyProcess,TQT_SIGNAL(missingSignature(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotAskForImport(TQString))); + connect(verifyProcess,TQT_SIGNAL(verifyOver(TQString,TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotVerifyResult(TQString,TQString))); verifyProcess->KgpgVerifyText(mess); } else { @@ -280,7 +280,7 @@ void KgpgView::clearSign() delete opts; KgpgInterface *signProcess=new KgpgInterface(); - connect(signProcess,TQT_SIGNAL(txtSignOver(TQString)),this,TQT_SLOT(slotSignResult(TQString))); + connect(signProcess,TQT_SIGNAL(txtSignOver(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotSignResult(TQString))); TQStringList options=NULL; if (KGpgSettings::pgpCompatibility()) options<<"--pgp6"; @@ -298,7 +298,7 @@ else editor->setText(signResult); emit resetEncoding(false); - KgpgApp *win=(KgpgApp *) parent(); + KgpgApp *win=(KgpgApp *) tqparent(); win->editRedo->setEnabled(false); win->editUndo->setEnabled(false); } @@ -311,8 +311,8 @@ void KgpgView::popuppublic() ///// popup dialog to select public key for encryption //////// open dialog --> popuppublic.cpp - popupPublic *dialogue=new popupPublic(this, "public_keys", 0,false,((KgpgApp *) parent())->goDefaultKey); - connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(encodetxt(TQStringList,TQStringList,bool,bool))); + popupPublic *dialogue=new popupPublic(this, "public_keys", 0,false,((KgpgApp *) tqparent())->goDefaultKey); + connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),TQT_TQOBJECT(this),TQT_SLOT(encodetxt(TQStringList,TQStringList,bool,bool))); dialogue->exec(); delete dialogue; } @@ -325,16 +325,16 @@ void KgpgView::slotdecode() /////////////// decode data from the editor. triggered by the decode button TQString dests,encUsers; - messages=TQString::null; + messages=TQString(); //TQString resultat=KgpgInterface::KgpgDecryptText(editor->text(),encUsers); KgpgInterface *txtDecrypt=new KgpgInterface(); - connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),this,TQT_SLOT(updateDecryptedtxt(TQString))); - connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),this,TQT_SLOT(failedDecryptedtxt(TQString))); + connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),TQT_TQOBJECT(this),TQT_SLOT(updateDecryptedtxt(TQString))); + connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),TQT_TQOBJECT(this),TQT_SLOT(failedDecryptedtxt(TQString))); txtDecrypt->KgpgDecryptText(editor->text(),TQStringList::split(TQString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace())); /* - KgpgApp *win=(KgpgApp *) parent(); + KgpgApp *win=(KgpgApp *) tqparent(); if (!resultat.isEmpty()) { editor->setText(resultat); win->editRedo->setEnabled(false); @@ -371,7 +371,7 @@ void KgpgView::encodetxt(TQStringList selec,TQStringList encryptOptions,bool, bo if (symmetric) selec.clear(); KgpgInterface *txtCrypt=new KgpgInterface(); - connect (txtCrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),this,TQT_SLOT(updatetxt(TQString))); + connect (txtCrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),TQT_TQOBJECT(this),TQT_SLOT(updatetxt(TQString))); txtCrypt->KgpgEncryptText(editor->text(),selec,encryptOptions); //KMessageBox::sorry(0,"OVER"); diff --git a/kgpg/kgpgview.h b/kgpg/kgpgview.h index f65323b..9a61988 100644 --- a/kgpg/kgpgview.h +++ b/kgpg/kgpgview.h @@ -41,9 +41,10 @@ class TQDragEnterEvent; class MyEditor : public KTextEdit { Q_OBJECT + TQ_OBJECT public: - MyEditor( TQWidget *parent = 0, const char *name = 0); + MyEditor( TQWidget *tqparent = 0, const char *name = 0); private: TQString message,messages,tempFile; public slots: @@ -65,17 +66,18 @@ signals: }; -class KgpgView : public QWidget +class KgpgView : public TQWidget { Q_OBJECT + TQ_OBJECT friend class MyEditor; public: /** Constructor for the main view */ - KgpgView(TQWidget *parent = 0, const char *name=0); + KgpgView(TQWidget *tqparent = 0, const char *name=0); /** Destructor for the main view */ ~KgpgView(); - /** returns a pointer to the document connected to the view instance. Mind that this method requires a KgpgApp instance as a parent + /** returns a pointer to the document connected to the view instance. Mind that this method requires a KgpgApp instance as a tqparent * widget to get to the window document pointer by calling the KgpgApp::getDocument() method. * * @see KgpgApp#getDocument diff --git a/kgpg/kgpgwizard.ui b/kgpg/kgpgwizard.ui index 36d1501..67b2da9 100644 --- a/kgpg/kgpgwizard.ui +++ b/kgpg/kgpgwizard.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KgpgWizard</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KgpgWizard</cstring> </property> @@ -15,7 +15,7 @@ <property name="caption"> <string>KGpg Wizard</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -26,7 +26,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="3" colspan="1"> + <widget class="TQLabel" row="0" column="0" rowspan="3" colspan="1"> <property name="name"> <cstring>pixmapLabel1</cstring> </property> @@ -50,11 +50,11 @@ <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -62,7 +62,7 @@ <string><h1>Welcome to the KGpg Wizard</h1> This wizard will first setup some basic configuration options required for KGpg to work properly. Next, it will allow you to create your own key pair, enabling you to encrypt your files and emails.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -76,7 +76,7 @@ This wizard will first setup some basic configuration options required for KGpg <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -93,7 +93,7 @@ This wizard will first setup some basic configuration options required for KGpg </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -104,25 +104,25 @@ This wizard will first setup some basic configuration options required for KGpg <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>text_optionsfound</cstring> </property> <property name="text"> <string>Unless you want to try some unusual settings, just click on the "next" button.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>KGpg needs to know where your GnuPG configuration file is stored.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -136,7 +136,7 @@ This wizard will first setup some basic configuration options required for KGpg <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -148,18 +148,18 @@ This wizard will first setup some basic configuration options required for KGpg <cstring>kURLRequester1</cstring> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string><br>Path to your GnuPG options file:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="5" colspan="1"> + <widget class="TQLabel" row="0" column="0" rowspan="5" colspan="1"> <property name="name"> <cstring>pixmapLabel1_2</cstring> </property> @@ -183,13 +183,13 @@ This wizard will first setup some basic configuration options required for KGpg <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -200,7 +200,7 @@ This wizard will first setup some basic configuration options required for KGpg <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>checkBox1</cstring> </property> @@ -211,7 +211,7 @@ This wizard will first setup some basic configuration options required for KGpg <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="3" colspan="1"> + <widget class="TQLabel" row="0" column="0" rowspan="3" colspan="1"> <property name="name"> <cstring>pixmapLabel1_3</cstring> </property> @@ -235,7 +235,7 @@ This wizard will first setup some basic configuration options required for KGpg <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -249,14 +249,14 @@ This wizard will first setup some basic configuration options required for KGpg <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -266,13 +266,13 @@ The shredder securely deletes files (overwriting them 35 times) dropped on to it Remember that if you download a file or open one in an editor, parts of the file may be saved in a temporary location. Shredding will not erase these temporary files. <br><b>Shredding may not be 100% secure if you use a journaling file system.</b></qt></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignJustify|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -283,7 +283,7 @@ Remember that if you download a file or open one in an editor, parts of the file <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>checkBox2</cstring> </property> @@ -304,22 +304,22 @@ Remember that if you download a file or open one in an editor, parts of the file <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -342,18 +342,18 @@ Remember that if you download a file or open one in an editor, parts of the file </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textGenerate</cstring> </property> <property name="text"> <string>KGpg will now launch the key generation dialog to create your own key pair for encryption and decryption.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="4" colspan="1"> + <widget class="TQLabel" row="0" column="0" rowspan="4" colspan="1"> <property name="name"> <cstring>pixmapLabel1_4</cstring> </property> @@ -377,7 +377,7 @@ Remember that if you download a file or open one in an editor, parts of the file <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -394,10 +394,10 @@ Remember that if you download a file or open one in an editor, parts of the file <data format="XPM.GZ" length="79396">789cedbd59732339b2eff97e3e45dbc1dbb1315c52a4b8d8d83c68a5b84994445112c7e6014bec3b1791e2b5f9ee0384bb23b3faa8bbab32d95975e7b264acc89f18810838dcffee4090a1fff15f7f7b9b4dfff65fffe33fd61bb189d4df5428567ffb2fbdcdb2cffffbfff9bffee77ffc67b375f6b7b3b3c6df9a67ddf6dfcefef3fff88ffff4c5dfd4df58a3d750cd5ecd9fc4670dcbe11970b3d1acd96f10c3fbfa1db9dda88f570762d83f6c39aedf0fe6c467fd9a2f907bb07f32b2dc6cd0f5841b60f31bb8be9018f6d7a56338bf2286eb2b17c8787dde8e188e57b963385e13c3f1ded6717dbd7e4adc6ad69c11b76bd64b64ec8f2a1c43fb7b62689f6d1dd7ed2717c4d0be2256d8dea763684f10437b41d771dd1e6b11437be9d871fd7e86ed9da13dbd0fc775fbfc8e18f62f7b353b7ff09e1dd7fbeb4f64b4af7e720cd73b25c6ebfd2006fb791e32dacfeb3b86e325318e0f730cd7372486ebd58fc4d0be3f712c6a7b64c8685f39725c9f4f8e89e17cbcedb86e5fe4c4605ff6e1b87e3fe4c4d8bfd4717dfec09defbc8ec704dba7f150dc31f49f1163fc1d1cd7e7e37362b81e7ee518de3f2786eba9bac478fed8717d7dea1219c74f3788e1fce9ce31b44fed617cb06bc7f0fe9018cebfda3a86f1a0feb6e1fc2bb77fa7bebe402353bcb488b1bf3d62689f5f3aaedb93b55e9db97809678eebf6bc0631b4e7ed81c9feb24f8cfe70e618faf74c8cfdbf2286eb0953c7f5f5887362b0bf7c4346fbaa9d6368bf458cedb71d839e3a86f329b73f9c6f45d7db86f3a57dc760ff1e31d87b758b8cf1a69963b89e0e315c4f103806fda1ebc7f1f0368eebf38509315c4ff9e218aed7b587d7d3740cf15322e3f85553623c3fd917e34ff88eebe3a301319c3f2b88e17ce53d700bc78f49c7f5f1fc8218ed79edb87ebf84ebef937fe80299f42f760cfec789c19e72888cf6571f8ea1bd9c18ed7fe618f4f08218f3d31e19eda5bbc4986f268e617c07c4707cf0460cfd5d5d1383bd62b07fbf85fdf53431faebc631b47f438cf17aeb18ec3b2286f385d231f8cf1d32da4b798e61fca93dd2972131b4173d39aedf6797c438fe5bc7e06f3de26eab3e7f1319ed1d1c88a17d3e765c1f9f53ffd19ff33bc7e02f136268bfa2f7d1be6904dc26ffaae3a7d5a4f12f1f1c433c3062b0afbc40c6f1970762b45fd3311cdf20c6e3ef80693c55e618fadf27c6f1bc26067b54cfc8e8ef9a8e277fbf740cfed12046fdb8770ce3bf2686f6f357c7f5fb71428cfa312306fbfa747d546f6d1d837d26c4d89f27c7a0df0762387fcc1c83bf2d89d19fa68e21bf5e21a37de3dc311c9f12a3be7c3a067fdc1043fbc5d271fd7ef1410cfd5d1d1ccbfa7d4ddcabdf4f6f80db385e7ed771dd5ef24c0ce7634bc7905f77c470be724cdc57f5f8dd22e3786413c760cf36311c9f0f88e1faaa3a7e5b4eaf74df31f813d8cbe94b191363bdb144467ff372c770fc8c18eb23e118f2d18818f3d51531da234226ff61c4988fdb8e217ea97df48f78ee18f488ae1ffb2707c4188f5dc790cfdcfe387e9c18fd6fe718e2078f6fa3bdc49818f3ddc431e8f13b31b6bf705cbf9f85c4680fe118f44f12c3f86637c430be31bd4ff17d490cedf18363389f470cfe2c02e27ebbf6ef6764b4afd7740cfda1fea1de662f8eebf6c257e25ecd0afdab8df1949c398678da12437f0af48f73ea3ff6f7fc1cdacb2262b8dea8d6b77693eab7f49918ec1d3c20933f9d39aedbf77ac4a8171531f63f43467fe14d62d4cfc031c4a3db1ff5e51a98f2afdf2386f7f58763f0ef4b64aa2f3bc4a84f1e31eac5c6716d1f4ded637f5789e3faf82a24c6f3a3fd283e04730cf1312586fdc508d8f97be218f4d9bd0ff629c68ea1ff3931fae7d271fdbe56c8a42f53623cdfda31e8e78218ce273a8ea1bd67621c8fc831d89b11833d195d3fda8b53fb549fbc3986787b2046fb148e61bcbac4d07efa480cfe1edd2153fe3a2386e3934f62ac9fae1cd7e31dd0f9307e3c3a9f82f8c8c8de4ad41c0f8129bea23931b42f6e1cd7ed273b62683f79715cbf1f65c470bee4e0b8ce5f11473e87f678490ced89d431e807faf7791ff7cf89e1fd74450ce78b717ccf3570f804dc3987fe16cc717d3d29d84b50fcfb7d645a5f181363be3a3886f7b7c0546f4b418cfb4bc7504f5d23a3bf7a3e31ecef158e217fdd10833fc917c7e01f6b64f42771818cfea1211e05c563de45c6f8919f8e213e3831ae674c1dc3fbb7c8a8272c740cfd97c438df183a06ff5f10437fd41c19ed2d687fb4b7b8750cef7bc4988f3f1c43fc3688d11ed89f731c0f513a06fba6c4584f0d1d43bcdd1263bc7e10833f277d628ca70df239ea419b18c72f710cf9f79918da0f946388e70631e643c7989f2f1dd7d7e3d3f5a2bf276fc4b2e612fdcbc453dd1e9f3986f85a11637c6f1d437e3e23c6f8168eebf387f7c470fe32725cbf9fed91359ccf0f88e17cc1d031e8cd2b319ecf735cb7b7720ce75b69e04e138e0f2262d4831d32da333d10c3fbeccc71dd7ebe2506fb55753e383f233da8ae1d433cde0253fc27b963a87f1f91295ff588617fd5700cf9b9498cf9f90119e32b1f3986f8bc20c6f9f1d031f8fb1899ea959e63d07f9f188eafbe31e43fbc7ecacfd92d31fa53df318cdf3531dadb43c6fe472fc438ffbb2486e3334d8cf900fb4bfa92bf3b06fb2e88f1fadf8831bfb61d433dfa844cf3c38963184f6a0ff367dc755cfb0753c04e5f068ec13e5d62d4bbd2318c47807c8ec7f71c837fec89b1fe74fb63bef68851ef56c87dd4b70e31ce277a8e41df3262acbf77c4584fe37852bc06cfc4604fc61dc3fce192188fa7ebc1f84c136288a70c8f37f10af5cad431d4af0b62684faf1dd7f62f57c4d07e903986f845ffed603dc1a97d8cf7403a06fd1c12c3f1c58618aeb76821a37dd8de71bd7f2c8861ff244246bdcaeb7c732e285e831631faeb1c19fd2fbc26c6f807ff14543f071d62ac9f5f1c433c5c10837f44b43fea4934710cf5c98c18f62f7a8e61fc3932ea49b623067ba45dc7757f031f19afdfff20c6fa6d4e0cfbeb1898e2271a12c3f161450ce7cb578eebe3c51d32c68fda10a3fd34721fe3ad720cf1e21163bcf41d831e6f89d13e43c7103f2fc4d03f86fd3fd7d8deca319c2f23c6f59a37c7609f2931e643f05793cff07eceb563e8af63684f668ee1fa56c4e8bfd8ff0eea4945fba39eb0c2717d7c9c1243bc867b62ccef0932d60ffecc31e86d9718ceef49c7b0bef5480ced05afc4a817b1635d5f1fdaab837a54a58eebf3ad36c478be8e63f0979018f4c313c470be30765c9f2fb92756e775fbe86f5dd4a3ec9518eb919d63a8179f88a13df9410cedc54de4beaadfcfea7cd171f938cf8029de8ba963c85797c818dfe98563a8bf27c430beea1999e6ab1bc790ef5f89513f768e613c97c8a44f3bc750afaf89d19fde1d833f05c0940f459718e32b24c6f5ad27c7f5f1559b18ebbbc231e48735318c878e90319e53bc1e179f5dc7109f9a18eb7f9f18f3530bb8d3c4fa6b448cf614c4b85efe440cd7cb2bc7503f7f1283bf78387e149fac24c6f83e770cf3ef6b62cccf3931b4cf0b62b087df41267de3c478bd8563689ffa8bf1bd9a12437fe49563888705319c2f5a3b86fadded0ff196a3ff74d0fefa8c18e7b397c418ef1b6238ff8aeca7717eaf88a17d6fe0b88eaf780cdcc5f1481831ea4f488cc74f1cd7c7733c7f97ec9b12637f2f1dd7ef577d62682f5e3baedb0b6e88410fd20632da77e53b86fedd13c3f9f88763b81ef73eb4973491c91e77c03decaf067bb8f979ca1c437e71efc378c457c818ef9213e37c76e618e205fae7f279ec3b867a66458cfefdea18f2df8018e7c3ee7888c772490cf61260ef6ff9b0e318f42320c67cf68c8cf1935f3b86fa76428cfe72e318f42627c6f82a9131be3cda1fe34b6c1d43be7a25c6f9f61d31b45fb489b17d0f19e3c50b89b19e881dd7edc92931e6e737c7506f3c10e37add9818ce172e1d83bf48e02eda37578e213f3c12c3f9e4d2318c678f18f3f32731fa73e618eaeb1531f8efeac9711d3f4223e3f8792f8ea1ff0531c6937b1fd707df1d43ffde8871fda4725c9fcf5f23e3f8f82362ac27568e21feaf8851ef3e1cd7ed853e31c4ab42ffede278f85b626c7fec18fcaf4b8cf6891dd7ed6bba1eac5ffcbde3fafd08f289203d080531ead5c431f4df2746bd8a8935e80dfa638ff4aee3b83e3ec5f1eaf561ffbcf6cf6ecbad472f8931ff6c80297ed91019f39f8c89511f0262ac77ef9031de644a8cfaf14e8ceb6b23c7107fb43fc6935a13e3fa55e518d6b724b08b8737623c5f460ce7f31362ac1fd78e61bde18218d7a3ee91b1ffde8118ae27fb700cf1bd2746ff2f89e17cd9ca31f8db0b319ccfbf4246fbe96b628cb7d231cc17a7c478ff413986f6e97a313efc1631facbbb63c8d7b7c498cf0a64b47770498cf67c750cf506b58ff1b272c7e3fcfe11b887f6f7cf88e17cded031e4eb1c99ecb524c6fc3a720cfede2486f622e618e2ef8a18e2217d42a67cfe408ceb0b1f8e61bed02646fdb8730cfa48fdc178f3a87dec3fdf3b067b3b86fd57b5de7425c5539e20e3f8eb0019e3211b3886fcd620c678c4f7293f24a963f0e73931e6874b64f477b520c678ba2686f1963931faf73931f457558e411f3d64ec4f7cef18fceb9618d703df1c43bddb22c6f15a13a37db78e61feda2086f12ae87ad07edeab63d0932631fa77db31d4abefc4a8df53628c5fe618f41bfbd7437dd21d62cccf1b62acef43c790cf2431aebf5d11a3ff9f3986fe3262f47fb45f0fc72b5c10e3fd940b62684fb488c19fd317648a878a18ded774fde8ef058e478fea972d311c1f158e215e2262383e13c07dec1ff71c43fcbaf7512f5ac4703cd78ebd7a7ff4cf3efa9fdc12c3f1e18018f657f5f8f6bee58f5b625c8f9e22533c7062183f75efb8de5fbd20a37f7b0b62cc7fdc31cc3706c4303e95760cedf9c8e49f743d58af68f73eae8760fbe45f2b498cf92f750cf54d498cf58d720cfa3747a6feae1cc3f137c4a80757c4986fdcfba8072fc4301efa1c19eda3e78e416f5ac4180f2f8e411f36c4e86f9a18eba72bc7f5f9bd1819e33f0c88315e3262eccfd431c4e79a18fd3521c6f5257c9ffcb9108e21bf3591d11e5c11c3f5f28018fc33c5fef551df78480cfbe7b7c4180fb1e3fa787640c6fa54c3f192eab1fc0c98eaa3e2d531ac972c91e9f34163625cef6b10e3f82c1c43febe40a6f9574c8cf5cb9b63f0df7362bc5f3027067bea0132c643f94c8cfefb4e0cfd951130c5837a20c6fb272dc7e0cf0362f4df866318df4b62acf7f17c3db44fdc2346ff6d13637c2e88b1de7c700cf9232646bdbd43467b551e31de0ffec6a0276e7fcc17ca31e48b4f62f0978a98d6731f1c433c6862bcffb324c6f9db9c18f5953986f55dd71e9c2f467feba3be161931f487dd3b86f87e22c678ba700cf3bb15318ef7dc31c4fb3931ce9f668eebf8f0713cfb54cfbf12c3f923458cf54d8f18dae73b62685fa23f52bcf18818cec7410fa420ffb921c6f719b1d7a9fdb9b647bf4df3f172848cf11224c418bf05328e5fd521c6fcb2700cf9ba498cfede06a678083c62d4d7d231d817cf4ffe5e3489b1de081d437cdd11437b5221e3f5e79e63d08f73623cff16993e9fb022467db8720c7afb498cf5fa3531fa7f0c4cfe575d10a3bfcd1cd7c7ab8418e71323c7f5f8491caf3ef63f3c3886f8e1c478ffc52786eb53743de84fdcbd8ffe8afdedd37c4f13a3fd26c4d8fecc71dd7ea188d11e57c470be60edb83e5f3246a6f5aa7762ac1f9b8e411f1931cee7c81ee8ffd52db0a0faee9d18ebb13afefacaf96b4e0cfbe72fc0e49ff99e18f59f3b86fd67c8f4f99d1531fabbe718ae3f43a6f9df8118ebcf6b648c2f754e8ceb692362f41f883f457a97df1363fd36740cf9e18e188fcf1dd7d7b37a2686ebc9b6c438ff7c47c6fe562dc7a0670131f6bf700ce3352186f6abc431d873410ce70b1b8eebf12b9e90a93ea3fed2fadcda31e4a35762385fe91343fbace9b86e3fd6c8686f3125c6f69963c89fd43ec67b211dd7ede50fc002edaf0262b4ff1b31de4fbc2386f6d4d071dd9eae9069fe714d8cf5684e0cc78bc431f40ffd4f08d0ffb08e57e1f459b78169beb812c878befc0299eaa10fc7600fda1ff35375e918f2e91698fc2bef3886faa44246bdaff6c4580f6862385e7c22e378471131b63f760ced3f20e3f8463d62d42ff73efa7fc3311c4fede1f8461298c633e938867c7a4e8cfdbf2586e3454c8ce33147a6f8183b86fe3d12c3f8fa1bc7757b2bb49f10a8cf1dc7b03ed422c678481d433d551263bcb71dd7ed7b6b62b8de00c7477868efc231ccf7c93e1eea3f730cf986fae3417be51bb0ec0057d09e227f2aa13f4eaffc0131c6cfc131e8cd3932da33178e417f1f88d19e0a19fd29d1c4b8feb1700cf1774b8ceb6d1132f9ff3786f6bac4b8ff9b63b02fee4ffe14e6c4a88f7362ccdf9218ec95627b4e0f4ac770bd8e717de4ce717dfeec8c18da9337c8e82f719f188e8f9e913dcc67f43efa4371700c7abc20c67af49318fd09fc41c933acf7278eebe31f37c4b07f922077f0fa968e21fe1431deafa8fd413abd29f6c8146f03c7f5fbd59218e3e10a19fda39a11a3fe53fbf4f9938018fd27710c7ae0f6c7f178745cdba77c02a6f14fde8971ff0bc750dfe0f5d0f856ca31f8d71b328ea70c1c43fb43626cbf720cc73b46fbfbc838bef10b31c6fb9363c8dff7c4e8af787e1adff08218f52c24467fd4c838bef92531dabf4f8cfb6f1c83de44c8d85f3520c67abb4d0cfb871d64ec5fb024c6f9589318f6afeafa4f6af29fe41119c75728c7d0fe1898c6b73a27c6f9ec2b32d5ef37c468cf01325e5f72458cfe5e3986f86e12837df21cd8d81bfab3760cf54b490cfb470fc868ffea8318fbf78d213fee8971be3927f66bceae91713ca25b629c4f3788e1f878818cfd952b62f4f72762685fc1f86985fd8b2ac7500f9d13c3fea940c6fe54af8ec11febfca5ce9d7e0f808dfe427f1bc0643fe918de8f77c8d83f79e618e6437b62cc7f8f8e410ffac8145fd41e8e679402537f93b563b89e2762b4e78363580f9c11e3f8f490d11e31770cd71312a33f3d13c3f1215ebfa2f15c3a067b1d88f17a226238be6c39f6ebf6a93d0f38abf543397f8b3f91b1fd5c13a33d27c8180fd12b31fa67e6188e87fe39ff294ac710bf37c478fd5bc7106f9218ae37ec23a3bdfc67c760cf3631f43fa2f3a33d045eafc2ebcf9bc438fe2362b417f89fd678bdde8c18ebcd376268bf7a715c1f5fd6fea89d3fe757c8140f37c470fd0531da3b7b770ce35322e3f5aa8818ce1f57c064cf6ce418ecd324467bec1dd7d79b6e91d1bed9d2319c5f21e3f5a5e78ec11fbac4d8fe0b32d9bb4f8cf58a700cfa4fd78ffd49f07c64ffaa24c678f9740cf6dc13e3f81d90c93f68ff0ebc1fa4c8e8ef72468cfe50ebb1f65c3e2b91f17afd3930d9773521c6f87d41c6f3cb07646affcc31d877400cc7179fc834be783dd4ff22710cf7131e88d17e73c730be2132c64770e7b87e5f3c23e3f509e918fadf43c6f1136f8ec11ed89e87d793d7fee975c81ec52d329e3f7e44c6fe2697c8d8dfeac6717d7db202a6feca4762783fba40267bfbc4a81f1fc8d89f64428cfe7aefb8debf7a47c6fe9567c4d81ef68ffa5b3e12e3f5d7f9c5f3487fa319308d8f583806fb2f91f17acb5764b44774e3b87e7f95033b7bb789617ff6e218f67f4046fb9733c770fe4764b2c73b328d473dfefe377b7f22e3f16c868cfd8d6364bc5e1502d3f5a85b64bc1e31770cf1db42a6eb79720cfdb944c6eb0b43c790df52609fecfde018e27f808ce7af0e8ee1fc703e9ffa173591f1fcfe0e19cf579d0153ff04be4ffd6173643c5e7ac8783cc3f3d1f58919321dff888cc7b367641ff871c3997989ffddb7d6165c70695eec7ff72dfac59f3e267f852dfac59f3e267f85ed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e2a4175f6d4f7a71d28bafb627bd38e9c557db935e9cf4e2abed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e2a4175f6d4f7a71d28bafb627bd38e9c557db935e9cf4e2abed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e2a4175f6d4f7a71d28bafb627bd38e9c557db935e9cf4e2abed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e2a4175f6d4f7a71d28bafb627bd38e9c557db935e9cf4e2abed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e2a4175f6d4f7a71d28bafb627bd38e9c557db935e9cf4e2abed492f4e7af1d5f6a41727bdf86a7bd28b935e7cb53de9c5492fbeda9ef4e217ea85e29a7bdc37afa0e690477f051ff8c57a11f384a73ce3392f78c92bbee26bbee15bfec1777ccf3fff1abef00bf422363d3ff00b7ec9aff835bfe1b77c60fe75c787e667c4c77cc2a7fc9e3ffcf9bef06fd68b197fe44ffc99cff90b5ff057fe66b6ef7cc91bbcc9cf788bb7f939eff02eeff13ee38c71efafe01347d78b9409268d0dbafc8629a699c77c16b090452c66094b59c67256b092556cc5d66cc3b6ec83edf884edd9273bfcf9be7124bd50ec825db22b76cd6ed82d1b98bede99d7908dd8984dd894ddb30736638fec893dd7af397b610bf6caded8bb3966c796acc1f59fed1b3faf17acc9ce4c5f5aaccdce5987758d0d7aac6fde4a0413c258e1c5d8e0f91ffd082994d0c213be084428227610f1ffaa7a2112918a4ce4a21025bb139579adc4da586123b6e243ecfeaeefffc02a622f3ec5415c884b7165a2e54fca313fa517a1b81637ec8337c4ad18304f0cc49d188a91188b89988a7bf1607a3933af47f1249ec55cbc88857835db37f624deffde3262c9ee454334c59969f74ff18d9fd08b40b4ecdff2161dd1153dd1173dc92593424aa9a4668fd233ca3093fee34606329491103296894c65267359884f59caca68c86fbc46aee45a6ec495a9c8fe04dff851bd905bf9217726773ec9bdb1c48029f9290ff2425eca2b795d8ffd83bc91b7c60a57a294037927877254ff8ce5d864d6969c885b3995f7f2417e6711f1261fe59388e4f3aff78d1fd50b39973bf92217f2550c8d3f48e3116ff25dde89b55cca866cca33d9926d792e3bb22b7bc60e7d6b0565128e124a2aa5b4f991863c3652be0a8cc2923d9e54a82215cbe7ff35f442252ae557b26b74c2fcb04465a69fb92ae44195aa32fe7fab566acd7ca31e635b5ba88df18185daaa4c7da81d3f533bb5373f85fa540775a12ed595ba5637ea167d63c65ed440ddc9e7bfbe5ea8a1b811e76a647c40aab1e9e3c48cf15469e3fd4cddab0735538f6caa9ed4b39aab17b550afea4dbd8b955aca816aa8a63cb08d3a33d613f54f617e846aa9b6fdcbbda41ce25e7555efafaf17aacfdafc499b09a8cd1a669473630ba5f69a99d12fb4d052542604b4f6b4af031dea4847c63306e256c762a8139dea4ce7ba404be4baac8f371123f7ba12a01e8f7aa5d77af3d7d60bbdd51f664ef12a467a2799deab83fe54b91ceb83bed097fa4a5feb1b7dab07fa4e0ff5488fa5146b35d73b36d11373cc54dfeb07638b99ceac6f70f3d28fb53573fd64fefdace7e209bc43bfe8857efdebea857cd66f6c2b1746074236513bfd6efa71a197bac11b2cd34d7dc602ddd26dfb9774c58a458a43e6906f9a99bdbbc67699ca748fc5ba672cd2d7b9c73d66226c6fdab13f058bb4a742a83d3ce1491eff55f5c2536c6b7abd161b3df5b4f571fdae97f64fa27a816c1b9d1878a11779b197e8c444cfa7f0f993a9cd7722b3ffe7732f557b9351cfbc4c4df4cccbbdc2a84d66f694c6b746a6b527638fcc2bc51c728a57792b6ffdd7d40b6fe36de58085a662b8f43ecc54c2da61e7eda5f43ebd8377e15d7a57deb577232ff919bbf66ef9ca1b7877ded01bb14f6fec4dbca9a9d67def9ecf95f0989dc3eb2eef98bcc24cbe3dd4da61bc434ebc877a0ef7eccdbc47efe92fa917669ecddb62c312de30b1fda4f6deb3faf49e75d79b7b2fdec27bf5debc776f29efbc86d7f4cebc96d73699f1b735a4f2cebd8ed765d2ebd9fc63f289a9bc74ae98d7c73891ead3e7620aaa21573ee3c15f502f6e7d21195b1baf80eb2ecc3816c6c34772e94bf3a37ced7b5e9f3f7b53af656659ffa01d53537abeef074cf2b6ad348cee1a35e11d7df0c3da370abd14433faa6de1f1a9ff4b6ad03fa2177ee2a7bec9007eae3339f276b5358ceaf1865fe8815ffa95bf929162fcd95ffbbfa33d91f85bff830f6c0ef136c6339a6a27c7b577987c6bce30f777f50ceec1eba8e15f492ffc3ddbf99fbccd125b6f1b4b1430869ea92a7ca314fe857fe95ff9d7bca5fabf772cfc1bfee0df1a6be4bcad73a31b4645a5d1623fb46dab9d3fb0f359ffce1ffa237ffcd7d10b3ff027661a71601329bc9dd5fb5af305eff853f5e85dfaf7fe83995b307ff647e698fea3899627ab42bcc39ba6963f9879cdb8f63853a38bd2af67f6fedc7ff9f7af8bfe5ebd90cffec2879a39b3f9cf8e9b79997fb1d47ff5dff4c87f3713adbeb8f9e3f580bf64c26f88dc7846a3ae408abadad0bae42dbf69eb50e97953ffecdf3d3ff9bd7ae1b7f895b73579636366db63f4895c1dd895dff6cffd8ea9273c16fb5d5327fec098782bbf67f27357657edfe4205ed719ca7a5dc003663ce3311081349af197d08b40795b9bfb036da21ae610d62f3ee524f04c84dc7837811f0441c8c31f1a9338884cb5d15259109b6ab4ab0fe017e63c2c4882d4ae6b0459901b7df90be84550980899aa2228add6431da097721c5432d403d60d5626bf7c78ad1f1d93601d6c4c8eca4d15fa116cd5ced4e53af83067e16c14eca4c79e83bdf1cde8cfd78be03338185bd8191803bfb01935b8d0fbe032b80aaecddc7d62aaedcdcfac4505377c6e66afdd2096774641c7a6eab035e8c1fce656cc834170170cc5f59faf17fe2c1819ad3fe367c1d878726d15bb12c326c12498b2a1bc34b5e321b8ffa9b1894d2dbaf57ac61ea98995077b96ba1e1f05b3c0e412b10b9ebccebf731df4f7e945f01cccf9b3d5365301b4eaf539bbf2c0d92a78091662a819fb085e7ffaded747f06694f920ef8c66ec4d255a584d32f93b0fdee54ccc8265d0089a7fae5e98f13e78dbe02c68e91e6f9879d4b456f88ba02d97c1b97975826ed0f3973f3b36fec6f4d5cce2a5b0fac93b21b77ee1ede4bb17f8f5bdb6a011b23f572f42119a79839e09a646d62f4c1cdb1aa0d02c54a1964b3343d986decf7fae423e873e1fc94b9355cdbc5d77ebdc5d5a6bb0280cc2308cc2d80ffe5cbd08599884298bf4334b94f58bbc9e4b16621c66616e66659c7d98b9e411c626688685649ea9b994a9bacc9c6faf9fbc9df18c376f1e9662e68dc38a3ffc797a617243aa5a26930ee4a75c58bf3075858964f5c917e14a05a2c136ec3c3cd2d8f8db706d3ca32b2f4d0d9aab8f70637ce3dd33755cb80d3fd853b80bf77fa25e78e1a738a8891c88b55c48bb52f704b305c9c34378a13bfa22bcfcc91ce2b66a185e85d78249667dc3f8433d6bd5cba0d497d267f3f02650e1ed9fa517e18097ec36bc63eb70188e586c6c51d6f3854f9686e370124e593bbc97db238d51e889f04176c558303d0b67b6ce000565a9aea4173e060dfef1efb9a7f63bf442874ffcd6f3d95aacc530e87cd38bf0399c872fe1820f3c79acb1e19ffe327c955dfe22989f07b1329a61ab71e38b997f1ebeb197f03d5cf2f0cfd18bb02152fe14363517b7e61713de0acfc296f58bb01d9e871d2dcc3ce4f57863c49ade547464972561d7e4931ddc71d4a51ccb7d7813f6c27ec423f6ef98b3fe6bbd88042ff893bc64eb60256ef9b2f68b835d8b129b480622527e4f5c1e6f8ce473a423cfe4a6848df5bdbce36d53cf186b78bbc88f02318fc228525dffcfd28b3c8a8d5e84c62f4a7b4fc466399bf7e5204aa254dd0487288bf2e38d515444a5ec6aae7b62547b86bd0957dacc1a2ca24adceb2a5afd3b3e03f8aff5221c44eb28f67c29a38db8d53bbdafef08dbda338bb6d28f3ebcb9d7f4ce8f3546fe8d484418ed8c7e8ec4584fccf964bd5e7250e682a37df469a3c43b3bfe9cf5f7d5176ce769311403b551733327296abfd05e3fb88a0ed145300d2fa3cbe38d918992abe85ab5d9448ce44035eb95f2bafe34f5792bba896e23ed4dc3c6afd70b13252c1a282fba0b56d150acede70b3cebb76606e9bd0477d128ccc5215c46471b2333170da2b11a4513964453e37df77595a1d4d46c5fa28768163db2dc5b79ed5fad17763e123df18e4ec46dfd398acbda67cbfade270f27e2297af682686e6fbb1f6b8cfc71741979b21bbde87b16eb3d5a5fa99c4da285f1c5d7e8cd7b3cf69cf5f7cc47a277ef36e4e6ca96d150be9a5afcadbe2f92ab0ba39e8da8199d45ada81d9d1f6f8c4cc6f4c32b9b4ba20eb36b3bfdda338c2f060fde6bd495aba8c757e2ea57eb85dd467db63573d427518aa1992bf4e1de883a9899ea4185310fae621684478d5f150b3689a5a93fcdcc3588eb7b103067ed8b66ac621d7b3c3dee770e7edf7aa73fe343fe1efb621807b2eb6deab9597ddf330ee3288ed97d9cc4e931c728cea24bff2dcef5b3189b5ab719ce60edddf8473b2ee232ae642b5e89c868cb2fd50b2ee23537734793439ea46413cdd4bef68b42b178136fe38f78676a8c79541c6f8cd821def332e8b3095b9baa2b0a62b7e2dcf58bf833dec587f8c2df9b68faa57a61d715e24b3e17eb70145fb189bcb3eb0ab52d3ee36b91a8d0545c0f7c1cdf1c337ec3417c1bc53697e867160763c5ea3bd95339169bf0100fe23b7d25c260fdabf5c2f8ec50e472118ed4dcd4835d25e1fe88fd94623c3293c6a5df66b7f1f898f95ec4f144ee545b744cc575afd3baf637b9442fe3697c1f4ee2877021e7def87873d6df7b7fc4fb14793c337ae1b3500aa39efb3a7e3ff5d2bb881fc55206c6164f3f7e7fe4ab6df41e3fc773b9883a26b39a28d18f36ab0617ec9cade2977811bfc66ff1fbafd60bb34dbd0def5abf507316d11cc1ae39a92c9c9b5cb264a5b1c6916bc1b8692a9b775b7ffad7f5faa799a105178aeb697ce63fc7adb81d0cfdfdafd58b3a972c8240f3d8577331d2793d46e81b46d7cfd98357ea9db9b223e692c74ddc89bbaaede7626ce6ac703742d84f320565dc8bfbe14dc2c32ab1f7ea7fa95e703361e273a3e8a130a3a29a768ce0beaa5e2632ec272ad166463f39662e312f9d78a2239918998a8be9bcae7897aa30fac9139df84920a7c16b12fe5abd78dc245112abb6c9f743b19197668c0aa805bd5d78ed6fe2384992948f227dd45a30622cc9820e5bdb35f824e7678a9b11a8d7e093427c24651cf232a97eb15e8878cf243719351c31334a416caee850cf9872d94f56c99a3d249b70986c8ff9794c11271fc92e8ad5c85435a6e83019ac50a25e3b79637e7848f67a9e7c7af23873d63ff279ade4905cf0d770a47746cbfaf51dd5bc5e7392ac6fa2e432b992fbe4da5f1eb316f4da6c9fdc24b7c9803fb18d6ed8cf0e9ae8dc2b1337c95ddc4a86c1345c86bf582fccf6815db3b6e66a2ea54e4d556c6c918cead9fb241927133f52eb649adc1fb31694cfc9835e27b368cc6e95f0eca710f0ceb6defb45f2687389b8499ef8fe57ea85dd26cf463fd7f19518ea7bf81c86b1855d996d283fec2473d962efc98bd1f523e6127608d6d1557c1b0ff9796d0b6d7c439a735f9ab9914af661962c92d7e4e157ea459d4bde025b774e4d36199bd8ddd367fcbd3e5b27efc93269b08c8f9223af2bd8ef188522394bead5f7fa9c665698b4599c9c279da49bf4923efff8b57a61d71552ce5b29333586cd2567b6be80352ecf97217b488599975cc5aba3e6927a1bac138f5d9af8e0f80d8da9d79743d655b354ea2b95a62afde9efb7fed1cf83ab946da54c3d969879ebce5c99a8e768b91ca57e1aa4619889db344a8ffed9fee4234d4c8785fd5e42ed8b5a8ed38c85d15bbcf35ff98197ecf3d7ea0567699e5c041df969fc62909a397b3d939e9a5ac36393b48cce829dba4eab203ca64fd82ddfa5ab746defe27a1fa6e6ddf3677d907dff3aee85f36062742cfbd57ac165ba8906c199a93142b69697c6333ef173a9f613dd8fe9364a8377769e7e70753c9fa8b71f6cc976bc93eeec67113c6e6601b9fa60917723e7e93efd4c8ff07df83ffafd11ff9171cf1483e9855ca497e6bacef193a9f6537d9da413cdf4ab8c63965e1d572f184baf8d8d6f22df545ca96aa6b7661ec0c4d05b184b0c828d99affedafaa2de069ffc8a37e4423d59cfa8bf41879ff79497e95d741b0ffc221dea453a3aa65e784f5e3335358664aaad326b0d9d0a964e582f9d069b64c71ffe892fdfffbecf85fec0f753c3f441e4c62f3e5353fba90f132512d6a8e5bb3c0f6fd2595c88327d3c4e2df86d9b3ea56b6fcb9fd52e7d363380a6caf88b5cb0cb7498ced3977f7c5c3c4e177ceabfe8b57e39ae5ed8adbf16b960d18bd50cf581b5b899c17b3b1337afb14adfd2773ee6f747d50bb335d658b296c883aec879cbcc8daef96dda489b7afbcf8e0b9468fbb7412477c66a67110f86ff68ff1ff97e6ab8f2365ea1797ca5a7b25747491e7cd839bceea6adb49d9eebebb4a3d263dfbf3075af97764399f6f85ddacf78c632f1af3eef297326789549f6942976ce6f329d79997f2cbda8bf3330635b9db0502e78c34489acfd42fba11c89db2c0896aa277a59e81d75fdb3de463c5449166571ba096ffff9fefe583e6789388883f2c52c4bb3cc68dcb53fcd72b6f45a47d20bb3f5d759c1bba98993acd4997ca75a501dc2667c1675b34addc72c5bfd7b3fbffdd5d6b76bf677d93adbb073bf17ae334f70bdcbb66c2e97d126fb48baf14db6fb7a5df6479f7f91eded2a97fd9eaab1c51b7d76462fb34fef226ef9cfd19b28f9e4e76bc1dfb7f5c77aebb532a112711333fbd42676ced67a9a4e4469bf55cfba2c531b21b283686617c936bbfc6a2efda3cfbfc8aef84d10d8fb9d7685458e8d5ed867177c2a26c6e95b761dbfb055762342ef88f72f701b7df73d124fc5fe325cf10daf8261348ee6d9addc27292b752006b16f227560fc61190ee52bebc976a4b24a24d91d5b7eb52efbe3cfcbc9867c6efd428ce45dfddc02bb2e5ea84fbd0fa6d92878ccc62c4d5e928fe3fa80fd6c701289883ff8beb140994dd832d8f049364db4f7ca4ab1625da1ed3765598fade2fbec3ef6e45e4a93e51f64983d64b3ec317be29374732cbdb0dbec599c1b5b6cf47de4eb9ceef0999cb20b9fbd755c657319f3c9b19f55e027d94bb6c85efd5636d11f26331c84970d82a97af04bc94d5cec8c3fbeb13249e5793ccadeb3252ba389b80d2a33420d35cc9ac61a67c1306b1d4f2f8c5fb4d96d1028bb363e5159fdfdebf7ba023db04d709ef8c9a39cc64c2f8eb7fe99ed93add18243a4d88beab04c5e1ac51a64e75927cbd8cad4a0895d71b34f53c8baeada6864cfe48f3e2bb36eb8f4dbde59ceb38b9ce5227b0a32b63c9e5ed86d2eed3d56cd4d0d3a09da5edf7ea6cd7e2e4333e320fa71937ba6429e8b23e592dc673bb6cb83ac2b3ec52ebaf10bfd2c56799847e2238ff384ad5924c6792aeff22c9d7873fd6abfc128eec3439ee7455e8aabbc92d76aa6e2304fb6f9ea987ac1a5deb25b761e8ee4a71c18fd045bd4f33416e6eb6cc4eea356bec9b7fca7ef5fe41fde2ddb05815cc889a9bb57de6b706db645ba0d96f1367a6366de6cecb2538f828b91b6f96d98eff3cffa7b6a7779fd19915c8b66d265f7f2d6f8c590af12713cbdb05b1b25d18b5d17d7b3fa53a9397e1be823bfc82ff32bb1cdaff31b91fc58fbfc33bfcd07e9a7b84887f95d10e44396d8e7fae5f693d8cfea3a1fe793a4112e445f8cf2a91ee5f7f9433e63f6735e139f7b41b4901bf6903f8a5dfe24bdfc39dae73cd1d92c9f674fd9821f8ea717f5f660e6ac037b5791c59eb69f0ab09fcb08edb31e7af22c5ee42fea9a2df5f60fdd0b8f8266be089ae19599d38ca241f4143de5aff99bf0a4fdfcc1bd9eb291f18faef18bbec9193c1c194bbcb34ebecc1bec396fe6b1181b1db93433fa323f0b17c12efe604f792b6f87f3fc3c9b5abfc83be226f9fcfb5cf2b3cfe34bfb7c105fe55d3da9bf7d05cfafc8f532efa5af795f050597fb82fdab672215a2905e4bbfea6da13c59e8e8a9f0d26161924611445e1186f6392c9d2232bebf968b22e2f6f94d8368a3e3686946622d7a451c054522766259987258de055b3589a659371d644fc9dc7e8f317cc9abec29cc8d4f348aacc8c58db9b8a3e985dd860f41507bc65832fb9c026b09eb1bf2ad28b2eba22caa62c596eaee9fb553ac935d94159b625b7c444fe9301bcac458601779a2fee1b6865d8443b6b64f6312b7e1d05493a9dc8ba1c91a23fb19505355ac82243e2bf67ed3541377f2c03b6a629f076732ab9717ec25fe283e8b43786eeace876c5a5cc8b0b82cae8ea917761b748b6b35d7cfc66b85b185c46f0f8ecd58dd14b7c520bc2ceef8c73f3abe50f1387ee287e08ecd83cf62588c222fbf0edbc94078ecddfa81e9cfabe95f47dca617f6dfc5b898186b18ffe02f700fbe98d6ebaf32beaa9f4671e7f7ed0a6070c66ed4c8d43a2ff95c45d14df419dd14f77915a9e2c1f8c54cdcf81fc5e311f5c26ced131a4dc5bfb6ab5cba5e1337758636f6b82a9e541855e226fb87c79bde3ff31b7e53ccc3883d679be225f28c472c8a057f0b87cae802337512cb8a57534d3d8a81b181f18a622c3af63dd5566dc94c0e9b79b9fd8ea4c96507336bfed04c656a12f44dd5c38c729ccb56d415923d0a19758bb75cc89616c62fde8b65f19bfbb03ffffcce3815b9b85563cd7daebbeccadbe965bd36be2b9a712ce6c5d957df43e79f45ab6887977920657ac1fac579d1c98c2f181db82dba461b7a5617582236ac1fb76510c745bfe4d62fc46dc944279ac86e29d8c6f862aa53638333eb096a2245fdbdd1862942077c10f4830eebe9ab52b1273353f5e2f3681fa952979ea9cccf9383a9ddaf8ea7175c94beb795e6bfe8c5aa7719e8a7da2f94927c51246558467ff71d827b533daea2391f4703b6339125d9da68a17d8cdd44744ced38f217c61663eb13561d582f984637a66e7ac93e4c9dd5b1bf37fe302963d5b4cfcc28131b11bc632d617c61a226c64726968320e8cbae28e5d2d49b4de98937e99769f6106a392fb332d73e3f94c531f5c258a314a6048d5ed20b7daf9aa61acfe1797bc1367f48e63c2fab72e50d8a46b90eafbc6eb12c37e9b0dc961fc9a05894467da39df1fab51d6bfe5eeef87bb4331678afc7dee8859e668372cf9ecb4ff560de1772a2ecb7f2263aafbfe36c7eca83f5049595b2bc088c7f9497f07baf179c9557e1b0bcb6b984cdc54c980c6be6aa8df2a6bc2d07e51d9ff8c931f5c2ae439643cdd593e6a602bdb34f92c26f457d94a364e99d672fe5b89c94533ee2b7e53d1f951faa145ef9213ae190bff177d98d62f37fab0d1deb13f483be7129c6e98368aa1e4bd5846da09f2667d9e7a834cb076b05deb0df5bb4f681df7f7bb18d992f75a2b254e5ac34be9517e513bb2f9fe579392f782292677f763cbdb0b92068972fe130657211f9eac35843a9bc5ce8cc2fcad7f2ad7c4fb2725936cc78770ad35f9b1be299898777ab0b6a549ae32c1791d18a9ee89446f12c9bed24e8f086974b667c84d9be5a5da86dd13431d0b7df55e40d6b0dfafddf6f4ba97bf6d991c153d92ccfca56d91649792e9765a77ccf1ad926d3feec787a61b76597b58cc68fe5a7f18fcc7e12d30fcb9efa10dbb2cf9e2b5e8c8de7c7266398d137c2b0801f517a41f8203ac637de6c6e005f3036b2738e89bd638be39dd9f88771ae9f0a31a1dfdb57c5fede17be7fa949258c1a9d57b2527215cd92b5baf15f2b9d4d63aff2e49c4ff43a681e4f2f4c8d9197db20101b31323561a3feeea0ad31de8d7a3ed8ef947a015fb249e59b7982c93955e0053216039b13f8ab1a810f583f31f972a246fc4576ab50655e513fafce8d7130d65d3dfbe60be5a1d6cbb37fe413766befa384d7729fb6721e6fcb66320f27c179795345559c96a55f257c94b58ea717765bd9e7792ecc1ceddeaef9e983d50bafaf3eaa2c6fb3c7f03c7f6393283639736172dc6595a7af7ecb5691d607d4087482bffb769ed195cce48889fd763ff881cd0bf5bf9a759e305ea29affcc177efbb2478443e31945a9c47d55569568c687e4ae5a85efd943b50e36d5e6787a61b7c13bfb30713908b65eeee5bc659fbd68ea0cae9e632d66712ba84c8dc8cd3cf3b5da268bcacc96bcb58c4dedf82a17a017b2ebf3a09fd423a9263647940f6a92d8e709cd54667cc2f03ff781ffbe35d16a9fe9969aca2c2d6fb265f9c9e6d5cece57cba76a6fc2eb5e96e2267ed2dbe3e90567f198b5d496c5726866462cb0cf1ab46b9f4c8cbdcfea335cb19e1c588f576d534f5e47afd5c17f3699dffa45574eac32d8ba31a82b26f487a6197dd28be6b7dcf1475ef62988f648537fa681174e6c2e896ec249945417d52a9b49337baf2e855f5d1d4b2f44c2ed9a772e85bcd37b316077a617cf8a79a6068ea6c175e227976929a58df352a86dd091d33c8fde6cede873d35f51574818dfb0353ed1acaead2e180b8dff882f7cb535b3b475f621d7d58d5dcb48e601cbaa9cc52fd5453e4eef926b98971c412f22af69ff9e447026c7416c3fabcd4676445556d78d4c8878c99ec5b377632acbc4d41063336f49ec7382adf7436feb279ad663693d03fcc2daa3f6961ff087ffe61f0db9f08beca96c470731f7665555dd26efb1ae06d9347be0651616eb63e84575c787de7d3e2c2f94f4bc602cc67acaed1c32b3916f7c60efbdd9b980df166b9644bead9df47d3eb2969097b257e7c64e30ae86ba2f0fd5e8fb312d1fcac3cffa441d239791cf7a455e8dab1b363391d2ae262a48fc6c1a4cc4553e4f3fed036f7e522fa274c85ad5d4334e974ecd9c91d57f4b600c39cfcc1bbbdcce283ad5bd96a257d70c0c34c0f886b184eec1d6b0ed33fbfbf1b46af9dbdffd3dffee5743eefd37be8b6ec53cecb197709277f4b07aa8bc6a16a9a0489f44fc737a1133d6e2b7324df7d563f514b7f52c3216b163eee772908f4ccf97c60b1e74563debccea85b5453517a3acd4f7660e99d8ef2647be7d3e8e1c060ff699523feb03b4358af53dcfe4221bd815bfeac5ccd296f1367b8a92709135f24915853a6807cd9fd18bf4890f446e469e578bbcc1e6c1ad7dbe8becda3984c929f6798ecc44c1a5e929fed86adafeceded7d03dfb833e92420df1a3f9e2f7bc24cbbac122335a117fa8b07acd2e42ed0fc243b4a82eb20393d1e58feb4590b34b91b31ba3919160d55e96d94076f5056fd8da534f4c6f9f4dbf7ba67eb4cffbec99d7a59c5473538bcdccdca201ca49be026cf2c9517ce2abad9a888d3c8fa2c78d0ac54e858f9bac515d44a68049cb7051bdb1ed8fea45f118b360ae26b61f7565bc3035b51d7356095b330866bf3d68fcc08efb0434c15ac3a808e8c3a5fda9b74c6dedefed8f5da7fc37f9855de719b07e7099ecf3839923bd4761ceab65a88b7d91055745973fff985e0479f1c15a660e68674ff518d7cf422e7823e8578daa2999cfad6ed8e780f386d18319f880d9c758c7ae3dd9e7a52bb488d115a3a06ca31af5fca37b5c9f3055b8d5db96ee86d7ace79fdb95e0ea4c7ad547b48fefccbca4253e8369d54e3f7f4c2f12ab990d5b2f525eb06b8df2a09a6562d71931571c6c74e854de599f405fb8b32b72765d52eff5dece35c83f20b7d42b7447f307de5266168b6cae95f5d37dd20d96d559d84b2ea5aeced97d5514cdaa13a8a0f1637a118fabaecd15667ef102f305755626b6d710f73a4d6f75df3e574f35ac35cc3b3da827d25b6b09589fb43fe9ed77ba71798c1ad3e9c3ce5670411b2bfa336d6a5c719b0e643bde563d318b3ecb76362b1e64abc8bd45b80c863fa617559f9f077d13ffcc3ebb04ea066b89fad99b5d0dabd233b7de543f1fdefeded452b6a2baabff9e80fdf9e643f57e562fea4ae3a7fcc13e6334ddf1b67daebf7dda36fdde5cd588ad565cde88b9fd9b39315f3175be122bb9522bbdf27e4c2f56fe2a303a606c5044662e6eb659a8eaf8373ed0b73e60ea8b49deabd7a42e8d6ff44d3c7cc07cc3fa4e6d1b1ac3eef739c55ae4877da3057f9f805dd92dffcd9cd6dac2ce4bc2e7609a5762c91ec5ac3a5b85ab287af3cffd76b8e4d31fd38b551c0decdf1f31b922865c6035b4bec759af49adb0beacf521b316b25586f9b7a9b2eb979b73d4d738f9e61bb5ba1e7e349f386df8f265eb60711bb556e92a136f62b6cad37319ae0aef25f6f4225aff687db12af939bf317effe05fcb81a91dd147f88bfd66edb7bac1d61b9843ee54560d8d8e7c1bcb9474c3e6906fbef1fd5ad6cfe710b090e5ca5c91a931f6ea21526c667e5e56d56a152ea2a8ba58ad579b1fad2ffcd96acb6f8c325bad18d4ab515d39a8eb4c66f24bfd32d6b0339206db983869da9c0139c48d93f114faf7f7ba6195e51839c468c66ffc2438b3e3130e5916df18cd581665f21eead547a492f7dc5fed7e743e12ae92e7aa5bd71103653387a925ed67f87d6ef4a32307661bd5fa31b3f7b6ecd68e39d50f726875d4f8889d7d808e64e41b5feb859d937db71ed132d972f77bea8aef7feff56c6d68c62e0da659b5dab37972992d7326cb34f70fce2f7e603e120cd371d0afebe7cc3e4bd0ae4dd4f776bbb68e841a13ebce7abe6135c3664da31af5b843beb07353cdec3dd03ad3d4fbd8f5cc7f994b6a7bfc717f01cd28eeb227719fb7c4cc9b8537c55bb4f73aabcf9f58bf78581d44beba905d3f17233bcfb0b5a67e30b190c29cf45bdd60ac62957366734aad8e771e66d5606cef06836f404e01dfe1cd63d69ebf594b9ff157218a3c6ddb5c2266f12069946938ad7e582fec36f94cc7defd2aa933e71d640c9859502d69fd01fefdbd1ed4bfcf6d94581f019f70b5a189a6e3e8c53ff00b9bd5bbacefbfc6dbd5257bced2ea2c0d92fd6ab3bafa99f50bff897dacaef980378d4ff7bef705332b8fec3ca5ae382fbff711d842dd257bd647709df3430eedb6b65ba39eaffc1be6aab035bab6d757f14eccea4ffaeda4bfbaf1d9cfe885d9863ee777debdd5051619addc7e3ff676b6f6cd0fbefd1b5f77506fd178ad6ee5d0decbf8ee98eeb7f10cceeccf11724b9d57a4fd7b5bcbd5203f987aebc01ef34391acee929f5def3cac86ab5179558f75fadbb1ff6e6bc7f837b5a5f1071f7ca1d60d1b13cd5ad72e7feb3bc79dabd6ff6a1acd9ef1c56a9c2f5793eaacfecb72f3ac67fc62fa73eb9d8cf37391f38189f1de2ab17df8b636f1fdfcf3fbfb9f0a7b6fd7b1e059e0f665e72cf51cf6bbfd7fd60fccecacae31ecfce4bb39c9c46479934b56f7612e9e6c94ac1e4c94dc05e1cfde1f59cd582b1f7eef0b902b8c5e5c12dbfba2565bab919dc5c3fbf667f5687e7b69e7ae3066660e6b676d99f9bd55d09fb91f622bcd1dbbe26754737eff7e29edfd92d554dd5437f03791aa9e77c67f4e2fcc3694fc2ae8c37dce6f3e613f41856b5513f81c55bd9e09cf9d87ca0c34c3cef233d48d7e6d993b581f7573963f92537e67bd61eb4f5edf2f918f3697d828e1e9eae967ef8f642d6f2372537309fb84f3efd621b6750eb9abd7b0fe4e3f6ca56eb736137f773fa45eef303e92dabf8967d749ed6713bde277fb02fc35acdfe13bc199caccfca9b77a5ecd2197b0b99caf5e7efe7e6af0965c78f7942fa08eb0fda07fd31cc3de39727587f321a8ace4a14ceabcd2af86f55f4bccec3a58ed1d47f70b9b8f4cbe9aac16abd7d55bdec4bf37b85dbdfffcfdd43009467c5035ec7cc268c0525e06ad6f7546dd5f3347b32b7f303f81dfff565f6c56ae86d5a81ad6eba17807c97e2eebd8f505ddb73573d6c5aa51de445d36afff2ee795b7faf9fba96973b5b535463dde3d53554c6cff3d5d7f9bb6616bae7aee8aeb1934e6b42efe7735c7acdef75b8de1c6f2fb5ae438f5a7a93e7b51591c581d27feb6ac8ef0f98b78d534f5e796cf4dc4ce5767fac0cd4bb58069bb3ab3dbfffefb2ff66b192f7eaef959ed43ee31de665bd8121f63cb5be5d46baed6ab56781b158c799fc7fafcc5ff1fb6fff9fffe9ffff1ff01d65fbc39</data> </image> </images> -<slots> +<Q_SLOTS> <slot>finishButton_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kactivelabel.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kgpg/listkeys.cpp b/kgpg/listkeys.cpp index 1a7ace8..f52d821 100644 --- a/kgpg/listkeys.cpp +++ b/kgpg/listkeys.cpp @@ -102,16 +102,16 @@ class UpdateViewItem : public KListViewItem { public: - UpdateViewItem(TQListView *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired); - UpdateViewItem(TQListViewItem *parent=0, TQString name=TQString::null,TQString email=TQString::null, TQString tr=TQString::null, TQString val=TQString::null, TQString size=TQString::null, TQString creat=TQString::null, TQString id=TQString::null); + UpdateViewItem(TQListView *tqparent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired); + UpdateViewItem(TQListViewItem *tqparent=0, TQString name=TQString(),TQString email=TQString(), TQString tr=TQString(), TQString val=TQString(), TQString size=TQString(), TQString creat=TQString(), TQString id=TQString()); virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align); virtual int compare( TQListViewItem * item, int c, bool ascending ) const; virtual TQString key( int column, bool ) const; bool def,exp; }; -UpdateViewItem::UpdateViewItem(TQListView *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired) - : KListViewItem(parent) +UpdateViewItem::UpdateViewItem(TQListView *tqparent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired) + : KListViewItem(tqparent) { def=isdefault; exp=isexpired; @@ -124,8 +124,8 @@ UpdateViewItem::UpdateViewItem(TQListView *parent, TQString name,TQString email, setText(6,id); } -UpdateViewItem::UpdateViewItem(TQListViewItem *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id) - : KListViewItem(parent) +UpdateViewItem::UpdateViewItem(TQListViewItem *tqparent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id) + : KListViewItem(tqparent) { setText(0,name); setText(1,email); @@ -137,7 +137,7 @@ UpdateViewItem::UpdateViewItem(TQListViewItem *parent, TQString name,TQString em } -void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) { TQColorGroup _cg( cg ); if (depth()==0) @@ -147,7 +147,7 @@ void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, font.setBold(true); p->setFont(font); } - else if ((exp) && (column==3)) _cg.setColor( TQColorGroup::Text, Qt::red ); + else if ((exp) && (column==3)) _cg.setColor( TQColorGroup::Text, TQt::red ); } else if (column<2) { @@ -157,7 +157,7 @@ void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, } - KListViewItem::paintCell(p,_cg, column, width, alignment); + KListViewItem::paintCell(p,_cg, column, width, tqalignment); } #include <iostream> @@ -213,8 +213,8 @@ TQString UpdateViewItem::key( int column, bool ) const //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool allowMultipleSelection, TQString preselected): -KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *tqparent, const char *name,bool allowMultipleSelection, TQString preselected): +KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel) { TQString keyname; page = new TQWidget(this); @@ -236,7 +236,7 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) labeltxt=new TQLabel(i18n("Choose secret key:"),page); vbox=new TQVBoxLayout(page); - if (preselected==TQString::null) preselected = KGpgSettings::defaultKey(); + if (preselected==TQString()) preselected = KGpgSettings::defaultKey(); FILE *fp,*fp2; TQString fullname,tst,tst2; @@ -257,7 +257,7 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) val=i18n("Unlimited"); fullname=keyString[9]; - fp2 = popen(TQFile::encodeName(TQString("gpg --no-tty --with-colons --list-key %1").arg(KShellProcess::quote(id))), "r"); + fp2 = popen(TQFile::encodeName(TQString("gpg --no-tty --with-colons --list-key %1").tqarg(KShellProcess::quote(id))), "r"); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { tst2=TQString::fromUtf8(line); @@ -271,12 +271,12 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) dead=false; break; case '-': - if (tst2.section(':',11,11).find('D')==-1) warn=true; + if (tst2.section(':',11,11).tqfind('D')==-1) warn=true; break; default: break; } - if (tst2.section(':',11,11).find('D')!=-1) + if (tst2.section(':',11,11).tqfind('D')!=-1) dead=true; break; } @@ -284,12 +284,12 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) pclose(fp2); if (!fullname.isEmpty() && (!dead)) { TQString keyMail,keyName; - if (fullname.find("<")!=-1) { + if (fullname.tqfind("<")!=-1) { keyMail=fullname.section('<',-1,-1); keyMail.truncate(keyMail.length()-1); keyName=fullname.section('<',0,0); } else { - keyMail=TQString::null; + keyMail=TQString(); keyName=fullname; } @@ -297,11 +297,11 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) item=new KListViewItem(keysListpr,keyName,keyMail,id); - //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").arg(id).arg(trust).arg(val)); + //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").tqarg(id).tqarg(trust).tqarg(val)); KListViewItem *sub= new KListViewItem(item,i18n("Expiration:"),val); sub->setSelectable(false); item->setPixmap(0,keyPair); - if (preselected.find(id,0,false)!=-1) { + if (preselected.tqfind(id,0,false)!=-1) { keysListpr->setSelected(item,true); keysListpr->setCurrentItem(item); selectedok=true; @@ -313,10 +313,10 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) if (warn) { - KMessageBox::information(this,i18n("<qt><b>Some of your secret keys are untrusted.</b><br>Change their trust if you want to use them for signing.</qt>"),TQString::null,"warnUntrusted"); + KMessageBox::information(this,i18n("<qt><b>Some of your secret keys are untrusted.</b><br>Change their trust if you want to use them for signing.</qt>"),TQString(),"warnUntrusted"); } - TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk())); - TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *))); + TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),TQT_TQOBJECT(this),TQT_SLOT(slotpreOk())); + TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),TQT_TQOBJECT(this),TQT_SLOT(slotSelect(TQListViewItem *))); if (!selectedok) @@ -352,8 +352,8 @@ void KgpgSelKey::slotSelect(TQListViewItem *item) if (item==NULL) return; if (item->depth()!=0) { - keysListpr->setSelected(item->parent(),true); - keysListpr->setCurrentItem(item->parent()); + keysListpr->setSelected(item->tqparent(),true); + keysListpr->setCurrentItem(item->tqparent()); } } @@ -362,7 +362,7 @@ TQString KgpgSelKey::getkeyID() { ///// emit selected key if (keysListpr->currentItem()==NULL) - return(TQString::null); + return(TQString()); TQString result; TQPtrList< TQListViewItem > list = keysListpr->selectedItems(false); TQListViewItem *item; @@ -379,7 +379,7 @@ TQString KgpgSelKey::getkeyMail() TQString username; ///// emit selected key if (keysListpr->currentItem()==NULL) - return(TQString::null); + return(TQString()); else { username=keysListpr->currentItem()->text(0); //username=username.section(' ',0,0); @@ -392,8 +392,8 @@ TQString KgpgSelKey::getkeyMail() ///////////////////////////////////////////////////////////////////////////////////////////// -KeyView::KeyView( TQWidget *parent, const char *name ) - : KListView( parent, name ) +KeyView::KeyView( TQWidget *tqparent, const char *name ) + : KListView( tqparent, name ) { KIconLoader *loader = KGlobal::iconLoader(); @@ -424,7 +424,7 @@ KeyView::KeyView( TQWidget *parent, const char *name ) trustgood.fill(KGpgSettings::colorGood());//TQColor(144,255,0)); bitBlt(&trustgood,0,0,&blankFrame,0,0,50,15); - connect(this,TQT_SIGNAL(expanded (TQListViewItem *)),this,TQT_SLOT(expandKey(TQListViewItem *))); + connect(this,TQT_SIGNAL(expanded (TQListViewItem *)),TQT_TQOBJECT(this),TQT_SLOT(expandKey(TQListViewItem *))); header()->setMovingEnabled(false); setAcceptDrops(true); setDragEnabled(true); @@ -434,12 +434,12 @@ KeyView::KeyView( TQWidget *parent, const char *name ) void KeyView::droppedfile (KURL url) { - if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").arg(url.path()), TQString::null, i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes) + if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").tqarg(url.path()), TQString(), i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes) return; KgpgInterface *importKeyProcess=new KgpgInterface(); importKeyProcess->importKeyURL(url); - connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SLOT(slotReloadKeys(TQStringList))); + connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),TQT_TQOBJECT(this),TQT_SLOT(slotReloadKeys(TQStringList))); } void KeyView::contentsDragMoveEvent(TQDragMoveEvent *e) @@ -476,8 +476,8 @@ void KeyView::startDrag() } -mySearchLine::mySearchLine(TQWidget *parent, KeyView *listView, const char *name) -:KListViewSearchLine(parent,listView,name) +mySearchLine::mySearchLine(TQWidget *tqparent, KeyView *listView, const char *name) +:KListViewSearchLine(tqparent,listView,name) { searchListView=listView; setKeepParentsVisible(false); @@ -506,7 +506,7 @@ void mySearchLine::updateSearch(const TQString& s) { if (item->isVisible() && !(item->text(6).isEmpty())) { - if (searchListView->displayOnlySecret && searchListView->secretList.find(item->text(6))==-1) + if (searchListView->displayOnlySecret && searchListView->secretList.tqfind(item->text(6))==-1) item->setVisible(false); if (!searchListView->displayDisabled && item->pixmap(2)) if (item->pixmap(2)->serialNumber()==disabledSerial) @@ -519,12 +519,12 @@ void mySearchLine::updateSearch(const TQString& s) /////////////////////////////////////////////////////////////////////////////////////// main window for key management -listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterface" ), KMainWindow(parent, name,0) +listKeys::listKeys(TQWidget *tqparent, const char *name) : DCOPObject( "KeyInterface" ), KMainWindow(tqparent, name,0) { - //KWin::setType(Qt::WDestructiveClose); + //KWin::setType(TQt::WDestructiveClose); keysList2 = new KeyView(this); - keysList2->photoKeysList=TQString::null; + keysList2->photoKeysList=TQString(); keysList2->groupNb=0; keyStatusBar=NULL; readOptions(); @@ -533,60 +533,60 @@ listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterfa installEventFilter(this); setCaption(i18n("Key Management")); - (void) new KAction(i18n("&Open Editor"), "edit",0,this, TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor"); - KAction *exportPublicKey = new KAction(i18n("E&xport Public Keys..."), "kgpg_export", KStdAccel::shortcut(KStdAccel::Copy),this, TQT_SLOT(slotexport()),actionCollection(),"key_export"); - KAction *deleteKey = new KAction(i18n("&Delete Keys"),"editdelete", Qt::Key_Delete,this, TQT_SLOT(confirmdeletekey()),actionCollection(),"key_delete"); - signKey = new KAction(i18n("&Sign Keys..."), "kgpg_sign", 0,this, TQT_SLOT(signkey()),actionCollection(),"key_sign"); - KAction *delSignKey = new KAction(i18n("Delete Sign&ature"),"editdelete", 0,this, TQT_SLOT(delsignkey()),actionCollection(),"key_delsign"); - KAction *infoKey = new KAction(i18n("&Edit Key"), "kgpg_info", Qt::Key_Return,this, TQT_SLOT(listsigns()),actionCollection(),"key_info"); - KAction *importKey = new KAction(i18n("&Import Key..."), "kgpg_import", KStdAccel::shortcut(KStdAccel::Paste),this, TQT_SLOT(slotPreImportKey()),actionCollection(),"key_import"); - KAction *setDefaultKey = new KAction(i18n("Set as De&fault Key"),0, 0,this, TQT_SLOT(slotSetDefKey()),actionCollection(),"key_default"); - importSignatureKey = new KAction(i18n("Import Key From Keyserver"),"network", 0,this, TQT_SLOT(preimportsignkey()),actionCollection(),"key_importsign"); - importAllSignKeys = new KAction(i18n("Import &Missing Signatures From Keyserver"),"network", 0,this, TQT_SLOT(importallsignkey()),actionCollection(),"key_importallsign"); - refreshKey = new KAction(i18n("&Refresh Keys From Keyserver"),"reload", 0,this, TQT_SLOT(refreshKeyFromServer()),actionCollection(),"key_server_refresh"); - - KAction *createGroup=new KAction(i18n("&Create Group with Selected Keys..."), 0, 0,this, TQT_SLOT(createNewGroup()),actionCollection(),"create_group"); - KAction *delGroup= new KAction(i18n("&Delete Group"), 0, 0,this, TQT_SLOT(deleteGroup()),actionCollection(),"delete_group"); - KAction *editCurrentGroup= new KAction(i18n("&Edit Group"), 0, 0,this, TQT_SLOT(editGroup()),actionCollection(),"edit_group"); - - KAction *newContact=new KAction(i18n("&Create New Contact in Address Book"), "kaddressbook", 0,this, TQT_SLOT(addToKAB()),actionCollection(),"add_kab"); - (void) new KAction(i18n("&Go to Default Key"), "gohome",TQKeySequence(CTRL+Qt::Key_Home) ,this, TQT_SLOT(slotGotoDefaultKey()),actionCollection(),"go_default_key"); - - KStdAction::quit(this, TQT_SLOT(quitApp()), actionCollection()); - KStdAction::find(this, TQT_SLOT(findKey()), actionCollection()); - KStdAction::findNext(this, TQT_SLOT(findNextKey()), actionCollection()); - (void) new KAction(i18n("&Refresh List"), "reload", KStdAccel::reload(),this, TQT_SLOT(refreshkey()),actionCollection(),"key_refresh"); - KAction *openPhoto= new KAction(i18n("&Open Photo"), "image", 0,this, TQT_SLOT(slotShowPhoto()),actionCollection(),"key_photo"); - KAction *deletePhoto= new KAction(i18n("&Delete Photo"), "delete", 0,this, TQT_SLOT(slotDeletePhoto()),actionCollection(),"delete_photo"); - KAction *addPhoto= new KAction(i18n("&Add Photo"), 0, 0,this, TQT_SLOT(slotAddPhoto()),actionCollection(),"add_photo"); - - KAction *addUid= new KAction(i18n("&Add User Id"), 0, 0,this, TQT_SLOT(slotAddUid()),actionCollection(),"add_uid"); - KAction *delUid= new KAction(i18n("&Delete User Id"), 0, 0,this, TQT_SLOT(slotDelUid()),actionCollection(),"del_uid"); - - KAction *editKey = new KAction(i18n("Edit Key in &Terminal"), "kgpg_term", TQKeySequence(ALT+Qt::Key_Return),this, TQT_SLOT(slotedit()),actionCollection(),"key_edit"); - KAction *exportSecretKey = new KAction(i18n("Export Secret Key..."), 0, 0,this, TQT_SLOT(slotexportsec()),actionCollection(),"key_sexport"); - KAction *revokeKey = new KAction(i18n("Revoke Key..."), 0, 0,this, TQT_SLOT(revokeWidget()),actionCollection(),"key_revoke"); - - KAction *deleteKeyPair = new KAction(i18n("Delete Key Pair"), 0, 0,this, TQT_SLOT(deleteseckey()),actionCollection(),"key_pdelete"); - KAction *generateKey = new KAction(i18n("&Generate Key Pair..."), "kgpg_gen", KStdAccel::shortcut(KStdAccel::New),this, TQT_SLOT(slotgenkey()),actionCollection(),"key_gener"); - - KAction *regeneratePublic = new KAction(i18n("&Regenerate Public Key"), 0, 0,this, TQT_SLOT(slotregenerate()),actionCollection(),"key_regener"); - - (void) new KAction(i18n("&Key Server Dialog"), "network", 0,this, TQT_SLOT(showKeyServer()),actionCollection(),"key_server"); - KStdAction::preferences(this, TQT_SLOT(showOptions()), actionCollection(),"options_configure"); - (void) new KAction(i18n("Tip of the &Day"), "idea", 0,this, TQT_SLOT(slotTip()), actionCollection(),"help_tipofday"); - (void) new KAction(i18n("View GnuPG Manual"), "contents", 0,this, TQT_SLOT(slotManpage()),actionCollection(),"gpg_man"); - - (void) new KToggleAction(i18n("&Show only Secret Keys"), "kgpg_show", 0,this, TQT_SLOT(slotToggleSecret()),actionCollection(),"show_secret"); + (void) new KAction(i18n("&Open Editor"), "edit",0,TQT_TQOBJECT(this), TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor"); + KAction *exportPublicKey = new KAction(i18n("E&xport Public Keys..."), "kgpg_export", KStdAccel::shortcut(KStdAccel::Copy),TQT_TQOBJECT(this), TQT_SLOT(slotexport()),actionCollection(),"key_export"); + KAction *deleteKey = new KAction(i18n("&Delete Keys"),"editdelete", TQt::Key_Delete,TQT_TQOBJECT(this), TQT_SLOT(confirmdeletekey()),actionCollection(),"key_delete"); + signKey = new KAction(i18n("&Sign Keys..."), "kgpg_sign", 0,TQT_TQOBJECT(this), TQT_SLOT(signkey()),actionCollection(),"key_sign"); + KAction *delSignKey = new KAction(i18n("Delete Sign&ature"),"editdelete", 0,TQT_TQOBJECT(this), TQT_SLOT(delsignkey()),actionCollection(),"key_delsign"); + KAction *infoKey = new KAction(i18n("&Edit Key"), "kgpg_info", TQt::Key_Return,TQT_TQOBJECT(this), TQT_SLOT(listsigns()),actionCollection(),"key_info"); + KAction *importKey = new KAction(i18n("&Import Key..."), "kgpg_import", KStdAccel::shortcut(KStdAccel::Paste),TQT_TQOBJECT(this), TQT_SLOT(slotPreImportKey()),actionCollection(),"key_import"); + KAction *setDefaultKey = new KAction(i18n("Set as De&fault Key"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotSetDefKey()),actionCollection(),"key_default"); + importSignatureKey = new KAction(i18n("Import Key From Keyserver"),"network", 0,TQT_TQOBJECT(this), TQT_SLOT(preimportsignkey()),actionCollection(),"key_importsign"); + importAllSignKeys = new KAction(i18n("Import &Missing Signatures From Keyserver"),"network", 0,TQT_TQOBJECT(this), TQT_SLOT(importallsignkey()),actionCollection(),"key_importallsign"); + refreshKey = new KAction(i18n("&Refresh Keys From Keyserver"),"reload", 0,TQT_TQOBJECT(this), TQT_SLOT(refreshKeyFromServer()),actionCollection(),"key_server_refresh"); + + KAction *createGroup=new KAction(i18n("&Create Group with Selected Keys..."), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(createNewGroup()),actionCollection(),"create_group"); + KAction *delGroup= new KAction(i18n("&Delete Group"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(deleteGroup()),actionCollection(),"delete_group"); + KAction *editCurrentGroup= new KAction(i18n("&Edit Group"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(editGroup()),actionCollection(),"edit_group"); + + KAction *newContact=new KAction(i18n("&Create New Contact in Address Book"), "kaddressbook", 0,TQT_TQOBJECT(this), TQT_SLOT(addToKAB()),actionCollection(),"add_kab"); + (void) new KAction(i18n("&Go to Default Key"), "gohome",TQKeySequence(CTRL+TQt::Key_Home) ,TQT_TQOBJECT(this), TQT_SLOT(slotGotoDefaultKey()),actionCollection(),"go_default_key"); + + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quitApp()), actionCollection()); + KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(findKey()), actionCollection()); + KStdAction::findNext(TQT_TQOBJECT(this), TQT_SLOT(findNextKey()), actionCollection()); + (void) new KAction(i18n("&Refresh List"), "reload", KStdAccel::reload(),TQT_TQOBJECT(this), TQT_SLOT(refreshkey()),actionCollection(),"key_refresh"); + KAction *openPhoto= new KAction(i18n("&Open Photo"), "image", 0,TQT_TQOBJECT(this), TQT_SLOT(slotShowPhoto()),actionCollection(),"key_photo"); + KAction *deletePhoto= new KAction(i18n("&Delete Photo"), "delete", 0,TQT_TQOBJECT(this), TQT_SLOT(slotDeletePhoto()),actionCollection(),"delete_photo"); + KAction *addPhoto= new KAction(i18n("&Add Photo"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotAddPhoto()),actionCollection(),"add_photo"); + + KAction *addUid= new KAction(i18n("&Add User Id"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotAddUid()),actionCollection(),"add_uid"); + KAction *delUid= new KAction(i18n("&Delete User Id"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotDelUid()),actionCollection(),"del_uid"); + + KAction *editKey = new KAction(i18n("Edit Key in &Terminal"), "kgpg_term", TQKeySequence(ALT+TQt::Key_Return),TQT_TQOBJECT(this), TQT_SLOT(slotedit()),actionCollection(),"key_edit"); + KAction *exportSecretKey = new KAction(i18n("Export Secret Key..."), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotexportsec()),actionCollection(),"key_sexport"); + KAction *revokeKey = new KAction(i18n("Revoke Key..."), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(revokeWidget()),actionCollection(),"key_revoke"); + + KAction *deleteKeyPair = new KAction(i18n("Delete Key Pair"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(deleteseckey()),actionCollection(),"key_pdelete"); + KAction *generateKey = new KAction(i18n("&Generate Key Pair..."), "kgpg_gen", KStdAccel::shortcut(KStdAccel::New),TQT_TQOBJECT(this), TQT_SLOT(slotgenkey()),actionCollection(),"key_gener"); + + KAction *regeneratePublic = new KAction(i18n("&Regenerate Public Key"), 0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotregenerate()),actionCollection(),"key_regener"); + + (void) new KAction(i18n("&Key Server Dialog"), "network", 0,TQT_TQOBJECT(this), TQT_SLOT(showKeyServer()),actionCollection(),"key_server"); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showOptions()), actionCollection(),"options_configure"); + (void) new KAction(i18n("Tip of the &Day"), "idea", 0,TQT_TQOBJECT(this), TQT_SLOT(slotTip()), actionCollection(),"help_tipofday"); + (void) new KAction(i18n("View GnuPG Manual"), "contents", 0,TQT_TQOBJECT(this), TQT_SLOT(slotManpage()),actionCollection(),"gpg_man"); + + (void) new KToggleAction(i18n("&Show only Secret Keys"), "kgpg_show", 0,TQT_TQOBJECT(this), TQT_SLOT(slotToggleSecret()),actionCollection(),"show_secret"); keysList2->displayOnlySecret=false; - (void) new KToggleAction(i18n("&Hide Expired/Disabled Keys"),0, 0,this, TQT_SLOT(slotToggleDisabled()),actionCollection(),"hide_disabled"); + (void) new KToggleAction(i18n("&Hide Expired/Disabled Keys"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotToggleDisabled()),actionCollection(),"hide_disabled"); keysList2->displayDisabled=true; - sTrust=new KToggleAction(i18n("Trust"),0, 0,this, TQT_SLOT(slotShowTrust()),actionCollection(),"show_trust"); - sSize=new KToggleAction(i18n("Size"),0, 0,this, TQT_SLOT(slotShowSize()),actionCollection(),"show_size"); - sCreat=new KToggleAction(i18n("Creation"),0, 0,this, TQT_SLOT(slotShowCreat()),actionCollection(),"show_creat"); - sExpi=new KToggleAction(i18n("Expiration"),0, 0,this, TQT_SLOT(slotShowExpi()),actionCollection(),"show_expi"); + sTrust=new KToggleAction(i18n("Trust"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotShowTrust()),actionCollection(),"show_trust"); + sSize=new KToggleAction(i18n("Size"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotShowSize()),actionCollection(),"show_size"); + sCreat=new KToggleAction(i18n("Creation"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotShowCreat()),actionCollection(),"show_creat"); + sExpi=new KToggleAction(i18n("Expiration"),0, 0,TQT_TQOBJECT(this), TQT_SLOT(slotShowExpi()),actionCollection(),"show_expi"); photoProps = new KSelectAction(i18n("&Photo ID's"),"kgpg_photo", actionCollection(), "photo_settings"); @@ -682,12 +682,12 @@ listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterfa setCentralWidget(keysList2); keysList2->restoreLayout(KGlobal::config(), "KeyView"); - TQObject::connect(keysList2,TQT_SIGNAL(returnPressed(TQListViewItem *)),this,TQT_SLOT(listsigns())); - TQObject::connect(keysList2,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(listsigns())); - TQObject::connect(keysList2,TQT_SIGNAL(selectionChanged ()),this,TQT_SLOT(checkList())); + TQObject::connect(keysList2,TQT_SIGNAL(returnPressed(TQListViewItem *)),TQT_TQOBJECT(this),TQT_SLOT(listsigns())); + TQObject::connect(keysList2,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),TQT_TQOBJECT(this),TQT_SLOT(listsigns())); + TQObject::connect(keysList2,TQT_SIGNAL(selectionChanged ()),TQT_TQOBJECT(this),TQT_SLOT(checkList())); TQObject::connect(keysList2,TQT_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)), this,TQT_SLOT(slotmenu(TQListViewItem *,const TQPoint &,int))); - TQObject::connect(keysList2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(annule())); + TQObject::connect(keysList2,TQT_SIGNAL(destroyed()),TQT_TQOBJECT(this),TQT_SLOT(annule())); /////////////// get all keys data @@ -702,10 +702,10 @@ listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterfa : "locationbar_erase")); (void) new TQLabel(i18n("Search: "),toolBar()); listViewSearch = new mySearchLine(toolBar(),keysList2); - connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); + connect(clearSearch, TQT_SIGNAL(pressed()), TQT_TQOBJECT(listViewSearch), TQT_SLOT(clear())); - (void)new KAction(i18n("Filter Search"), Qt::Key_F6, listViewSearch, TQT_SLOT(setFocus()),actionCollection(), "search_focus"); + (void)new KAction(i18n("Filter Search"), TQt::Key_F6, TQT_TQOBJECT(listViewSearch), TQT_SLOT(setFocus()),actionCollection(), "search_focus"); sTrust->setChecked(KGpgSettings::showTrust()); sSize->setChecked(KGpgSettings::showSize()); @@ -718,10 +718,10 @@ listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterfa keyStatusBar->insertFixedItem(i18n("00000 Keys, 000 Groups"),1,true); keyStatusBar->setItemAlignment(0, AlignLeft); keyStatusBar->changeItem("",1); - TQObject::connect(keysList2,TQT_SIGNAL(statusMessage(TQString,int,bool)),this,TQT_SLOT(changeMessage(TQString,int,bool))); - TQObject::connect(statusbarTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(statusBarTimeout())); + TQObject::connect(keysList2,TQT_SIGNAL(statusMessage(TQString,int,bool)),TQT_TQOBJECT(this),TQT_SLOT(changeMessage(TQString,int,bool))); + TQObject::connect(statusbarTimer,TQT_SIGNAL(timeout()),TQT_TQOBJECT(this),TQT_SLOT(statusBarTimeout())); - s_kgpgEditor= new KgpgApp(parent, "editor",WType_Dialog,actionCollection()->action("go_default_key")->shortcut(),true); + s_kgpgEditor= new KgpgApp(tqparent, "editor",WType_Dialog,actionCollection()->action("go_default_key")->shortcut(),true); connect(s_kgpgEditor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList))); connect(this,TQT_SIGNAL(fontChanged(TQFont)),s_kgpgEditor,TQT_SLOT(slotSetFont(TQFont))); connect(s_kgpgEditor->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList))); @@ -740,7 +740,7 @@ void listKeys::slotOpenEditor() { KgpgApp *kgpgtxtedit = new KgpgApp(this, "editor",WType_TopLevel | WDestructiveClose,actionCollection()->action("go_default_key")->shortcut()); connect(kgpgtxtedit,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList))); - connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SIGNAL(encryptFiles(KURL::List))); + connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),TQT_TQOBJECT(this),TQT_SIGNAL(encryptFiles(KURL::List))); connect(this,TQT_SIGNAL(fontChanged(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont))); connect(kgpgtxtedit->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList))); kgpgtxtedit->show(); @@ -838,7 +838,7 @@ void listKeys::slotToggleDisabled() void listKeys::slotGotoDefaultKey() { - TQListViewItem *myDefaulKey = keysList2->findItem(KGpgSettings::defaultKey(),6); + TQListViewItem *myDefaulKey = keysList2->tqfindItem(KGpgSettings::defaultKey(),6); keysList2->clearSelection(); keysList2->setCurrentItem(myDefaulKey); keysList2->setSelected(myDefaulKey,true); @@ -887,7 +887,7 @@ void listKeys::slotDelUid() { TQListViewItem *item=keysList2->currentItem(); while (item->depth()>0) - item=item->parent(); + item=item->tqparent(); KProcess *conprocess=new KProcess(); KConfig *config = KGlobal::config(); @@ -923,15 +923,15 @@ void listKeys::slotAddUid() addUidWidget->enableButtonOK(false); AddUid *keyUid=new AddUid(); addUidWidget->setMainWidget(keyUid); - //keyUid->setMinimumSize(keyUid->sizeHint()); + //keyUid->setMinimumSize(keyUid->tqsizeHint()); keyUid->setMinimumWidth(300); - connect(keyUid->kLineEdit1,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(slotAddUidEnable(const TQString & ))); + connect(keyUid->kLineEdit1,TQT_SIGNAL(textChanged ( const TQString & )),TQT_TQOBJECT(this),TQT_SLOT(slotAddUidEnable(const TQString & ))); if (addUidWidget->exec()!=TQDialog::Accepted) return; KgpgInterface *addUidProcess=new KgpgInterface(); addUidProcess->KgpgAddUid(keysList2->currentItem()->text(6),keyUid->kLineEdit1->text(),keyUid->kLineEdit2->text(),keyUid->kLineEdit3->text()); connect(addUidProcess,TQT_SIGNAL(addUidFinished()),keysList2,TQT_SLOT(refreshselfkey())); - connect(addUidProcess,TQT_SIGNAL(addUidError(TQString)),this,TQT_SLOT(slotGpgError(TQString))); + connect(addUidProcess,TQT_SIGNAL(addUidError(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotGpgError(TQString))); } void listKeys::slotAddUidEnable(const TQString & name) @@ -949,13 +949,13 @@ void listKeys::slotAddPhoto() if (KMessageBox::warningContinueCancel(this,mess)!=KMessageBox::Continue) return; - TQString imagePath=KFileDialog::getOpenFileName (TQString::null,"image/jpeg",this); + TQString imagePath=KFileDialog::getOpenFileName (TQString(),"image/jpeg",this); if (imagePath.isEmpty()) return; KgpgInterface *addPhotoProcess=new KgpgInterface(); addPhotoProcess->KgpgAddPhoto(keysList2->currentItem()->text(6),imagePath); - connect(addPhotoProcess,TQT_SIGNAL(addPhotoFinished()),this,TQT_SLOT(slotUpdatePhoto())); - connect(addPhotoProcess,TQT_SIGNAL(addPhotoError(TQString)),this,TQT_SLOT(slotGpgError(TQString))); + connect(addPhotoProcess,TQT_SIGNAL(addPhotoFinished()),TQT_TQOBJECT(this),TQT_SLOT(slotUpdatePhoto())); + connect(addPhotoProcess,TQT_SIGNAL(addPhotoError(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotGpgError(TQString))); } void listKeys::slotGpgError(TQString errortxt) @@ -966,13 +966,13 @@ void listKeys::slotGpgError(TQString errortxt) void listKeys::slotDeletePhoto() { - if (KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete Photo id <b>%1</b><br>from key <b>%2 <%3></b> ?</qt>").arg(keysList2->currentItem()->text(6)).arg(keysList2->currentItem()->parent()->text(0)).arg(keysList2->currentItem()->parent()->text(1)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete"))!=KMessageBox::Continue) + if (KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete Photo id <b>%1</b><br>from key <b>%2 <%3></b> ?</qt>").tqarg(keysList2->currentItem()->text(6)).tqarg(keysList2->currentItem()->tqparent()->text(0)).tqarg(keysList2->currentItem()->tqparent()->text(1)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete"))!=KMessageBox::Continue) return; KgpgInterface *delPhotoProcess=new KgpgInterface(); - delPhotoProcess->KgpgDeletePhoto(keysList2->currentItem()->parent()->text(6),keysList2->currentItem()->text(6)); - connect(delPhotoProcess,TQT_SIGNAL(delPhotoFinished()),this,TQT_SLOT(slotUpdatePhoto())); - connect(delPhotoProcess,TQT_SIGNAL(delPhotoError(TQString)),this,TQT_SLOT(slotGpgError(TQString))); + delPhotoProcess->KgpgDeletePhoto(keysList2->currentItem()->tqparent()->text(6),keysList2->currentItem()->text(6)); + connect(delPhotoProcess,TQT_SIGNAL(delPhotoFinished()),TQT_TQOBJECT(this),TQT_SLOT(slotUpdatePhoto())); + connect(delPhotoProcess,TQT_SIGNAL(delPhotoError(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotGpgError(TQString))); } void listKeys::slotUpdatePhoto() @@ -1006,7 +1006,7 @@ void listKeys::slotSetPhotoSize(int size) TQListViewItem *newdef = keysList2->firstChild(); while (newdef) { - //if ((keysList2->photoKeysList.find(newdef->text(6))!=-1) && (newdef->childCount ()>0)) + //if ((keysList2->photoKeysList.tqfind(newdef->text(6))!=-1) && (newdef->childCount ()>0)) if (newdef->childCount ()>0) { bool hasphoto=false; TQListViewItem *newdefChild = newdef->firstChild(); @@ -1049,19 +1049,19 @@ void listKeys::findFirstKey() // - KFind *m_find = new KFind(searchString, searchOptions,this); - m_find->setData(searchText); - while (m_find->find()==KFind::NoMatch) { + KFind *m_tqfind = new KFind(searchString, searchOptions,this); + m_tqfind->setData(searchText); + while (m_tqfind->find()==KFind::NoMatch) { if (!item->nextSibling()) { foundItem=false; break; } else { item = item->nextSibling(); searchText=item->text(0)+" "+item->text(1)+" "+item->text(6); - m_find->setData(searchText); + m_tqfind->setData(searchText); } } - delete m_find; + delete m_tqfind; if (foundItem) { @@ -1070,7 +1070,7 @@ void listKeys::findFirstKey() keysList2->setSelected(item,true); keysList2->ensureItemVisible(item); } else - KMessageBox::sorry(this,i18n("<qt>Search string '<b>%1</b>' not found.").arg(searchString)); + KMessageBox::sorry(this,i18n("<qt>Search string '<b>%1</b>' not found.").tqarg(searchString)); } void listKeys::findNextKey() @@ -1085,26 +1085,26 @@ void listKeys::findNextKey() if (!item) return; while(item->depth() > 0) - item = item->parent(); + item = item->tqparent(); item=item->nextSibling(); TQString searchText=item->text(0)+" "+item->text(1)+" "+item->text(6); //kdDebug(2100)<<"Next string:"<<searchText<<endl; //kdDebug(2100)<<"Search:"<<searchString<<endl; //kdDebug(2100)<<"OPts:"<<searchOptions<<endl; - KFind *m_find = new KFind(searchString, searchOptions,this); - m_find->setData(searchText); - while (m_find->find()==KFind::NoMatch) { + KFind *m_tqfind = new KFind(searchString, searchOptions,this); + m_tqfind->setData(searchText); + while (m_tqfind->find()==KFind::NoMatch) { if (!item->nextSibling()) { foundItem=false; break; } else { item = item->nextSibling(); searchText=item->text(0)+" "+item->text(1)+" "+item->text(6); - m_find->setData(searchText); + m_tqfind->setData(searchText); //kdDebug(2100)<<"Next string:"<<searchText<<endl; } } - delete m_find; + delete m_tqfind; if (foundItem) { keysList2->clearSelection(); keysList2->setCurrentItem(item); @@ -1266,16 +1266,16 @@ void listKeys::quitApp() void listKeys::readOptions() { - clipboardMode=QClipboard::Clipboard; + clipboardMode=TQClipboard::Clipboard; if (KGpgSettings::useMouseSelection() && (kapp->clipboard()->supportsSelection())) - clipboardMode=QClipboard::Selection; + clipboardMode=TQClipboard::Selection; /////// re-read groups in case the config file location was changed TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); KGpgSettings::setGroups(groups.join(",")); keysList2->groupNb=groups.count(); if (keyStatusBar) - changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1); + changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); showTipOfDay= KGpgSettings::showTipOfDay(); } @@ -1286,12 +1286,12 @@ void listKeys::showOptions() if (KConfigDialog::showDialog("settings")) return; kgpgOptions *optionsDialog=new kgpgOptions(this,"settings"); - connect(optionsDialog,TQT_SIGNAL(settingsUpdated()),this,TQT_SLOT(readAllOptions())); - connect(optionsDialog,TQT_SIGNAL(homeChanged()),this,TQT_SLOT(refreshkey())); - connect(optionsDialog,TQT_SIGNAL(reloadKeyList()),this,TQT_SLOT(refreshkey())); + connect(optionsDialog,TQT_SIGNAL(settingsUpdated()),TQT_TQOBJECT(this),TQT_SLOT(readAllOptions())); + connect(optionsDialog,TQT_SIGNAL(homeChanged()),TQT_TQOBJECT(this),TQT_SLOT(refreshkey())); + connect(optionsDialog,TQT_SIGNAL(reloadKeyList()),TQT_TQOBJECT(this),TQT_SLOT(refreshkey())); connect(optionsDialog,TQT_SIGNAL(refreshTrust(int,TQColor)),keysList2,TQT_SLOT(refreshTrust(int,TQColor))); - connect(optionsDialog,TQT_SIGNAL(changeFont(TQFont)),this,TQT_SIGNAL(fontChanged(TQFont))); - connect(optionsDialog,TQT_SIGNAL(installShredder()),this,TQT_SIGNAL(installShredder())); + connect(optionsDialog,TQT_SIGNAL(changeFont(TQFont)),TQT_TQOBJECT(this),TQT_SIGNAL(fontChanged(TQFont))); + connect(optionsDialog,TQT_SIGNAL(installShredder()),TQT_TQOBJECT(this),TQT_SIGNAL(installShredder())); optionsDialog->exec(); delete optionsDialog; } @@ -1309,7 +1309,7 @@ void listKeys::slotSetDefKey() void listKeys::slotSetDefaultKey(TQString newID) { - TQListViewItem *newdef = keysList2->findItem(newID,6); + TQListViewItem *newdef = keysList2->tqfindItem(newID,6); if (newdef) slotSetDefaultKey(newdef); } @@ -1328,7 +1328,7 @@ void listKeys::slotSetDefaultKey(TQListViewItem *newdef) return; } - TQListViewItem *olddef = keysList2->findItem(KGpgSettings::defaultKey(),6); + TQListViewItem *olddef = keysList2->tqfindItem(KGpgSettings::defaultKey(),6); KGpgSettings::setDefaultKey(newdef->text(6)); KGpgSettings::writeConfig(); @@ -1382,10 +1382,10 @@ void listKeys::slotmenu(TQListViewItem *sel, const TQPoint &pos, int ) if (keysList2->currentItem()->text(6).isEmpty()) popupgroup->exec(pos); else { - if ((keysList2->secretList.find(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1)) + if ((keysList2->secretList.tqfind(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1)) popupsec->exec(pos); else - if ((keysList2->orphanList.find(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1)) + if ((keysList2->orphanList.tqfind(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1)) popuporphan->exec(pos); else popup->exec(pos); @@ -1415,7 +1415,7 @@ void listKeys::revokeWidget() keyRevoke->kURLRequester1->setURL(TQDir::homeDirPath()+"/"+keysList2->currentItem()->text(1).section('@',0,0)+".revoke"); keyRevoke->kURLRequester1->setMode(KFile::File); - keyRevoke->setMinimumSize(keyRevoke->sizeHint()); + keyRevoke->setMinimumSize(keyRevoke->tqsizeHint()); keyRevoke->show(); keyRevokeWidget->setMainWidget(keyRevoke); @@ -1424,15 +1424,15 @@ void listKeys::revokeWidget() if (keyRevoke->cbSave->isChecked()) { slotrevoke(keysList2->currentItem()->text(6),keyRevoke->kURLRequester1->url(),keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text()); if (keyRevoke->cbPrint->isChecked()) - connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(doFilePrint(TQString))); + connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),TQT_TQOBJECT(this),TQT_SLOT(doFilePrint(TQString))); if (keyRevoke->cbImport->isChecked()) - connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(slotImportRevoke(TQString))); + connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotImportRevoke(TQString))); } else { - slotrevoke(keysList2->currentItem()->text(6),TQString::null,keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text()); + slotrevoke(keysList2->currentItem()->text(6),TQString(),keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text()); if (keyRevoke->cbPrint->isChecked()) - connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(doPrint(TQString))); + connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),TQT_TQOBJECT(this),TQT_SLOT(doPrint(TQString))); if (keyRevoke->cbImport->isChecked()) - connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(slotImportRevokeTxt(TQString))); + connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotImportRevokeTxt(TQString))); } } @@ -1474,11 +1474,11 @@ void listKeys::slotexportsec() fgpg.remove(); KProcIO *p=new KProcIO(TQTextCodec::codecForLocale()); - *p<<"gpg"<<"--no-tty"<<"--output"<<TQFile::encodeName(url.path())<<"--armor"<<"--export-secret-keys"<<keysList2->currentItem()->text(6); + *p<<"gpg"<<"--no-tty"<<"--output"<<TQString(TQFile::encodeName(url.path()))<<"--armor"<<"--export-secret-keys"<<keysList2->currentItem()->text(6); p->start(KProcess::Block); if (fgpg.exists()) - KMessageBox::information(this,i18n("Your PRIVATE key \"%1\" was successfully exported.\nDO NOT leave it in an insecure place.").arg(url.path())); + KMessageBox::information(this,i18n("Your PRIVATE key \"%1\" was successfully exported.\nDO NOT leave it in an insecure place.").tqarg(url.path())); else KMessageBox::sorry(this,i18n("Your secret key could not be exported.\nCheck the key.")); } @@ -1542,7 +1542,7 @@ void listKeys::slotexport() TQFile fgpg(expname); if (fgpg.exists()) fgpg.remove(); - *p<<"--output"<<TQFile::encodeName(expname)<<"--export"<<"--armor"; + *p<<"--output"<<TQString(TQFile::encodeName(expname))<<"--export"<<"--armor"; if (!exportAttr) *p<<"--export-options"<<"no-include-attributes"; @@ -1553,7 +1553,7 @@ void listKeys::slotexport() p->start(KProcess::Block); if (fgpg.exists()) - KMessageBox::information(this,i18n("Your public key \"%1\" was successfully exported\n").arg(expname)); + KMessageBox::information(this,i18n("Your public key \"%1\" was successfully exported\n").tqarg(expname)); else KMessageBox::sorry(this,i18n("Your public key could not be exported\nCheck the key.")); } @@ -1570,10 +1570,10 @@ void listKeys::slotexport() TQString result=kexp->getKey(klist,exportAttr); if (page->checkClipboard->isChecked()) slotProcessExportClip(result); - //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),this,TQT_SLOT(slotProcessExportClip(TQString))); + //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotProcessExportClip(TQString))); else slotProcessExportMail(result); - //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),this,TQT_SLOT(slotProcessExportMail(TQString))); + //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotProcessExportMail(TQString))); } } @@ -1585,15 +1585,15 @@ void listKeys::slotexport() void listKeys::slotProcessExportMail(TQString keys) { /// start default Mail application - kapp->invokeMailer(TQString::null, TQString::null, TQString::null, TQString::null, + kapp->invokeMailer(TQString(), TQString(), TQString(), TQString(), keys, //body - TQString::null, - TQString::null); // attachments + TQString(), + TQString()); // attachments } void listKeys::slotProcessExportClip(TQString keys) { - kapp->clipboard()->setText(keys,clipboardMode); + kapp->tqclipboard()->setText(keys,clipboardMode); } @@ -1610,7 +1610,7 @@ void listKeys::slotShowPhoto() KService::Ptr ptr = offers.first(); //KMessageBox::sorry(0,ptr->desktopEntryName()); KProcIO *p=new KProcIO(TQTextCodec::codecForLocale()); - *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQFile::encodeName(ptr->desktopEntryName()+" %i")<<"--edit-key"<<keysList2->currentItem()->parent()->text(6)<<"uid"<<keysList2->currentItem()->text(6)<<"showphoto"<<"quit"; + *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQString(TQFile::encodeName(ptr->desktopEntryName()+" %i"))<<"--edit-key"<<keysList2->currentItem()->tqparent()->text(6)<<"uid"<<keysList2->currentItem()->text(6)<<"showphoto"<<"quit"; p->start(KProcess::DontCare,true); } @@ -1629,7 +1629,7 @@ void listKeys::listsigns() if (keysList2->currentItem()->pixmap(0)->serialNumber()==keysList2->pixkeyOrphan.serialNumber()) { if (KMessageBox::questionYesNo(this,i18n("This key is an orphaned secret key (secret key without public key.) It is currently not usable.\n\n" - "Would you like to regenerate the public key?"), TQString::null, i18n("Generate"), i18n("Do Not Generate"))==KMessageBox::Yes) + "Would you like to regenerate the public key?"), TQString(), i18n("Generate"), i18n("Do Not Generate"))==KMessageBox::Yes) slotregenerate(); return; } @@ -1667,7 +1667,7 @@ void listKeys::deleteGroup() if (!keysList2->currentItem() || !keysList2->currentItem()->text(6).isEmpty()) return; - int result=KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete group <b>%1</b> ?</qt>").arg(keysList2->currentItem()->text(0)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete")); + int result=KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete group <b>%1</b> ?</qt>").tqarg(keysList2->currentItem()->text(0)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete")); if (result!=KMessageBox::Continue) return; KgpgInterface::delGpgGroup(keysList2->currentItem()->text(0), KGpgSettings::gpgConfigPath()); @@ -1681,7 +1681,7 @@ void listKeys::deleteGroup() TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); KGpgSettings::setGroups(groups.join(",")); keysList2->groupNb=groups.count(); - changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1); + changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); } void listKeys::groupChange() @@ -1720,7 +1720,7 @@ void listKeys::createNewGroup() KMessageBox::sorry(this,i18n("<qt>You cannot create a group containing signatures, subkeys or other groups.</qt>")); return; } - TQString groupName=KInputDialog::getText(i18n("Create New Group"),i18n("Enter new group name:"),TQString::null,0,this); + TQString groupName=KInputDialog::getText(i18n("Create New Group"),i18n("Enter new group name:"),TQString(),0,this); if (groupName.isEmpty()) return; if (!keysGroup.isEmpty()) { @@ -1730,16 +1730,16 @@ void listKeys::createNewGroup() TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); KGpgSettings::setGroups(groups.join(",")); keysList2->refreshgroups(); - TQListViewItem *newgrp = keysList2->findItem(groupName,0); + TQListViewItem *newgrp = keysList2->tqfindItem(groupName,0); keysList2->clearSelection(); keysList2->setCurrentItem(newgrp); keysList2->setSelected(newgrp,true); keysList2->ensureItemVisible(newgrp); keysList2->groupNb=groups.count(); - changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1); + changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); } else - KMessageBox::sorry(this,i18n("<qt>No valid or trusted key was selected. The group <b>%1</b> will not be created.</qt>").arg(groupName)); + KMessageBox::sorry(this,i18n("<qt>No valid or trusted key was selected. The group <b>%1</b> will not be created.</qt>").tqarg(groupName)); } } @@ -1781,11 +1781,11 @@ void listKeys::editGroup() gEdit->buttonAdd->setPixmap(KGlobal::iconLoader()->loadIcon("down",KIcon::Small,20)); gEdit->buttonRemove->setPixmap(KGlobal::iconLoader()->loadIcon("up",KIcon::Small,20)); - connect(gEdit->buttonAdd,TQT_SIGNAL(clicked()),this,TQT_SLOT(groupAdd())); - connect(gEdit->buttonRemove,TQT_SIGNAL(clicked()),this,TQT_SLOT(groupRemove())); - // connect(dialogGroupEdit->okClicked(),TQT_SIGNAL(clicked()),this,TQT_SLOT(groupChange())); - connect(gEdit->availableKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),this,TQT_SLOT(groupAdd())); - connect(gEdit->groupKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),this,TQT_SLOT(groupRemove())); + connect(gEdit->buttonAdd,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(groupAdd())); + connect(gEdit->buttonRemove,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(groupRemove())); + // connect(dialogGroupEdit->okClicked(),TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(groupChange())); + connect(gEdit->availableKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),TQT_TQOBJECT(this),TQT_SLOT(groupAdd())); + connect(gEdit->groupKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),TQT_TQOBJECT(this),TQT_SLOT(groupRemove())); TQListViewItem *item=keysList2->firstChild(); if (item==NULL) return; @@ -1817,7 +1817,7 @@ void listKeys::editGroup() gEdit->groupKeys->setColumnWidthMode(1,TQListView::Manual); gEdit->groupKeys->setColumnWidthMode(2,TQListView::Manual); - gEdit->setMinimumSize(gEdit->sizeHint()); + gEdit->setMinimumSize(gEdit->tqsizeHint()); gEdit->show(); if (dialogGroupEdit->exec()==TQDialog::Accepted) groupChange(); @@ -1864,7 +1864,7 @@ void listKeys::signkey() pclose(pass); opt= i18n("<qt>You are about to sign key:<br><br>%1<br>ID: %2<br>Fingerprint: <br><b>%3</b>.<br><br>" "You should check the key fingerprint by phoning or meeting the key owner to be sure that someone " - "is not trying to intercept your communications</qt>").arg(keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")").arg(keysList2->currentItem()->text(6)).arg(fingervalue); + "is not trying to intercept your communications</qt>").tqarg(keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")").tqarg(keysList2->currentItem()->text(6)).tqarg(fingervalue); if (KMessageBox::warningContinueCancel(this,opt)!=KMessageBox::Continue) return; @@ -1946,7 +1946,7 @@ void listKeys::signLoop() kdDebug(2100)<<"Sign process for key: "<<keyCount<<" on a total of "<<signList.count()<<endl; if ( signList.at(keyCount) ) { KgpgInterface *signKeyProcess=new KgpgInterface(); - TQObject::connect(signKeyProcess,TQT_SIGNAL(signatureFinished(int)),this,TQT_SLOT(signatureResult(int))); + TQObject::connect(signKeyProcess,TQT_SIGNAL(signatureFinished(int)),TQT_TQOBJECT(this),TQT_SLOT(signatureResult(int))); signKeyProcess->KgpgSignKey(signList.at(keyCount)->text(6),globalkeyID,globalkeyMail,globalisLocal,globalChecked); } } @@ -1958,7 +1958,7 @@ void listKeys::signatureResult(int success) keysList2->refreshcurrentkey(signList.at(keyCount)); else if (success==2) - KMessageBox::sorry(this,i18n("<qt>Bad passphrase, key <b>%1</b> not signed.</qt>").arg(signList.at(keyCount)->text(0)+i18n(" (")+signList.at(keyCount)->text(1)+i18n(")"))); + KMessageBox::sorry(this,i18n("<qt>Bad passphrase, key <b>%1</b> not signed.</qt>").tqarg(signList.at(keyCount)->text(0)+i18n(" (")+signList.at(keyCount)->text(1)+i18n(")"))); keyCount++; signLoop(); @@ -2052,25 +2052,25 @@ void listKeys::delsignkey() return; } - TQString signID,parentKey,signMail,parentMail; + TQString signID,tqparentKey,signMail,tqparentMail; ////////////////// open a key selection dialog (KgpgSelKey, see begining of this file) - parentKey=keysList2->currentItem()->parent()->text(6); + tqparentKey=keysList2->currentItem()->tqparent()->text(6); signID=keysList2->currentItem()->text(6); - parentMail=keysList2->currentItem()->parent()->text(0)+" ("+keysList2->currentItem()->parent()->text(1)+")"; + tqparentMail=keysList2->currentItem()->tqparent()->text(0)+" ("+keysList2->currentItem()->tqparent()->text(1)+")"; signMail=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")"; - if (parentKey==signID) { + if (tqparentKey==signID) { KMessageBox::sorry(this,i18n("Edit key manually to delete a self-signature.")); return; } - TQString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").arg(signMail).arg(parentMail); + TQString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").tqarg(signMail).tqarg(tqparentMail); - if (KMessageBox::questionYesNo(this,ask,TQString::null,KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes) + if (KMessageBox::questionYesNo(this,ask,TQString(),KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes) return; KgpgInterface *delSignKeyProcess=new KgpgInterface(); - delSignKeyProcess->KgpgDelSignature(parentKey,signID); - connect(delSignKeyProcess,TQT_SIGNAL(delsigfinished(bool)),this,TQT_SLOT(delsignatureResult(bool))); + delSignKeyProcess->KgpgDelSignature(tqparentKey,signID); + connect(delSignKeyProcess,TQT_SIGNAL(delsigfinished(bool)),TQT_TQOBJECT(this),TQT_SLOT(delsignatureResult(bool))); } void listKeys::delsignatureResult(bool success) @@ -2078,7 +2078,7 @@ void listKeys::delsignatureResult(bool success) if (success) { TQListViewItem *top=keysList2->currentItem(); while (top->depth()!=0) - top=top->parent(); + top=top->tqparent(); while (top->firstChild()!=0) delete top->firstChild(); keysList2->refreshcurrentkey(top); @@ -2134,7 +2134,7 @@ void listKeys::slotgenkey() bool goodpass=false; while (!goodpass) { - int code=KPasswordDialog::getNewPassword(password,i18n("<b>Enter passphrase for %1</b>:<br>Passphrase should include non alphanumeric characters and random sequences").arg(newKeyName+" <"+newKeyMail+">")); + int code=KPasswordDialog::getNewPassword(password,i18n("<b>Enter passphrase for %1</b>:<br>Passphrase should include non alphanumeric characters and random sequences").tqarg(newKeyName+" <"+newKeyMail+">")); if (code!=TQDialog::Accepted) return; if (password.length()<5) @@ -2143,13 +2143,13 @@ void listKeys::slotgenkey() goodpass=true; } - pop = new KPassivePopup((TQWidget *)parent(),"new_key"); + pop = new KPassivePopup((TQWidget *)tqparent(),"new_key"); pop->setTimeout(0); TQWidget *wid=new TQWidget(pop); TQVBoxLayout *vbox=new TQVBoxLayout(wid,3); - TQVBox *passiveBox=pop->standardView(i18n("Generating new key pair."),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),wid); + TQVBox *passiveBox=pop->standardView(i18n("Generating new key pair."),TQString(),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),wid); TQMovie anim; @@ -2157,7 +2157,7 @@ void listKeys::slotgenkey() TQLabel *tex=new TQLabel(wid); TQLabel *tex2=new TQLabel(wid); - tex->setAlignment(AlignHCenter); + tex->tqsetAlignment(AlignHCenter); tex->setMovie(anim); tex2->setText(i18n("\nPlease wait...")); vbox->addWidget(passiveBox); @@ -2175,42 +2175,42 @@ void listKeys::slotgenkey() pop->move(iXpos,iYpos); pop->setAutoDelete(false); KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale()); - message=TQString::null; + message=TQString(); //*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--batch"<<"--passphrase-fd"<<res<<"--gen-key"<<"-a"<<"kgpg.tmp"; *proc<<"gpg"<<"--no-tty"<<"--status-fd=2"<<"--no-secmem-warning"<<"--batch"<<"--gen-key"<<"--utf8-strings"; ///////// when process ends, update dialog infos - TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(genover(KProcess *))); + TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),TQT_TQOBJECT(this), TQT_SLOT(genover(KProcess *))); proc->start(KProcess::NotifyOnExit,true); if (ktype=="RSA") - proc->writeStdin("Key-Type: 1"); + proc->writeStdin(TQString("Key-Type: 1")); else { - proc->writeStdin("Key-Type: DSA"); - proc->writeStdin("Subkey-Type: ELG-E"); - proc->writeStdin(TQString("Subkey-Length:%1").arg(ksize)); + proc->writeStdin(TQString("Key-Type: DSA")); + proc->writeStdin(TQString("Subkey-Type: ELG-E")); + proc->writeStdin(TQString("Subkey-Length:%1").tqarg(ksize)); } - proc->writeStdin(TQString("Passphrase:%1").arg(password)); - proc->writeStdin(TQString("Key-Length:%1").arg(ksize)); - proc->writeStdin(TQString("Name-Real:%1").arg(newKeyName)); + proc->writeStdin(TQString("Passphrase:%1").tqarg(password.data())); + proc->writeStdin(TQString("Key-Length:%1").tqarg(ksize)); + proc->writeStdin(TQString("Name-Real:%1").tqarg(newKeyName)); if (!newKeyMail.isEmpty()) - proc->writeStdin(TQString("Name-Email:%1").arg(newKeyMail)); + proc->writeStdin(TQString("Name-Email:%1").tqarg(newKeyMail)); if (!kcomment.isEmpty()) - proc->writeStdin(TQString("Name-Comment:%1").arg(kcomment)); + proc->writeStdin(TQString("Name-Comment:%1").tqarg(kcomment)); if (kexp==0) proc->writeStdin(TQString("Expire-Date:0")); if (kexp==1) - proc->writeStdin(TQString("Expire-Date:%1").arg(knumb)); + proc->writeStdin(TQString("Expire-Date:%1").tqarg(knumb)); if (kexp==2) - proc->writeStdin(TQString("Expire-Date:%1w").arg(knumb)); + proc->writeStdin(TQString("Expire-Date:%1w").tqarg(knumb)); if (kexp==3) - proc->writeStdin(TQString("Expire-Date:%1m").arg(knumb)); + proc->writeStdin(TQString("Expire-Date:%1m").tqarg(knumb)); if (kexp==4) - proc->writeStdin(TQString("Expire-Date:%1y").arg(knumb)); - proc->writeStdin("%commit"); - TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readgenprocess(KProcIO *))); + proc->writeStdin(TQString("Expire-Date:%1y").tqarg(knumb)); + proc->writeStdin(TQString("%commit")); + TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),TQT_TQOBJECT(this),TQT_SLOT(readgenprocess(KProcIO *))); proc->closeWhenDone(); } else ////// start expert (=konsole) mode { @@ -2232,7 +2232,7 @@ void listKeys::readgenprocess(KProcIO *p) { TQString required; while (p->readln(required,true)!=-1) { - if (required.find("KEY_CREATED")!=-1) + if (required.tqfind("KEY_CREATED")!=-1) newkeyFinger=required.stripWhiteSpace().section(' ',-1); message+=required+"\n"; } @@ -2242,13 +2242,13 @@ void listKeys::readgenprocess(KProcIO *p) void listKeys::genover(KProcess *) { - newkeyID=TQString::null; + newkeyID=TQString(); continueSearch=true; KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale()); *conprocess<< "gpg"; *conprocess<<"--no-secmem-warning"<<"--with-colons"<<"--fingerprint"<<"--list-keys"<<newKeyName; - TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(slotReadFingerProcess(KProcIO *))); - TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(newKeyDone(KProcess *))); + TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),TQT_TQOBJECT(this),TQT_SLOT(slotReadFingerProcess(KProcIO *))); + TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),TQT_TQOBJECT(this), TQT_SLOT(newKeyDone(KProcess *))); conprocess->start(KProcess::NotifyOnExit,true); } @@ -2281,7 +2281,7 @@ void listKeys::newKeyDone(KProcess *) return; } keysList2->refreshcurrentkey(newkeyID); - changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1); + changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); KDialogBase *keyCreated=new KDialogBase( this, "key_created", true,i18n("New Key Pair Created"), KDialogBase::Ok); newKey *page=new newKey(keyCreated); page->TLname->setText("<b>"+newKeyName+"</b>"); @@ -2294,12 +2294,12 @@ void listKeys::newKeyDone(KProcess *) page->LEfinger->setText(newkeyFinger); page->CBdefault->setChecked(true); page->show(); - //page->resize(page->maximumSize()); + //page->resize(page->tqmaximumSize()); keyCreated->setMainWidget(page); delete pop; keyCreated->exec(); - TQListViewItem *newdef = keysList2->findItem(newkeyID,6); + TQListViewItem *newdef = keysList2->tqfindItem(newkeyID,6); if (newdef) if (page->CBdefault->isChecked()) slotSetDefaultKey(newdef); @@ -2312,10 +2312,10 @@ void listKeys::newKeyDone(KProcess *) if (page->CBsave->isChecked()) { slotrevoke(newkeyID,page->kURLRequester1->url(),0,i18n("backup copy")); if (page->CBprint->isChecked()) - connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(doFilePrint(TQString))); + connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),TQT_TQOBJECT(this),TQT_SLOT(doFilePrint(TQString))); } else if (page->CBprint->isChecked()) { - slotrevoke(newkeyID,TQString::null,0,i18n("backup copy")); - connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(doPrint(TQString))); + slotrevoke(newkeyID,TQString(),0,i18n("backup copy")); + connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),TQT_TQOBJECT(this),TQT_SLOT(doPrint(TQString))); } } @@ -2326,7 +2326,7 @@ void listKeys::doFilePrint(TQString url) TQTextStream t( &qfile ); doPrint(t.read()); } else - KMessageBox::sorry(this,i18n("<qt>Cannot open file <b>%1</b> for printing...</qt>").arg(url)); + KMessageBox::sorry(this,i18n("<qt>Cannot open file <b>%1</b> for printing...</qt>").tqarg(url)); } void listKeys::doPrint(TQString txt) @@ -2345,7 +2345,7 @@ void listKeys::deleteseckey() //////////////////////// delete a key TQString res=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")"; int result=KMessageBox::warningContinueCancel(this, - i18n("<p>Delete <b>SECRET KEY</b> pair <b>%1</b>?</p>Deleting this key pair means you will never be able to decrypt files encrypted with this key again.").arg(res), + i18n("<p>Delete <b>SECRET KEY</b> pair <b>%1</b>?</p>Deleting this key pair means you will never be able to decrypt files encrypted with this key again.").tqarg(res), i18n("Warning"), KGuiItem(i18n("Delete"),"editdelete")); if (result!=KMessageBox::Continue) @@ -2358,7 +2358,7 @@ void listKeys::deleteseckey() *conprocess<<"-e"<<"gpg" <<"--no-secmem-warning" <<"--delete-secret-key"<<keysList2->currentItem()->text(6); - TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(reloadSecretKeys())); + TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),TQT_TQOBJECT(this), TQT_SLOT(reloadSecretKeys())); conprocess->start(KProcess::NotifyOnExit,KProcess::AllOutput); } @@ -2366,7 +2366,7 @@ void listKeys::reloadSecretKeys() { FILE *fp; char line[300]; - keysList2->secretList=TQString::null; + keysList2->secretList=TQString(); fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r"); while ( fgets( line, sizeof(line), fp)) { TQString lineRead=TQString::fromUtf8(line); @@ -2388,7 +2388,7 @@ void listKeys::confirmdeletekey() deleteGroup(); return; } - if (((keysList2->secretList.find(keysList2->currentItem()->text(6))!=-1) || (keysList2->orphanList.find(keysList2->currentItem()->text(6))!=-1)) && (keysList2->selectedItems().count()==1)) + if (((keysList2->secretList.tqfind(keysList2->currentItem()->text(6))!=-1) || (keysList2->orphanList.tqfind(keysList2->currentItem()->text(6))!=-1)) && (keysList2->selectedItems().count()==1)) deleteseckey(); else { TQStringList keysToDelete; @@ -2397,7 +2397,7 @@ void listKeys::confirmdeletekey() bool secretKeyInside=false; for ( uint i = 0; i < exportList.count(); ++i ) if ( exportList.at(i) ) { - if (keysList2->secretList.find(exportList.at(i)->text(6))!=-1) { + if (keysList2->secretList.tqfind(exportList.at(i)->text(6))!=-1) { secretKeyInside=true; secList+=exportList.at(i)->text(0)+" ("+exportList.at(i)->text(1)+")<br>"; exportList.at(i)->setSelected(false); @@ -2406,7 +2406,7 @@ void listKeys::confirmdeletekey() } if (secretKeyInside) { - int result=KMessageBox::warningContinueCancel(this,i18n("<qt>The following are secret key pairs:<br><b>%1</b>They will not be deleted.<br></qt>").arg(secList)); + int result=KMessageBox::warningContinueCancel(this,i18n("<qt>The following are secret key pairs:<br><b>%1</b>They will not be deleted.<br></qt>").tqarg(secList)); if (result!=KMessageBox::Continue) return; } @@ -2461,7 +2461,7 @@ void listKeys::deletekey() } } else stateChanged("empty_list"); - changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1); + changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); } @@ -2473,8 +2473,8 @@ void listKeys::slotPreImportKey() dial->setMainWidget(page); page->newFilename->setCaption(i18n("Open File")); page->newFilename->setMode(KFile::File); - page->resize(page->minimumSize()); - dial->resize(dial->minimumSize()); + page->resize(page->tqminimumSize()); + dial->resize(dial->tqminimumSize()); if (dial->exec()==TQDialog::Accepted) { if (page->checkFile->isChecked()) { @@ -2488,7 +2488,7 @@ void listKeys::slotPreImportKey() connect(importKeyProcess,TQT_SIGNAL(refreshOrphaned()),keysList2,TQT_SLOT(slotReloadOrphaned())); } } else { - TQString keystr = kapp->clipboard()->text(clipboardMode); + TQString keystr = kapp->tqclipboard()->text(clipboardMode); if (!keystr.isEmpty()) { changeMessage(i18n("Importing..."),0,true); KgpgInterface *importKeyProcess=new KgpgInterface(); @@ -2508,7 +2508,7 @@ void KeyView::expandGroup(TQListViewItem *item) TQStringList keysGroup=KgpgInterface::getGpgGroupSetting(item->text(0),KGpgSettings::gpgConfigPath()); kdDebug(2100)<<keysGroup<<endl; for ( TQStringList::Iterator it = keysGroup.begin(); it != keysGroup.end(); ++it ) { - UpdateViewItem *item2=new UpdateViewItem(item,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null); + UpdateViewItem *item2=new UpdateViewItem(item,TQString(*it),TQString(),TQString(),TQString(),TQString(),TQString(),TQString()); item2->setPixmap(0,pixkeyGroup); item2->setExpandable(false); } @@ -2519,7 +2519,7 @@ TQPixmap KeyView::slotGetPhoto(TQString photoId,bool mini) KTempFile *phototmp=new KTempFile(); TQString popt="cp %i "+phototmp->name(); KProcIO *p=new KProcIO(TQTextCodec::codecForLocale()); - *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(popt)<<"--list-keys"<<photoId; + *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQString(TQFile::encodeName(popt))<<"--list-keys"<<photoId; p->start(KProcess::Block); TQPixmap pixmap; @@ -2528,9 +2528,9 @@ TQPixmap KeyView::slotGetPhoto(TQString photoId,bool mini) TQImage dup=pixmap.convertToImage(); TQPixmap dup2; if (!mini) - dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQImage::ScaleMin)); + dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQ_ScaleMin)); else - dup2.convertFromImage(dup.scale(22,22,TQImage::ScaleMin)); + dup2.convertFromImage(dup.scale(22,22,TQ_ScaleMin)); phototmp->unlink(); delete phototmp; return dup2; @@ -2572,20 +2572,20 @@ void KeyView::expandKey(TQListViewItem *item) if (tst[0]=="uat") { kdDebug(2100)<<"Found photo at uid "<<uidNumber<<endl; - itemuid= new UpdateViewItem(item,i18n("Photo id"),TQString::null,TQString::null,"-","-","-",TQString::number(uidNumber)); + itemuid= new UpdateViewItem(item,i18n("Photo id"),TQString(),TQString(),"-","-","-",TQString::number(uidNumber)); if (displayPhoto) { kgpgphototmp=new KTempFile(); kgpgphototmp->setAutoDelete(true); TQString pgpgOutput="cp %i "+kgpgphototmp->name(); KProcIO *p=new KProcIO(TQTextCodec::codecForLocale()); - *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput); + *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQString(TQFile::encodeName(pgpgOutput)); *p<<"--edit-key"<<item->text(6)<<"uid"<<TQString::number(uidNumber)<<"showphoto"<<"quit"; p->start(KProcess::Block); TQPixmap pixmap; pixmap.load(kgpgphototmp->name()); TQImage dup=pixmap.convertToImage(); TQPixmap dup2; - dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQImage::ScaleMin)); + dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQ_ScaleMin)); itemuid->setPixmap(0,dup2); delete kgpgphototmp; //itemuid->setPixmap(0,keyPhotoId); @@ -2595,7 +2595,7 @@ void KeyView::expandKey(TQListViewItem *item) cycle="uid"; } else { kdDebug(2100)<<"Found uid at "<<uidNumber<<endl; - itemuid= new UpdateViewItem(item,uidKey.gpgkeyname,uidKey.gpgkeymail,TQString::null,"-","-","-","-"); + itemuid= new UpdateViewItem(item,uidKey.gpgkeyname,uidKey.gpgkeymail,TQString(),"-","-","-","-"); itemuid->setPixmap(2,uidKey.trustpic); if (noID) { item->setText(0,uidKey.gpgkeyname); @@ -2638,7 +2638,7 @@ void KeyView::expandKey(TQListViewItem *item) } else if (tst[0]=="sub") { gpgKey subKey=extractKey(line); - itemsub= new UpdateViewItem(item,i18n("%1 subkey").arg(subKey.gpgkeyalgo),TQString::null,TQString::null,subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid); + itemsub= new UpdateViewItem(item,i18n("%1 subkey").tqarg(subKey.gpgkeyalgo),TQString(),TQString(),subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid); itemsub->setPixmap(0,pixkeySingle); itemsub->setPixmap(2,subKey.trustpic); cycle="sub"; @@ -2672,7 +2672,7 @@ void KeyView::refreshkeylist() TQListViewItem *current = currentItem(); if(current != NULL) { while(current->depth() > 0) { - current = current->parent(); + current = current->tqparent(); } takeItem(current); } @@ -2681,8 +2681,8 @@ void KeyView::refreshkeylist() clear(); FILE *fp2,*fp; TQStringList issec; - secretList=TQString::null; - orphanList=TQString::null; + secretList=TQString(); + orphanList=TQString(); fp2 = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r"); while ( fgets( line, sizeof(line), fp2)) { TQString lineRead=TQString::fromUtf8(line); @@ -2711,21 +2711,21 @@ void KeyView::refreshkeylist() if (pubKey.gpgkeyname.isEmpty()) noID=true; - item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired); + item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString(),pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired); item->setPixmap(2,pubKey.trustpic); item->setExpandable(true); TQStringList::Iterator ite; - ite=issec.find(pubKey.gpgkeyid.right(8)); + ite=issec.tqfind(pubKey.gpgkeyid.right(8)); if (ite!=issec.end()) { item->setPixmap(0,pixkeyPair); secretList+=pubKey.gpgkeyid; issec.remove(*ite); } else item->setPixmap(0,pixkeySingle); - if (openKeys.find(pubKey.gpgkeyid)!=-1) + if (openKeys.tqfind(pubKey.gpgkeyid)!=-1) item->setOpen(true); } @@ -2743,7 +2743,7 @@ void KeyView::refreshkeylist() groupNb=groups.count(); for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) if (!TQString(*it).isEmpty()) { - item=new UpdateViewItem(this,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,false,false); + item=new UpdateViewItem(this,TQString(*it),TQString(),TQString(),TQString(),TQString(),TQString(),TQString(),false,false); item->setPixmap(0,pixkeyGroup); item->setExpandable(false); } @@ -2753,9 +2753,9 @@ void KeyView::refreshkeylist() if(current != NULL) { // select previous selected if (!current->text(6).isEmpty()) - newPos = findItem(current->text(6), 6); + newPos = tqfindItem(current->text(6), 6); else - newPos = findItem(current->text(0), 0); + newPos = tqfindItem(current->text(0), 0); delete current; } @@ -2768,7 +2768,7 @@ void KeyView::refreshkeylist() setSelected(firstChild(),true); } - emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1); + emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("Ready"),0); kdDebug(2100)<<"Refresh Finished"<<endl; } @@ -2794,7 +2794,7 @@ void KeyView::insertOrphan(TQString currentID) // if (orphanedKey.gpgkeyname.isEmpty()) // noID=true; - item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired); + item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString(),orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired); item->setPixmap(0,pixkeyOrphan); } } @@ -2816,7 +2816,7 @@ void KeyView::insertOrphanedKeys(TQStringList orphans) fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r"); while ( fgets( line, sizeof(line), fp)) { TQString lineRead=TQString::fromUtf8(line); - if ((lineRead.startsWith("sec")) && (orphans.find(lineRead.section(':',4,4).right(8))!=orphans.end())) { + if ((lineRead.startsWith("sec")) && (orphans.tqfind(lineRead.section(':',4,4).right(8))!=orphans.end())) { gpgKey orphanedKey=extractKey(lineRead); bool isbold=false; @@ -2828,7 +2828,7 @@ void KeyView::insertOrphanedKeys(TQStringList orphans) // if (orphanedKey.gpgkeyname.isEmpty()) // noID=true; orphanList+=orphanedKey.gpgkeyid+","; - UpdateViewItem *item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired); + UpdateViewItem *item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString(),orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired); item->setPixmap(0,pixkeyOrphan); } } @@ -2851,11 +2851,11 @@ void KeyView::refreshgroups() groupNb=groups.count(); for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) if (!TQString(*it).isEmpty()) { - item=new UpdateViewItem(this,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,false,false); + item=new UpdateViewItem(this,TQString(*it),TQString(),TQString(),TQString(),TQString(),TQString(),TQString(),false,false); item->setPixmap(0,pixkeyGroup); item->setExpandable(false); } - emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1); + emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("Ready"),0); } @@ -2865,7 +2865,7 @@ void KeyView::refreshselfkey() if (currentItem()->depth()==0) refreshcurrentkey(currentItem()); else - refreshcurrentkey(currentItem()->parent()); + refreshcurrentkey(currentItem()->tqparent()); } void KeyView::slotReloadKeys(TQStringList keyIDs) @@ -2880,9 +2880,9 @@ void KeyView::slotReloadKeys(TQStringList keyIDs) for ( TQStringList::Iterator it = keyIDs.begin(); it != keyIDs.end(); ++it ) { refreshcurrentkey(*it); } - kdDebug(2100)<<"Refreshing key:--------"<<(keyIDs.last()).right(8).prepend("0x")<<endl; - ensureItemVisible(this->findItem((keyIDs.last()).right(8).prepend("0x"),6)); - emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1); + kdDebug(2100)<<"Refreshing key:--------"<<TQString((keyIDs.last()).right(8).prepend("0x"))<<endl; + ensureItemVisible(this->tqfindItem((keyIDs.last()).right(8).prepend("0x"),6)); + emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("Ready"),0); } @@ -2911,13 +2911,13 @@ void KeyView::slotReloadOrphaned() TQStringList::Iterator it; for ( it = issec.begin(); it != issec.end(); ++it ) { - if (findItem(*it,6)==0) { + if (tqfindItem(*it,6)==0) { insertOrphan(*it); orphanList+=*it+","; } } - setSelected(findItem(*it,6),true); - emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1); + setSelected(tqfindItem(*it,6),true); + emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("Ready"),0); } @@ -2925,7 +2925,7 @@ void KeyView::refreshcurrentkey(TQString currentID) { if (currentID.isNull()) return; UpdateViewItem *item=NULL; - TQString issec=TQString::null; + TQString issec=TQString(); FILE *fp,*fp2; char line[300]; @@ -2954,11 +2954,11 @@ void KeyView::refreshcurrentkey(TQString currentID) isbold=true; if (pubKey.gpgkeytrust==i18n("Expired")) isexpired=true; - item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired); + item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString(),pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired); item->setPixmap(2,pubKey.trustpic); item->setVisible(true); item->setExpandable(true); - if (issec.find(pubKey.gpgkeyid.right(8),0,FALSE)!=-1) { + if (issec.tqfind(pubKey.gpgkeyid.right(8),0,FALSE)!=-1) { item->setPixmap(0,pixkeyPair); secretList+=pubKey.gpgkeyid; } else { @@ -2969,12 +2969,12 @@ void KeyView::refreshcurrentkey(TQString currentID) pclose(fp); if (!keyFound) { - if (orphanList.find(currentID)==-1) + if (orphanList.tqfind(currentID)==-1) orphanList+=currentID+","; insertOrphan(currentID); return; } - if (orphanList.find(currentID)!=-1) + if (orphanList.tqfind(currentID)!=-1) orphanList.remove(currentID); clearSelection(); @@ -3059,13 +3059,13 @@ gpgKey KeyView::extractKey(TQString keyColon) ret.gpgkeyexpiration=KGlobal::locale()->formatDate(date, true); } TQString fullname=keyString[9]; - if (fullname.find("<")!=-1) { + if (fullname.tqfind("<")!=-1) { ret.gpgkeymail=fullname.section('<',-1,-1); ret.gpgkeymail.truncate(ret.gpgkeymail.length()-1); ret.gpgkeyname=fullname.section('<',0,0); //ret.gpgkeyname=ret.gpgkeyname.section('(',0,0); } else { - ret.gpgkeymail=TQString::null; + ret.gpgkeymail=TQString(); ret.gpgkeyname=fullname; //ret.gpgkeyname=fullname.section('(',0,0); } @@ -3138,7 +3138,7 @@ gpgKey KeyView::extractKey(TQString keyColon) ret.trustpic=trustunknown; break; } - if (keyString[11].find('D')!=-1) { + if (keyString[11].tqfind('D')!=-1) { ret.gpgkeytrust=i18n("Disabled"); ret.trustpic=trustbad; } diff --git a/kgpg/listkeys.h b/kgpg/listkeys.h index fc3c038..69e64e4 100644 --- a/kgpg/listkeys.h +++ b/kgpg/listkeys.h @@ -38,7 +38,7 @@ class TQPushButton; class TQPopupMenu; class TQLabel; -class QCheckbox; +class TQCheckbox; class KStatusBar; class KPassivePopup; class KProcess; @@ -68,9 +68,10 @@ struct gpgKey class KgpgSelKey : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool allowMultipleSelection=false, TQString preselected=TQString::null); + KgpgSelKey( TQWidget *tqparent = 0, const char *name = 0,bool allowMultipleSelection=false, TQString preselected=TQString()); KListView *keysListpr; TQPixmap keyPair; TQCheckBox *local; @@ -91,9 +92,10 @@ public slots: class KeyView : public KListView { Q_OBJECT + TQ_OBJECT friend class listKeys; public: - KeyView( TQWidget *parent = 0, const char *name = 0); + KeyView( TQWidget *tqparent = 0, const char *name = 0); bool displayPhoto,displayOnlySecret,displayDisabled; int previewSize; TQString secretList; @@ -142,14 +144,15 @@ protected: class mySearchLine: public KListViewSearchLine { Q_OBJECT + TQ_OBJECT public: - mySearchLine(TQWidget *parent = 0, KeyView *listView = 0, const char *name = 0); + mySearchLine(TQWidget *tqparent = 0, KeyView *listView = 0, const char *name = 0); virtual ~mySearchLine(); private: KeyView *searchListView; public slots: -virtual void updateSearch(const TQString &s = TQString::null); +virtual void updateSearch(const TQString &s = TQString()); protected: virtual bool itemMatches(const TQListViewItem *item, const TQString & s) const; }; @@ -159,9 +162,10 @@ class listKeys : public KMainWindow, virtual public KeyInterface { friend class KeyView; Q_OBJECT + TQ_OBJECT public: - listKeys(TQWidget *parent=0, const char *name=0); + listKeys(TQWidget *tqparent=0, const char *name=0); ~listKeys(); TQLabel *keyPhoto; KeyView *keysList2; @@ -192,7 +196,7 @@ private: groupEdit *gEdit; KgpgInterface *revKeyProcess; KDialogBase *addUidWidget; - QClipboard::Mode clipboardMode; + TQClipboard::Mode clipboardMode; TQTimer *statusbarTimer; diff --git a/kgpg/newkey.ui b/kgpg/newkey.ui index ad6b0aa..8dfc354 100644 --- a/kgpg/newkey.ui +++ b/kgpg/newkey.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>newKey</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>newKey</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -41,7 +41,7 @@ <string>You have successfully created the following key:</string> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>CBdefault</cstring> </property> @@ -65,7 +65,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -73,7 +73,7 @@ <string>Fingerprint:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -81,7 +81,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -89,7 +89,7 @@ <string>Email:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -97,7 +97,7 @@ <string>Key ID:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>TLname</cstring> </property> @@ -113,7 +113,7 @@ <string>textLabel7</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>TLemail</cstring> </property> @@ -121,7 +121,7 @@ <string>textLabel8</string> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>TLid</cstring> </property> @@ -131,7 +131,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -142,7 +142,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -150,7 +150,7 @@ <string>It is recommended to save or print a revocation certificate in case your key is compromised.</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>CBprint</cstring> </property> @@ -158,7 +158,7 @@ <string>Print</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>CBsave</cstring> </property> @@ -189,8 +189,8 @@ <includes> <include location="local" impldecl="in implementation">newkey.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>CBsave_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kgpg/newkey.ui.h b/kgpg/newkey.ui.h index e920edd..07df4eb 100644 --- a/kgpg/newkey.ui.h +++ b/kgpg/newkey.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kgpg/popuppublic.cpp b/kgpg/popuppublic.cpp index 3a1461d..01bd02b 100644 --- a/kgpg/popuppublic.cpp +++ b/kgpg/popuppublic.cpp @@ -54,14 +54,14 @@ class UpdateViewItem2 : public KListViewItem { public: - UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault); + UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault); virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align); virtual TQString key(int c,bool ) const; bool def; }; -UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault) - : KListViewItem(parent) +UpdateViewItem2::UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault) + : KListViewItem(tqparent) { def=isDefault; setText(0,name); @@ -70,14 +70,14 @@ def=isDefault; } -void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) { if ((def) && (column<2)) { TQFont font(p->font()); font.setBold(true); p->setFont(font); } - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } TQString UpdateViewItem2 :: key(int c,bool ) const @@ -87,8 +87,8 @@ TQString UpdateViewItem2 :: key(int c,bool ) const /////////////// main view -popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): -KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true) +popupPublic::popupPublic(TQWidget *tqparent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): +KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, tqparent, name,true) { TQWidget *page = plainPage(); @@ -106,7 +106,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20); keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20); - if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile)); + if (filemode) setCaption(i18n("Select Public Key for %1").tqarg(sfile)); fmode=filemode; TQHButtonGroup *hBar=new TQHButtonGroup(page); @@ -146,7 +146,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0); KActionCollection *actcol=new KActionCollection(this); - (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); + (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, TQT_TQOBJECT(this), TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); @@ -167,16 +167,16 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent "box enables you to use any key, even if it has not be signed.")); if (filemode) { - TQWidget *parentBox=new TQWidget(boutonboxoptions); - TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0); + TQWidget *tqparentBox=new TQWidget(boutonboxoptions); + TQHBoxLayout *shredBox=new TQHBoxLayout(tqparentBox,0); //shredBox->setFrameStyle(TQFrame::NoFrame); //shredBox->setMargin(0); - CBshred=new TQCheckBox(i18n("Shred source file"),parentBox); + CBshred=new TQCheckBox(i18n("Shred source file"),tqparentBox); TQWhatsThis::add (CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible")); TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>"); - KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox ); + KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").tqarg(shredWhatsThis),tqparentBox ); shredBox->addWidget(CBshred); shredBox->addWidget(warn); } @@ -208,7 +208,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent char line[200]="\0"; FILE *fp2; - seclist=TQString::null; + seclist=TQString(); fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r"); while ( fgets( line, sizeof(line), fp2)) @@ -256,7 +256,7 @@ void popupPublic::sort() if (current==NULL) return; - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -266,7 +266,7 @@ void popupPublic::sort() while ( current->nextSibling() ) { current = current->nextSibling(); - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -304,7 +304,7 @@ void popupPublic::customOpts(const TQString &str) void popupPublic::slotGotoDefaultKey() { - TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2); + TQListViewItem *myDefaulKey = keysList->tqfindItem(KGpgSettings::defaultKey(),2); keysList->clearSelection(); keysList->setCurrentItem(myDefaulKey); keysList->setSelected(myDefaulKey,true); @@ -329,7 +329,7 @@ void popupPublic::refreshkeys() { if (!TQString(*it).isEmpty()) { - UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false); + UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString(),TQString(),false); item->setPixmap(0,keyGroup); } } @@ -346,7 +346,7 @@ void popupPublic::slotpreselect() { TQListViewItem *it=NULL; if (!keysList->firstChild()) return; - if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2); + if (fmode) it=keysList->tqfindItem(KGpgSettings::defaultKey(),2); if (!trusted) sort(); if (fmode) @@ -415,25 +415,25 @@ void popupPublic::slotprocread(KProcIO *p) untrustedList<<id; break; } - if (keyString[11].find('D')!=-1) dead=true; + if (keyString[11].tqfind('D')!=-1) dead=true; tst=keyString[9]; - if (tst.find("<")!=-1) { + if (tst.tqfind("<")!=-1) { keymail=tst.section('<',-1,-1); keymail.truncate(keymail.length()-1); keyname=tst.section('<',0,0); - //if (keyname.find("(")!=-1) + //if (keyname.tqfind("(")!=-1) // keyname=keyname.section('(',0,0); } else { - keymail=TQString::null; + keymail=TQString(); keyname=tst;//.section('(',0,0); } if ((!dead) && (!tst.isEmpty())) { bool isDefaultKey=false; if (id.right(8)==defaultKey) isDefaultKey=true; UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey); - //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").arg(id).arg(tr).arg(val)); + //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val)); //sub->setSelectable(false); - if (seclist.find(tst,0,FALSE)!=-1) + if (seclist.tqfind(tst,0,FALSE)!=-1) item->setPixmap(0,keyPair); else item->setPixmap(0,keySingle); diff --git a/kgpg/popuppublic.h b/kgpg/popuppublic.h index 643a1dd..842d8a9 100644 --- a/kgpg/popuppublic.h +++ b/kgpg/popuppublic.h @@ -29,12 +29,13 @@ class KListView; class TQButtonGroup; class KProcIO; -class popupPublic : public KDialogBase //QDialog +class popupPublic : public KDialogBase //TQDialog { Q_OBJECT + TQ_OBJECT public: - popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); + popupPublic(TQWidget *tqparent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home)); ~popupPublic(); KListView *keysList; TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; diff --git a/kgpg/searchres.ui b/kgpg/searchres.ui index 0c81fcd..c58c6fe 100644 --- a/kgpg/searchres.ui +++ b/kgpg/searchres.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>searchRes</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>searchRes</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>statusText</cstring> </property> @@ -27,7 +27,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -116,7 +116,7 @@ <tabstop>kLVsearch</tabstop> <tabstop>kLEID</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klistview.h</includehint> diff --git a/kgpg/sourceselect.ui b/kgpg/sourceselect.ui index faf0dee..2881271 100644 --- a/kgpg/sourceselect.ui +++ b/kgpg/sourceselect.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>SrcSelect</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SrcSelect</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>350</width> <height>0</height> @@ -33,7 +33,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -44,7 +44,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>checkFile</cstring> </property> @@ -63,7 +63,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>checkClipboard</cstring> </property> @@ -83,7 +83,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -100,10 +100,10 @@ <slot>checkFile_toggled(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>checkFile_toggled( bool isOn )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/khexedit/bitswapwidget.cc b/khexedit/bitswapwidget.cc index 70a5a22..20d4039 100644 --- a/khexedit/bitswapwidget.cc +++ b/khexedit/bitswapwidget.cc @@ -24,10 +24,10 @@ #include "bitswapwidget.h" -CDigitLabel::CDigitLabel( TQWidget *parent, uint digit, const char *name ) - :TQLabel(parent, name), mDigit( digit ), mDotPosition( 0 ) +CDigitLabel::CDigitLabel( TQWidget *tqparent, uint digit, const char *name ) + :TQLabel(tqparent, name), mDigit( digit ), mDotPosition( 0 ) { - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); initialize(); } @@ -56,7 +56,7 @@ void CDigitLabel::setValue( uint digit, bool notify ) { if( notify == true ) { - emit valueChanged( this, digit, false ); + emit valueChanged( TQT_TQOBJECT(this), digit, false ); } mDigit = digit; @@ -64,7 +64,7 @@ void CDigitLabel::setValue( uint digit, bool notify ) if( notify == true ) { - emit valueChanged( this, mDigit, true ); + emit valueChanged( TQT_TQOBJECT(this), mDigit, true ); } } } @@ -81,7 +81,7 @@ void CDigitLabel::setDotPosition( uint dotPosition ) -TQSize CDigitLabel::sizeHint( void ) const +TQSize CDigitLabel::tqsizeHint( void ) const { int h = fontMetrics().height(); TQSize s( h, h ); // Retangular @@ -98,18 +98,18 @@ void CDigitLabel::drawContents( TQPainter *p ) if( hasFocus() == true ) { - p->fillRect( cr, palette().active().highlight() ); - p->setPen( palette().active().highlightedText() ); + p->fillRect( cr, tqpalette().active().highlight() ); + p->setPen( tqpalette().active().highlightedText() ); } else { - p->fillRect( cr, palette().active().base() ); - p->setPen( palette().active().text() ); + p->fillRect( cr, tqpalette().active().base() ); + p->setPen( tqpalette().active().text() ); } if( mDotPosition != 0 ) { - p->fillRect( cr.x()+2, cr.y()+2, 5, 5, Qt::red ); // UL + p->fillRect( cr.x()+2, cr.y()+2, 5, 5, TQt::red ); // UL /* if( mDotPosition == 1 ) { @@ -132,7 +132,7 @@ void CDigitLabel::drawContents( TQPainter *p ) TQString text; text.setNum( mDigit ); - p->drawText( 0, 0, cr.width(), cr.height(), alignment(), text ); + p->drawText( 0, 0, cr.width(), cr.height(), tqalignment(), text ); @@ -145,12 +145,12 @@ void CDigitLabel::keyPressEvent( TQKeyEvent *e ) { case Key_Left: case Key_Up: - emit stepCell( this, false ); + emit stepCell( TQT_TQOBJECT(this), false ); break; case Key_Right: case Key_Down: - emit stepCell( this, true ); + emit stepCell( TQT_TQOBJECT(this), true ); break; case Key_Escape: @@ -174,8 +174,8 @@ void CDigitLabel::keyPressEvent( TQKeyEvent *e ) -CByteWidget::CByteWidget( TQWidget *parent, const char *name ) - :TQWidget(parent, name) +CByteWidget::CByteWidget( TQWidget *tqparent, const char *name ) + :TQWidget(tqparent, name) { mHBox = new TQHBoxLayout( this, 0 ); @@ -183,9 +183,9 @@ CByteWidget::CByteWidget( TQWidget *parent, const char *name ) { mDigit[i] = new CDigitLabel( this, 7-i ); mDigit[i]->setLineWidth( 1 ); - mDigit[i]->setFixedSize( mDigit[i]->sizeHint()*2 ); + mDigit[i]->setFixedSize( mDigit[i]->tqsizeHint()*2 ); mDigit[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - mDigit[i]->setAlignment( AlignCenter ); + mDigit[i]->tqsetAlignment( AlignCenter ); connect( mDigit[i], TQT_SIGNAL(stepCell(const TQObject *, bool )), this, TQT_SLOT(stepCell(const TQObject *, bool ))); connect( mDigit[i], TQT_SIGNAL(valueChanged(const TQObject *, uint, bool )), @@ -206,7 +206,7 @@ void CByteWidget::stepCell( const TQObject *obj, bool next ) { for( uint i=0; i<8; i++ ) { - if( obj == mDigit[i] ) + if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) ) { if( next == true ) { @@ -228,7 +228,7 @@ void CByteWidget::valueChanged( const TQObject *obj, uint val, bool after ) { for( uint i=0; i<8; i++ ) { - if( obj == mDigit[i] ) + if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) ) { uint tmp = 7-mDigit[i]->value(); mDigit[tmp]->setValue( mDigit[i]->value(), false ); @@ -282,7 +282,7 @@ void CByteWidget::setBuddy( const TQObject *obj ) { for( uint i=0; i<8; i++ ) { - if( obj == mDigit[i] ) + if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) ) { uint val = mDigit[i]->value(); if( val < 8 ) diff --git a/khexedit/bitswapwidget.h b/khexedit/bitswapwidget.h index 9f54ab6..14d6ab2 100644 --- a/khexedit/bitswapwidget.h +++ b/khexedit/bitswapwidget.h @@ -26,15 +26,16 @@ #include <tqstring.h> -class CDigitLabel : public QLabel +class CDigitLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - CDigitLabel( TQWidget *parent, uint digit = 0, const char *name=0 ); + CDigitLabel( TQWidget *tqparent, uint digit = 0, const char *name=0 ); ~CDigitLabel( void ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; inline uint value( void ); signals: @@ -67,12 +68,13 @@ inline uint CDigitLabel::value( void ) -class CByteWidget : public QWidget +class CByteWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - CByteWidget( TQWidget *parent, const char *name=0 ); + CByteWidget( TQWidget *tqparent, const char *name=0 ); ~CByteWidget( void ); bool flag( TQByteArray &buf ); diff --git a/khexedit/chartabledialog.cc b/khexedit/chartabledialog.cc index 3f67b0e..a249325 100644 --- a/khexedit/chartabledialog.cc +++ b/khexedit/chartabledialog.cc @@ -32,13 +32,13 @@ #include "chartabledialog.h" -CCharTableDialog::CCharTableDialog( TQWidget *parent, const char *name, +CCharTableDialog::CCharTableDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Character Table"), Help|User1|Cancel, User1, - parent, name, modal, true, KStdGuiItem::insert()) + tqparent, name, modal, true, KStdGuiItem::insert()) { updateGeometry(); - setHelp( "khexedit/khexedit.html", TQString::null ); + setHelp( "khexedit/khexedit.html", TQString() ); TQString text; TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -69,7 +69,7 @@ CCharTableDialog::CCharTableDialog( TQWidget *parent, const char *name, text = i18n("Insert this number of characters:"); TQLabel *label = new TQLabel( text, plainPage() ); - label->setFixedWidth( label->sizeHint().width() ); + label->setFixedWidth( label->tqsizeHint().width() ); hbox->addWidget( label ); mInputCountSpin = new TQSpinBox( plainPage(), "spin" ); diff --git a/khexedit/chartabledialog.h b/khexedit/chartabledialog.h index dcdaafd..ac829e7 100644 --- a/khexedit/chartabledialog.h +++ b/khexedit/chartabledialog.h @@ -35,9 +35,10 @@ class TQSpinBox; class CCharTableDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CCharTableDialog( TQWidget *parent=0, const char *name=0,bool modal=false ); + CCharTableDialog( TQWidget *tqparent=0, const char *name=0,bool modal=false ); ~CCharTableDialog( void ); signals: diff --git a/khexedit/converterdialog.cc b/khexedit/converterdialog.cc index 6f3a82e..3452c4f 100644 --- a/khexedit/converterdialog.cc +++ b/khexedit/converterdialog.cc @@ -28,9 +28,9 @@ #include "hexvalidator.h" -CValidateLineEdit::CValidateLineEdit( TQWidget *parent, int validateType, +CValidateLineEdit::CValidateLineEdit( TQWidget *tqparent, int validateType, const char *name ) - :TQLineEdit( parent, name ), mBusy(false) + :TQLineEdit( tqparent, name ), mBusy(false) { mValidator = new CHexValidator( this, (CHexValidator::EState)validateType ); setValidator( mValidator ); @@ -66,9 +66,9 @@ void CValidateLineEdit::convertText( const TQString &text ) -CConverterDialog::CConverterDialog( TQWidget *parent, const char *name, +CConverterDialog::CConverterDialog( TQWidget *tqparent, const char *name, bool modal ) - :KDialogBase( parent, name, modal, i18n("Converter"), Cancel|User2|User1, + :KDialogBase( tqparent, name, modal, i18n("Converter"), Cancel|User2|User1, Cancel, true, KStdGuiItem::clear(), i18n("&On Cursor") ) { TQWidget *page = new TQWidget( this ); diff --git a/khexedit/converterdialog.h b/khexedit/converterdialog.h index abcc432..d5e8d7e 100644 --- a/khexedit/converterdialog.h +++ b/khexedit/converterdialog.h @@ -30,9 +30,10 @@ class CHexValidator; class CValidateLineEdit : public TQLineEdit { Q_OBJECT + TQ_OBJECT public: - CValidateLineEdit( TQWidget *parent, int validateType, const char *name=0 ); + CValidateLineEdit( TQWidget *tqparent, int validateType, const char *name=0 ); ~CValidateLineEdit( void ); public slots: @@ -53,9 +54,10 @@ class CValidateLineEdit : public TQLineEdit class CConverterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CConverterDialog( TQWidget *parent, const char *name=0, bool modal=true ); + CConverterDialog( TQWidget *tqparent, const char *name=0, bool modal=true ); ~CConverterDialog( void ); protected: diff --git a/khexedit/dialog.cc b/khexedit/dialog.cc index 8bc2cbe..a290cb8 100644 --- a/khexedit/dialog.cc +++ b/khexedit/dialog.cc @@ -40,8 +40,8 @@ static const TQStringList &formatStrings( void ); static const TQStringList &operationStrings( void ); -CGotoDialog::CGotoDialog( TQWidget *parent, const char *name, bool modal ) - :KDialogBase( Plain, i18n("Goto Offset"), Ok|Cancel, Ok, parent, name, +CGotoDialog::CGotoDialog( TQWidget *tqparent, const char *name, bool modal ) + :KDialogBase( Plain, i18n("Goto Offset"), Ok|Cancel, Ok, tqparent, name, modal ) { TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -174,8 +174,8 @@ void CGotoDialog::slotOk( void ) -CFindDialog::CFindDialog( TQWidget *parent, const char *name, bool modal ) - :KDialogBase( Plain, i18n("Find"), Ok|Cancel, Ok, parent, name, modal ) +CFindDialog::CFindDialog( TQWidget *tqparent, const char *name, bool modal ) + :KDialogBase( Plain, i18n("Find"), Ok|Cancel, Ok, tqparent, name, modal ) { TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -240,7 +240,7 @@ CFindDialog::CFindDialog( TQWidget *parent, const char *name, bool modal ) mCheckBackward->setChecked( config.readBoolEntry( "Backwards", false ) ); mCheckUseNavigator->setChecked( config.readBoolEntry( "UseNavigator", true)); uint val = config.readUnsignedNumEntry( "Format", 0 ); - mSelector->setCurrentItem(QMIN(4,val) ); + mSelector->setCurrentItem(TQMIN(4,val) ); selectorChanged( mSelector->currentItem() ); enableButtonOK(!mInput->text().isEmpty()); } @@ -343,10 +343,10 @@ void CFindDialog::findAgain( EOperation operation ) -CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *parent, const char *name, +CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Find (Navigator)"), User3|User2|User1|Close, - User2, parent, name, modal, true, i18n("New &Key"), + User2, tqparent, name, modal, true, i18n("New &Key"), i18n("&Next"), i18n("&Previous") ) { TQString text; @@ -365,7 +365,7 @@ CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *parent, const char *name, mKey = new TQLineEdit( plainPage() ); mKey->setMinimumWidth( fontMetrics().width("M") * 20 ); - mKey->setFocusPolicy( TQWidget::NoFocus ); + mKey->setFocusPolicy( TQ_NoFocus ); hbox->addWidget( mKey ); topLayout->addSpacing( spacingHint() ); // A little bit extra space @@ -481,9 +481,9 @@ void CFindNavigatorDialog::done( int resultCode ) -CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal ) +CReplaceDialog::CReplaceDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Find & Replace"), Ok|Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { TQString text; TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -501,7 +501,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal ) connect( mFindSelector, TQT_SIGNAL(activated(int)), TQT_SLOT(findSelectorChanged(int)) ); - text = i18n("Fo&rmat (find):"); + text = i18n("Fo&rmat (tqfind):"); TQLabel *label = new TQLabel( mFindSelector, text, plainPage() ); if( label == 0 ) { return; } @@ -530,10 +530,10 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal ) connect( mReplaceSelector, TQT_SIGNAL(activated(int)), TQT_SLOT(replaceSelectorChanged(int)) ); - text = i18n("For&mat (replace):"); + text = i18n("For&mat (tqreplace):"); label = new TQLabel( mReplaceSelector, text, plainPage() ); if( label == 0 ) { return; } - label->setFixedHeight( label->sizeHint().height() ); + label->setFixedHeight( label->tqsizeHint().height() ); vbox->addWidget( label ); vbox->addWidget( mReplaceSelector ); @@ -549,7 +549,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal ) label = new TQLabel( mReplaceInput, i18n("Rep&lace:"), plainPage() ); if( label == 0 ) { return; } - label->setFixedHeight( label->sizeHint().height() ); + label->setFixedHeight( label->tqsizeHint().height() ); vbox->addWidget( label ); vbox->addWidget( mReplaceInput ); @@ -581,10 +581,10 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal ) mCheckBackward->setChecked( config.readBoolEntry( "Backwards", false ) ); mCheckPrompt->setChecked( config.readBoolEntry( "Prompt", true)); uint val = config.readUnsignedNumEntry( "FindFormat", 0 ); - mFindSelector->setCurrentItem(QMIN(4,val) ); + mFindSelector->setCurrentItem(TQMIN(4,val) ); findSelectorChanged( mFindSelector->currentItem() ); val = config.readUnsignedNumEntry( "ReplaceFormat", 0 ); - mReplaceSelector->setCurrentItem(QMIN(4,val) ); + mReplaceSelector->setCurrentItem(TQMIN(4,val) ); replaceSelectorChanged( mReplaceSelector->currentItem() ); enableButtonOK(!mFindInput->text().isEmpty()); } @@ -676,10 +676,10 @@ void CReplaceDialog::slotOk( void ) -CReplacePromptDialog::CReplacePromptDialog( TQWidget *parent, const char *name, +CReplacePromptDialog::CReplacePromptDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Find & Replace"), User3|User2|User1|Close, - User2, parent, name, modal, true, i18n("Replace &All"), + User2, tqparent, name, modal, true, i18n("Replace &All"), i18n("Do Not Replace"), i18n("Replace")) { TQString text; @@ -757,9 +757,9 @@ void CReplacePromptDialog::done( int returnCode ) -CFilterDialog::CFilterDialog( TQWidget *parent, const char *name, bool modal ) +CFilterDialog::CFilterDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Binary Filter"), Ok|Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { TQString text; TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -846,7 +846,7 @@ void CFilterDialog::makeOperandLayout( void ) mOperandSelector = new TQComboBox( false, page ); if( mOperandSelector == 0 ) { return; } - mOperandSelector->setFixedHeight( mOperandSelector->sizeHint().height()); + mOperandSelector->setFixedHeight( mOperandSelector->tqsizeHint().height()); mOperandSelector->setMinimumWidth( fontMetrics().width("M")*20 ); mOperandSelector->insertStringList( formatStrings() ); connect( mOperandSelector, TQT_SIGNAL(activated(int)), @@ -891,7 +891,7 @@ void CFilterDialog::makeBitSwapLayout( void ) text = i18n("Swap rule"); TQLabel *label = new TQLabel( text, page ); if( label == 0 ) { return; } - label->setFixedHeight( label->sizeHint().height() ); + label->setFixedHeight( label->tqsizeHint().height() ); vbox->addWidget( label ); mByteWidget = new CByteWidget( page ); @@ -902,7 +902,7 @@ void CFilterDialog::makeBitSwapLayout( void ) text = i18n("&Reset"); TQPushButton *resetButton = new TQPushButton( text, page ); - resetButton->setFixedHeight( resetButton->sizeHint().height() ); + resetButton->setFixedHeight( resetButton->tqsizeHint().height() ); connect( resetButton, TQT_SIGNAL(clicked()), mByteWidget, TQT_SLOT(reset()) ); hbox->addWidget( resetButton ); @@ -1066,9 +1066,9 @@ void CFilterDialog::operationSelectorChanged( int index ) -CInsertDialog::CInsertDialog( TQWidget *parent, const char *name, bool modal ) +CInsertDialog::CInsertDialog( TQWidget *tqparent, const char *name, bool modal ) :KDialogBase( Plain, i18n("Insert Pattern"), Ok|Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { setButtonOKText(i18n("&Insert")); @@ -1152,7 +1152,7 @@ CInsertDialog::CInsertDialog( TQWidget *parent, const char *name, bool modal ) mCheckOnCursor->setChecked( config.readBoolEntry( "InsertOnCursor", false) ); cursorCheck(); uint val = config.readUnsignedNumEntry( "Format", 0 ); - mPatternSelector->setCurrentItem( QMIN(4,val) ); + mPatternSelector->setCurrentItem( TQMIN(4,val) ); patternSelectorChanged( mPatternSelector->currentItem() ); } @@ -1237,7 +1237,7 @@ void centerDialog( TQWidget *widget, TQWidget *centerParent ) } TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) ); - TQRect pos = centerParent->geometry(); + TQRect pos = centerParent->tqgeometry(); widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2, point.y() + pos.height()/2 - widget->height()/2, @@ -1253,7 +1253,7 @@ void centerDialogBottom( TQWidget *widget, TQWidget *centerParent ) } TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) ); - TQRect pos = centerParent->geometry(); + TQRect pos = centerParent->tqgeometry(); widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2, point.y() + pos.height() - widget->height(), @@ -1278,7 +1278,7 @@ void comboMatchText( TQComboBox *combo, const TQString &text ) -void showEntryFailure( TQWidget *parent, const TQString &msg ) +void showEntryFailure( TQWidget *tqparent, const TQString &msg ) { TQString message; message += i18n("Your request can not be processed."); @@ -1291,17 +1291,17 @@ void showEntryFailure( TQWidget *parent, const TQString &msg ) { message += msg; } - KMessageBox::sorry( parent, message, i18n("Invalid argument(s)") ); + KMessageBox::sorry( tqparent, message, i18n("Invalid argument(s)") ); } -bool verifyFileDestnation( TQWidget *parent, const TQString &title, +bool verifyFileDestnation( TQWidget *tqparent, const TQString &title, const TQString &path ) { if( path.isEmpty() == true ) { TQString msg = i18n("You must specify a destination file."); - KMessageBox::sorry( parent, msg, title ); + KMessageBox::sorry( tqparent, msg, title ); return( false ); } @@ -1311,21 +1311,21 @@ bool verifyFileDestnation( TQWidget *parent, const TQString &title, if( info.isDir() == true ) { TQString msg = i18n("You have specified an existing folder."); - KMessageBox::sorry( parent, msg, title ); + KMessageBox::sorry( tqparent, msg, title ); return( false ); } if( info.isWritable() == false ) { TQString msg = i18n("You do not have write permission to this file."); - KMessageBox::sorry( parent, msg, title ); + KMessageBox::sorry( tqparent, msg, title ); return( false ); } TQString msg = i18n( "" "You have specified an existing file.\n" "Overwrite current file?" ); - int reply = KMessageBox::warningContinueCancel( parent, msg, title, i18n("Overwrite") ); + int reply = KMessageBox::warningContinueCancel( tqparent, msg, title, i18n("Overwrite") ); if( reply != KMessageBox::Continue ) { return( false ); diff --git a/khexedit/dialog.h b/khexedit/dialog.h index 226825e..12456be 100644 --- a/khexedit/dialog.h +++ b/khexedit/dialog.h @@ -64,9 +64,10 @@ const uint Find_Next = 7; class CGotoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CGotoDialog( TQWidget *parent, const char *name = 0, bool modal = false ); + CGotoDialog( TQWidget *tqparent, const char *name = 0, bool modal = false ); ~CGotoDialog( void ); protected: @@ -90,6 +91,7 @@ class CGotoDialog : public KDialogBase class CFindDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum EOperation @@ -100,7 +102,7 @@ class CFindDialog : public KDialogBase }; public: - CFindDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); + CFindDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CFindDialog( void ); bool isEmpty( void ); @@ -137,9 +139,10 @@ class CFindDialog : public KDialogBase class CFindNavigatorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CFindNavigatorDialog( TQWidget *parent=0, const char *name=0, + CFindNavigatorDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CFindNavigatorDialog( void ); void defineData( SSearchControl &sc ); @@ -166,9 +169,10 @@ class CFindNavigatorDialog : public KDialogBase class CReplaceDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CReplaceDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); + CReplaceDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CReplaceDialog( void ); protected: @@ -209,9 +213,10 @@ class CReplaceDialog : public KDialogBase class CReplacePromptDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CReplacePromptDialog( TQWidget *parent=0, const char *name=0, + CReplacePromptDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CReplacePromptDialog( void ); void defineData( SSearchControl &sc ); @@ -238,6 +243,7 @@ class CReplacePromptDialog : public KDialogBase class CFilterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum EStackMode @@ -249,7 +255,7 @@ class CFilterDialog : public KDialogBase }; public: - CFilterDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); + CFilterDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CFilterDialog( void ); protected: @@ -297,9 +303,10 @@ class CFilterDialog : public KDialogBase class CInsertDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CInsertDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); + CInsertDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~CInsertDialog( void ); protected: @@ -336,8 +343,8 @@ void centerDialogBottom( TQWidget *widget, TQWidget *centerParent ); void comboMatchText( TQComboBox *combo, const TQString &text ); bool stringToOffset( const TQString & text, uint &offset ); -void showEntryFailure( TQWidget *parent, const TQString &msg ); -bool verifyFileDestnation( TQWidget *parent, const TQString &title, +void showEntryFailure( TQWidget *tqparent, const TQString &msg ); +bool verifyFileDestnation( TQWidget *tqparent, const TQString &title, const TQString &path ); diff --git a/khexedit/draglabel.cc b/khexedit/draglabel.cc index 8a98945..4f40110 100644 --- a/khexedit/draglabel.cc +++ b/khexedit/draglabel.cc @@ -28,12 +28,12 @@ #include "draglabel.h" -CDragLabel::CDragLabel( TQWidget *parent ) - : TQLabel( "draglabel", parent, "kde toolbar widget" ) +CDragLabel::CDragLabel( TQWidget *tqparent ) + : TQLabel( "draglabel", tqparent, "kde toolbar widget" ) { mValid = true; mDragPending = false; - setBackgroundMode( Qt::PaletteButton ); + setBackgroundMode( TQt::PaletteButton ); } @@ -44,7 +44,7 @@ CDragLabel::~CDragLabel( void ) void CDragLabel::mousePressEvent( TQMouseEvent *e ) { - if( mValid == false || e->button() != LeftButton || mUrl.isEmpty() == true ) + if( mValid == false || e->button() != Qt::LeftButton || mUrl.isEmpty() == true ) { return; } @@ -104,7 +104,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag ) } TQString text; - int index = mUrl.findRev( '/', mUrl.length() ); + int index = mUrl.tqfindRev( '/', mUrl.length() ); if( index < 0 ) { text = mUrl; @@ -120,12 +120,12 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag ) int h = fontMetrics().lineSpacing(); if( pixmap()->height() > h ) { h = pixmap()->height(); } - TQBitmap mask( w, h, TRUE ); + TQBitmap tqmask( w, h, TRUE ); TQPixmap dragPixmap( w, h ); dragPixmap.fill( black ); TQPainter p; - p.begin( &mask ); + p.begin( &tqmask ); p.setPen( white ); p.drawPixmap( 0, 0, mDragMask ); p.drawText( pixmap()->width()+sep, 0, w-pixmap()->width()+sep, @@ -136,7 +136,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag ) p.drawPixmap( 0, 0, *pixmap() ); p.end(); - dragPixmap.setMask( mask ); + dragPixmap.setMask( tqmask ); TQPoint hotspot( pixmap()->width(), pixmap()->height()/2 ); uriDrag.setPixmap( dragPixmap, hotspot ); diff --git a/khexedit/draglabel.h b/khexedit/draglabel.h index 441473e..16176f0 100644 --- a/khexedit/draglabel.h +++ b/khexedit/draglabel.h @@ -29,12 +29,13 @@ class KURLDrag; -class CDragLabel: public QLabel +class CDragLabel: public TQLabel { Q_OBJECT + TQ_OBJECT public: - CDragLabel( TQWidget *parent ); + CDragLabel( TQWidget *tqparent ); ~CDragLabel( void ); void setUrl( const TQString &url ); diff --git a/khexedit/exportdialog.cc b/khexedit/exportdialog.cc index 3d13d7c..df99fef 100644 --- a/khexedit/exportdialog.cc +++ b/khexedit/exportdialog.cc @@ -31,11 +31,11 @@ #include <tqpushbutton.h> -CExportDialog::CExportDialog( TQWidget *parent, char *name, bool modal ) +CExportDialog::CExportDialog( TQWidget *tqparent, char *name, bool modal ) :KDialogBase( Tabbed, i18n("Export Document"), Help|Ok|Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { - setHelp( "khexedit/khexedit.html", TQString::null ); + setHelp( "khexedit/khexedit.html", TQString() ); mFrame[ page_destination ] = addPage( i18n("Destination") ); mFrame[ page_option ] = addPage( i18n("Options") ); @@ -47,7 +47,7 @@ CExportDialog::CExportDialog( TQWidget *parent, char *name, bool modal ) readConfiguration(); TQString path = mDestination.fileInput->text(); - int index = path.findRev( '/' ); + int index = path.tqfindRev( '/' ); if( index != -1 ) { mWorkDir = path.left( index+1 ); } } @@ -109,8 +109,8 @@ void CExportDialog::readConfiguration( void ) } } val = mConfig->readNumEntry( "ArrayElementPerLine", 20 ); - val = QMAX( val, mArray.lineSizeSpin->minValue() ); - val = QMIN( val, mArray.lineSizeSpin->maxValue() ); + val = TQMAX( val, mArray.lineSizeSpin->minValue() ); + val = TQMIN( val, mArray.lineSizeSpin->maxValue() ); mArray.lineSizeSpin->setValue( val ); state = mConfig->readBoolEntry( "ArrayUnsignedAsHex", true ); mArray.hexadecimalCheck->setChecked( state ); @@ -208,17 +208,17 @@ void CExportDialog::setupDestinationPage( void ) vbox->addSpacing( fontMetrics().lineSpacing() ); TQRadioButton *radio1 = new TQRadioButton( i18n("&Everything"), group ); - radio1->setFixedSize( radio1->sizeHint() ); + radio1->setFixedSize( radio1->tqsizeHint() ); mDestination.rangeBox->insert( radio1, 0 ); vbox->addWidget( radio1, 0, AlignLeft ); TQRadioButton *radio2 = new TQRadioButton( i18n("&Selection"), group ); - radio2->setFixedSize( radio2->sizeHint() ); + radio2->setFixedSize( radio2->tqsizeHint() ); mDestination.rangeBox->insert( radio2, 1 ); vbox->addWidget( radio2, 0, AlignLeft ); TQRadioButton *radio3 = new TQRadioButton( i18n("&Range"), group ); - radio3->setFixedSize( radio3->sizeHint() ); + radio3->setFixedSize( radio3->tqsizeHint() ); mDestination.rangeBox->insert( radio3, 2 ); vbox->addWidget( radio3, 0, AlignLeft ); @@ -264,7 +264,7 @@ void CExportDialog::setupOptionPage( void ) makeCArrayOption(); mOptionStack->raiseWidget( (int)option_text ); - TQSize size = mOptionStack->sizeHint(); + TQSize size = mOptionStack->tqsizeHint(); size += TQSize(spacingHint()*2, spacingHint()*2); page->setMinimumSize( size ); } @@ -462,11 +462,11 @@ void CExportDialog::browserClicked( void ) TQString url; if( mDestination.formatCombo->currentItem() == option_html ) { - url = KFileDialog::getExistingDirectory( mWorkDir, topLevelWidget() ); + url = KFileDialog::getExistingDirectory( mWorkDir, tqtopLevelWidget() ); } else { - url = KFileDialog::getSaveFileName( mWorkDir, "*", topLevelWidget() ); + url = KFileDialog::getSaveFileName( mWorkDir, "*", tqtopLevelWidget() ); } if( url.isEmpty() ) @@ -474,7 +474,7 @@ void CExportDialog::browserClicked( void ) return; } - int index = url.findRev( '/' ); + int index = url.tqfindRev( '/' ); if( index != -1 ) { mWorkDir = url.left( index+1 ); @@ -673,14 +673,14 @@ bool CExportDialog::verifyPackage( const TQString &path ) } const TQString prefix = mHtml.prefixInput->text(); - TQString f1 = TQString("%1%2.html").arg(prefix).arg("00000000"); - TQString f2 = TQString("%1%2.html").arg(prefix).arg("99999999"); + TQString f1 = TQString("%1%2.html").tqarg(prefix).tqarg("00000000"); + TQString f2 = TQString("%1%2.html").tqarg(prefix).tqarg("99999999"); TQString msg = i18n( "" "You have specified an existing folder.\n" "If you continue, any existing file in the range " "\"%1\" to \"%2\" can be lost.\n" - "Continue?").arg(f1).arg(f2); + "Continue?").tqarg(f1).tqarg(f2); int reply = KMessageBox::warningContinueCancel( this, msg, title ); if( reply != KMessageBox::Continue ) { diff --git a/khexedit/exportdialog.h b/khexedit/exportdialog.h index b4dc3e1..52adac8 100644 --- a/khexedit/exportdialog.h +++ b/khexedit/exportdialog.h @@ -39,6 +39,7 @@ class KSimpleConfig; class CExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum EPage @@ -57,7 +58,7 @@ class CExportDialog : public KDialogBase option_max }; - CExportDialog( TQWidget *parent = 0, char *name = 0, bool modal = false ); + CExportDialog( TQWidget *tqparent = 0, char *name = 0, bool modal = false ); ~CExportDialog( void ); void writeConfiguration( void ); diff --git a/khexedit/fileinfodialog.cc b/khexedit/fileinfodialog.cc index 465c7f3..08fa5b1 100644 --- a/khexedit/fileinfodialog.cc +++ b/khexedit/fileinfodialog.cc @@ -30,18 +30,18 @@ #include "listview.h" // quick'n'dirty hack to have the occurrence column sorted correctly -class CStatisticListViewItem : public QListViewItem +class CStatisticListViewItem : public TQListViewItem { public: - CStatisticListViewItem( TQListView * parent, TQListViewItem * after, + CStatisticListViewItem( TQListView * tqparent, TQListViewItem * after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, int i, int o) - : TQListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7), + : TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6, label7), item( i ), occurrence( o ) {} - virtual int compare( TQListViewItem *i, int col, bool ascending/*Qt doc says: ignore this one*/ ) const + virtual int compare( TQListViewItem *i, int col, bool ascending/*TQt doc says: ignore this one*/ ) const { // occurrence column (or the percent one)? if( col == 5 || col == 6 ) @@ -69,12 +69,12 @@ class CStatisticListViewItem : public QListViewItem -CFileInfoDialog::CFileInfoDialog( TQWidget *parent,const char *name,bool modal) +CFileInfoDialog::CFileInfoDialog( TQWidget *tqparent,const char *name,bool modal) :KDialogBase( Plain, i18n("Statistics"), Help|User1|Cancel, User1, - parent, name, modal, true, i18n("&Update") ), + tqparent, name, modal, true, i18n("&Update") ), mBusy(false), mDirty(false) { - setHelp( "khexedit/khexedit.html", TQString::null ); + setHelp( "khexedit/khexedit.html", TQString() ); TQString text; TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -239,13 +239,13 @@ void CFileInfoDialog::setStatistics( SStatisticControl &sc ) o.sprintf("%03o", i ); b.sprintf("%s", printBin(i) ); - n = TQString("%1").arg( sc.occurrence[i], pre ); + n = TQString("%1").tqarg( sc.occurrence[i], pre ); if( sc.documentSize == 0 ) p = "0.00"; else { double val = 100.0*((double)sc.occurrence[i]/(double)sc.documentSize); - p = TQString("%1").arg( val, 6, 'f', 2 ); + p = TQString("%1").tqarg( val, 6, 'f', 2 ); } const TQChar _i((char)i); @@ -321,7 +321,7 @@ void CFileInfoDialog::showEvent( TQShowEvent *e ) void CFileInfoDialog::timerEvent( TQTimerEvent * ) { - killTimers(); + TQT_TQOBJECT(this)->killTimers(); slotUser1(); } diff --git a/khexedit/fileinfodialog.h b/khexedit/fileinfodialog.h index 742f3bd..5c8528f 100644 --- a/khexedit/fileinfodialog.h +++ b/khexedit/fileinfodialog.h @@ -36,9 +36,10 @@ class CListView; class CFileInfoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CFileInfoDialog( TQWidget *parent=0, const char *name=0,bool modal=false ); + CFileInfoDialog( TQWidget *tqparent=0, const char *name=0,bool modal=false ); ~CFileInfoDialog( void ); void setStatistics( void ); diff --git a/khexedit/hexbuffer.cc b/khexedit/hexbuffer.cc index 81b8fe6..2b9dc96 100644 --- a/khexedit/hexbuffer.cc +++ b/khexedit/hexbuffer.cc @@ -323,7 +323,7 @@ int SFilterControl::execute( uchar *dest, uchar *src, uint size ) // A short description so that I will understand what the // h... is going on five minutes from now. // - // Destination byte is masked (AND'ed) with the inverse bitmap + // Destination byte is tqmasked (AND'ed) with the inverse bitmap // (the noninversed bitmap contains position of the // two swap bits, eg 7-2 gives 10000100). Then the destination // is OR'ed with the swapped bitmap. @@ -347,14 +347,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const if( elementType == Char ) { char e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); sprintf( buf, "%d", e ); return( buf ); } else if( elementType == Uchar ) { unsigned char e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); if( unsignedAsHexadecimal == true ) { sprintf( buf, "0x%02x", e ); @@ -368,7 +368,7 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const else if( elementType == Short ) { short e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); sprintf( buf, "%d", e ); return( buf ); @@ -376,7 +376,7 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const else if( elementType == Ushort ) { unsigned short e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); if( unsignedAsHexadecimal == true ) { sprintf( buf, "0x%04x", e ); @@ -390,14 +390,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const else if( elementType == Int ) { int e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); sprintf( buf, "%u", e ); return( buf ); } else if( elementType == Uint ) { unsigned int e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); if( unsignedAsHexadecimal == true ) { sprintf( buf, "0x%08x", e ); @@ -411,14 +411,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const else if( elementType == Float ) { float e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); sprintf( buf, "%f", e ); return( buf ); } else if( elementType == Double ) { double e = 0; - memcpy( &e, b, QMIN(sizeof(e),maxSize) ); + memcpy( &e, b, TQMIN(sizeof(e),maxSize) ); sprintf( buf, "%f", e ); return( buf ); } @@ -447,8 +447,8 @@ TQString SExportCArray::variableName( uint range ) const uint es = elementSize(); uint numElement = range / es + ((range % es) ? 1 : 0); - return( TQString("%1 %2[%2]").arg(typeString[elementType]). - arg(arrayName).arg(numElement) ); + return( TQString("%1 %2[%2]").tqarg(typeString[elementType]). + tqarg(arrayName).tqarg(numElement) ); } @@ -568,7 +568,7 @@ bool CHexBuffer::hasFileName( void ) // // FIXME: Files can be called "Untitled" so this must be corrected. // - if( mUrl.isEmpty() || mUrl.contains( i18n( "Untitled" ), false ) ) + if( mUrl.isEmpty() || mUrl.tqcontains( i18n( "Untitled" ), false ) ) { return( false ); } @@ -580,9 +580,9 @@ bool CHexBuffer::hasFileName( void ) -int CHexBuffer::setLayout( SDisplayLayout &layout ) +int CHexBuffer::setLayout( SDisplayLayout &tqlayout ) { - mLayout = layout; + mLayout = tqlayout; mLayout.verify(); if( mLayout.primaryMode == SDisplayLayout::textOnly ) @@ -630,9 +630,9 @@ void CHexBuffer::setColor( SDisplayColor &color ) // // Test... // - //mColor.secondTextBg = Qt::yellow; - //mColor.offsetBg = Qt::lightGray; - //mColor.gridFg = Qt::darkCyan; + //mColor.secondTextBg = TQt::yellow; + //mColor.offsetBg = TQt::lightGray; + //mColor.gridFg = TQt::darkCyan; /* mColor.secondTextBg = mColor.textBg; @@ -676,7 +676,7 @@ bool CHexBuffer::toggleEditor( void ) edit_secondary : edit_primary; } - setEditMode( mEditMode ); // Sets the cursor shapes as well + setEditMode( mEditMode ); // Sets the cursor tqshapes as well if( changed == true ) { @@ -766,7 +766,7 @@ void CHexBuffer::setDisableCursor( bool disableCursor ) } -void CHexBuffer::setCursorShapeModifier( bool alwaysBlock, bool thickInsert ) +void CHexBuffer::settqCursorShapeModifier( bool alwaysBlock, bool thickInsert ) { mCursor.setShapeModifier( alwaysBlock, thickInsert ); setEditMode( mEditMode ); @@ -813,12 +813,12 @@ void CHexBuffer::setEditMode( EEditMode editMode ) -void CHexBuffer::setMaximumSize( uint maximumSize ) +void CHexBuffer::setMaximumSize( uint tqmaximumSize ) { - if( maximumSize == 0 ) { maximumSize = ~0; } + if( tqmaximumSize == 0 ) { tqmaximumSize = ~0; } - mMaximumSize = maximumSize; - mFixedSizeMode = maximumSize == (uint)~0 ? false : true; + mMaximumSize = tqmaximumSize; + mFixedSizeMode = tqmaximumSize == (uint)~0 ? false : true; mCursor.setFixedSizeMode( mFixedSizeMode ); if( mLayout.offsetVisible == false ) @@ -832,9 +832,9 @@ void CHexBuffer::setMaximumSize( uint maximumSize ) if( mLayout.offsetMode == SDisplayLayout::decimal ) { printOffset = &CHexBuffer::printDecimalOffset; - for( mOffsetSize=0; maximumSize > 0; mOffsetSize += 1 ) + for( mOffsetSize=0; tqmaximumSize > 0; mOffsetSize += 1 ) { - maximumSize = maximumSize / 10; + tqmaximumSize = tqmaximumSize / 10; } mOffsetIndex = 10 - mOffsetSize; } @@ -848,9 +848,9 @@ void CHexBuffer::setMaximumSize( uint maximumSize ) { printOffset = &CHexBuffer::printHexadecimalSmallOffset; } - for( mOffsetSize=0; maximumSize > 0; mOffsetSize += 1 ) + for( mOffsetSize=0; tqmaximumSize > 0; mOffsetSize += 1 ) { - maximumSize = maximumSize / 16; + tqmaximumSize = tqmaximumSize / 16; } if( mOffsetSize > 4 ) { mOffsetSize += 1; } // Space for the ':' sign mOffsetIndex = 9 - mOffsetSize; @@ -920,7 +920,7 @@ int CHexBuffer::writeFile( TQFile &file, CProgress &p ) do { - const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining ); + const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining ); const int writeSize = file.writeBlock( data() + offset, blockSize ); if( writeSize == -1 ) { @@ -952,7 +952,7 @@ int CHexBuffer::writeFile( TQFile &file, CProgress &p ) int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p ) { - if( resize( file.size() + 100 ) == false ) + if( tqresize( file.size() + 100 ) == false ) { p.finish(); return( Err_NoMemory ); @@ -965,7 +965,7 @@ int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p ) uint remaining = file.size(); while( remaining > 0 ) { - const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining ); + const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining ); const int readSize = file.readBlock( data() + offset, blockSize ); if( readSize == -1 ) { @@ -1029,7 +1029,7 @@ int CHexBuffer::insertFile( TQFile &file, CProgress &p ) uint remaining = file.size(); while( remaining > 0 ) { - const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining ); + const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining ); const int readSize = file.readBlock( array.data() + offset, blockSize ); if( readSize == -1 ) { @@ -1064,7 +1064,7 @@ int CHexBuffer::insertFile( TQFile &file, CProgress &p ) int CHexBuffer::newFile( const TQString &url ) { - if( resize( 100 ) == 0 ) + if( tqresize( 100 ) == 0 ) { return( Err_NoMemory ); } @@ -1609,7 +1609,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int sx, int x1, int x2 ) // // Draw the bookmark identifiers on this line (if any). We use the - // bitmask to minimize the number of times we try to draw the bookmarks. + // bittqmask to minimize the number of times we try to draw the bookmarks. // int bookmarkPosition = 0; if( mBookmarkMap.testBit(fileOffset/200) || @@ -1712,17 +1712,17 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, if( (line+1) % 2 || outsideText == true ) { paint.fillRect( x1, y, x2, lineHeight(), - useBlackWhite == true ? Qt::white : mColor.textBg ); + useBlackWhite == true ? TQt::white : mColor.textBg ); } else { paint.fillRect( x1, y, x2, lineHeight(), - useBlackWhite == true ? Qt::white : mColor.secondTextBg ); + useBlackWhite == true ? TQt::white : mColor.secondTextBg ); } if( mLayout.horzGridWidth > 0 && outsideText == false ) { - TQPen pen( useBlackWhite == true ? Qt::black : mColor.gridFg, + TQPen pen( useBlackWhite == true ? TQt::black : mColor.gridFg, mLayout.horzGridWidth ); paint.setPen( pen ); paint.drawLine( x1, y+mFontHeight, x2+x1, y+mFontHeight ); @@ -1753,7 +1753,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, int s1 = mOffsetSize * mUnitWidth; if( fileData != 0 ) { - paint.setPen( useBlackWhite == true ? Qt::black : mColor.offsetFg ); + paint.setPen( useBlackWhite == true ? TQt::black : mColor.offsetFg ); THIS_FPTR(printOffset)( mPrintBuf, fileOffset ); // ## paint.drawText( offset, mFontAscent+y, &mPrintBuf[mOffsetIndex], // mOffsetSize ); @@ -1768,7 +1768,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, offset += mLayout.separatorMarginWidth; int s2 = mLayout.leftSeparatorWidth + mLayout.separatorMarginWidth; - TQPen pen( useBlackWhite == true ? Qt::black : mColor.leftSeparatorFg, + TQPen pen( useBlackWhite == true ? TQt::black : mColor.leftSeparatorFg, mLayout.leftSeparatorWidth ); paint.setPen( pen ); int center = offset + mLayout.leftSeparatorWidth/2; @@ -1789,7 +1789,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, int flag = THIS_FPTR(printCell)( mPrintBuf, fileData[i] ); if( useBlackWhite == true ) { - paint.setPen( Qt::black ); + paint.setPen( TQt::black ); } else { @@ -1804,7 +1804,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, { if( (i+1) % mLayout.columnSize == 0 ) { - TQPen pen( useBlackWhite == true ? Qt::black : mColor.gridFg, + TQPen pen( useBlackWhite == true ? TQt::black : mColor.gridFg, mLayout.vertGridWidth ); paint.setPen( pen ); int x = localOffset - (mSplitWidth+1) / 2; @@ -1822,7 +1822,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, { offset += mLayout.separatorMarginWidth; int s = mLayout.separatorMarginWidth + mLayout.rightSeparatorWidth; - TQPen pen( useBlackWhite == true ? Qt::black : mColor.rightSeparatorFg, + TQPen pen( useBlackWhite == true ? TQt::black : mColor.rightSeparatorFg, mLayout.rightSeparatorWidth ); paint.setPen( pen ); int center = offset + mLayout.rightSeparatorWidth/2; @@ -1841,7 +1841,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y, int flag = printAsciiCell( mPrintBuf, fileData[i] ); if( useBlackWhite == true ) { - paint.setPen( Qt::black ); + paint.setPen( TQt::black ); } else { @@ -1888,8 +1888,8 @@ void CHexBuffer::drawHeader( TQPainter &paint, int sx, int width, int y, paint.setFont( KGlobalSettings::generalFont() ); const TQFontMetrics &fm = paint.fontMetrics(); - paint.fillRect( sx, y, width, fm.height(), Qt::white ); - paint.setPen( Qt::black ); + paint.fillRect( sx, y, width, fm.height(), TQt::white ); + paint.setPen( TQt::black ); if( header.line == SPageHeader::SingleLine ) { if( isFooter == false ) @@ -1923,8 +1923,8 @@ void CHexBuffer::drawHeader( TQPainter &paint, int sx, int width, int y, else if( header.pos[i] == SPageHeader::PageNumber ) { msg = i18n("Page %1 of %2") - .arg(KGlobal::locale()->formatNumber(position.curPage, 0)) - .arg(KGlobal::locale()->formatNumber(position.maxPage, 0)); + .tqarg(KGlobal::locale()->formatNumber(position.curPage, 0)) + .tqarg(KGlobal::locale()->formatNumber(position.maxPage, 0)); } else if( header.pos[i] == SPageHeader::FileName ) { @@ -2091,7 +2091,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx, } // - // Draw the cursor shape + // Draw the cursor tqshape // bool transparent = false; if( mActiveEditor == edit_primary ) @@ -2116,7 +2116,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx, paint.drawLine( center-2, mFontHeight-1, center+2, mFontHeight-1 ); } } - else // Solid block shape + else // Solid block tqshape { paint.fillRect( c.x1 - startx, 0, mUnitWidth, mFontHeight, cbg ); useFg = true; @@ -2209,7 +2209,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx, } // - // Draw the cursor shape + // Draw the cursor tqshape // transparent = false; if( mActiveEditor == edit_secondary ) @@ -2822,16 +2822,16 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p ) for( uint i=0; i < numFiles; i++ ) { name.sprintf( "%08d.html", i+1 ); - fileNames.append( TQString("%1/%2%3").arg(ex.package).arg(ex.prefix). + fileNames.append( TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix). arg(name)); } name.sprintf( "%08d.html", 0 ); - TQString tocName =TQString("%1/%2%3").arg(ex.package).arg(ex.prefix).arg(name); + TQString tocName =TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix).tqarg(name); TQString linkName; if( ex.symLink == true ) { - linkName = TQString("%1/%2").arg(ex.package).arg("index.html"); + linkName = TQString("%1/%2").tqarg(ex.package).tqarg("index.html"); } while( remaining > 0 ) @@ -2849,7 +2849,7 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p ) THIS_FPTR(printOffset)( mPrintBuf, (startLine-1)*mLayout.lineSize ); mPrintBuf[mOffsetSize]=0; - offset += TQString(" %1 [%2]").arg(i18n("to")).arg(mPrintBuf); + offset += TQString(" %1 [%2]").tqarg(i18n("to")).tqarg(mPrintBuf); offsets.append(offset); if( p.expired() == true ) @@ -2981,7 +2981,7 @@ int CHexBuffer::copyText( TQByteArray &array, const SExportRange &range, uint bytePerLine = mOffsetSize + 1 + (mNumCell + 2)*mLayout.lineSize + 1; uint size = (stopLine - startLine + 1)*bytePerLine; - if( array.resize( size+1 ) == false ) + if( array.tqresize( size+1 ) == false ) { return( Err_NoMemory ); } @@ -3021,7 +3021,7 @@ int CHexBuffer::copySelectedData( TQByteArray &array ) } uint size = stop - start; - if( array.resize( size ) == false ) + if( array.tqresize( size ) == false ) { return( Err_NoMemory ); } @@ -3466,7 +3466,7 @@ void CHexBuffer::updateBookmarkMap( bool resize ) { // // Espen 2000-05-16: - // I do this test to avoid some Qt warnings when I have closed + // I do this test to avoid some TQt warnings when I have closed // or reduced the size of the documnet while the (now invalid) // bookmarks still exist. // @@ -3621,7 +3621,7 @@ int CHexBuffer::replaceAll( SSearchControl &sc, bool init ) if( sc.key.size() > sc.val.size() ) { uint diff = sc.key.size() - sc.val.size(); - stop -= QMIN( stop, diff ); + stop -= TQMIN( stop, diff ); } else if( sc.key.size() < sc.val.size() ) { @@ -3660,7 +3660,7 @@ int CHexBuffer::replaceAll( SSearchControl &sc, bool init ) } } - i -= QMIN( i, sc.key.size() ); + i -= TQMIN( i, sc.key.size() ); if( i == 0 ) { break; } } } @@ -4167,7 +4167,7 @@ int CHexBuffer::scanData( SSearchControl &sc, bool init ) { sc.match = true; cursorGoto( i, 7 ); - markSet( i, sc.key.size() ); + markSet( i, (uint)sc.key.size() ); return( Err_Success ); } } @@ -4193,7 +4193,7 @@ int CHexBuffer::scanData( SSearchControl &sc, bool init ) { sc.match = true; cursorGoto( i, 7 ); - markSet( i, sc.key.size() ); + markSet( i, (uint)sc.key.size() ); return( Err_Success ); } } @@ -4360,7 +4360,7 @@ void CHexBuffer::doActionGroup( CHexActionGroup *group ) void CHexBuffer::doAction( CHexAction *action ) { - if( action->mAction == CHexAction::replace ) + if( action->mAction == CHexAction::tqreplace ) { doReplace( action, true ); } @@ -4406,7 +4406,7 @@ void CHexBuffer::recordStart( SCursor &cursor ) void CHexBuffer::recordReplace( SCursor &cursor, uint size, char *data1, uint data1Size ) { - CHexAction *hexAction = new CHexAction( CHexAction::replace, + CHexAction *hexAction = new CHexAction( CHexAction::tqreplace, cursor.curr.offset ); if( hexAction == 0 ) { @@ -4786,7 +4786,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName, for( uint i=0; i<=numPage; i++ ) { TQString n( fileNames[i].right( fileNames[i].length() - - fileNames[i].findRev('/') - 1) ); + fileNames[i].tqfindRev('/') - 1) ); os << "<A HREF=\"" << n << "\">" << i18n("Page") << i+1; os << "</A>"; os << " " << offsets[i]; @@ -4802,7 +4802,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName, // Make a symlink. We ignore any error here. I don't consider // it to be fatal. // - TQString n( tocName.right( tocName.length() - tocName.findRev('/') - 1) ); + TQString n( tocName.right( tocName.length() - tocName.tqfindRev('/') - 1) ); symlink( n.latin1(), linkName.latin1() ); } @@ -4825,11 +4825,11 @@ void CHexBuffer::printHtmlCaption( TQTextStream &os, uint captionType, break; case 2: - caption = mUrl.right( mUrl.length() - mUrl.findRev('/') - 1); + caption = mUrl.right( mUrl.length() - mUrl.tqfindRev('/') - 1); break; case 3: - caption = i18n("Page %1 of %2").arg(curPage).arg(numPage); + caption = i18n("Page %1 of %2").tqarg(curPage).tqarg(numPage); break; } @@ -4854,7 +4854,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next, } else { - TQString n( next->right( next->length() - next->findRev('/') - 1) ); + TQString n( next->right( next->length() - next->tqfindRev('/') - 1) ); os << "<A HREF=\"" << n << "\">" << i18n("Next") << "</A>" << " "; } @@ -4864,7 +4864,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next, } else { - TQString p( prev->right( prev->length() - prev->findRev('/') - 1) ); + TQString p( prev->right( prev->length() - prev->tqfindRev('/') - 1) ); os << "<A HREF=\"" << p << "\">" << i18n("Previous") << "</A>" << " "; } @@ -4874,7 +4874,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next, } else { - TQString t( toc->right( toc->length() - toc->findRev('/') - 1) ); + TQString t( toc->right( toc->length() - toc->tqfindRev('/') - 1) ); os << "<A HREF=\"" << t << "\">" << i18n("Contents"); os << "</A>" << " "; } @@ -4896,7 +4896,7 @@ int CHexBuffer::printHtmlHeader( TQTextStream &os, bool isFront ) if( isFront == true ) { os << "<HTML>" << endl << "<HEAD>" << endl; - os << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; "; + os << "<META HTTP-ETQUIV=\"Content-Type\" CONTENT=\"text/html; "; os << "charset=iso-8859-1\">" << endl; os << "<META NAME=\"hexdata\" CONTENT=\"khexedit dump\">" << endl; os << "</HEAD>" << endl << "<BODY>" << endl; @@ -4925,15 +4925,15 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine, os << "CELLSPACING=0 CELLPADDING=2>" << endl; if( mLayout.offsetVisible == true ) { - color = bw == true ? Qt::white : mColor.offsetBg; - os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl; + color = bw == true ? TQt::white : mColor.offsetBg; + os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl; os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" "; os << "CELLSPACING=0 CELLPADDING=2>" << endl; - color = bw == true ? Qt::black : mColor.offsetFg; + color = bw == true ? TQt::black : mColor.offsetFg; for( i=0; i<numLine; i++ ) { - os << "<TR><TD><TT><b><FONT COLOR=" << color.name().latin1() << ">"; + os << "<TR><TD><TT><b><FONT COLOR=" << TQString(color.name()).latin1() << ">"; THIS_FPTR(printOffset)( mPrintBuf, (line+i)*mLayout.lineSize ); mPrintBuf[mOffsetSize]=0; os << mPrintBuf << "</TD></TR>" << endl; @@ -4941,8 +4941,8 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine, os << "</TABLE>" << endl << "</TD>" << endl; } - color = bw == true ? Qt::white : mColor.textBg; - os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl; + color = bw == true ? TQt::white : mColor.textBg; + os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl; os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" "; os << "CELLSPACING=0 CELLPADDING=2>" << endl; for( i=0; i<numLine; i++ ) @@ -4953,8 +4953,8 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine, if( mLayout.secondaryMode != SDisplayLayout::hide ) { - color = bw == true ? Qt::white : mColor.textBg; - os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl; + color = bw == true ? TQt::white : mColor.textBg; + os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl; os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" "; os << "CELLSPACING=0 CELLPADDING=2>" << endl; for( i=0; i<numLine; i++ ) @@ -4978,14 +4978,14 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary, TQColor color; if( bw == true ) { - color = Qt::white; + color = TQt::white; } else { color = (line+1) % 2 ? mColor.textBg : mColor.secondTextBg; } - os << "<TR><TD NOWRAP BGCOLOR=" << color.name().latin1() << "><TT><B>" + os << "<TR><TD NOWRAP BGCOLOR=" << TQString(color.name()).latin1() << "><TT><B>" << endl; if( offset >= documentSize() ) { @@ -5003,7 +5003,7 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary, mPrintBuf[mNumCell] = 0; if( i == 0 ) { - color = bw == true ? Qt::black : foregroundColor(i); + color = bw == true ? TQt::black : foregroundColor(i); } else { @@ -5015,21 +5015,21 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary, unsigned char val = (unsigned char)data()[offset+i]; if( THIS_FPTR(printCell)( mPrintBuf, val ) == 0 ) { - color = bw == true ? Qt::black : foregroundColor(i); + color = bw == true ? TQt::black : foregroundColor(i); } else { - color = bw == true ? Qt::black : mColor.nonPrintFg; + color = bw == true ? TQt::black : mColor.nonPrintFg; } } mPrintBuf[mNumCell] = 0; if( i == 0 ) { - os << "<FONT COLOR=" << color.name().latin1() << ">"; + os << "<FONT COLOR=" << TQString(color.name()).latin1() << ">"; } else if( color != prevColor ) { - os << "</FONT><FONT COLOR=" << color.name().latin1() << ">"; + os << "</FONT><FONT COLOR=" << TQString(color.name()).latin1() << ">"; } prevColor = color; @@ -5053,7 +5053,7 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary, memset(mPrintBuf, ' ', 1 ); if( i == 0 ) { - color = bw == true ? Qt::black : mColor.secondaryFg; + color = bw == true ? TQt::black : mColor.secondaryFg; } else { @@ -5065,21 +5065,21 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary, unsigned char val = (unsigned char)data()[offset+i]; if( printAsciiCell( mPrintBuf, val ) == 0 ) { - color = bw == true ? Qt::black : mColor.secondaryFg; + color = bw == true ? TQt::black : mColor.secondaryFg; } else { - color = bw == true ? Qt::black : mColor.nonPrintFg; + color = bw == true ? TQt::black : mColor.nonPrintFg; } mPrintBuf[1] = 0; if( i == 0 ) { - os << "<FONT COLOR=" << color.name().latin1() << ">"; + os << "<FONT COLOR=" << TQString(color.name()).latin1() << ">"; } else if( color != prevColor ) { - os << "</FONT><FONT COLOR=" << color.name().latin1() << ">"; + os << "</FONT><FONT COLOR=" << TQString(color.name()).latin1() << ">"; } prevColor = color; diff --git a/khexedit/hexbuffer.h b/khexedit/hexbuffer.h index 755cca1..e5026de 100644 --- a/khexedit/hexbuffer.h +++ b/khexedit/hexbuffer.h @@ -304,38 +304,38 @@ struct SCursorConfig bool selectOn( void ) { - return( state & Qt::ShiftButton ); + return( state & TQt::ShiftButton ); } bool removeSelection( void ) { - return( state & Qt::ShiftButton ? false : true ); + return( state & TQt::ShiftButton ? false : true ); } void setKeepSelection( bool val ) { - state = val == true ? state|Qt::ShiftButton : state&~Qt::ShiftButton; + state = val == true ? state|TQt::ShiftButton : state&~TQt::ShiftButton; } bool controlButton( void ) { - return( state & Qt::ControlButton ? true : false ); + return( state & TQt::ControlButton ? true : false ); } bool shiftButton( void ) { - return( state & Qt::ShiftButton ? true : false ); + return( state & TQt::ShiftButton ? true : false ); } bool altButton( void ) { - return( state & Qt::AltButton ? true : false ); + return( state & TQt::AltButton ? true : false ); } void emulateControlButton( bool val ) { - state = val == true ? state|Qt::ControlButton : state&~Qt::ControlButton; + state = val == true ? state|TQt::ControlButton : state&~TQt::ControlButton; } int state; @@ -967,7 +967,7 @@ class CHexAction public: enum HexAction { - replace + tqreplace }; public: @@ -1031,7 +1031,7 @@ typedef bool (CHexBuffer::*InputCellFunc)( unsigned char *dest, int value, typedef void (CHexBuffer::*PrintOffsetFunc)( char *buf, uint offset ); -class CHexBuffer : public QByteArray +class CHexBuffer : public TQByteArray { public: enum EColumn @@ -1072,7 +1072,7 @@ class CHexBuffer : public QByteArray CHexBuffer( void ); ~CHexBuffer( void ); - int setLayout( SDisplayLayout &layout ); + int setLayout( SDisplayLayout &tqlayout ); void setColor( SDisplayColor &color ); void setInputMode( SDisplayInputMode &mode ); bool toggleEditor( void ); @@ -1082,7 +1082,7 @@ class CHexBuffer : public QByteArray void setNonPrintChar( TQChar nonPrintChar ); void setShowCursor( bool showCursor ); void setDisableCursor( bool disableCursor ); - void setCursorShapeModifier( bool alwaysBlock, bool thickInsert ); + void settqCursorShapeModifier( bool alwaysBlock, bool thickInsert ); void setEditMode( EEditMode editMode ); void setEditMode( EEditMode editMode, bool alwaysBlock, bool thickInsert ); void setMaximumSize( uint size ); @@ -1156,7 +1156,7 @@ class CHexBuffer : public QByteArray inline SCursorState &cursorState( void ); inline void valueOnCursor( TQByteArray &buf, uint size ); inline SFileState &fileState( void ); - inline const SDisplayLayout &layout( void ); + inline const SDisplayLayout &tqlayout( void ); inline const SDisplayInputMode &inputMode( void ); inline TQPtrList<SCursorOffset> &bookmarkList( void ); @@ -1417,7 +1417,7 @@ inline void CHexBuffer::valueOnCursor( TQByteArray &buf, uint size ) } -inline const SDisplayLayout &CHexBuffer::layout( void ) +inline const SDisplayLayout &CHexBuffer::tqlayout( void ) { return( mLayout ); } @@ -1531,7 +1531,7 @@ inline const TQColor &CHexBuffer::foregroundColor( uint column ) { if( column > mLayout.lineSize ) { - return( Qt::black ); + return( TQt::black ); } else { diff --git a/khexedit/hexdrag.cc b/khexedit/hexdrag.cc index 19cb34e..0347129 100644 --- a/khexedit/hexdrag.cc +++ b/khexedit/hexdrag.cc @@ -75,7 +75,7 @@ const char *CHexDrag::format( int i ) const } -TQByteArray CHexDrag::encodedData( const char *fmt ) const +TQByteArray CHexDrag::tqencodedData( const char *fmt ) const { if( fmt != 0 ) { @@ -98,7 +98,7 @@ bool CHexDrag::canDecode( const TQMimeSource *e ) bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest ) { - dest = e->encodedData(mediaString); + dest = e->tqencodedData(mediaString); return( dest.size() == 0 ? false : true ); // @@ -107,8 +107,8 @@ bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest ) // Major opcode: 17" // // if I try to use the code below on a source that has been - // collected from QClipboard. It is the e->provides(mediaString) - // that fail (Qt-2.0). Sometimes it works :( + // collected from TQClipboard. It is the e->provides(mediaString) + // that fail (TQt-2.0). Sometimes it works :( // // printf("0: %s\n", e->format(0) ); No problem. // printf("1: %s\n", e->format(1) ); Crash. @@ -116,7 +116,7 @@ bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest ) #if 0 if( e->provides(mediaString) == true ) { - dest = e->encodedData(mediaString); + dest = e->tqencodedData(mediaString); return( true ); } else diff --git a/khexedit/hexdrag.h b/khexedit/hexdrag.h index 2705124..aef2e01 100644 --- a/khexedit/hexdrag.h +++ b/khexedit/hexdrag.h @@ -25,9 +25,10 @@ #include <tqdragobject.h> #include <tqstring.h> -class CHexDrag : public QDragObject +class CHexDrag : public TQDragObject { Q_OBJECT + TQ_OBJECT public: CHexDrag( const TQByteArray &data, TQWidget *dragSource = 0, @@ -36,7 +37,7 @@ class CHexDrag : public QDragObject void setData( const TQByteArray &data ); const char* format ( int i ) const; - TQByteArray encodedData( const char *fmt ) const; + TQByteArray tqencodedData( const char *fmt ) const; static bool canDecode( const TQMimeSource *e ); diff --git a/khexedit/hexeditorwidget.cc b/khexedit/hexeditorwidget.cc index 60107f3..d1eaddd 100644 --- a/khexedit/hexeditorwidget.cc +++ b/khexedit/hexeditorwidget.cc @@ -47,8 +47,8 @@ -CHexEditorWidget::CHexEditorWidget( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +CHexEditorWidget::CHexEditorWidget( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent, name ) { CHexBuffer *hexBuffer = new CHexBuffer; if( hexBuffer == 0 ) { return; } @@ -66,13 +66,13 @@ CHexEditorWidget::CHexEditorWidget( TQWidget *parent, const char *name ) connect( mHexView, TQT_SIGNAL(pleaseStepFile(bool)), TQT_SLOT( stepFile(bool)) ); connect( kapp, TQT_SIGNAL( kdisplayFontChanged() ), TQT_SLOT( fontChanged() ) ); connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ),TQT_SLOT( paletteChanged()) ); - connect( mHexView, TQT_SIGNAL( layoutChanged( const SDisplayLayout & ) ), - TQT_SLOT( layoutChanged( const SDisplayLayout & ) ) ); + connect( mHexView, TQT_SIGNAL( tqlayoutChanged( const SDisplayLayout & ) ), + TQT_SLOT( tqlayoutChanged( const SDisplayLayout & ) ) ); connect( mHexView, TQT_SIGNAL( inputModeChanged( const SDisplayInputMode & ) ), this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) ); mHexView->setFocus(); - setBackgroundColor( palette().active().base() ); + setBackgroundColor( tqpalette().active().base() ); mProgressBusy = false; mGotoDialog = 0; @@ -115,7 +115,7 @@ void CHexEditorWidget::initialize( void ) setFont( mDisplayState.font ); mHexView->setMisc( mDisplayState.misc ); mHexView->setCursor( mDisplayState.cursor, false ); - mHexView->setLayout( mDisplayState.layout ); + mHexView->setLayout( mDisplayState.tqlayout ); mHexView->setInputMode( mDisplayState.input ); mHexView->setInsertMode( mDisplayState.misc.insertMode ); } @@ -123,25 +123,25 @@ void CHexEditorWidget::initialize( void ) void CHexEditorWidget::writeConfiguration( KConfig &config ) { - SDisplayLayout &layout = mDisplayState.layout; + SDisplayLayout &tqlayout = mDisplayState.tqlayout; config.setGroup( "Display Options" ); - config.writeEntry( "PrimaryMode", layout.primaryModeString() ); - config.writeEntry( "SecondaryMode", layout.secondaryModeString() ); - config.writeEntry( "OffsetMode", layout.offsetModeString() ); - config.writeEntry( "OffsetVisible", layout.offsetVisible ); - config.writeEntry( "PrimaryUpperCase", layout.primaryUpperCase ); - config.writeEntry( "OffsetUpperCase", layout.offsetUpperCase ); - config.writeEntry( "LineSize", layout.lineSize ); - config.writeEntry( "ColumnSize", layout.columnSize ); - config.writeEntry( "LockLine", layout.lockLine ); - config.writeEntry( "LockColumn", layout.lockColumn ); - config.writeEntry( "ColumnCharSpace", layout.columnCharSpace ); - config.writeEntry( "ColumnSpacing", layout.columnSpacing ); - config.writeEntry( "SeparatorMarginWidth", layout.separatorMarginWidth ); - config.writeEntry( "EdgeMarginWidth", layout.edgeMarginWidth ); - config.writeEntry( "LeftSeparatorWidth", layout.leftSeparatorWidth ); - config.writeEntry( "RightSeparatorWidth", layout.rightSeparatorWidth ); - config.writeEntry( "GridMode", layout.gridModeString() ); + config.writeEntry( "PrimaryMode", tqlayout.primaryModeString() ); + config.writeEntry( "SecondaryMode", tqlayout.secondaryModeString() ); + config.writeEntry( "OffsetMode", tqlayout.offsetModeString() ); + config.writeEntry( "OffsetVisible", tqlayout.offsetVisible ); + config.writeEntry( "PrimaryUpperCase", tqlayout.primaryUpperCase ); + config.writeEntry( "OffsetUpperCase", tqlayout.offsetUpperCase ); + config.writeEntry( "LineSize", tqlayout.lineSize ); + config.writeEntry( "ColumnSize", tqlayout.columnSize ); + config.writeEntry( "LockLine", tqlayout.lockLine ); + config.writeEntry( "LockColumn", tqlayout.lockColumn ); + config.writeEntry( "ColumnCharSpace", tqlayout.columnCharSpace ); + config.writeEntry( "ColumnSpacing", tqlayout.columnSpacing ); + config.writeEntry( "SeparatorMarginWidth", tqlayout.separatorMarginWidth ); + config.writeEntry( "EdgeMarginWidth", tqlayout.edgeMarginWidth ); + config.writeEntry( "LeftSeparatorWidth", tqlayout.leftSeparatorWidth ); + config.writeEntry( "RightSeparatorWidth", tqlayout.rightSeparatorWidth ); + config.writeEntry( "GridMode", tqlayout.gridModeString() ); SDisplayLine &line = mDisplayState.line; config.setGroup( "Line Size" ); @@ -183,7 +183,7 @@ void CHexEditorWidget::writeConfiguration( KConfig &config ) config.setGroup( "Display Font" ); config.writeEntry( "UseSystemFont", font.useSystemFont ); config.writeEntry( "LocalFont", font.localFont ); - config.writeEntry( "NonPrintChar", font.nonPrintChar.unicode() ); + config.writeEntry( "NonPrintChar", font.nonPrintChar.tqunicode() ); SDisplayCursor &cursor = mDisplayState.cursor; config.setGroup( "Display Cursor" ); @@ -221,38 +221,38 @@ void CHexEditorWidget::writeConfiguration( KConfig &config ) void CHexEditorWidget::readConfiguration( KConfig &config ) { - SDisplayLayout &layout = mDisplayState.layout; + SDisplayLayout &tqlayout = mDisplayState.tqlayout; config.setGroup( "Display Options" ); - layout.setPrimaryMode( config.readEntry("PrimaryMode") ); - layout.setSecondaryMode( config.readEntry("SecondaryMode") ); - layout.setOffsetMode( config.readEntry("OffsetMode") ); - layout.offsetVisible = config.readBoolEntry( - "OffsetVisible", layout.offsetVisible ); - layout.primaryUpperCase = config.readBoolEntry( - "PrimaryUpperCase", layout.primaryUpperCase ); - layout.offsetUpperCase = config.readBoolEntry( - "OffsetUpperCase", layout.offsetUpperCase ); - layout.lineSize = config.readNumEntry( - "LineSize", layout.lineSize ); - layout.columnSize = config.readNumEntry( - "ColumnSize", layout.columnSize ); - layout.lockLine = config.readBoolEntry( - "LockLine", layout.lockLine ); - layout.lockColumn = config.readBoolEntry( - "LockColumn", layout.lockColumn ); - layout.columnCharSpace = config.readBoolEntry( - "ColumnCharSpace", layout.columnCharSpace ); - layout.columnSpacing = config.readNumEntry( - "ColumnSpacing", layout.columnSpacing ); - layout.separatorMarginWidth = config.readNumEntry( - "SeparatorMarginWidth", layout.separatorMarginWidth ); - layout.edgeMarginWidth = config.readNumEntry( - "EdgeMarginWidth", layout.edgeMarginWidth ); - layout.leftSeparatorWidth = config.readNumEntry( - "LeftSeparatorWidth", layout.leftSeparatorWidth ); - layout.rightSeparatorWidth = config.readNumEntry( - "RightSeparatorWidth", layout.rightSeparatorWidth ); - layout.setGridMode( config.readEntry("GridMode") ); + tqlayout.setPrimaryMode( config.readEntry("PrimaryMode") ); + tqlayout.setSecondaryMode( config.readEntry("SecondaryMode") ); + tqlayout.setOffsetMode( config.readEntry("OffsetMode") ); + tqlayout.offsetVisible = config.readBoolEntry( + "OffsetVisible", tqlayout.offsetVisible ); + tqlayout.primaryUpperCase = config.readBoolEntry( + "PrimaryUpperCase", tqlayout.primaryUpperCase ); + tqlayout.offsetUpperCase = config.readBoolEntry( + "OffsetUpperCase", tqlayout.offsetUpperCase ); + tqlayout.lineSize = config.readNumEntry( + "LineSize", tqlayout.lineSize ); + tqlayout.columnSize = config.readNumEntry( + "ColumnSize", tqlayout.columnSize ); + tqlayout.lockLine = config.readBoolEntry( + "LockLine", tqlayout.lockLine ); + tqlayout.lockColumn = config.readBoolEntry( + "LockColumn", tqlayout.lockColumn ); + tqlayout.columnCharSpace = config.readBoolEntry( + "ColumnCharSpace", tqlayout.columnCharSpace ); + tqlayout.columnSpacing = config.readNumEntry( + "ColumnSpacing", tqlayout.columnSpacing ); + tqlayout.separatorMarginWidth = config.readNumEntry( + "SeparatorMarginWidth", tqlayout.separatorMarginWidth ); + tqlayout.edgeMarginWidth = config.readNumEntry( + "EdgeMarginWidth", tqlayout.edgeMarginWidth ); + tqlayout.leftSeparatorWidth = config.readNumEntry( + "LeftSeparatorWidth", tqlayout.leftSeparatorWidth ); + tqlayout.rightSeparatorWidth = config.readNumEntry( + "RightSeparatorWidth", tqlayout.rightSeparatorWidth ); + tqlayout.setGridMode( config.readEntry("GridMode") ); SDisplayLine &line = mDisplayState.line; config.setGroup( "Line Size" ); @@ -398,9 +398,9 @@ void CHexEditorWidget::paletteChanged( void ) setColor( mDisplayState.color ); } -void CHexEditorWidget::layoutChanged( const SDisplayLayout &/*layout*/ ) +void CHexEditorWidget::tqlayoutChanged( const SDisplayLayout &/*tqlayout*/ ) { - //mDisplayState.layout = layout; + //mDisplayState.tqlayout = tqlayout; } void CHexEditorWidget::inputModeChanged( const SDisplayInputMode &input ) @@ -414,30 +414,30 @@ void CHexEditorWidget::setLineSize(const SDisplayLine &line ) mDisplayState.line = line; } -void CHexEditorWidget::setLayout( const SDisplayLayout &layout ) +void CHexEditorWidget::setLayout( const SDisplayLayout &tqlayout ) { // // We only set the values that can be modified by the dialog // - mDisplayState.layout.lockLine = layout.lockLine; - mDisplayState.layout.lockColumn = layout.lockColumn; - mDisplayState.layout.leftSeparatorWidth = layout.leftSeparatorWidth; - mDisplayState.layout.rightSeparatorWidth = layout.rightSeparatorWidth; - mDisplayState.layout.separatorMarginWidth = layout.separatorMarginWidth; - mDisplayState.layout.edgeMarginWidth = layout.edgeMarginWidth; - mDisplayState.layout.columnCharSpace = layout.columnCharSpace; - mDisplayState.layout.columnSpacing = layout.columnSpacing; - mDisplayState.layout.horzGridWidth = layout.horzGridWidth; - mDisplayState.layout.vertGridWidth = layout.vertGridWidth; + mDisplayState.tqlayout.lockLine = tqlayout.lockLine; + mDisplayState.tqlayout.lockColumn = tqlayout.lockColumn; + mDisplayState.tqlayout.leftSeparatorWidth = tqlayout.leftSeparatorWidth; + mDisplayState.tqlayout.rightSeparatorWidth = tqlayout.rightSeparatorWidth; + mDisplayState.tqlayout.separatorMarginWidth = tqlayout.separatorMarginWidth; + mDisplayState.tqlayout.edgeMarginWidth = tqlayout.edgeMarginWidth; + mDisplayState.tqlayout.columnCharSpace = tqlayout.columnCharSpace; + mDisplayState.tqlayout.columnSpacing = tqlayout.columnSpacing; + mDisplayState.tqlayout.horzGridWidth = tqlayout.horzGridWidth; + mDisplayState.tqlayout.vertGridWidth = tqlayout.vertGridWidth; // // Select the line and column sizes we shall use now. // - SDisplayLayout &l = mDisplayState.layout; + SDisplayLayout &l = mDisplayState.tqlayout; l.lineSize = mDisplayState.line.lineSize[ l.primaryMode ]; l.columnSize = mDisplayState.line.columnSize[ l.primaryMode ]; - mHexView->setLayout( mDisplayState.layout ); + mHexView->setLayout( mDisplayState.tqlayout ); } void CHexEditorWidget::setCursor( const SDisplayCursor &cursor ) @@ -453,26 +453,26 @@ void CHexEditorWidget::setColor( const SDisplayColor &color ) // // The selection colors can not be chosen. // - mDisplayState.color.selectBg = kapp->palette().active().highlight(); - mDisplayState.color.selectFg = kapp->palette().active().highlightedText(); + mDisplayState.color.selectBg = kapp->tqpalette().active().highlight(); + mDisplayState.color.selectFg = kapp->tqpalette().active().highlightedText(); if( mDisplayState.color.useSystemColor == true ) { SDisplayColor c = mDisplayState.color; - c.textBg = kapp->palette().active().base(); - c.secondTextBg = kapp->palette().active().base(); - c.offsetBg = kapp->palette().active().base(); - c.inactiveBg = kapp->palette().active().base(); - c.primaryFg[0] = kapp->palette().active().text(); - c.primaryFg[1] = kapp->palette().active().text(); - c.nonPrintFg = kapp->palette().active().text(); - c.offsetFg = kapp->palette().active().text(); - c.secondaryFg = kapp->palette().active().text(); - c.leftSeparatorFg = kapp->palette().active().text(); - c.rightSeparatorFg = kapp->palette().active().text(); - c.cursorBg = kapp->palette().active().text(); - c.cursorFg = kapp->palette().active().base(); - c.gridFg = kapp->palette().active().text(); + c.textBg = kapp->tqpalette().active().base(); + c.secondTextBg = kapp->tqpalette().active().base(); + c.offsetBg = kapp->tqpalette().active().base(); + c.inactiveBg = kapp->tqpalette().active().base(); + c.primaryFg[0] = kapp->tqpalette().active().text(); + c.primaryFg[1] = kapp->tqpalette().active().text(); + c.nonPrintFg = kapp->tqpalette().active().text(); + c.offsetFg = kapp->tqpalette().active().text(); + c.secondaryFg = kapp->tqpalette().active().text(); + c.leftSeparatorFg = kapp->tqpalette().active().text(); + c.rightSeparatorFg = kapp->tqpalette().active().text(); + c.cursorBg = kapp->tqpalette().active().text(); + c.cursorFg = kapp->tqpalette().active().base(); + c.gridFg = kapp->tqpalette().active().text(); SDisplayColor defaultColor; c.bookmarkBg = defaultColor.bookmarkBg; c.bookmarkFg = defaultColor.bookmarkFg; @@ -513,46 +513,46 @@ void CHexEditorWidget::setMisc( const SDisplayMisc &misc ) void CHexEditorWidget::setHexadecimalMode( void ) { - layout().primaryMode = SDisplayLayout::hexadecimal; - layout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ]; - layout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ]; - mHexView->setLayout( layout() ); + tqlayout().primaryMode = SDisplayLayout::hexadecimal; + tqlayout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ]; + tqlayout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ]; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::setDecimalMode( void ) { - layout().primaryMode = SDisplayLayout::decimal; - layout().lineSize = line().lineSize[ SDisplayLine::decimal ]; - layout().columnSize = line().columnSize[ SDisplayLine::decimal ]; - mHexView->setLayout( layout() ); + tqlayout().primaryMode = SDisplayLayout::decimal; + tqlayout().lineSize = line().lineSize[ SDisplayLine::decimal ]; + tqlayout().columnSize = line().columnSize[ SDisplayLine::decimal ]; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::setOctalMode( void ) { - layout().primaryMode = SDisplayLayout::octal; - layout().lineSize = line().lineSize[ SDisplayLine::octal ]; - layout().columnSize = line().columnSize[ SDisplayLine::octal ]; - mHexView->setLayout( layout() ); + tqlayout().primaryMode = SDisplayLayout::octal; + tqlayout().lineSize = line().lineSize[ SDisplayLine::octal ]; + tqlayout().columnSize = line().columnSize[ SDisplayLine::octal ]; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::setBinaryMode( void ) { - layout().primaryMode = SDisplayLayout::binary; - layout().lineSize = line().lineSize[ SDisplayLine::binary ]; - layout().columnSize = line().columnSize[ SDisplayLine::binary ]; - mHexView->setLayout( layout() ); + tqlayout().primaryMode = SDisplayLayout::binary; + tqlayout().lineSize = line().lineSize[ SDisplayLine::binary ]; + tqlayout().columnSize = line().columnSize[ SDisplayLine::binary ]; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::setTextMode( void ) { - layout().primaryMode = SDisplayLayout::textOnly; - layout().lineSize = line().lineSize[ SDisplayLine::textOnly ]; - layout().columnSize = line().columnSize[ SDisplayLine::textOnly ]; - mHexView->setLayout( layout() ); + tqlayout().primaryMode = SDisplayLayout::textOnly; + tqlayout().lineSize = line().lineSize[ SDisplayLine::textOnly ]; + tqlayout().columnSize = line().columnSize[ SDisplayLine::textOnly ]; + mHexView->setLayout( tqlayout() ); } @@ -564,7 +564,7 @@ void CHexEditorWidget::saveWorkingDirectory( const TQString &url ) return; } - int index = url.findRev( '/' ); + int index = url.tqfindRev( '/' ); if( index != -1 ) { mWorkDir = url.left( index+1 ); @@ -580,7 +580,7 @@ void CHexEditorWidget::newFile( void ) return; } - TQString url = i18n("Untitled %1").arg( mUntitledCount ); + TQString url = i18n("Untitled %1").tqarg( mUntitledCount ); // // If the url is already present in the document list (should not happen), @@ -605,7 +605,7 @@ void CHexEditorWidget::newFile( void ) if( errCode != Err_Success ) { TQString msg = i18n("Unable to create new document."); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Operation Failed") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Operation Failed") ); return; } @@ -626,7 +626,7 @@ void CHexEditorWidget::newFile( const TQByteArray &data ) void CHexEditorWidget::open() { - KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,topLevelWidget() ); + KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,tqtopLevelWidget() ); if( file.isEmpty() ) return; @@ -764,7 +764,7 @@ bool CHexEditorWidget::selectDocument( const TQString &url, void CHexEditorWidget::insertFile( void ) { - KFileDialog fdlg(mWorkDir, TQString::null, topLevelWidget(), 0, TRUE); + KFileDialog fdlg(mWorkDir, TQString(), tqtopLevelWidget(), 0, TRUE); fdlg.setOperationMode( KFileDialog::Opening ); fdlg.okButton()->setGuiItem( KStdGuiItem::insert() ); fdlg.setCaption(i18n("Insert File")); @@ -868,7 +868,7 @@ bool CHexEditorWidget::querySave( void ) TQString msg = i18n("" "The current document has been modified.\n" "Do you want to save it?" ); - int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), msg, TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + int reply = KMessageBox::warningYesNoCancel( tqtopLevelWidget(), msg, TQString(), KStdGuiItem::save(), KStdGuiItem::discard() ); if( reply == KMessageBox::Yes ) { return( save() ); @@ -934,7 +934,7 @@ bool CHexEditorWidget::save( void ) "Current document has been changed on disk.\n" "If you save now, those changes will be lost.\n" "Proceed?" ); - int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), msg, + int reply = KMessageBox::warningYesNoCancel( tqtopLevelWidget(), msg, i18n("Save"), KStdGuiItem::save(), KStdGuiItem::discard() ); if( reply == KMessageBox::No || reply == KMessageBox::Cancel ) { @@ -986,7 +986,7 @@ bool CHexEditorWidget::saveAs( void ) TQString msg = i18n("" "A document with this name already exists.\n" "Do you want to overwrite it?" ); - int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg, + int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg, i18n("Save As"), i18n("Overwrite") ); if( reply == KMessageBox::Continue ) break; @@ -1021,7 +1021,7 @@ void CHexEditorWidget::reload( void ) if( mHexView->urlValid() == false ) { TQString msg = i18n( "The current document does not exist on the disk." ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Reload") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Reload") ); return; } @@ -1040,7 +1040,7 @@ void CHexEditorWidget::reload( void ) "If you reload now, the modifications will be lost." ); } - int reply = KMessageBox::warningContinueCancel(topLevelWidget(),msg,i18n("Reload"), i18n("&Reload")); + int reply = KMessageBox::warningContinueCancel(tqtopLevelWidget(),msg,i18n("Reload"), i18n("&Reload")); if( reply != KMessageBox::Continue ) { return; @@ -1070,7 +1070,7 @@ void CHexEditorWidget::print( void ) prt.setFullPage( true ); // I use my own marings // FIXME: Make a better header for the printingdialog - if (prt.setup(topLevelWidget(), i18n("Print Hex-Document"))) + if (prt.setup(tqtopLevelWidget(), i18n("Print Hex-Document"))) { prt.setTopMarginMM( prt.option("kde-khexedit-topmarginmm").toInt() ); prt.setBottomMarginMM( prt.option("kde-khexedit-bottommarginmm").toInt() ); @@ -1125,7 +1125,7 @@ void CHexEditorWidget::printPostscript( CHexPrinter &printer ) if( errCode != Err_Success ) { - KMessageBox::sorry( topLevelWidget(), msg, i18n("Print") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Print") ); } } @@ -1148,7 +1148,7 @@ bool CHexEditorWidget::confirmPrintPageNumber( CHexPrinter &printer ) "You are about to print %n pages.<br>" "Proceed?</qt>", numPageSelected ); - int reply = KMessageBox::warningYesNo( topLevelWidget(), msg, + int reply = KMessageBox::warningYesNo( tqtopLevelWidget(), msg, i18n("Print"), KStdGuiItem::print(), KStdGuiItem::cancel() ); if( reply != KMessageBox::Continue ) { @@ -1165,7 +1165,7 @@ void CHexEditorWidget::exportDialog( void ) { if( mExportDialog == 0 ) { - mExportDialog = new CExportDialog( topLevelWidget(), 0, false ); + mExportDialog = new CExportDialog( tqtopLevelWidget(), 0, false ); if( mExportDialog == 0 ) { return; } connect( mExportDialog, TQT_SIGNAL( exportText(const SExportText &)), this, TQT_SLOT( exportText( const SExportText &)) ); @@ -1191,7 +1191,7 @@ void CHexEditorWidget::exportText( const SExportText &ex ) { TQString msg = i18n("Unable to export data.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") ); } } @@ -1208,7 +1208,7 @@ void CHexEditorWidget::exportHtml( const SExportHtml &ex ) { TQString msg = i18n("Unable to export data.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") ); } } @@ -1225,7 +1225,7 @@ void CHexEditorWidget::exportCArray( const SExportCArray &ex ) { TQString msg = i18n("Unable to export data.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") ); } } @@ -1238,7 +1238,7 @@ void CHexEditorWidget::encode( CConversion::EMode mode ) "The encoding you have selected is not reversible.\n" "If you revert to the original encoding later, there is no " "guarantee that the data can be restored to the original state."); - int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg, + int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg, i18n("Encode"), i18n("&Encode")); if( reply != KMessageBox::Continue ) { @@ -1258,7 +1258,7 @@ void CHexEditorWidget::encode( CConversion::EMode mode ) { TQString msg = i18n("Could not encode data.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Encode") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Encode") ); } } @@ -1306,34 +1306,34 @@ void CHexEditorWidget::enableInputLock( bool inputLock ) void CHexEditorWidget::toggleOffsetColumnVisibility( void ) { - layout().offsetVisible = layout().offsetVisible == true ? false : true; - mHexView->setLayout( layout() ); + tqlayout().offsetVisible = tqlayout().offsetVisible == true ? false : true; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::toggleTextColumnVisibility( void ) { - layout().secondaryMode = layout().secondaryMode == SDisplayLayout::hide ? + tqlayout().secondaryMode = tqlayout().secondaryMode == SDisplayLayout::hide ? SDisplayLayout::textOnly : SDisplayLayout::hide; - mHexView->setLayout( layout() ); + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::toggleOffsetAsDecimal( void ) { - layout().offsetMode = layout().offsetMode == SDisplayLayout::hexadecimal ? + tqlayout().offsetMode = tqlayout().offsetMode == SDisplayLayout::hexadecimal ? SDisplayLayout::decimal : SDisplayLayout::hexadecimal; - mHexView->setLayout( layout() ); + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::toggleDataUppercase( void ) { - layout().primaryUpperCase = layout().primaryUpperCase == true ? false : true; - mHexView->setLayout( layout() ); + tqlayout().primaryUpperCase = tqlayout().primaryUpperCase == true ? false : true; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::toggleOffsetUppercase( void ) { - layout().offsetUpperCase = layout().offsetUpperCase == true ? false : true; - mHexView->setLayout( layout() ); + tqlayout().offsetUpperCase = tqlayout().offsetUpperCase == true ? false : true; + mHexView->setLayout( tqlayout() ); } void CHexEditorWidget::toggleInsertMode( void ) @@ -1412,7 +1412,7 @@ void CHexEditorWidget::removeAllBookmark( void ) TQString msg = i18n("" "Deleted bookmarks can not be restored.\n" "Proceed?" ); - int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg ); + int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg ); if( reply != KMessageBox::Continue ) { return; @@ -1447,7 +1447,7 @@ void CHexEditorWidget::gotoOffset( void ) { if( mGotoDialog == 0 ) { - mGotoDialog = new CGotoDialog( topLevelWidget(), 0, false ); + mGotoDialog = new CGotoDialog( tqtopLevelWidget(), 0, false ); if( mGotoDialog == 0 ) { return; } connect( mGotoDialog, TQT_SIGNAL(gotoOffset( uint, uint, bool, bool )), mHexView, TQT_SLOT(gotoOffset( uint, uint, bool, bool )) ); @@ -1456,7 +1456,7 @@ void CHexEditorWidget::gotoOffset( void ) } -void CHexEditorWidget::find( void ) +void CHexEditorWidget::tqfind( void ) { if( mFindNavigatorDialog != 0 ) { @@ -1465,7 +1465,7 @@ void CHexEditorWidget::find( void ) if( mFindDialog == 0 ) { - mFindDialog = new CFindDialog( topLevelWidget(), 0, false ); + mFindDialog = new CFindDialog( tqtopLevelWidget(), 0, false ); if( mFindDialog == 0 ) { return; } connect( mFindDialog, TQT_SIGNAL(findData(SSearchControl &, uint, bool)), @@ -1526,7 +1526,7 @@ void CHexEditorWidget::findData( SSearchControl &sc, uint mode, bool navigator) if( mode == Find_First ) { TQString msg = i18n( "Search key not found in document." ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Find") ); } } @@ -1580,7 +1580,7 @@ bool CHexEditorWidget::askWrap( bool fwd, const TQString &header ) "Continue from the end?" ); } - int reply = KMessageBox::questionYesNo( topLevelWidget(), msg, header, KStdGuiItem::cont(), KStdGuiItem::cancel() ); + int reply = KMessageBox::questionYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cont(), KStdGuiItem::cancel() ); return( reply == KMessageBox::Yes ? true : false ); } @@ -1594,7 +1594,7 @@ bool CHexEditorWidget::canFind( bool showError ) TQString msg = i18n("" "Your request can not be processed.\n" "No search pattern defined." ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Find") ); } return( false ); } @@ -1613,13 +1613,13 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc ) if( mFindNavigatorDialog == 0 ) { - mFindNavigatorDialog = new CFindNavigatorDialog(topLevelWidget(),0,false); + mFindNavigatorDialog = new CFindNavigatorDialog(tqtopLevelWidget(),0,false); if( mFindNavigatorDialog == 0 ) { return; } connect( mFindNavigatorDialog, TQT_SIGNAL(findData(SSearchControl &, uint, bool)), TQT_SLOT(findData(SSearchControl &, uint, bool)) ); connect( mFindNavigatorDialog, TQT_SIGNAL(makeKey(void)), - TQT_SLOT(find()) ); + TQT_SLOT(tqfind()) ); } if( mFindNavigatorDialog->isVisible() == false ) { @@ -1630,13 +1630,13 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc ) -void CHexEditorWidget::replace( void ) +void CHexEditorWidget::tqreplace( void ) { hideReplacePrompt(); if( mReplaceDialog == 0 ) { - mReplaceDialog = new CReplaceDialog( topLevelWidget(), 0, false ); + mReplaceDialog = new CReplaceDialog( tqtopLevelWidget(), 0, false ); if( mReplaceDialog == 0 ) { return; } connect( mReplaceDialog, TQT_SIGNAL( replaceData( SSearchControl &, uint)), @@ -1726,7 +1726,7 @@ void CHexEditorWidget::replacePrompt( SSearchControl &sc ) { if( mReplacePromptDialog == 0 ) { - mReplacePromptDialog = new CReplacePromptDialog(topLevelWidget(), 0,false); + mReplacePromptDialog = new CReplacePromptDialog(tqtopLevelWidget(), 0,false); if( mReplacePromptDialog == 0 ) { return; } connect( mReplacePromptDialog, TQT_SIGNAL( replaceData( SSearchControl &, uint)), @@ -1765,14 +1765,14 @@ void CHexEditorWidget::replaceResult( SSearchControl &sc ) { msg += i18n( "Search key not found in document." ); } - KMessageBox::information( topLevelWidget(), msg, i18n("Find & Replace")); + KMessageBox::information( tqtopLevelWidget(), msg, i18n("Find & Replace")); } else { const TQString msg = i18n( "<qt>Operation complete.<br><br>One replacement was made.</qt>", "<qt>Operation complete.<br><br>%n replacements were made.</qt>", sc.numReplace ); - KMessageBox::information( topLevelWidget(), msg, i18n("Find & Replace")); + KMessageBox::information( tqtopLevelWidget(), msg, i18n("Find & Replace")); } } @@ -1781,7 +1781,7 @@ void CHexEditorWidget::insertPattern( void ) { if( mInsertDialog == 0 ) { - mInsertDialog = new CInsertDialog( topLevelWidget(), 0, false ); + mInsertDialog = new CInsertDialog( tqtopLevelWidget(), 0, false ); if( mInsertDialog == 0 ) { return; } connect( mInsertDialog, TQT_SIGNAL(execute( SInsertData & )), mHexView, TQT_SLOT(insert( SInsertData & )) ); @@ -1795,7 +1795,7 @@ void CHexEditorWidget::encoding( void ) TQString msg = i18n("" "Not available yet!\n" "Define your own encoding" ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Encoding") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Encoding") ); } @@ -1803,7 +1803,7 @@ void CHexEditorWidget::strings( void ) { if( mStringDialog == 0 ) { - mStringDialog = new CStringDialog( topLevelWidget(), 0, false ); + mStringDialog = new CStringDialog( tqtopLevelWidget(), 0, false ); if( mStringDialog == 0 ) { return; } connect( mStringDialog, TQT_SIGNAL(markText( uint, uint, bool )), mHexView, TQT_SLOT(setMark( uint, uint, bool )) ); @@ -1830,7 +1830,7 @@ void CHexEditorWidget::collectStrings( void ) { TQString msg = i18n("Could not collect strings.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Collect Strings") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Collect Strings") ); } } @@ -1842,14 +1842,14 @@ void CHexEditorWidget::recordView( void ) TQString msg = i18n("" "Not available yet!\n" "Define a record (structure) and fill it with data from the document." ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Record Viewer") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Record Viewer") ); } void CHexEditorWidget::filter( void ) { if( mFilterDialog == 0 ) { - mFilterDialog = new CFilterDialog( topLevelWidget(), 0, false ); + mFilterDialog = new CFilterDialog( tqtopLevelWidget(), 0, false ); if( mFilterDialog == 0 ) { return; } connect( mFilterDialog, TQT_SIGNAL(filterData( SFilterControl & )), mHexView, TQT_SLOT(filter( SFilterControl & )) ); @@ -1862,7 +1862,7 @@ void CHexEditorWidget::chart( void ) { if( mCharTableDialog == 0 ) { - mCharTableDialog = new CCharTableDialog( topLevelWidget(), 0, false ); + mCharTableDialog = new CCharTableDialog( tqtopLevelWidget(), 0, false ); if( mCharTableDialog == 0 ) { return; } connect( mCharTableDialog, TQT_SIGNAL(assign( const TQByteArray & )), mHexView, TQT_SLOT(insert( const TQByteArray & )) ); @@ -1887,7 +1887,7 @@ void CHexEditorWidget::statistics( void ) { if( mFileInfoDialog == 0 ) { - mFileInfoDialog = new CFileInfoDialog( topLevelWidget(), 0, false ); + mFileInfoDialog = new CFileInfoDialog( tqtopLevelWidget(), 0, false ); if( mFileInfoDialog == 0 ) { return; } connect( mFileInfoDialog, TQT_SIGNAL(collectStatistic(SStatisticControl &)), TQT_SLOT(collectStatistics(SStatisticControl &))); @@ -1916,7 +1916,7 @@ void CHexEditorWidget::collectStatistics( SStatisticControl &sc ) TQString msg = i18n("Could not collect document statistics.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Collect Document Statistics") ); } @@ -1927,12 +1927,12 @@ void CHexEditorWidget::options( void ) { if( mOptionDialog == 0 ) { - mOptionDialog = new COptionDialog( topLevelWidget(), 0, false ); + mOptionDialog = new COptionDialog( tqtopLevelWidget(), 0, false ); if( mOptionDialog == 0 ) { return; } connect( mOptionDialog, TQT_SIGNAL(lineSizeChoice(const SDisplayLine &)), TQT_SLOT(setLineSize(const SDisplayLine &)) ); - connect( mOptionDialog, TQT_SIGNAL(layoutChoice(const SDisplayLayout &)), + connect( mOptionDialog, TQT_SIGNAL(tqlayoutChoice(const SDisplayLayout &)), TQT_SLOT(setLayout(const SDisplayLayout &)) ); connect( mOptionDialog, TQT_SIGNAL(fontChoice(const SDisplayFont &)), TQT_SLOT(setFont(const SDisplayFont &)) ); @@ -1958,8 +1958,8 @@ void CHexEditorWidget::favorites( void ) { TQString msg = i18n("" "Not available yet!\n" - "Save or retrive your favorite layout" ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Profiles") ); + "Save or retrive your favorite tqlayout" ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Profiles") ); } @@ -1978,8 +1978,8 @@ int CHexEditorWidget::readURL( const KURL &url, bool insert ) // if( !url.isValid() ) { - TQString msg = i18n("Malformed URL\n%1").arg( url.url() ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Read URL") ); + TQString msg = i18n("Malformed URL\n%1").tqarg( url.url() ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read URL") ); return( Err_IllegalArgument ); } @@ -2013,7 +2013,7 @@ void CHexEditorWidget::writeURL( TQString &url ) { mHexView->setModified( modified ); TQString msg = i18n("Could not save remote file."); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") ); } } } @@ -2049,30 +2049,30 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url, TQFileInfo info( diskPath ); if( info.exists() == false ) { - const TQString msg = i18n("The specified file does not exist.\n%1").arg( diskPath ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); + const TQString msg = i18n("The specified file does not exist.\n%1").tqarg( diskPath ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") ); return( false ); } if( info.isDir() == true ) { - const TQString msg = i18n("You have specified a folder.\n%1").arg( diskPath ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); + const TQString msg = i18n("You have specified a folder.\n%1").tqarg( diskPath ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") ); return( false ); } if( info.isReadable() == false ) { - const TQString msg = i18n("You do not have read permission to this file.\n%1").arg( diskPath ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); + const TQString msg = i18n("You do not have read permission to this file.\n%1").tqarg( diskPath ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") ); return( false ); } TQFile file( diskPath ); if( file.open( IO_ReadOnly | IO_Raw ) == false ) { - const TQString msg = i18n("An error occurred while trying to open the file.\n%1").arg( diskPath ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); + const TQString msg = i18n("An error occurred while trying to open the file.\n%1").tqarg( diskPath ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") ); return( false ); } @@ -2102,7 +2102,7 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url, TQString header = insert == true ? i18n("Insert") : i18n("Read"); TQString msg = i18n("Could not read file.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, header ); + KMessageBox::sorry( tqtopLevelWidget(), msg, header ); } file.close(); @@ -2120,14 +2120,14 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath ) if( info.isDir() == true ) { TQString msg = i18n("You have specified a folder."); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") ); return( false ); } if( info.isWritable() == false ) { TQString msg = i18n("You do not have write permission."); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") ); return( false ); } } @@ -2136,7 +2136,7 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath ) if( file.open( IO_WriteOnly | IO_Raw | IO_Truncate ) == false ) { TQString msg = i18n("An error occurred while trying to open the file."); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") ); return( false ); } @@ -2149,7 +2149,7 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath ) { TQString msg = i18n("Could not write data to disk.\n"); msg += hexError( errCode ); - KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") ); + KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") ); } file.close(); @@ -2231,7 +2231,7 @@ bool CHexEditorWidget::createBuffer( void ) { TQString msg = i18n( "Can not create text buffer.\n" ); msg += hexError( Err_NoMemory ); - KMessageBox::error( topLevelWidget(), msg, i18n("Loading Failed" ) ); + KMessageBox::error( tqtopLevelWidget(), msg, i18n("Loading Failed" ) ); return( false ); } @@ -2418,7 +2418,7 @@ int CHexEditorWidget::progressParse( const SProgressData &pd ) } - int reply = KMessageBox::warningYesNo( topLevelWidget(), msg, header, KStdGuiItem::cancel(), KStdGuiItem::cont() ); + int reply = KMessageBox::warningYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cancel(), KStdGuiItem::cont() ); mProgressStop = false; return( reply == KMessageBox::Yes ? Err_Stop : Err_Success ); } @@ -2431,7 +2431,7 @@ bool CHexEditorWidget::busy( bool showWarning ) { TQString msg = i18n("Could not finish operation.\n"); msg += hexError( Err_Busy ); - KMessageBox::sorry( topLevelWidget(), msg ); + KMessageBox::sorry( tqtopLevelWidget(), msg ); } return( mProgressBusy ); diff --git a/khexedit/hexeditorwidget.h b/khexedit/hexeditorwidget.h index 04701f6..d14bfd1 100644 --- a/khexedit/hexeditorwidget.h +++ b/khexedit/hexeditorwidget.h @@ -51,9 +51,10 @@ class CReplacePromptDialog; namespace KIO { class Job; } -class CHexEditorWidget : public QWidget +class CHexEditorWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum EProgressMode @@ -70,7 +71,7 @@ class CHexEditorWidget : public QWidget }; public: - CHexEditorWidget( TQWidget *parent = 0, const char *name = 0 ); + CHexEditorWidget( TQWidget *tqparent = 0, const char *name = 0 ); ~CHexEditorWidget( void ); void initialize( void ); @@ -82,7 +83,7 @@ class CHexEditorWidget : public QWidget inline int defaultTextWidth( void ); inline CHexViewWidget *view( void ); - inline SDisplayLayout &layout( void ); + inline SDisplayLayout &tqlayout( void ); inline SDisplayLine &line( void ); inline SDisplayInputMode &inputMode( void ); inline SDisplayMisc::EOpenFile openFile( void ); @@ -149,12 +150,12 @@ class CHexEditorWidget : public QWidget void gotoNextBookmark( void ); void gotoPrevBookmark( void ); void gotoOffset( void ); - void find( void ); + void tqfind( void ); void findAgain( void ); void findNext( void ); void findPrevious( void ); void findData( SSearchControl &sc, uint mode, bool navigator ); - void replace( void ); + void tqreplace( void ); void insertPattern( void ); void encoding( void ); void strings( void ); @@ -169,10 +170,10 @@ class CHexEditorWidget : public QWidget protected slots: void fontChanged( void ); void paletteChanged( void ); - void layoutChanged( const SDisplayLayout &layout ); + void tqlayoutChanged( const SDisplayLayout &tqlayout ); void inputModeChanged( const SDisplayInputMode &input ); void setLineSize(const SDisplayLine &line ); - void setLayout( const SDisplayLayout &layout ); + void setLayout( const SDisplayLayout &tqlayout ); void setCursor( const SDisplayCursor &cursor ); void setColor( const SDisplayColor &color ); void setFont( const SDisplayFont &font ); @@ -258,9 +259,9 @@ inline CHexViewWidget *CHexEditorWidget::view( void ) return( mHexView ); } -inline SDisplayLayout &CHexEditorWidget::layout( void ) +inline SDisplayLayout &CHexEditorWidget::tqlayout( void ) { - return( mDisplayState.layout ); + return( mDisplayState.tqlayout ); } inline SDisplayLine &CHexEditorWidget::line( void ) diff --git a/khexedit/hexeditstate.h b/khexedit/hexeditstate.h index 13a6c66..04f6425 100644 --- a/khexedit/hexeditstate.h +++ b/khexedit/hexeditstate.h @@ -378,26 +378,26 @@ class SDisplayColor // choses in Control Center. // useSystemColor = false; - offsetBg = Qt::white; - textBg = Qt::white; - secondTextBg = Qt::white; - inactiveBg = Qt::gray; - selectBg = kapp->palette().active().highlight(); - selectFg = kapp->palette().active().highlightedText(); - markBg = Qt::blue; - markFg = Qt::white; - primaryFg[0] = Qt::black; - primaryFg[1] = Qt::blue; - offsetFg = Qt::red; - secondaryFg = Qt::black; - nonPrintFg = Qt::red; - gridFg = Qt::darkCyan; - leftSeparatorFg = Qt::darkGreen; - rightSeparatorFg = Qt::darkGreen; - cursorBg = Qt::red; - cursorFg = Qt::black; - bookmarkBg = Qt::green; - bookmarkFg = Qt::black; + offsetBg = TQt::white; + textBg = TQt::white; + secondTextBg = TQt::white; + inactiveBg = TQt::gray; + selectBg = kapp->tqpalette().active().highlight(); + selectFg = kapp->tqpalette().active().highlightedText(); + markBg = TQt::blue; + markFg = TQt::white; + primaryFg[0] = TQt::black; + primaryFg[1] = TQt::blue; + offsetFg = TQt::red; + secondaryFg = TQt::black; + nonPrintFg = TQt::red; + gridFg = TQt::darkCyan; + leftSeparatorFg = TQt::darkGreen; + rightSeparatorFg = TQt::darkGreen; + cursorBg = TQt::red; + cursorFg = TQt::black; + bookmarkBg = TQt::green; + bookmarkFg = TQt::black; } bool useSystemColor; @@ -574,7 +574,7 @@ class SDisplayState { public: SDisplayLine line; - SDisplayLayout layout; + SDisplayLayout tqlayout; SDisplayCursor cursor; SDisplayColor color; SDisplayFont font; diff --git a/khexedit/hexmanagerwidget.cc b/khexedit/hexmanagerwidget.cc index b5fe32c..2001a6b 100644 --- a/khexedit/hexmanagerwidget.cc +++ b/khexedit/hexmanagerwidget.cc @@ -23,11 +23,11 @@ #include "hexmanagerwidget.h" #include "searchbar.h" -CHexManagerWidget::CHexManagerWidget( TQWidget *parent, const char *name, +CHexManagerWidget::CHexManagerWidget( TQWidget *tqparent, const char *name, EConversionPosition conversionPosition, EPosition tabBarPosition, EPosition searchBarPosition ) - : TQWidget( parent, name ) + : TQWidget( tqparent, name ) { mValid = false; @@ -70,7 +70,7 @@ void CHexManagerWidget::updateLayout( void ) { if( mValid == false ) { return; } - delete layout(); + delete tqlayout(); TQVBoxLayout *vlay = new TQVBoxLayout( this, 0, 0 ); if( mSearchBar && mSearchBarPosition == AboveEditor ) @@ -126,19 +126,19 @@ void CHexManagerWidget::setConversionVisibility( EConversionPosition position ) else if( mConversionPosition == Float ) { TQPoint point = mapToGlobal( TQPoint(0,0) ); - TQRect rect = geometry(); + TQRect rect = tqgeometry(); TQPoint p; - p.setX(point.x() + rect.width()/2 - mConverter->minimumSize().width()/2); - p.setY(point.y() + rect.height()/2 - mConverter->minimumSize().height()/2); - mConverter->resize( mConverter->minimumSize() ); + p.setX(point.x() + rect.width()/2 - mConverter->tqminimumSize().width()/2); + p.setY(point.y() + rect.height()/2 - mConverter->tqminimumSize().height()/2); + mConverter->resize( mConverter->tqminimumSize() ); mConverter->reparent( 0, WStyle_Customize | WStyle_DialogBorder, p, true ); mConverter->setCaption(kapp->makeStdCaption(i18n("Conversion"))); } else { mConversionPosition = Embed; - uint utilHeight = mConverter->minimumSize().height(); + uint utilHeight = mConverter->tqminimumSize().height(); TQPoint p( 0, height() - utilHeight ); mConverter->reparent( this, 0, p, true ); } @@ -250,16 +250,16 @@ int CHexManagerWidget::preferredWidth( void ) int w = mEditor->defaultTextWidth(); if( mConversionPosition == Embed ) { - int converterWidth = mConverter->sizeHint().width(); - w = QMAX( w, converterWidth ); + int converterWidth = mConverter->tqsizeHint().width(); + w = TQMAX( w, converterWidth ); } return( w ); } -CTabBar::CTabBar( TQWidget *parent, char *name ) - :TQTabBar( parent, name ) +CTabBar::CTabBar( TQWidget *tqparent, char *name ) + :TQTabBar( tqparent, name ) { connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotSelected(int)) ); } @@ -267,9 +267,9 @@ CTabBar::CTabBar( TQWidget *parent, char *name ) void CTabBar::addName( const TQString &name ) { - TQString n( name.right(name.length()-name.findRev('/')-1) ); + TQString n( name.right(name.length()-name.tqfindRev('/')-1) ); - TQTab *t = find( n ); + TQTab *t = tqfind( n ); if( t == 0 ) { t = new TQTab(); @@ -283,8 +283,8 @@ void CTabBar::addName( const TQString &name ) void CTabBar::removeName( const TQString &name ) { - TQString n( name.right(name.length()-name.findRev('/')-1) ); - TQTab *t = find(n); + TQString n( name.right(name.length()-name.tqfindRev('/')-1) ); + TQTab *t = tqfind(n); if( t == 0 ) { return; @@ -297,7 +297,7 @@ void CTabBar::removeName( const TQString &name ) { mFileList.remove(it); removeTab(t); - layoutTabs(); + tqlayoutTabs(); break; } } @@ -306,8 +306,8 @@ void CTabBar::removeName( const TQString &name ) void CTabBar::changeName( const TQString &curName, const TQString &newName ) { - TQString n( curName.right(curName.length()-curName.findRev('/')-1) ); - TQTab *t = find(n); + TQString n( curName.right(curName.length()-curName.tqfindRev('/')-1) ); + TQTab *t = tqfind(n); if( t == 0 ) { return; @@ -318,12 +318,12 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName ) { if( (*it).id() == t->identifier() ) { - TQString m( newName.right(newName.length()-newName.findRev('/')-1) ); + TQString m( newName.right(newName.length()-newName.tqfindRev('/')-1) ); t->setText(m); mFileList.remove(it); mFileList.append( CFileKey(newName,t->identifier()) ); - layoutTabs(); + tqlayoutTabs(); update(); // Seems to be necessary break; } @@ -331,7 +331,7 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName ) } -TQTab *CTabBar::find( const TQString &name ) +TQTab *CTabBar::tqfind( const TQString &name ) { TQPtrList<TQTab> &list = *tabList(); for( TQTab *t = list.first(); t != 0; t = list.next() ) diff --git a/khexedit/hexmanagerwidget.h b/khexedit/hexmanagerwidget.h index 2d90233..40dfc9f 100644 --- a/khexedit/hexmanagerwidget.h +++ b/khexedit/hexmanagerwidget.h @@ -72,12 +72,13 @@ class CFileKey -class CTabBar : public QTabBar +class CTabBar : public TQTabBar { Q_OBJECT + TQ_OBJECT public: - CTabBar( TQWidget *parent=0, char *name=0 ); + CTabBar( TQWidget *tqparent=0, char *name=0 ); void addName( const TQString &name ); void removeName( const TQString &name ); void changeName( const TQString &curName, const TQString &newName ); @@ -87,7 +88,7 @@ class CTabBar : public QTabBar void slotSelected( int id ); private: - TQTab *find( const TQString &name ); + TQTab *tqfind( const TQString &name ); private: TQValueList<CFileKey> mFileList; @@ -97,9 +98,10 @@ class CTabBar : public QTabBar }; -class CHexManagerWidget : public QWidget +class CHexManagerWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum EConversionPosition @@ -117,7 +119,7 @@ class CHexManagerWidget : public QWidget }; public: - CHexManagerWidget( TQWidget *parent = 0, const char *name = 0, + CHexManagerWidget( TQWidget *tqparent = 0, const char *name = 0, EConversionPosition state = Embed, EPosition tabBarPosition = HideItem, EPosition searchBarPosition = HideItem ); diff --git a/khexedit/hextoolwidget.cc b/khexedit/hextoolwidget.cc index b5e918e..7c80583 100644 --- a/khexedit/hextoolwidget.cc +++ b/khexedit/hextoolwidget.cc @@ -29,8 +29,8 @@ #include <tqcombobox.h> -CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) - : TQFrame( parent, name ) +CHexToolWidget::CHexToolWidget( TQWidget *tqparent, const char *name ) + : TQFrame( tqparent, name ) { setFrameStyle( TQFrame::Panel | TQFrame::Raised ); setLineWidth( 1 ); @@ -64,30 +64,30 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) for( int i=0; i<4; i++ ) { TQLabel *Label = new TQLabel( msg1[i], this ); - Label->setAlignment( AlignRight|AlignVCenter ); + Label->tqsetAlignment( AlignRight|AlignVCenter ); ValuesBox->addWidget( Label, i, 0 ); mText1[i] = new TQLineEdit( this ); mText1[i]->setReadOnly( true ); - mText1[i]->setAlignment( AlignRight ); + mText1[i]->tqsetAlignment( AlignRight ); ValuesBox->addWidget( mText1[i], i, 1 ); Label = new TQLabel( msg2[i], this ); - Label->setAlignment( AlignRight|AlignVCenter ); + Label->tqsetAlignment( AlignRight|AlignVCenter ); ValuesBox->addWidget( Label, i, 3 ); mText2[i] = new TQLineEdit( this ); mText2[i]->setReadOnly( true ); - mText2[i]->setAlignment( AlignRight ); + mText2[i]->tqsetAlignment( AlignRight ); ValuesBox->addWidget( mText2[i], i, 4 ); Label = new TQLabel( msg3[i], this ); - Label->setAlignment( AlignRight|AlignVCenter ); + Label->tqsetAlignment( AlignRight|AlignVCenter ); mUtilBox->addWidget( Label, i, 1 ); mText3[i] = new TQLineEdit( this ); mText3[i]->setReadOnly( true ); - mText3[i]->setAlignment( AlignRight ); + mText3[i]->tqsetAlignment( AlignRight ); mUtilBox->addWidget( mText3[i], i, 2 ); } @@ -95,7 +95,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) text = i18n("Show little endian decoding"); mCheckIntelFormat = new TQCheckBox( text, this ); - mCheckIntelFormat->setMinimumSize( mCheckIntelFormat->sizeHint() ); + mCheckIntelFormat->setMinimumSize( mCheckIntelFormat->tqsizeHint() ); connect( mCheckIntelFormat, TQT_SIGNAL(clicked()), this, TQT_SLOT(intelFormat()) ); SettingsBox->addWidget( mCheckIntelFormat, 0, AlignVCenter ); mCheckIntelFormat->setChecked( // default value to please endian system users @@ -109,7 +109,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) text = i18n("Show unsigned as hexadecimal"); mCheckHexadecimal = new TQCheckBox( text, this ); - mCheckHexadecimal->setMinimumSize( mCheckHexadecimal->sizeHint() ); + mCheckHexadecimal->setMinimumSize( mCheckHexadecimal->tqsizeHint() ); connect( mCheckHexadecimal, TQT_SIGNAL(clicked()), this, TQT_SLOT(unsignedFormat()) ); SettingsBox->addWidget( mCheckHexadecimal, 0, AlignVCenter ); @@ -120,7 +120,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) // Variable bitwidth. Based on Craig Graham's work. // TQLabel *bitLabel = new TQLabel( i18n("Stream length:"), this ); - bitLabel->setAlignment( AlignRight|AlignVCenter ); + bitLabel->tqsetAlignment( AlignRight|AlignVCenter ); mUtilBox->addWidget( bitLabel, 4, 1 ); mBitCombo = new TQComboBox( false, this ); @@ -132,7 +132,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) text += i==0 ? i18n("Bit Window") : i18n("Bits Window"); mBitCombo->insertItem( text ); } - mBitCombo->setMinimumSize( mBitCombo->sizeHint() ); + mBitCombo->setMinimumSize( mBitCombo->tqsizeHint() ); connect( mBitCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bitWidthChanged(int))); mUtilBox->addWidget( mBitCombo, 4, 2 ); @@ -147,7 +147,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name ) mCursorState.valid = false; mViewHexCaps = true; - setMinimumSize( sizeHint() ); + setMinimumSize( tqsizeHint() ); show(); } @@ -192,7 +192,7 @@ void CHexToolWidget::bitWidthChanged( int /*i*/ ) // unsigned long CHexToolWidget::bitValue( SCursorState &state, int n ) { - static const unsigned char bitmask[9] = + static const unsigned char bittqmask[9] = { 0, 1<<7, 3<<6, 7<<5, 15<<4, 31<<3, 63<<2, 127<<1, 255 }; @@ -217,9 +217,9 @@ unsigned long CHexToolWidget::bitValue( SCursorState &state, int n ) int this_time = ((8-bit)>=n)?n:(8-bit); // - // mask to get only the bit's we're swallowing + // tqmask to get only the bit's we're swallowing // - c &= bitmask[this_time]; + c &= bittqmask[this_time]; // // shift down to get bit's in low part of byte @@ -258,7 +258,7 @@ void CHexToolWidget::cursorChanged( SCursorState &state ) // checking for system endianess, using the compiler for the byte interpretation and cutting bloaded code // TODO: add PDP endianess void *P8Bit, *P16Bit, *P32Bit, *P64Bit; - // ensure strict alignment for double as needed on some architectures (e.g. PA-RISC) + // ensure strict tqalignment for double as needed on some architectures (e.g. PA-RISC) typedef union { unsigned char b[8]; double d; } aligned_t; aligned_t Data; if( diff --git a/khexedit/hextoolwidget.h b/khexedit/hextoolwidget.h index 7bb0643..2c2abe5 100644 --- a/khexedit/hextoolwidget.h +++ b/khexedit/hextoolwidget.h @@ -31,12 +31,13 @@ class TQCheckBox; #include "hexbuffer.h" #include <tqframe.h> -class CHexToolWidget : public QFrame +class CHexToolWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CHexToolWidget( TQWidget *parent = 0, const char *name = 0 ); + CHexToolWidget( TQWidget *tqparent = 0, const char *name = 0 ); ~CHexToolWidget( void ); void writeConfiguration( KConfig &config ); diff --git a/khexedit/hexvalidator.cc b/khexedit/hexvalidator.cc index 96cd982..28325a9 100644 --- a/khexedit/hexvalidator.cc +++ b/khexedit/hexvalidator.cc @@ -23,9 +23,9 @@ #include <tqwidget.h> #include "hexvalidator.h" -CHexValidator::CHexValidator( TQWidget *parent, EState state, +CHexValidator::CHexValidator( TQWidget *tqparent, EState state, const char *name ) - :TQValidator( parent, name ) + :TQValidator( TQT_TQOBJECT(tqparent), name ) { setState( state ); } diff --git a/khexedit/hexvalidator.h b/khexedit/hexvalidator.h index 69b6fc1..551bc4f 100644 --- a/khexedit/hexvalidator.h +++ b/khexedit/hexvalidator.h @@ -23,9 +23,10 @@ #include <tqvalidator.h> -class CHexValidator: public QValidator +class CHexValidator: public TQValidator { Q_OBJECT + TQ_OBJECT public: enum EState @@ -38,7 +39,7 @@ class CHexValidator: public QValidator }; public: - CHexValidator( TQWidget *parent, EState state, const char *name = 0 ); + CHexValidator( TQWidget *tqparent, EState state, const char *name = 0 ); ~CHexValidator( void ); TQValidator::State validate( TQString &string, int &pos ) const; void setState( EState state ); diff --git a/khexedit/hexviewwidget.cc b/khexedit/hexviewwidget.cc index 5f3e32c..8cdc1d4 100644 --- a/khexedit/hexviewwidget.cc +++ b/khexedit/hexviewwidget.cc @@ -165,22 +165,22 @@ void CDragManager::setupTimer( void ) // -// This widget will use the entire space of the parent widget +// This widget will use the entire space of the tqparent widget // -CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name, +CHexViewWidget::CHexViewWidget( TQWidget *tqparent, const char *name, CHexBuffer *hexBuffer ) - : TQFrame( parent, name, + : TQFrame( tqparent, name, #ifdef USE_NORTHWEST_GRAVITY - Qt::WStaticContents + TQt::WStaticContents #else 0 #endif ), mScrollBarSize( 16 ) { - if( parent == 0 || hexBuffer == 0 ) { return; } + if( tqparent == 0 || hexBuffer == 0 ) { return; } // - // Qt 2.0: + // TQt 2.0: // ------- // I use the "CScrollBar" because sometimes (very seldom) when I // do a mHorzScroll->hide() the mHorzScroll->isVisible() remains true @@ -193,9 +193,9 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name, // signal whenever is receives a TQHideEvent. // - mVertScroll = new CScrollBar( TQScrollBar::Vertical, this ); + mVertScroll = new CScrollBar( Qt::Vertical, this ); if( mVertScroll == 0 ) { return; } - mHorzScroll = new CScrollBar( TQScrollBar::Horizontal, this ); + mHorzScroll = new CScrollBar( Qt::Horizontal, this ); if( mHorzScroll == 0 ) { return; } mCorner = new TQWidget( this ); if( mCorner == 0 ) { return; } @@ -217,7 +217,7 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name, setFrameStyle( TQFrame::WinPanel|TQFrame::Sunken ); setWFlags( WResizeNoErase ); - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); mHexBuffer = hexBuffer; mHexBuffer->cursorReset(); @@ -233,7 +233,7 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name, setStartY(0); setAcceptDrops(true); - setDropHighlight(false); // Init state + frame shape + setDropHighlight(false); // Init state + frame tqshape setBackgroundColor( mHexBuffer->backgroundColor() ); } @@ -272,7 +272,7 @@ int CHexViewWidget::insertFile( TQFile &file, CProgress &p ) emit dataChanged(); emit cursorChanged( mHexBuffer->cursorState() ); - emit layoutChanged( mLayout ); + emit tqlayoutChanged( mLayout ); return( Err_Success ); } @@ -371,7 +371,7 @@ void CHexViewWidget::setBuffer( CHexBuffer *hexBuffer ) emit cursorChanged( mHexBuffer->cursorState() ); emit fileState( mHexBuffer->fileState() ); emit encodingChanged( mHexBuffer->encoding() ); - emit layoutChanged( mLayout ); + emit tqlayoutChanged( mLayout ); emit inputModeChanged( mHexBuffer->inputMode() ); emit fileName( mHexBuffer->url(), mHexBuffer->hasFileName() ); emit bookmarkChanged( mHexBuffer->bookmarkList() ); @@ -386,7 +386,7 @@ void CHexViewWidget::changeXPos( int p ) setStartX(p); - if( QABS(dx) < width() ) + if( TQABS(dx) < width() ) { scroll( dx, 0, contentsRect() ); } @@ -414,7 +414,7 @@ void CHexViewWidget::changeYPos( int p ) int dy = startY() - p; setStartY(p); - if( QABS( dy ) < height() ) + if( TQABS( dy ) < height() ) { scroll( 0, dy, contentsRect() ); } @@ -438,7 +438,7 @@ void CHexViewWidget::changeYPos( int p ) void CHexViewWidget::clipboardChanged( void ) { - disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()), + disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()), this,TQT_SLOT(clipboardChanged())); unselect(); } @@ -459,7 +459,7 @@ void CHexViewWidget::filter( SFilterControl &fc ) int errCode = mHexBuffer->filter( fc ); if( errCode == Err_Success ) { - repaint(); + tqrepaint(); emit dataChanged(); emit cursorChanged( mHexBuffer->cursorState() ); } @@ -629,7 +629,7 @@ void CHexViewWidget::updateView( bool redraw, bool fixCursor ) tooMuchX += mScrollBarSize; if( horzScrollbarVisible == false && tooMuchX > 0 ) { - // Horizontal scrollbar will be visible after all. + //Qt::Horizontal scrollbar will be visible after all. editHeight -= mScrollBarSize; tooMuchY += mScrollBarSize; } @@ -716,13 +716,13 @@ void CHexViewWidget::setPalette( const TQPalette &p ) } -void CHexViewWidget::setLayout( SDisplayLayout &layout ) +void CHexViewWidget::setLayout( SDisplayLayout &tqlayout ) { - mLayout = layout; + mLayout = tqlayout; mHexBuffer->setLayout( mLayout ); updateWindow(); - emit layoutChanged( mLayout ); + emit tqlayoutChanged( mLayout ); emit cursorChanged( mHexBuffer->cursorState() ); emit textWidth( defaultWidth() ); } @@ -739,7 +739,7 @@ void CHexViewWidget::setCursor( const SDisplayCursor &cursor, bool /*updateDisplay*/ ) { mCursor = cursor; - mHexBuffer->setCursorShapeModifier( cursor.alwaysBlockShape, + mHexBuffer->settqCursorShapeModifier( cursor.alwaysBlockShape, cursor.thickInsertShape ); setupCursorTimer(); redrawFromOffset( mHexBuffer->cursorOffset(), false ); @@ -752,7 +752,7 @@ void CHexViewWidget::setColor( const SDisplayColor &color, mHexBuffer->setColor( mColor ); if( updateDisplay == true ) { - repaint(); + tqrepaint(); } } @@ -796,7 +796,7 @@ int CHexViewWidget::setEncoding( CConversion::EMode mode, CProgress &p ) int errCode = mHexBuffer->setEncoding( mode, p ); if( errCode == Err_Success ) { - repaint(); + tqrepaint(); emit cursorChanged( mHexBuffer->cursorState() ); emit encodingChanged( mHexBuffer->encoding() ); } @@ -964,18 +964,18 @@ void CHexViewWidget::copy( void ) { return; } - disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()), + disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()), this,TQT_SLOT(clipboardChanged())); // - // Note: Do no give the CHexDrag a parent != 0. The clipboard + // Note: Do no give the CHexDrag a tqparent != 0. The clipboard // owns the current dragdata and will destroy it on exit or - // when it receives a new object. If the CHexDrag has a parent - // != 0, the CHexDrag object will be destroyed when the parent + // when it receives a new object. If the CHexDrag has a tqparent + // != 0, the CHexDrag object will be destroyed when the tqparent // is destroyed. We will then have a double destroy situation // when the app. is closed (=> segfault). // - TQApplication::clipboard()->setData(new CHexDrag( buf )); - connect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()), + TQApplication::tqclipboard()->setData(new CHexDrag( buf )); + connect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()), this,TQT_SLOT(clipboardChanged())); } @@ -988,10 +988,10 @@ void CHexViewWidget::copyText( int columnSegment ) return; } - disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()), + disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()), this,TQT_SLOT(clipboardChanged())); - TQApplication::clipboard()->setText( buf.data() ); - connect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()), + TQApplication::tqclipboard()->setText( buf.data() ); + connect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()), this,TQT_SLOT(clipboardChanged())); } @@ -999,7 +999,7 @@ void CHexViewWidget::copyText( int columnSegment ) void CHexViewWidget::paste( void ) { - TQMimeSource *data = TQApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::tqclipboard()->data(); if( data != 0 ) { TQByteArray buf; @@ -1099,11 +1099,11 @@ int CHexViewWidget::bookmarkMenu( const TQString &title ) if( p == 0 ) { continue; } text.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF ); - text.prepend( TQString("[%1] %2: ").arg(i+1).arg(i18n("Offset")) ); + text.prepend( TQString("[%1] %2: ").tqarg(i+1).tqarg(i18n("Offset")) ); popup->insertItem( text, i ); } - TQSize s(popup->sizeHint()); + TQSize s(popup->tqsizeHint()); TQPoint center( (width()-s.width())/2, (height()-s.height())/2 ); int position = popup->exec( mapToGlobal(center) ); delete popup; @@ -1379,7 +1379,7 @@ void CHexViewWidget::drawFrame( TQPainter *p ) // accepts a drop. The setPalette() function causes quite a bit of flicker // in the scrollbars (even when PropagationMode is NoChildren), so I // draw the frame manually when it can accept a drop. Note that the - // code below is for the frame shape "TQFrame::WinPanel|TQFrame::Plain" + // code below is for the frame tqshape "TQFrame::WinPanel|TQFrame::Plain" // if( mDropHighlight == true ) { @@ -1505,7 +1505,7 @@ void CHexViewWidget::keyPressEvent( TQKeyEvent *e ) default: if( (e->text()[0]).isPrint() == true ) { - cursorInput( e->text()[0] ); + cursorInput( TQString(e->text())[0] ); } break; } @@ -1534,7 +1534,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e ) // The RMB popup menu is managed by the KContextMenuManager // - if( e->button() == LeftButton ) + if( e->button() == Qt::LeftButton ) { if( e->state() & ControlButton ) { @@ -1550,7 +1550,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e ) setCursorPosition( e->x(), e->y(), true, cellLevel ); } } - else if( e->button() == MidButton ) + else if( e->button() == Qt::MidButton ) { paste(); } @@ -1559,7 +1559,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e ) void CHexViewWidget::mouseMoveEvent( TQMouseEvent *e ) { - if( e->state() & LeftButton ) + if( e->state() & Qt::LeftButton ) { if( mDragManager->start( e ) == false ) { @@ -1575,7 +1575,7 @@ void CHexViewWidget::mouseReleaseEvent( TQMouseEvent *e ) // The RMB popup menu is managed by the KContextMenuManager // - if( e->button() == LeftButton ) + if( e->button() == Qt::LeftButton ) { if( e->state() & ControlButton ) { @@ -1670,7 +1670,7 @@ void CHexViewWidget::dropEvent( TQDropEvent *e ) { // // This widget can not itself open a file so it will simply pass - // the request to a parent that can (hopefully) do this + // the request to a tqparent that can (hopefully) do this // for( KURL::List::ConstIterator it = list.begin(); it != list.end(); it++ ) { @@ -1860,7 +1860,7 @@ void CHexViewWidget::setCursorPosition(int x, int y, bool init, bool cellLevel) void CHexViewWidget::redrawInterval( uint startOffset, uint stopOffset ) { // - // Can be improved, I repaint the entire line even if the offsets + // Can be improved, I tqrepaint the entire line even if the offsets // only specify one byte. // uint lineStart = mHexBuffer->calculateLine( startOffset ); @@ -1942,7 +1942,7 @@ void CHexViewWidget::paintText( const TQRect &rect, bool expand ) #endif } - if( contentsRect().contains( r ) == false ) + if( contentsRect().tqcontains( r ) == false ) { paintFrame(); if( r.left() < frameWidth() ) { r.setLeft( frameWidth() ); } @@ -2270,7 +2270,7 @@ void CHexViewWidget::setDropHighlight( bool dropHighlight ) // // 2000-01-10 Espen Sand // Highlight. I have reimplemented TQFrame::drawFrame(TQPainter *) - // to support a custom frame color. I assume the frame shape is + // to support a custom frame color. I assume the frame tqshape is // "TQFrame::WinPanel|TQFrame::Plain" in that function. // setFrameStyle( TQFrame::WinPanel|TQFrame::Plain ); diff --git a/khexedit/hexviewwidget.h b/khexedit/hexviewwidget.h index d0050e8..c467e03 100644 --- a/khexedit/hexviewwidget.h +++ b/khexedit/hexviewwidget.h @@ -37,13 +37,14 @@ #include "hexclipboard.h" #include "hexbuffer.h" -class CScrollBar : public QScrollBar +class CScrollBar : public TQScrollBar { Q_OBJECT + TQ_OBJECT public: - CScrollBar( Orientation o, TQWidget *parent, const char *name = 0 ) - : TQScrollBar( o, parent, name ) + CScrollBar( Qt::Orientation o, TQWidget *tqparent, const char *name = 0 ) + : TQScrollBar( o, tqparent, name ) { } @@ -58,9 +59,10 @@ class CScrollBar : public QScrollBar }; -class CDragManager : public QWidget +class CDragManager : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum EDragActivateMode @@ -95,12 +97,13 @@ class CDragManager : public QWidget -class CHexViewWidget : public QFrame +class CHexViewWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CHexViewWidget( TQWidget *parent, const char *name, CHexBuffer *hexBuffer ); + CHexViewWidget( TQWidget *tqparent, const char *name, CHexBuffer *hexBuffer ); ~CHexViewWidget( void ); inline bool widgetValid( void ); @@ -137,7 +140,7 @@ class CHexViewWidget : public QFrame virtual void setPalette( const TQPalette & ); void setInputMode( SDisplayInputMode &mode ); - void setLayout( SDisplayLayout &layout ); + void setLayout( SDisplayLayout &tqlayout ); void setCursor( const SDisplayCursor &cursor, bool updateDisplay ); void setColor( const SDisplayColor &color, bool updateDisplay ); void setFont( const SDisplayFontInfo &fontInfo, bool updateDisplay ); @@ -215,7 +218,7 @@ class CHexViewWidget : public QFrame void cursorChanged( SCursorState &state ); void fileState( SFileState &state ); void dataChanged( void ); - void layoutChanged( const SDisplayLayout &layout ); + void tqlayoutChanged( const SDisplayLayout &tqlayout ); void inputModeChanged( const SDisplayInputMode &mode ); void bookmarkChanged( TQPtrList<SCursorOffset> &list ); void editMode( CHexBuffer::EEditMode editMode ); diff --git a/khexedit/lib/codecs/kbinarybytecodec.cpp b/khexedit/lib/codecs/kbinarybytecodec.cpp index a49a460..fc9fe8d 100644 --- a/khexedit/lib/codecs/kbinarybytecodec.cpp +++ b/khexedit/lib/codecs/kbinarybytecodec.cpp @@ -24,7 +24,7 @@ using namespace KHE; void KBinaryByteCodec::encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const { for( unsigned char M=1<<7; M>0; M>>=1 ) - Digits.at(Pos++) = (Char & M) ? '1' : '0'; + Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; } void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const @@ -36,7 +36,7 @@ void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned break; // now set the for( ; M>0; M>>=1 ) - Digits.at(Pos++) = (Char & M) ? '1' : '0'; + Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; } diff --git a/khexedit/lib/codecs/kbytecodec.cpp b/khexedit/lib/codecs/kbytecodec.cpp index f4847ba..900055e 100644 --- a/khexedit/lib/codecs/kbytecodec.cpp +++ b/khexedit/lib/codecs/kbytecodec.cpp @@ -40,7 +40,7 @@ KByteCodec *KByteCodec::createCodec( KCoding C ) unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const { - //kdDebug() << TQString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl; + //kdDebug() << TQString("KByteCodec::decode(%1,%2)").tqarg(Digits).tqarg(Pos) << endl; const uint P = Pos; // remove leading 0s @@ -50,7 +50,7 @@ unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, ui unsigned int d = encodingWidth(); do { - if( !appendDigit(&C,Digits.at(Pos)) ) + if( !appendDigit(&C,Digits.tqat(Pos)) ) break; ++Pos; diff --git a/khexedit/lib/codecs/kcharcodec.cpp b/khexedit/lib/codecs/kcharcodec.cpp index 1aab79b..dea28c1 100644 --- a/khexedit/lib/codecs/kcharcodec.cpp +++ b/khexedit/lib/codecs/kcharcodec.cpp @@ -42,7 +42,7 @@ KCharCodec *KCharCodec::createCodec( const TQString &Name ) { KCharCodec *Codec = 0; - if( KTextCharCodec::codecNames().findIndex(Name) != -1 ) + if( KTextCharCodec::codecNames().tqfindIndex(Name) != -1 ) Codec = KTextCharCodec::createCodec( Name ); else if( KEBCDIC1047CharCodec::codecName() == Name ) Codec = KEBCDIC1047CharCodec::create(); diff --git a/khexedit/lib/codecs/kdecimalbytecodec.cpp b/khexedit/lib/codecs/kdecimalbytecodec.cpp index c556875..065eb81 100644 --- a/khexedit/lib/codecs/kdecimalbytecodec.cpp +++ b/khexedit/lib/codecs/kdecimalbytecodec.cpp @@ -24,12 +24,12 @@ using namespace KHE; void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { unsigned char C = Char / 100; - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 100; C = Char / 10; - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 10; - Digits.at(Pos) = '0'+Char; + Digits.tqat(Pos) = '0'+Char; } @@ -38,15 +38,15 @@ void KDecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigne unsigned char C; if( (C = Char / 100) ) { - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 100; } if( (C = Char / 10) ) { - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; Char -= C * 10; } - Digits.at(Pos) = '0'+Char; + Digits.tqat(Pos) = '0'+Char; } diff --git a/khexedit/lib/codecs/kebcdic1047charcodec.cpp b/khexedit/lib/codecs/kebcdic1047charcodec.cpp index d1002c3..2e91035 100644 --- a/khexedit/lib/codecs/kebcdic1047charcodec.cpp +++ b/khexedit/lib/codecs/kebcdic1047charcodec.cpp @@ -21,7 +21,7 @@ using namespace KHE; -static Q_UINT16 UnicodeChars[256] = +static TQ_UINT16 UnicodeChars[256] = { 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F, 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, @@ -98,7 +98,7 @@ static const char KEBCDIC1047CharCodecName[] = "EBCDIC 1047"; bool KEBCDIC1047CharCodec::encode( char *D, const TQChar &C ) const { - int I = C.unicode(); + int I = C.tqunicode(); // not in range? if( 0x00FF < I ) return false; @@ -119,6 +119,6 @@ const TQString& KEBCDIC1047CharCodec::name() const const TQString& KEBCDIC1047CharCodec::codecName() { - static const TQString Name( TQString::fromLatin1(KEBCDIC1047CharCodecName) ); + static const TQString Name( TQString::tqfromLatin1(KEBCDIC1047CharCodecName) ); return Name; } diff --git a/khexedit/lib/codecs/khexadecimalbytecodec.cpp b/khexedit/lib/codecs/khexadecimalbytecodec.cpp index 596fd24..46abdad 100644 --- a/khexedit/lib/codecs/khexadecimalbytecodec.cpp +++ b/khexedit/lib/codecs/khexadecimalbytecodec.cpp @@ -41,16 +41,16 @@ bool KHexadecimalByteCodec::smallDigits() const { return Digit != BigDigit; } void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { - Digits.at(Pos++) = Digit[Char>>4]; - Digits.at(Pos) = Digit[Char&0x0F]; + Digits.tqat(Pos++) = Digit[Char>>4]; + Digits.tqat(Pos) = Digit[Char&0x0F]; } void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const { unsigned char C; if( (C = (Char>>4)) ) - Digits.at(Pos++) = Digit[C]; - Digits.at(Pos) = Digit[Char&0x0F]; + Digits.tqat(Pos++) = Digit[C]; + Digits.tqat(Pos) = Digit[Char&0x0F]; } diff --git a/khexedit/lib/codecs/koctalbytecodec.cpp b/khexedit/lib/codecs/koctalbytecodec.cpp index 44c7952..7aa156d 100644 --- a/khexedit/lib/codecs/koctalbytecodec.cpp +++ b/khexedit/lib/codecs/koctalbytecodec.cpp @@ -23,9 +23,9 @@ using namespace KHE; void KOctalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const { - Digits.at(Pos++) = '0'+(Char>>6); - Digits.at(Pos++) = '0'+((Char>>3)&0x07); - Digits.at(Pos) = '0'+((Char) &0x07); + Digits.tqat(Pos++) = '0'+(Char>>6); + Digits.tqat(Pos++) = '0'+((Char>>3)&0x07); + Digits.tqat(Pos) = '0'+((Char) &0x07); } @@ -33,10 +33,10 @@ void KOctalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned { unsigned char C; if( (C = (Char>>6)&0x07) ) - Digits.at(Pos++) = '0'+C; + Digits.tqat(Pos++) = '0'+C; if( (C = (Char>>3)&0x07) ) - Digits.at(Pos++) = '0'+C; - Digits.at(Pos) = '0'+((Char)&0x07); + Digits.tqat(Pos++) = '0'+C; + Digits.tqat(Pos) = '0'+((Char)&0x07); } diff --git a/khexedit/lib/codecs/ktextcharcodec.cpp b/khexedit/lib/codecs/ktextcharcodec.cpp index a9014dd..f5bcc65 100644 --- a/khexedit/lib/codecs/ktextcharcodec.cpp +++ b/khexedit/lib/codecs/ktextcharcodec.cpp @@ -27,7 +27,7 @@ using namespace KHE; -static const char QTextCodecWhiteSpace = 63; +static const char TQTextCodecWhiteSpace = 63; static struct KEncodingNames { KEncoding Encoding; @@ -106,7 +106,7 @@ static bool is8Bit( TQTextCodec *Codec ) Length = 1; CS = Codec->fromUnicode( S, Length ); //kdDebug() << Codec->name() << " "<<c[0]<<"->"<<CS[0]<<":"<<Length << endl; - if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != QTextCodecWhiteSpace) ) + if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != TQTextCodecWhiteSpace) ) { Result = false; break; @@ -127,7 +127,7 @@ const TQStringList &KTextCharCodec::codecNames() bool Found = true; TQTextCodec* Codec = KGlobal::charsets()->codecForName( *it, Found ); if( Found && is8Bit(Codec) ) - CodecNames.append( TQString::fromLatin1(Codec->name()) ); + CodecNames.append( TQString::tqfromLatin1(Codec->name()) ); } } @@ -150,7 +150,7 @@ TQString KTextCharCodec::nameOfEncoding( KEncoding C ) if( N != 0 ) { - TQString CodeName = TQString::fromLatin1( N ); + TQString CodeName = TQString::tqfromLatin1( N ); } return Codec; } @@ -186,10 +186,10 @@ const TQStringList &KTextCharCodec::codecNames() for( unsigned int i=0; i<NoOfEncodings; ++i ) { bool Found = true; - TQString Name = TQString::fromLatin1( EncodingNames[i].Name ); + TQString Name = TQString::tqfromLatin1( EncodingNames[i].Name ); TQTextCodec* Codec = KGlobal::charsets()->codecForName( Name, Found ); if( Found ) - CodecNames.append( TQString::fromLatin1(Codec->name()) ); + CodecNames.append( TQString::tqfromLatin1(Codec->name()) ); } } @@ -231,6 +231,6 @@ KHEChar KTextCharCodec::decode( char Byte ) const const TQString& KTextCharCodec::name() const { if( Name.isNull() ) - Name = TQString::fromLatin1( Codec->name() ); + Name = TQString::tqfromLatin1( Codec->name() ); return Name; } diff --git a/khexedit/lib/codecs/ktextcharcodec.h b/khexedit/lib/codecs/ktextcharcodec.h index 8d834ea..05a40ab 100644 --- a/khexedit/lib/codecs/ktextcharcodec.h +++ b/khexedit/lib/codecs/ktextcharcodec.h @@ -51,9 +51,9 @@ class KTextCharCodec : public KCharCodec protected: TQTextCodec *Codec; - /** decodes the chars to unicode */ + /** decodes the chars to tqunicode */ TQTextDecoder *Decoder; - /** encodes the chars from unicode */ + /** encodes the chars from tqunicode */ TQTextEncoder *Encoder; /** */ mutable TQString Name; diff --git a/khexedit/lib/controller/kchareditor.cpp b/khexedit/lib/controller/kchareditor.cpp index 7225ec7..9f58245 100644 --- a/khexedit/lib/controller/kchareditor.cpp +++ b/khexedit/lib/controller/kchareditor.cpp @@ -39,9 +39,9 @@ bool KCharEditor::handleKeyPress( TQKeyEvent *KeyEvent ) bool KeyUsed = false; // some input that should be inserted? if( KeyEvent->text().length() > 0 - && !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) + && !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) ) { - TQChar C = KeyEvent->text()[0]; + TQChar C = TQString(KeyEvent->text())[0]; if( C.isPrint() ) { TQByteArray D( 1 ); diff --git a/khexedit/lib/controller/keditor.cpp b/khexedit/lib/controller/keditor.cpp index 5678b09..02b9129 100644 --- a/khexedit/lib/controller/keditor.cpp +++ b/khexedit/lib/controller/keditor.cpp @@ -38,9 +38,9 @@ KEditor::KEditor( KBufferCursor *BC, KHexEdit* HE, KController *P ) bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) { bool clearUndoRedoInfo = true; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; - bool ControlPressed = KeyEvent->state() & Qt::ControlButton; - bool AltPressed = KeyEvent->state() & Qt::AltButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; + bool ControlPressed = KeyEvent->state() & TQt::ControlButton; + bool AltPressed = KeyEvent->state() & TQt::AltButton; bool KeyUsed = true; // we only care for cursor keys and the like, won't hardcode any other keys @@ -49,7 +49,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) // in each command anyway switch( KeyEvent->key() ) { - case Qt::Key_Delete: + case TQt::Key_Delete: if( ShiftPressed ) HexEdit->cut(); else if( HexEdit->BufferRanges->hasSelection() ) @@ -61,7 +61,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) } break; - case Qt::Key_Insert: + case TQt::Key_Insert: if( ShiftPressed ) HexEdit->paste(); else if( ControlPressed ) @@ -70,7 +70,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) HexEdit->setOverwriteMode( !HexEdit->OverWrite ); break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if( AltPressed ) { if( ControlPressed ) @@ -95,13 +95,13 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent ) doEditAction( ControlPressed ? WordBackspace : CharBackspace ); clearUndoRedoInfo = false; break; - case Qt::Key_F16: // "Copy" key on Sun keyboards + case TQt::Key_F16: // "Copy" key on Sun keyboards HexEdit->copy(); break; - case Qt::Key_F18: // "Paste" key on Sun keyboards + case TQt::Key_F18: // "Paste" key on Sun keyboards HexEdit->paste(); break; - case Qt::Key_F20: // "Cut" key on Sun keyboards + case TQt::Key_F20: // "Cut" key on Sun keyboards HexEdit->cut(); break; @@ -187,7 +187,7 @@ void KEditor::doEditAction( KEditAction Action ) } } - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); diff --git a/khexedit/lib/controller/knavigator.cpp b/khexedit/lib/controller/knavigator.cpp index d865d12..3258ce9 100644 --- a/khexedit/lib/controller/knavigator.cpp +++ b/khexedit/lib/controller/knavigator.cpp @@ -39,8 +39,8 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent ) bool KeyUsed = true; //bool clearUndoRedoInfo = true; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; - bool ControlPressed = KeyEvent->state() & Qt::ControlButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; + bool ControlPressed = KeyEvent->state() & TQt::ControlButton; //bool AltPressed = KeyEvent->state() & AltButton; // we only care for cursor keys and the like, won't hardcode any other keys @@ -49,28 +49,28 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent ) // in each command anyway switch( KeyEvent->key() ) { - case Qt::Key_Left: + case TQt::Key_Left: moveCursor( ControlPressed ? MoveWordBackward : MoveBackward, ShiftPressed ); break; - case Qt::Key_Right: + case TQt::Key_Right: moveCursor( ControlPressed ? MoveWordForward : MoveForward, ShiftPressed ); break; - case Qt::Key_Up: + case TQt::Key_Up: moveCursor( ControlPressed ? MovePgUp : MoveUp, ShiftPressed ); break; - case Qt::Key_Down: + case TQt::Key_Down: moveCursor( ControlPressed ? MovePgDown : MoveDown, ShiftPressed ); break; - case Qt::Key_Home: + case TQt::Key_Home: moveCursor( ControlPressed ? MoveHome : MoveLineStart, ShiftPressed ); break; - case Qt::Key_End: + case TQt::Key_End: moveCursor( ControlPressed ? MoveEnd : MoveLineEnd, ShiftPressed ); break; - case Qt::Key_Prior: + case TQt::Key_Prior: moveCursor( MovePgUp, ShiftPressed ); break; - case Qt::Key_Next: + case TQt::Key_Next: moveCursor( MovePgDown, ShiftPressed ); break; @@ -127,7 +127,7 @@ void KNavigator::moveCursor( KMoveAction Action, bool Select ) if( Select ) BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); diff --git a/khexedit/lib/controller/ktabcontroller.cpp b/khexedit/lib/controller/ktabcontroller.cpp index 0531b2c..401be04 100644 --- a/khexedit/lib/controller/ktabcontroller.cpp +++ b/khexedit/lib/controller/ktabcontroller.cpp @@ -37,9 +37,9 @@ bool KTabController::handleKeyPress( TQKeyEvent *KeyEvent ) { bool KeyUsed = false; - bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton; + bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton; - if( KeyEvent->key() == Qt::Key_Tab ) + if( KeyEvent->key() == TQt::Key_Tab ) { // are we in the char column? if( HexEdit->cursorColumn() == KHexEdit::CharColumnId ) diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp index 3bf4c9b..4f32789 100644 --- a/khexedit/lib/controller/kvalueeditor.cpp +++ b/khexedit/lib/controller/kvalueeditor.cpp @@ -46,29 +46,29 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) // switch( KeyEvent->key() ) { - case Qt::Key_Plus: + case TQt::Key_Plus: doValueEditAction( IncValue ); break; - case Qt::Key_Minus: + case TQt::Key_Minus: doValueEditAction( DecValue ); break; - case Qt::Key_Space: + case TQt::Key_Space: if( !InEditMode ) { KeyUsed = false; break; } - case Qt::Key_Enter: - case Qt::Key_Return: + case TQt::Key_Enter: + case TQt::Key_Return: doValueEditAction( InEditMode?LeaveValue:EnterValue ); break; - case Qt::Key_Escape: + case TQt::Key_Escape: if( InEditMode ) doValueEditAction( CancelValue ); else KeyUsed = false; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if( InEditMode ) doValueEditAction( ValueBackspace ); else @@ -77,9 +77,9 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) default: // is plain char? if( KeyEvent->text().length() > 0 - && ( !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) ) + && ( !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) ) ) { - TQChar C = KeyEvent->text()[0]; + TQChar C = TQString(KeyEvent->text())[0]; // no usable char? if( !C.isLetterOrNumber() ) { @@ -115,7 +115,7 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent ) BufferCursor->gotoRealIndex(); KSection ChangedRange( Index,HexEdit->DataBuffer->size()-1 ); HexEdit->BufferRanges->addChangedRange( ChangedRange ); - HexEdit->repaintChanged(); + HexEdit->tqrepaintChanged(); HexEdit->ensureCursorVisible(); HexEdit->unpauseCursor(); HexEdit->updateCursor(); @@ -207,7 +207,7 @@ void KValueEditor::doValueEditAction( KValueEditAction Action, int Input ) EditValue = NewValue; ByteCodec->encode( ByteBuffer, 0, EditValue ); - HexEdit->DataBuffer->replace( Index, 1, (char*)&EditValue, 1 ); + HexEdit->DataBuffer->tqreplace( Index, 1, (char*)&EditValue, 1 ); } HexEdit->updateCursor(); diff --git a/khexedit/lib/helper.h b/khexedit/lib/helper.h index 5f2b009..5fa746f 100644 --- a/khexedit/lib/helper.h +++ b/khexedit/lib/helper.h @@ -25,7 +25,7 @@ // temporary solution until syntax highlighting is implemented static inline TQColor colorForChar( const KHE::KHEChar Byte ) { - return Byte.isUndefined() ? Qt::yellow : Byte.isPunct() ? Qt::red : Byte.isPrint() ? Qt::black : Qt::blue; + return Byte.isUndefined() ? TQt::yellow : Byte.isPunct() ? TQt::red : Byte.isPrint() ? TQt::black : TQt::blue; } #endif diff --git a/khexedit/lib/kbigbuffer.cpp b/khexedit/lib/kbigbuffer.cpp index 99925da..08be888 100644 --- a/khexedit/lib/kbigbuffer.cpp +++ b/khexedit/lib/kbigbuffer.cpp @@ -83,7 +83,7 @@ int KBigBuffer::remove( KSection /*Section*/ ) return 0; } -unsigned int KBigBuffer::replace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) +unsigned int KBigBuffer::tqreplace( KSection /*Section*/, const char*, unsigned int /*Length*/ ) { return 0; } @@ -95,8 +95,8 @@ int KBigBuffer::fill( char /*FillChar*/, int /*Length*/, unsigned int /*Pos*/ ) int KBigBuffer::move( int /*DestPos*/, KSection /*SourceSection*/ ) { return 0; } -//int KBigBuffer::find( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } -int KBigBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +//int KBigBuffer::tqfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } +int KBigBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kbigbuffer.h b/khexedit/lib/kbigbuffer.h index 63e6ec4..b4461ab 100644 --- a/khexedit/lib/kbigbuffer.h +++ b/khexedit/lib/kbigbuffer.h @@ -52,18 +52,18 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int replace( KSection S, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection S, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int find( const char*, int Length, int Pos = 0 ) const; - virtual int find( const char*KeyData, int Length, KSection Section ) const; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kbordercolumn.cpp b/khexedit/lib/kbordercolumn.cpp index d23bfea..170f972 100644 --- a/khexedit/lib/kbordercolumn.cpp +++ b/khexedit/lib/kbordercolumn.cpp @@ -49,8 +49,8 @@ void KBorderColumn::paintLine( TQPainter *P ) if( Middle ) { - int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View ); - P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() ); + int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View ); + P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() ); P->drawLine( LineX, 0, LineX, LineHeight-1 ) ; } } @@ -75,8 +75,8 @@ void KBorderColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys ) KPixelX LX = x() + LineX; if( Middle && Xs.includes(LX) ) { - int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View ); - P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() ); + int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View ); + P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() ); P->drawLine( LX, Ys.start(), LX, Ys.end() ) ; } } diff --git a/khexedit/lib/kbuffercoltextexport.cpp b/khexedit/lib/kbuffercoltextexport.cpp index 142504c..9ee6f77 100644 --- a/khexedit/lib/kbuffercoltextexport.cpp +++ b/khexedit/lib/kbuffercoltextexport.cpp @@ -38,7 +38,7 @@ KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, c : Data( D ), CoordRange( CR ) { - NoOfBytesPerLine = BufferColumn->layout()->noOfBytesPerLine(); + NoOfBytesPerLine = BufferColumn->tqlayout()->noOfBytesPerLine(); Pos = new int[NoOfBytesPerLine]; // TODO: remove this hack and make it more general diff --git a/khexedit/lib/kbuffercolumn.cpp b/khexedit/lib/kbuffercolumn.cpp index d4f58d9..1d26bf0 100644 --- a/khexedit/lib/kbuffercolumn.cpp +++ b/khexedit/lib/kbuffercolumn.cpp @@ -185,7 +185,7 @@ void KBufferColumn::recalcByteWidth() void KBufferColumn::recalcVerticalGridX() { - VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2; + VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2; } @@ -395,7 +395,7 @@ void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be remove void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); // clear background unsigned int BlankFlag = (Pos.start()!=0?StartsBefore:0) | (Pos.end()!=LastPos?EndsLater:0); @@ -427,13 +427,13 @@ void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos ) // falls Marking nicht mehr gebuffert und noch zu erwarten if( HasMarking && Marking.endsBefore(IndizesPart.start()) ) { - // erhebe nächste Markierung im Bereich + // erhebe n�chste Markierung im Bereich HasMarking = isMarked( IndizesPart, &Marking, &MarkingFlag ); } // falls Selection nicht mehr gebuffert und noch zu erwarten if( HasSelection && Selection.endsBefore(IndizesPart.start()) ) { - // erhebe nächste Selection im Bereich + // erhebe n�chste Selection im Bereich HasSelection = isSelected( IndizesPart, &Selection, &SelectionFlag ); } @@ -501,7 +501,7 @@ void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index ) void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); paintRange( P, CG.highlight(), Positions, Flag ); @@ -524,7 +524,7 @@ void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag ) { - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); paintRange( P, CG.text(), Positions, Flag ); @@ -549,7 +549,7 @@ void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, i void KBufferColumn::paintGrid( TQPainter *P, KSection Range ) { int st = 0; // counter for spacing triggering - P->setPen( Qt::black ); + P->setPen( TQt::black ); // paint all the bytes affected for( int p=Range.start(); p<=Range.end(); ++p,++st ) { @@ -560,7 +560,7 @@ void KBufferColumn::paintGrid( TQPainter *P, KSection Range ) // spacing behind byte and vertical grid enabled? if( st == SpacingTrigger && p != LastPos ) - P->drawLine( VerticalGridX, 0, VerticalGridX, LineHeight-1 ) ; + P->drawLine(VerticalGridX, 0,VerticalGridX, LineHeight-1 ) ; P->translate( -x, 0 ); } @@ -572,7 +572,7 @@ void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Pos KPixelX RangeX = Flag & StartsBefore ? relRightXOfPos( Positions.start()-1 ) + 1 : relXOfPos( Positions.start() ); KPixelX RangeW = (Flag & EndsLater ? relXOfPos( Positions.end()+1 ): relRightXOfPos( Positions.end() ) + 1) - RangeX; - P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,Qt::SolidPattern) ); + P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,TQt::SolidPattern) ); } @@ -581,9 +581,9 @@ void KBufferColumn::paintByte( TQPainter *P, int Index ) char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte; KHEChar B = Codec->decode( Byte ); - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); TQColor Color = CG.text(); - TQBrush Brush( CG.base(), Qt::SolidPattern ); + TQBrush Brush( CG.base(), TQt::SolidPattern ); if( Index > -1 ) { @@ -631,14 +631,14 @@ void KBufferColumn::paintCursor( TQPainter *P, int Index ) { char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte; KHEChar B = Codec->decode( Byte ); - P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) ); + P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) ); } void KBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const { P->setPen( Color ); - P->drawText( 0, DigitBaseLine, B ); + P->drawText( 0, DigitBaseLine, TQString(B) ); } diff --git a/khexedit/lib/kbuffercolumn.h b/khexedit/lib/kbuffercolumn.h index 10e930d..47f21d1 100644 --- a/khexedit/lib/kbuffercolumn.h +++ b/khexedit/lib/kbuffercolumn.h @@ -39,7 +39,7 @@ class KCharCodec; const int NoByteFound = -1; /** base class of all buffer column displayers - * holds all information about the vertical layout of a buffer column + * holds all information about the vertical tqlayout of a buffer column * knows how to paint the data and the editing things (focus, cursor, selection) * but does not offer * @@ -154,7 +154,7 @@ class KBufferColumn : public KColumn int firstPos() const; int lastPos() const; KSection visiblePositions() const; - const KBufferLayout *layout() const; + const KBufferLayout *tqlayout() const; KCharCodec* codec() const; protected: @@ -184,7 +184,7 @@ class KBufferColumn : public KColumn protected: /** pointer to the buffer */ KDataBuffer *Buffer; - /** pointer to the layout */ + /** pointer to the tqlayout */ const KBufferLayout *Layout; /** pointer to the ranges */ KBufferRanges *Ranges; @@ -242,7 +242,7 @@ inline int KBufferColumn::firstPos() const { return PaintPositions.start(); } inline int KBufferColumn::lastPos() const { return PaintPositions.end(); } inline KSection KBufferColumn::visiblePositions() const { return PaintPositions; } -inline const KBufferLayout *KBufferColumn::layout() const { return Layout; } +inline const KBufferLayout *KBufferColumn::tqlayout() const { return Layout; } inline void KBufferColumn::setCodec( KCharCodec *C ) { Codec = C; } diff --git a/khexedit/lib/kbuffercursor.h b/khexedit/lib/kbuffercursor.h index 855b3e8..93205cc 100644 --- a/khexedit/lib/kbuffercursor.h +++ b/khexedit/lib/kbuffercursor.h @@ -27,10 +27,10 @@ namespace KHE class KBufferLayout; -/**@short navigates through the buffer in an abstract way, based on the layout +/**@short navigates through the buffer in an abstract way, based on the tqlayout * * The cursor is allowed to access every coord that has content as - * described in the layout. It holds the coord of the actual position + * described in the tqlayout. It holds the coord of the actual position * and the according index in the data array. * * To enable the cursor to be placed behind the last position in a line @@ -138,7 +138,7 @@ class KBufferCursor void stepToEnd(); private: - /** layout, tells how the column is organized */ + /** tqlayout, tells how the column is organized */ const KBufferLayout *Layout; /** Position in buffer */ @@ -151,7 +151,7 @@ class KBufferCursor */ bool Behind : 1; - /** tells whether there could be a position behind the end of the layout */ + /** tells whether there could be a position behind the end of the tqlayout */ bool AppendPosEnabled : 1; }; diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp index 3fb3cff..8fa1973 100644 --- a/khexedit/lib/kbufferdrag.cpp +++ b/khexedit/lib/kbufferdrag.cpp @@ -50,7 +50,7 @@ static const char *localTextPlain() TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower(); // remove the whitespaces int s; - while( (s=TextPlainLocal.find(' ')) >= 0 ) + while( (s=TextPlainLocal.tqfind(' ')) >= 0 ) TextPlainLocal.remove( s, 1 ); TextPlainLocal.prepend( TextPlainLocalStub ); @@ -62,12 +62,12 @@ static const char *localTextPlain() // tries to create a codec by the given charset description static TQTextCodec* codecForCharset( const TQCString& Desc ) { - int i = Desc.find( "charset=" ); + int i = Desc.tqfind( "charset=" ); if( i >= 0 ) { TQCString CharSetName = Desc.mid( i+8 ); // remove any further attributes - if( (i=CharSetName.find( ';' )) >= 0 ) + if( (i=CharSetName.tqfind( ';' )) >= 0 ) CharSetName = CharSetName.left( i ); // try to find codec @@ -135,7 +135,7 @@ const char *KBufferDrag::format( int i ) const } -TQByteArray KBufferDrag::encodedData( const char *Format ) const +TQByteArray KBufferDrag::tqencodedData( const char *Format ) const { if( Format != 0 ) { @@ -144,7 +144,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const return( Data ); // plain text wanted? - if( qstrncmp(Format,TextPlain,10) == 0 ) + if( tqstrncmp(Format,TextPlain,10) == 0 ) { TQCString Output; TQTextCodec *TextCodec = codecForCharset( TQCString(Format).lower() ); @@ -166,7 +166,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const { KHEChar B = CharCodec->decode( Data[i] ); - Text.at(i) = B.isUndefined() ? KHEChar(UndefinedChar) : + Text.tqat(i) = B.isUndefined() ? KHEChar(UndefinedChar) : (!B.isPrint() && B != Tab && B != Return ) ? KHEChar(SubstituteChar) : B; } // clean up @@ -224,12 +224,12 @@ bool KBufferDrag::canDecode( const TQMimeSource* Source ) bool KBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest ) { -// Dest = Source->encodedData( MediaString ); +// Dest = Source->tqencodedData( MediaString ); // return Dest.size() != 0; bool CanDecode = Source->provides( OctetStream ); if( CanDecode ) - Dest = Source->encodedData( OctetStream ); + Dest = Source->tqencodedData( OctetStream ); return CanDecode; } diff --git a/khexedit/lib/kbufferdrag.h b/khexedit/lib/kbufferdrag.h index d04bca6..effd9a2 100644 --- a/khexedit/lib/kbufferdrag.h +++ b/khexedit/lib/kbufferdrag.h @@ -37,9 +37,10 @@ typedef KColTextExport* KColTextExportPtr; /** *@author Friedrich W. H. Kossebau */ -class KBufferDrag : public QDragObject +class KBufferDrag : public TQDragObject { Q_OBJECT + TQ_OBJECT public: // TODO: make this call somewhat more generic @@ -51,7 +52,7 @@ class KBufferDrag : public QDragObject public: // TQDragObject API virtual const char *format( int i ) const; - virtual TQByteArray encodedData( const char* ) const; + virtual TQByteArray tqencodedData( const char* ) const; public: virtual void setData( const TQByteArray &); diff --git a/khexedit/lib/kbufferlayout.h b/khexedit/lib/kbufferlayout.h index c243225..bd92005 100644 --- a/khexedit/lib/kbufferlayout.h +++ b/khexedit/lib/kbufferlayout.h @@ -24,7 +24,7 @@ namespace KHE { -/**@short the logical layout of a plain buffer view +/**@short the logical tqlayout of a plain buffer view * * Given the values for * * length of the buffer, @@ -38,7 +38,7 @@ namespace KHE { * * final position in this line, and * * the total number of lines (is final line +1 or 0) * - * This layout sees the buffer as a continous stream of byte, + * This tqlayout sees the buffer as a continous stream of byte, * thus uses each line after the start from the begin to the end. * * If the buffer is empty the end coord will be set one pos left to the start coord @@ -75,7 +75,7 @@ class KBufferLayout /** returns the coord of the end */ KBufferCoord final() const; - /** tells how much lines this layout needs (incl. blank leading lines due to StartOffset) */ + /** tells how much lines this tqlayout needs (incl. blank leading lines due to StartOffset) */ int noOfLines() const; diff --git a/khexedit/lib/kbufferranges.h b/khexedit/lib/kbufferranges.h index ed2cbce..6b293b2 100644 --- a/khexedit/lib/kbufferranges.h +++ b/khexedit/lib/kbufferranges.h @@ -28,7 +28,7 @@ namespace KHE { /** a class to control all the ranges like marking and selections - * holds also all modified ranges and merges them so a repaint can take its info from here + * holds also all modified ranges and merges them so a tqrepaint can take its info from here * * @author Friedrich W. H. Kossebau */ diff --git a/khexedit/lib/kbytesedit.cpp b/khexedit/lib/kbytesedit.cpp index 3eb49bd..db4b193 100644 --- a/khexedit/lib/kbytesedit.cpp +++ b/khexedit/lib/kbytesedit.cpp @@ -129,7 +129,7 @@ void KBytesEdit::setKeepsMemory( bool KM ) bool KBytesEdit::isAutoDelete() const { return AutoDelete; } -void KBytesEdit::repaintRange( int i1, int i2 ) +void KBytesEdit::tqrepaintRange( int i1, int i2 ) { bool ChangeCursor = !(CursorPaused) && KSection(i1,i2).includes( BufferCursor->index() ); if( ChangeCursor ) @@ -137,7 +137,7 @@ void KBytesEdit::repaintRange( int i1, int i2 ) BufferRanges->addChangedRange( i1, i2 ); - repaintChanged(); + tqrepaintChanged(); if( ChangeCursor ) unpauseCursor(); diff --git a/khexedit/lib/kbytesedit.h b/khexedit/lib/kbytesedit.h index e57d73a..884f565 100644 --- a/khexedit/lib/kbytesedit.h +++ b/khexedit/lib/kbytesedit.h @@ -36,10 +36,10 @@ class KBytesEditPrivate; * * 1. used as viewer * a) static data ranges -> no changes for data pointer and length - * possible changes are told to the widget by repaintRange + * possible changes are told to the widget by tqrepaintRange * b) changing data ranges -> data pointer and length might change * changes told by - * * resetData( char *, int size, bool repaint ); + * * resetData( char *, int size, bool tqrepaint ); * * * 2. used as editor * a) static data ranges @@ -57,10 +57,11 @@ class KBytesEditPrivate; class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit { Q_OBJECT + TQ_OBJECT //_PROPERTY( char * Data READ data ) - Q_PROPERTY( int DataSize READ dataSize ) - Q_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize ) - Q_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false ) + TQ_PROPERTY( int DataSize READ dataSize ) + TQ_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize ) + TQ_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false ) public: @@ -69,7 +70,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit * @param S size of used memory * @param RS_ real size of the memory * @param KM keep the memory on resize (RS_ is then the maximum size) - * @param Parent parent widget + * @param Parent tqparent widget * @param Name name for this widget * @param F flags */ @@ -136,8 +137,8 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit */ void setKeepsMemory( bool KM = true ); - /** repaint the indizes from i1 to i2 */ - void repaintRange( int i1, int i2 ); + /** tqrepaint the indizes from i1 to i2 */ + void tqrepaintRange( int i1, int i2 ); protected: /** deletes the databuffer */ diff --git a/khexedit/lib/kcolumnsview.cpp b/khexedit/lib/kcolumnsview.cpp index c855b51..90fa10c 100644 --- a/khexedit/lib/kcolumnsview.cpp +++ b/khexedit/lib/kcolumnsview.cpp @@ -129,10 +129,10 @@ void KColumnsView::updateView() } -void KColumnsView::repaintView() +void KColumnsView::tqrepaintView() { resizeContents( totalWidth(), totalHeight() ); - repaintContents( false ); + tqrepaintContents( false ); } @@ -167,7 +167,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch ) if( AffectedLines.isValid() ) { TQPainter Paint; - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( const_cast<TQPixmap*>(&LineBuffer), this ); // starting painting with the first line KColumn *C = RedrawColumns.first(); @@ -198,7 +198,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch ) break; // to avoid flickers we first paint to the linebuffer - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( TQT_TQPAINTDEVICE(&LineBuffer), this ); KColumn *C = RedrawColumns.first(); Paint.translate( C->x(), 0 ); diff --git a/khexedit/lib/kcolumnsview.h b/khexedit/lib/kcolumnsview.h index 372a6f5..f3e00da 100644 --- a/khexedit/lib/kcolumnsview.h +++ b/khexedit/lib/kcolumnsview.h @@ -39,14 +39,15 @@ class KColumnsViewPrivate; *@author Friedrich W. H. Kossebau */ -class KColumnsView : public QScrollView +class KColumnsView : public TQScrollView { Q_OBJECT + TQ_OBJECT friend class KColumn; public: - KColumnsView( /*bool R = false,*/ TQWidget *parent=0, const char *name=0, WFlags Flags=0 ); + KColumnsView( /*bool R = false,*/ TQWidget *tqparent=0, const char *name=0, WFlags Flags=0 ); virtual ~KColumnsView(); public: // drawing @@ -112,7 +113,7 @@ class KColumnsView : public QScrollView protected: // painting void updateView(); - void repaintView(); + void tqrepaintView(); private: /** hiding it*/ diff --git a/khexedit/lib/kcursor.h b/khexedit/lib/kcursor.h index 17b4371..bb66003 100644 --- a/khexedit/lib/kcursor.h +++ b/khexedit/lib/kcursor.h @@ -38,7 +38,7 @@ class KCursor public: /** sets size of the full cursor */ void setSize( KPixelX Width, KPixelY Height ); - /** sets the shape of the cursor to be drawn */ + /** sets the tqshape of the cursor to be drawn */ void setShape( KPixelX X, KPixelX W ); public: // access diff --git a/khexedit/lib/kdatabuffer.cpp b/khexedit/lib/kdatabuffer.cpp index 054d792..4c4f365 100644 --- a/khexedit/lib/kdatabuffer.cpp +++ b/khexedit/lib/kdatabuffer.cpp @@ -25,13 +25,13 @@ using namespace KHE; int KDataBuffer::insert( int Pos, const char* D, int Length ) { - return replace( Pos,0,D,Length ); + return tqreplace( Pos,0,D,Length ); } int KDataBuffer::remove( KSection Remove ) { - replace( Remove, 0, 0 ); + tqreplace( Remove, 0, 0 ); return Remove.width(); // TODO: check if this is true } diff --git a/khexedit/lib/kdatabuffer.h b/khexedit/lib/kdatabuffer.h index e7cc3bc..796ccd6 100644 --- a/khexedit/lib/kdatabuffer.h +++ b/khexedit/lib/kdatabuffer.h @@ -146,9 +146,9 @@ class KHEXEDIT_EXPORT KDataBuffer * @param SourceLength * @return length of replacced data */ - virtual unsigned int replace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; + virtual unsigned int tqreplace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0; /** convenience function, behaves as above */ - unsigned int replace( unsigned int Pos, unsigned int RemoveLength, + unsigned int tqreplace( unsigned int Pos, unsigned int RemoveLength, const char* Source, unsigned int SourceLength ); /** moves a part of the data to a new position, while floating the other data around @@ -201,7 +201,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Pos the position to start the search * @return index of the first or -1 */ - //virtual int find( const char*, int Length, int Pos = 0 ) const = 0; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const = 0; /** searches for a given data string * The section limits the data within which the key has to be found * If the end of the section is lower then the start the search continues at the start??? @@ -210,7 +210,7 @@ class KHEXEDIT_EXPORT KDataBuffer * @param Section section within the keydata is to be found * @return index of the first occurence or -1 */ - virtual int find( const char*KeyData, int Length, KSection Section ) const = 0; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const = 0; /** searches backward beginning with byte at Pos. * @param * @param Length length of search string @@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer */ virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ }; @@ -235,9 +235,9 @@ inline const char *KDataBuffer::dataSet( int Offset, int Length ) const inline int KDataBuffer::remove( int Pos, int Length ) { return remove( KSection(Pos,Pos+Length-1) ); } -inline unsigned int KDataBuffer::replace( unsigned int Pos, unsigned int RemoveLength, +inline unsigned int KDataBuffer::tqreplace( unsigned int Pos, unsigned int RemoveLength, const char* D, unsigned int InputLength ) -{ return replace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } +{ return tqreplace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); } inline bool KDataBuffer::isReadOnly() const { return false; } diff --git a/khexedit/lib/kfixedsizebuffer.cpp b/khexedit/lib/kfixedsizebuffer.cpp index 784858c..0c13e94 100644 --- a/khexedit/lib/kfixedsizebuffer.cpp +++ b/khexedit/lib/kfixedsizebuffer.cpp @@ -89,7 +89,7 @@ int KFixedSizeBuffer::remove( KSection Remove ) } -unsigned int KFixedSizeBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KFixedSizeBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.startsBehind( Size-1 ) || (Remove.width()==0 && InputLength==0) ) @@ -214,7 +214,7 @@ int KFixedSizeBuffer::fill( const char FChar, int FillLength, unsigned int Pos ) int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, unsigned int Pos ) { - //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(OtherRange.end()) + //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).tqarg(Pos).tqarg(OtherRange.start()).tqarg(OtherRange.end()) // << endl; // test other values if( OtherRange.startsBehind(Other.size()-1) ) @@ -245,14 +245,14 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un ValueByLength = -1; } //kdDebug() - // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).arg(Range.start()).arg(Range.end()).arg(OtherRange.start()).arg(OtherRange.end()) + // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).tqarg(Range.start()).tqarg(Range.end()).tqarg(OtherRange.start()).tqarg(OtherRange.end()) // << endl; int oi = OtherRange.start(); for( int i=Range.start(); i<=Range.end(); ++i,++oi ) { char OD = Other.datum(oi); char D = Data[i]; - //kdDebug() << TQString("%1==%2").arg((int)D).arg((int)OD) << endl; + //kdDebug() << TQString("%1==%2").tqarg((int)D).tqarg((int)OD) << endl; if( OD == D ) continue; return OD < D ? 1 : -1; @@ -262,7 +262,7 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un } -int KFixedSizeBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } +int KFixedSizeBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } int KFixedSizeBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; } diff --git a/khexedit/lib/kfixedsizebuffer.h b/khexedit/lib/kfixedsizebuffer.h index 90060f0..e5997c3 100644 --- a/khexedit/lib/kfixedsizebuffer.h +++ b/khexedit/lib/kfixedsizebuffer.h @@ -48,17 +48,17 @@ class KFixedSizeBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - virtual int find( const char*KeyData, int Length, KSection Section ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/khechar.h b/khexedit/lib/khechar.h index 04b4016..6f4cd7f 100644 --- a/khexedit/lib/khechar.h +++ b/khexedit/lib/khechar.h @@ -23,7 +23,7 @@ namespace KHE { -class KHEChar : public QChar +class KHEChar : public TQChar { public: KHEChar( TQChar C ); diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp index a7a27c5..49030bf 100644 --- a/khexedit/lib/khexedit.cpp +++ b/khexedit/lib/khexedit.cpp @@ -29,7 +29,7 @@ #include <tqcursor.h> #include <tqapplication.h> // kde specific -#ifndef QT_ONLY +#ifndef TQT_ONLY #include <kglobalsettings.h> #endif // lib specific @@ -78,7 +78,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl TrippleClickTimer( new TQTimer(this) ), CursorPixmaps( new KCursor() ), Codec( 0 ), - ClipboardMode( QClipboard::Clipboard ), + ClipboardMode( TQClipboard::Clipboard ), ResizeStyle( DefaultResizeStyle ), Encoding( MaxEncodingId ), // forces update ReadOnly( false ), @@ -94,7 +94,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl InZooming( false ), d( 0 ) { - // initalize layout + // initalize tqlayout if( DataBuffer ) BufferLayout->setLength( DataBuffer->size() ); BufferLayout->setNoOfLinesPerPage( noOfLinesPerPage() ); @@ -123,7 +123,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl Controller = Navigator; -#ifdef QT_ONLY +#ifdef TQT_ONLY TQFont FixedFont( "fixed", 10 ); FixedFont.setFixedPitch( true ); setFont( FixedFont ); @@ -133,7 +133,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl // get the full control viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( WheelFocus ); + viewport()->setFocusPolicy( TQ_WheelFocus ); viewport()->installEventFilter( this ); installEventFilter( this ); @@ -199,7 +199,7 @@ void KHexEdit::setOverwriteMode( bool OM ) OverWrite = OM; // affected: - // cursor shape + // cursor tqshape bool ChangeCursor = !( CursorPaused || ValueEditor->isInEditMode() ); if( ChangeCursor ) pauseCursor(); @@ -478,7 +478,7 @@ void KHexEdit::zoomOut( int PointDec ) { InZooming = true; TQFont F( font() ); - F.setPointSize( QMAX( 1, TQFontInfo(F).pointSize() - PointDec ) ); + F.setPointSize( TQMAX( 1, TQFontInfo(F).pointSize() - PointDec ) ); setFont( F ); InZooming = false; } @@ -548,17 +548,17 @@ void KHexEdit::toggleOffsetColumn( bool Visible ) } -TQSize KHexEdit::sizeHint() const +TQSize KHexEdit::tqsizeHint() const { return TQSize( totalWidth(), totalHeight() ); } -TQSize KHexEdit::minimumSizeHint() const +TQSize KHexEdit::tqminimumSizeHint() const { // TODO: better minimal width (visibility!) return TQSize( OffsetColumn->visibleWidth()+FirstBorderColumn->visibleWidth()+SecondBorderColumn->visibleWidth()+valueColumn().byteWidth()+charColumn().byteWidth(), - lineHeight() + noOfLines()>1? style().pixelMetric(TQStyle::PM_ScrollBarExtent):0 ); + lineHeight() + noOfLines()>1? tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent):0 ); } @@ -598,7 +598,7 @@ int KHexEdit::fittingBytesPerLine( const TQSize &NewSize ) const // check influence of dis-/appearing of the vertical scrollbar bool VerticalScrollbarIsVisible = verticalScrollBar()->isVisible(); - KPixelX ScrollbarExtent = style().pixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width(); + KPixelX ScrollbarExtent = tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width(); KPixelX AvailableWidth = FullWidth; if( VerticalScrollbarIsVisible ) @@ -737,7 +737,7 @@ bool KHexEdit::selectWord( /*unsigned TODO:change all unneeded signed into unsig BufferRanges->setFirstWordSelection( WordSection ); BufferCursor->gotoIndex( WordSection.end()+1 ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); return true; @@ -757,7 +757,7 @@ void KHexEdit::select( KSection Section ) BufferRanges->setSelection( Section ); BufferCursor->gotoIndex( Section.end()+1 ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); @@ -781,7 +781,7 @@ void KHexEdit::selectAll( bool Select ) BufferCursor->gotoEnd(); } - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); @@ -850,7 +850,7 @@ void KHexEdit::cut() if( !Drag ) return; - TQApplication::clipboard()->setData( Drag, ClipboardMode ); + TQApplication::tqclipboard()->setData( Drag, ClipboardMode ); removeSelectedData(); } @@ -862,7 +862,7 @@ void KHexEdit::copy() if( !Drag ) return; - TQApplication::clipboard()->setData( Drag, ClipboardMode ); + TQApplication::tqclipboard()->setData( Drag, ClipboardMode ); } @@ -871,7 +871,7 @@ void KHexEdit::paste() if( isReadOnly() ) return; - TQMimeSource *Source = TQApplication::clipboard()->data( ClipboardMode ); + TQMimeSource *Source = TQApplication::tqclipboard()->data( ClipboardMode ); pasteFromSource( Source ); } @@ -904,7 +904,7 @@ void KHexEdit::insert( const TQByteArray &D ) // we restrict the replacement to the minimum length of selection and input ChangedRange = BufferRanges->selection(); ChangedRange.restrictEndTo( ChangedRange.start()+D.size()-1 ); - int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoCIndex( ChangedRange.start()+W ); BufferRanges->removeSelection(); } @@ -917,7 +917,7 @@ void KHexEdit::insert( const TQByteArray &D ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() ); + int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( W ); } } @@ -930,7 +930,7 @@ void KHexEdit::insert( const TQByteArray &D ) // replacing the selection KSection Selection = BufferRanges->selection(); int OldLastIndex = BufferLayout->length() - 1; - int W = DataBuffer->replace( Selection, D.data(), D.size() ); + int W = DataBuffer->tqreplace( Selection, D.data(), D.size() ); updateLength(); BufferCursor->gotoIndex( Selection.start() + W ); if( W > 0 ) @@ -967,7 +967,7 @@ void KHexEdit::insert( const TQByteArray &D ) if( Changed ) { BufferRanges->addChangedRange( ChangedRange ); - repaintChanged(); + tqrepaintChanged(); } ensureCursorVisible(); @@ -994,7 +994,7 @@ void KHexEdit::removeSelectedData() KSection ChangedRange = removeData( Selection ); BufferRanges->removeSelection(); - repaintChanged(); + tqrepaintChanged(); BufferCursor->gotoCIndex( Selection.start() ); @@ -1017,7 +1017,7 @@ KSection KHexEdit::removeData( KSection Indizes ) // if( !undoRedoInfo.valid() ) // { // doc->selectionStart( selNum, undoRedoInfo.id, undoRedoInfo.index ); -// undoRedoInfo.d->text = TQString::null; +// undoRedoInfo.d->text = TQString(); // } // readFormats( c1, c2, undoRedoInfo.d->text, TRUE ); // } @@ -1042,7 +1042,7 @@ void KHexEdit::updateLength() void KHexEdit::clipboardChanged() { // don't listen to selection changes - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0 ); + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0 ); selectAll( false ); } @@ -1059,7 +1059,7 @@ void KHexEdit::setCursorPosition( int Index, bool Behind ) bool RangesModifed = BufferRanges->isModified(); if( RangesModifed ) { - repaintChanged(); + tqrepaintChanged(); viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor ); @@ -1178,7 +1178,7 @@ void KHexEdit::showEvent( TQShowEvent *e ) bool KHexEdit::eventFilter( TQObject *O, TQEvent *E ) { - if( O == this || O == viewport() ) + if( TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(viewport()) ) { if( E->type() == TQEvent::FocusIn ) { @@ -1192,16 +1192,16 @@ bool KHexEdit::eventFilter( TQObject *O, TQEvent *E ) // if( O == this && E->type() == TQEvent::PaletteChange ) // { -// TQColor old( viewport()->colorGroup().color(TQColorGroup::Text) ); +// TQColor old( viewport()->tqcolorGroup().color(TQColorGroup::Text) ); // -// if( old != colorGroup().color(TQColorGroup::Text) ) +// if( old != tqcolorGroup().color(TQColorGroup::Text) ) // { -// TQColor c( colorGroup().color(TQColorGroup::Text) ); +// TQColor c( tqcolorGroup().color(TQColorGroup::Text) ); // doc->setMinimumWidth( -1 ); // doc->setDefaultFormat( doc->formatCollection()->defaultFormat()->font(), c ); // lastFormatted = doc->firstParagraph(); // formatMore(); -// repaintChanged(); +// tqrepaintChanged(); // } // } @@ -1275,20 +1275,20 @@ void KHexEdit::createCursorPixmaps() int Index = BufferCursor->validIndex(); TQPainter Paint; - Paint.begin( &CursorPixmaps->offPixmap(), this ); + Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->offPixmap()), this ); activeColumn().paintByte( &Paint, Index ); Paint.end(); - Paint.begin( &CursorPixmaps->onPixmap(), this ); + Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->onPixmap()), this ); activeColumn().paintCursor( &Paint, Index ); Paint.end(); - // calculat the shape + // calculat the tqshape KPixelX CursorX; KPixelX CursorW; if( BufferCursor->isBehind() ) { - CursorX = QMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth ); + CursorX = TQMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth ); CursorW = InsertCursorWidth; } else @@ -1397,12 +1397,12 @@ void KHexEdit::keyPressEvent( TQKeyEvent *KeyEvent ) } -void KHexEdit::repaintChanged() +void KHexEdit::tqrepaintChanged() { if( !isUpdatesEnabled() || !viewport()->isUpdatesEnabled() || !BufferRanges->isModified() ) return; - // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with repaintRange + // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with tqrepaintRange resizeContents( totalWidth(), totalHeight() ); KPixelXs Xs( contentsX(), visibleWidth(), true ); @@ -1498,7 +1498,7 @@ void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions ) // to avoid flickers we first paint to the linebuffer TQPainter Paint; - Paint.begin( &LineBuffer, this ); + Paint.tqbegin( &LineBuffer, this ); Paint.translate( C->x(), 0 ); C->paintPositions( &Paint, Line, Positions ); @@ -1548,7 +1548,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) pauseCursor( true ); // care about a left button press? - if( e->button() == LeftButton ) + if( e->button() == Qt::LeftButton ) { MousePressed = true; @@ -1559,7 +1559,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) BufferRanges->setSelectionStart( BufferLayout->indexAtLineStart(DoubleClickLine) ); BufferCursor->gotoLineEnd(); BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); return; @@ -1601,12 +1601,12 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e ) BufferRanges->removeFurtherSelections(); } - else if( e->button() == MidButton ) + else if( e->button() == Qt::MidButton ) BufferRanges->removeSelection(); if( BufferRanges->isModified() ) { - repaintChanged(); + tqrepaintChanged(); viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor ); } @@ -1671,20 +1671,20 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e ) // was end of selection operation? else if( BufferRanges->hasSelection() ) { - if( TQApplication::clipboard()->supportsSelection() ) + if( TQApplication::tqclipboard()->supportsSelection() ) { - ClipboardMode = QClipboard::Selection; - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + ClipboardMode = TQClipboard::Selection; + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); copy(); - connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); - ClipboardMode = QClipboard::Clipboard; + connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); + ClipboardMode = TQClipboard::Clipboard; } } } // middle mouse button paste? - else if( e->button() == MidButton && !isReadOnly() ) + else if( e->button() == Qt::MidButton && !isReadOnly() ) { pauseCursor(); @@ -1694,12 +1694,12 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e ) if( BufferRanges->hasSelection() && !BufferRanges->selectionIncludes(BufferCursor->index()) ) BufferRanges->removeSelection(); - ClipboardMode = QClipboard::Selection; + ClipboardMode = TQClipboard::Selection; paste(); - ClipboardMode = QClipboard::Clipboard; + ClipboardMode = TQClipboard::Clipboard; // ensure selection changes to be drawn TODO: create a insert/pasteAtCursor that leaves out drawing - repaintChanged(); + tqrepaintChanged(); ensureCursorVisible(); unpauseCursor(); @@ -1738,7 +1738,7 @@ void KHexEdit::contentsMouseDoubleClickEvent( TQMouseEvent *e ) selectWord( Index ); // as we already have a doubleclick maybe it is a tripple click - TrippleClickTimer->start( qApp->doubleClickInterval(), true ); + TrippleClickTimer->start( tqApp->doubleClickInterval(), true ); DoubleClickPoint = e->globalPos(); } // else @@ -1803,7 +1803,7 @@ void KHexEdit::handleMouseMove( const TQPoint& Point ) // handles the move of th if( BufferRanges->selectionStarted() ) BufferRanges->setSelectionEnd( BufferCursor->realIndex() ); - repaintChanged(); + tqrepaintChanged(); unpauseCursor(); } @@ -1915,7 +1915,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) if( NewIndex != Selection.start() ) { BufferCursor->gotoCIndex( NewIndex+Selection.width() ); - ChangedRange.set( QMIN(InsertIndex,Selection.start()), QMAX(InsertIndex,Selection.end()) ); + ChangedRange.set( TQMIN(InsertIndex,Selection.start()), TQMAX(InsertIndex,Selection.end()) ); } } // is a copy @@ -1933,7 +1933,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) ChangedRange.restrictEndTo( BufferLayout->length()-1 ); if( ChangedRange.isValid() ) { - int NoOfReplaced = DataBuffer->replace( ChangedRange, Data.data(), ChangedRange.width() ); + int NoOfReplaced = DataBuffer->tqreplace( ChangedRange, Data.data(), ChangedRange.width() ); BufferCursor->gotoNextByte( NoOfReplaced ); } } @@ -1953,7 +1953,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e ) BufferRanges->addChangedRange( ChangedRange ); BufferRanges->removeSelection(); - repaintChanged(); + tqrepaintChanged(); ensureCursorVisible(); // open ui @@ -2005,15 +2005,15 @@ void KHexEdit::contentsContextMenuEvent( TQContextMenuEvent *e ) { selectAll(); // if the clipboard support selections, put the newly selected text into the clipboard - if( TQApplication::clipboard()->supportsSelection() ) + if( TQApplication::tqclipboard()->supportsSelection() ) { - ClipboardMode = QClipboard::Selection; - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + ClipboardMode = TQClipboard::Selection; + disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); copy(); - connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); - ClipboardMode = QClipboard::Clipboard; + connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); + ClipboardMode = TQClipboard::Clipboard; } } else if( r == d->id[IdUndo] ) diff --git a/khexedit/lib/khexedit.h b/khexedit/lib/khexedit.h index 8e81fd8..80d36d9 100644 --- a/khexedit/lib/khexedit.h +++ b/khexedit/lib/khexedit.h @@ -81,31 +81,32 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView friend class KCharEditor; Q_OBJECT + TQ_OBJECT Q_ENUMS( KResizeStyle KCoding ) - Q_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode ) - Q_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly ) - Q_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false ) - Q_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly ) - - Q_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine ) - Q_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus ) - - //Q_PROPERTY( bool hasSelectedData READ hasSelectedData ) - //Q_PROPERTY( TQByteArray SelectedData READ selectedData ) - Q_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle ) - Q_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset ) - Q_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset ) + TQ_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode ) + TQ_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly ) + TQ_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false ) + TQ_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly ) + + TQ_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine ) + TQ_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus ) + + //TQ_PROPERTY( bool hasSelectedData READ hasSelectedData ) + //TQ_PROPERTY( TQByteArray SelectedData READ selectedData ) + TQ_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle ) + TQ_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset ) + TQ_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset ) //_PROPERTY( int undoDepth READ undoDepth WRITE setUndoDepth ) //_PROPERTY( bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled ) // value column - Q_PROPERTY( KCoding Coding READ coding WRITE setCoding ) - Q_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth ) - Q_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes ) - Q_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth ) - Q_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth ) + TQ_PROPERTY( KCoding Coding READ coding WRITE setCoding ) + TQ_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth ) + TQ_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes ) + TQ_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth ) + TQ_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth ) // char column - Q_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable ) - Q_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar ) + TQ_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable ) + TQ_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar ) public: enum KResizeStyle { NoResize=0, LockGrouping=1, FullSizeUsage=2, MaxResizeStyleId=0xFF }; @@ -129,8 +130,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView // void focusOutEvent( TQFocusEvent *FocusEvent ); virtual bool eventFilter( TQObject *O, TQEvent *E ); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; public: // value access @@ -215,7 +216,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView void placeCursor( const TQPoint &Point ); /***/ void setCursorColumn( KBufferColumnId ); -// void repaintByte( int row, int column, bool Erase = true ); +// void tqrepaintByte( int row, int column, bool Erase = true ); // void updateByte( int row, int column ); // void ensureByteVisible( int row, int column ); @@ -396,8 +397,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** handles screen update in case of a change to any of the width sizes */ void updateViewByWidth(); - /** repaints all the parts that are signed as changed */ - void repaintChanged(); + /** tqrepaints all the parts that are signed as changed */ + void tqrepaintChanged(); protected: // drawing related operations /** recreates the cursor pixmaps and paints active and inactive cursors if doable */ @@ -424,7 +425,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView protected: /** recalcs all dependant values with the actual NoOfBytesPerLine */ void adjustToLayoutNoOfBytesPerLine(); - /** recalcs a layout due to the resize style that fits into the view size + /** recalcs a tqlayout due to the resize style that fits into the view size * and updates the dependant values */ void adjustLayoutToSize(); @@ -451,7 +452,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** Buffer with the data */ KDataBuffer *DataBuffer; - /** holds the logical layout */ + /** holds the logical tqlayout */ KBufferLayout *BufferLayout; /** */ KBufferCursor *BufferCursor; @@ -506,7 +507,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView /** point at which the current dragging started */ TQPoint DragStartPoint; /** */ - QClipboard::Mode ClipboardMode; + TQClipboard::Mode ClipboardMode; /** font size as set by user (used for zooming) */ int DefaultFontSize; diff --git a/khexedit/lib/koffsetcolumn.cpp b/khexedit/lib/koffsetcolumn.cpp index fb8e694..c2be15a 100644 --- a/khexedit/lib/koffsetcolumn.cpp +++ b/khexedit/lib/koffsetcolumn.cpp @@ -42,8 +42,8 @@ KOffsetColumn::~KOffsetColumn() void KOffsetColumn::paintLine( TQPainter *P, int Line ) { - const TQColor &ButtonColor = View->colorGroup().button(); - P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,Qt::SolidPattern) ); + const TQColor &ButtonColor = View->tqcolorGroup().button(); + P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,TQt::SolidPattern) ); printFunction()( CodedOffset,FirstLineOffset+Delta*Line ); P->drawText( 0, DigitBaseLine, TQString().append(CodedOffset) ); @@ -68,8 +68,8 @@ void KOffsetColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys ) { Xs.restrictTo( XSpan ); - const TQColor &ButtonColor = View->colorGroup().button(); - P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,Qt::SolidPattern) ); + const TQColor &ButtonColor = View->tqcolorGroup().button(); + P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,TQt::SolidPattern) ); } void KOffsetColumn::setFormat( KOffsetFormat::KFormat F ) diff --git a/khexedit/lib/koffsetcolumn.h b/khexedit/lib/koffsetcolumn.h index 497d7ef..56b48f1 100644 --- a/khexedit/lib/koffsetcolumn.h +++ b/khexedit/lib/koffsetcolumn.h @@ -81,7 +81,7 @@ class KOffsetColumn : public KColumn /** */ KPixelY DigitBaseLine; - protected: // general layout + protected: // general tqlayout KOffsetFormat::KFormat Format; int CodingWidth; diff --git a/khexedit/lib/kplainbuffer.cpp b/khexedit/lib/kplainbuffer.cpp index 02b9d70..1d79756 100644 --- a/khexedit/lib/kplainbuffer.cpp +++ b/khexedit/lib/kplainbuffer.cpp @@ -72,7 +72,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length ) // check all parameters if( Length == 0 ) return 0; - //kdDebug() << TQString("before: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl; + //kdDebug() << TQString("before: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; // correct for appending if( Pos > (int)Size ) Pos = Size; @@ -82,7 +82,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length ) // copy new data to its place memcpy( &Data[Pos], D, Length ); - //kdDebug() << TQString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl; + //kdDebug() << TQString("after: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; Modified = true; return Length; @@ -108,7 +108,7 @@ int KPlainBuffer::remove( KSection Remove ) } -unsigned int KPlainBuffer::replace( KSection Remove, const char* D, unsigned int InputLength ) +unsigned int KPlainBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength ) { // check all parameters if( Remove.start() >= (int)Size || (Remove.width()==0 && InputLength==0) ) @@ -259,7 +259,7 @@ int KPlainBuffer::fill( const char FChar, int FillLength, unsigned int Pos ) } -int KPlainBuffer::find( const char* SearchString, int Length, KSection Section ) const +int KPlainBuffer::tqfind( const char* SearchString, int Length, KSection Section ) const { Section.restrictEndTo( Size-1 ); diff --git a/khexedit/lib/kplainbuffer.h b/khexedit/lib/kplainbuffer.h index 31851ae..c0d8846 100644 --- a/khexedit/lib/kplainbuffer.h +++ b/khexedit/lib/kplainbuffer.h @@ -54,18 +54,18 @@ class KPlainBuffer : public KDataBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection Remove ); - virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength ); + virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength ); virtual int move( int DestPos, KSection SourceSection ); virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M = true ); - //virtual int find( const char*, int Length, int Pos = 0 ) const; - virtual int find( const char*KeyData, int Length, KSection Section ) const; + //virtual int tqfind( const char*, int Length, int Pos = 0 ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; -/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ +/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */ public: void setReadOnly( bool RO = true ); diff --git a/khexedit/lib/kvaluecolumn.cpp b/khexedit/lib/kvaluecolumn.cpp index 62d36c0..beb706a 100644 --- a/khexedit/lib/kvaluecolumn.cpp +++ b/khexedit/lib/kvaluecolumn.cpp @@ -105,9 +105,9 @@ void KValueColumn::paintEditedByte( TQPainter *P, char Byte, const TQString &Edi { KHEChar B = Codec->decode( Byte ); - const TQColorGroup &CG = View->colorGroup(); + const TQColorGroup &CG = View->tqcolorGroup(); - P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) ); + P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) ); drawCode( P, EditBuffer, CG.base() ); } diff --git a/khexedit/lib/kwrappingrobuffer.cpp b/khexedit/lib/kwrappingrobuffer.cpp index b913c1a..a47745c 100644 --- a/khexedit/lib/kwrappingrobuffer.cpp +++ b/khexedit/lib/kwrappingrobuffer.cpp @@ -50,7 +50,7 @@ void KWrappingROBuffer::set( const char* D, int L ) } -int KWrappingROBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const +int KWrappingROBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; } diff --git a/khexedit/lib/kwrappingrobuffer.h b/khexedit/lib/kwrappingrobuffer.h index 51ee7b8..97ae33c 100644 --- a/khexedit/lib/kwrappingrobuffer.h +++ b/khexedit/lib/kwrappingrobuffer.h @@ -47,13 +47,13 @@ class KWrappingROBuffer : public KReadOnlyBuffer virtual int insert( int Pos, const char*, int Length ); virtual int remove( KSection S ); - virtual unsigned int replace( KSection S, const char*, unsigned int Length ); + virtual unsigned int tqreplace( KSection S, const char*, unsigned int Length ); virtual int fill( const char FillChar, int, int ); virtual void setDatum( unsigned int Offset, const char Char ); virtual void setModified( bool M ); - virtual int find( const char*KeyData, int Length, KSection Section ) const; + virtual int tqfind( const char*KeyData, int Length, KSection Section ) const; virtual int rfind( const char*, int Length, int Pos = -1 ) const; @@ -75,7 +75,7 @@ inline char KWrappingROBuffer::datum( unsigned int Offset ) const { return Data[ inline int KWrappingROBuffer::insert( int, const char*, int ) { return 0; } inline int KWrappingROBuffer::remove( KSection ) { return 0; } -inline unsigned int KWrappingROBuffer::replace( KSection, const char*, unsigned int ) { return 0; } +inline unsigned int KWrappingROBuffer::tqreplace( KSection, const char*, unsigned int ) { return 0; } inline int KWrappingROBuffer::fill( const char , int, int ) { return 0; } inline void KWrappingROBuffer::setDatum( unsigned int, const char ) {} diff --git a/khexedit/listview.cc b/khexedit/listview.cc index e02e1c7..b6af69b 100644 --- a/khexedit/listview.cc +++ b/khexedit/listview.cc @@ -24,31 +24,31 @@ #include "listview.h" -CListView::CListView( TQWidget *parent, const char *name, int visibleItem ) - :KListView( parent, name ), mVisibleItem(QMAX( 1, visibleItem )) +CListView::CListView( TQWidget *tqparent, const char *name, int visibleItem ) + :KListView( tqparent, name ), mVisibleItem(TQMAX( 1, visibleItem )) { setVisibleItem(visibleItem); } void CListView::setVisibleItem( int visibleItem, bool updateSize ) { - mVisibleItem = QMAX( 1, visibleItem ); + mVisibleItem = TQMAX( 1, visibleItem ); if( updateSize == true ) { - TQSize s = sizeHint(); - setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() + + TQSize s = tqsizeHint(); + setMinimumSize( s.width() + verticalScrollBar()->tqsizeHint().width() + lineWidth() * 2, s.height() ); } } -TQSize CListView::sizeHint( void ) const +TQSize CListView::tqsizeHint( void ) const { - TQSize s = TQListView::sizeHint(); + TQSize s = TQListView::tqsizeHint(); int h = fontMetrics().height() + 2*itemMargin(); if( h % 2 > 0 ) { h++; } - s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->sizeHint().height()); + s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->tqsizeHint().height()); return( s ); } #include "listview.moc" diff --git a/khexedit/listview.h b/khexedit/listview.h index e87a17d..f549539 100644 --- a/khexedit/listview.h +++ b/khexedit/listview.h @@ -26,12 +26,13 @@ class CListView : public KListView { Q_OBJECT + TQ_OBJECT public: - CListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 ); + CListView( TQWidget *tqparent=0, const char *name=0, int visibleItem=10 ); void setVisibleItem( int visibleItem, bool updateSize=true ); - virtual TQSize sizeHint( void ) const; + virtual TQSize tqsizeHint( void ) const; private: int mVisibleItem; diff --git a/khexedit/optiondialog.cc b/khexedit/optiondialog.cc index c1bbb39..783a8c0 100644 --- a/khexedit/optiondialog.cc +++ b/khexedit/optiondialog.cc @@ -46,9 +46,9 @@ #include <tqobjectlist.h> static void enableWidget( TQWidget *w, bool state ) { - if( w->children() ) + if( w->tqchildren() ) { - TQObjectList *l = (TQObjectList*)w->children(); // silence please + TQObjectList *l = (TQObjectList*)w->tqchildren(); // silence please for( uint i=0; i < l->count(); i++ ) { TQObject *o = l->at(i); @@ -64,11 +64,11 @@ static void enableWidget( TQWidget *w, bool state ) -COptionDialog::COptionDialog( TQWidget *parent, char *name, bool modal ) +COptionDialog::COptionDialog( TQWidget *tqparent, char *name, bool modal ) :KDialogBase( IconList, i18n("Configure"), Help|Default|Apply|Ok|Cancel, - Ok, parent, name, modal, true ) + Ok, tqparent, name, modal, true ) { - setHelp( "khexedit/khexedit.html", TQString::null ); + setHelp( "khexedit/khexedit.html", TQString() ); setupLayoutPage(); setupCursorPage(); @@ -260,7 +260,7 @@ void COptionDialog::setupCursorPage( void ) TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); TQVButtonGroup *group = new TQVButtonGroup( i18n("Blinking"), page ); - group->layout()->setMargin( spacingHint() ); + group->tqlayout()->setMargin( spacingHint() ); topLayout->addWidget( group ); text = i18n("Do not b&link"); @@ -282,7 +282,7 @@ void COptionDialog::setupCursorPage( void ) TQT_SLOT( slotChanged())); group = new TQVButtonGroup( i18n("Shape"), page ); - group->layout()->setMargin( spacingHint() ); + group->tqlayout()->setMargin( spacingHint() ); topLayout->addWidget( group ); text = i18n("Always &use block (rectangular) cursor"); @@ -298,7 +298,7 @@ void COptionDialog::setupCursorPage( void ) text = i18n("Cursor Behavior When Editor Loses Focus"); group = new TQVButtonGroup( text, page ); - group->layout()->setMargin( spacingHint() ); + group->tqlayout()->setMargin( spacingHint() ); topLayout->addWidget( group ); text = i18n("&Stop blinking (if blinking is enabled)"); @@ -351,7 +351,7 @@ void COptionDialog::setupColorPage( void ) modeList.append( i18n("Marked Background") ); modeList.append( i18n("Marked Text") ); modeList.append( i18n("Cursor Background") ); - modeList.append( i18n("Cursor Text (block shape)") ); + modeList.append( i18n("Cursor Text (block tqshape)") ); modeList.append( i18n("Bookmark Background") ); modeList.append( i18n("Bookmark Text") ); modeList.append( i18n("Separator") ); @@ -439,7 +439,7 @@ void COptionDialog::setupFilePage( void ) modeList.append( i18n("Most Recent Document") ); modeList.append( i18n("All Recent Documents") ); mFile.openCombo->insertStringList( modeList ); - mFile.openCombo->setMinimumWidth( mFile.openCombo->sizeHint().width() ); + mFile.openCombo->setMinimumWidth( mFile.openCombo->tqsizeHint().width() ); connect( mFile.openCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT( slotChanged())); @@ -548,7 +548,7 @@ void COptionDialog::setupMiscPage( void ) this, TQT_SLOT( slotChanged())); TQVButtonGroup *group = new TQVButtonGroup( i18n("Sounds"), page ); - group->layout()->setMargin( spacingHint() ); + group->tqlayout()->setMargin( spacingHint() ); topLayout->addWidget( group ); text = i18n("Make sound on data &input (eg. typing) failure"); mMisc.inputCheck = new TQCheckBox( text, group ); @@ -560,7 +560,7 @@ void COptionDialog::setupMiscPage( void ) this, TQT_SLOT( slotChanged())); group = new TQVButtonGroup( i18n("Bookmark Visibility"), page ); - group->layout()->setMargin( spacingHint() ); + group->tqlayout()->setMargin( spacingHint() ); topLayout->addWidget( group ); text = i18n("Use visible bookmarks in the offset column"); mMisc.bookmarkColumnCheck = new TQCheckBox( text, group ); @@ -696,9 +696,9 @@ void COptionDialog::slotDefault( void ) { case page_layout: { - SDisplayLayout layout; + SDisplayLayout tqlayout; SDisplayLine line; - setLayout( layout, line ); + setLayout( tqlayout, line ); } break; @@ -758,7 +758,7 @@ void COptionDialog::slotApply( void ) mDisplayState.line.setColumnSize(index, mLayout.columnSizeSpin->value()); emit lineSizeChoice( mDisplayState.line ); - SDisplayLayout &l = mDisplayState.layout; + SDisplayLayout &l = mDisplayState.tqlayout; l.lockLine = mLayout.lockLineCheck->isChecked(); l.lockColumn = mLayout.lockColumnCheck->isChecked(); l.leftSeparatorWidth = mLayout.leftSepWidthSpin->value(); @@ -789,7 +789,7 @@ void COptionDialog::slotApply( void ) l.horzGridWidth = l.vertGridWidth = 1; } - emit layoutChoice( mDisplayState.layout ); + emit tqlayoutChoice( mDisplayState.tqlayout ); } break; @@ -883,35 +883,35 @@ void COptionDialog::slotApply( void ) configChanged = false; } -void COptionDialog::setLayout( SDisplayLayout &layout, SDisplayLine &line ) +void COptionDialog::setLayout( SDisplayLayout &tqlayout, SDisplayLine &line ) { mDisplayState.line = line; - mDisplayState.layout = layout; + mDisplayState.tqlayout = tqlayout; slotModeSelectorChanged( mLayout.formatCombo->currentItem() ); - mLayout.lockLineCheck->setChecked( layout.lockLine ); - mLayout.lockColumnCheck->setChecked( layout.lockColumn ); - mLayout.leftSepWidthSpin->setValue( layout.leftSeparatorWidth ); - mLayout.rightSepWidthSpin->setValue( layout.rightSeparatorWidth ); - mLayout.separatorSpin->setValue( layout.separatorMarginWidth ); - mLayout.edgeSpin->setValue( layout.edgeMarginWidth ); - mLayout.leftSepWidthSpin->setValue( layout.leftSeparatorWidth ); - mLayout.rightSepWidthSpin->setValue( layout.rightSeparatorWidth ); - mLayout.columnCheck->setChecked( layout.columnCharSpace ); - slotColumnSepCheck( layout.columnCharSpace ); - mLayout.columnSepSpin->setValue( layout.columnSpacing ); - - if( layout.horzGridWidth == 0 && layout.vertGridWidth == 0 ) + mLayout.lockLineCheck->setChecked( tqlayout.lockLine ); + mLayout.lockColumnCheck->setChecked( tqlayout.lockColumn ); + mLayout.leftSepWidthSpin->setValue( tqlayout.leftSeparatorWidth ); + mLayout.rightSepWidthSpin->setValue( tqlayout.rightSeparatorWidth ); + mLayout.separatorSpin->setValue( tqlayout.separatorMarginWidth ); + mLayout.edgeSpin->setValue( tqlayout.edgeMarginWidth ); + mLayout.leftSepWidthSpin->setValue( tqlayout.leftSeparatorWidth ); + mLayout.rightSepWidthSpin->setValue( tqlayout.rightSeparatorWidth ); + mLayout.columnCheck->setChecked( tqlayout.columnCharSpace ); + slotColumnSepCheck( tqlayout.columnCharSpace ); + mLayout.columnSepSpin->setValue( tqlayout.columnSpacing ); + + if( tqlayout.horzGridWidth == 0 && tqlayout.vertGridWidth == 0 ) { mLayout.gridCombo->setCurrentItem(0); } - else if( layout.horzGridWidth != 0 && layout.vertGridWidth != 0 ) + else if( tqlayout.horzGridWidth != 0 && tqlayout.vertGridWidth != 0 ) { mLayout.gridCombo->setCurrentItem(3); } else { - mLayout.gridCombo->setCurrentItem( layout.vertGridWidth != 0 ? 1 : 2 ); + mLayout.gridCombo->setCurrentItem( tqlayout.vertGridWidth != 0 ? 1 : 2 ); } } @@ -1021,7 +1021,7 @@ void COptionDialog::setFile( SDisplayMisc &misc ) void COptionDialog::setState( SDisplayState &state ) { - setLayout( state.layout, state.line ); + setLayout( state.tqlayout, state.line ); setCursor( state.cursor ); setColor( state.color ); setFont( state.font ); @@ -1050,8 +1050,8 @@ SDisplayCursor::EFocusMode COptionDialog::cursorFocusMode( void ) -CColorListBox::CColorListBox( TQWidget *parent, const char *name, WFlags f ) - :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) +CColorListBox::CColorListBox( TQWidget *tqparent, const char *name, WFlags f ) + :KListBox( tqparent, name, f ), mCurrentOnDragEnter(-1) { connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) ); setAcceptDrops( true); @@ -1199,7 +1199,7 @@ void CColorListItem::paint( TQPainter *p ) p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( 3, 1, mBoxWidth, h-1 ); p->fillRect( 4, 2, mBoxWidth-2, h-3, mColor ); } diff --git a/khexedit/optiondialog.h b/khexedit/optiondialog.h index b53a806..0089155 100644 --- a/khexedit/optiondialog.h +++ b/khexedit/optiondialog.h @@ -27,7 +27,7 @@ class TQFrame; class TQCheckBox; class TQLabel; class TQLineEdit; -class QPushbutton; +class TQPushbutton; class TQRadioButton; class TQSpinBox; class TQComboBox; @@ -43,9 +43,10 @@ class KFontChooser; class CColorListBox : public KListBox { Q_OBJECT + TQ_OBJECT public: - CColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 ); + CColorListBox( TQWidget *tqparent=0, const char * name=0, WFlags f=0 ); void setColor( uint index, const TQColor &color ); const TQColor color( uint index ); @@ -69,10 +70,10 @@ class CColorListBox : public KListBox }; -class CColorListItem : public QListBoxItem +class CColorListItem : public TQListBoxItem { public: - CColorListItem( const TQString &text, const TQColor &color=Qt::black ); + CColorListItem( const TQString &text, const TQColor &color=TQt::black ); const TQColor &color( void ); void setColor( const TQColor &color ); @@ -92,6 +93,7 @@ class CColorListItem : public QListBoxItem class COptionDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum EPage @@ -105,10 +107,10 @@ class COptionDialog : public KDialogBase page_max }; - COptionDialog( TQWidget *parent = 0, char *name = 0, bool modal = false ); + COptionDialog( TQWidget *tqparent = 0, char *name = 0, bool modal = false ); ~COptionDialog( void ); - void setLayout( SDisplayLayout &layout, SDisplayLine &line ); + void setLayout( SDisplayLayout &tqlayout, SDisplayLine &line ); void setCursor( SDisplayCursor &cursor ); void setColor( SDisplayColor &color ); void setFont( SDisplayFont &font ); @@ -236,7 +238,7 @@ class COptionDialog : public KDialogBase signals: void lineSizeChoice( const SDisplayLine &lineSize ); - void layoutChoice( const SDisplayLayout &layout ); + void tqlayoutChoice( const SDisplayLayout &tqlayout ); void cursorChoice( const SDisplayCursor &cursor ); void colorChoice( const SDisplayColor &color ); void fontChoice( const SDisplayFont &font ); diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.cpp b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp index cb2b549..1e53c05 100644 --- a/khexedit/parts/kbytesedit/kbyteseditwidget.cpp +++ b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp @@ -26,8 +26,8 @@ #include "kbyteseditwidget.h" -KBytesEditWidget::KBytesEditWidget( TQWidget *parent, const char *name, const TQStringList & ) - : TQWidget( parent, name) +KBytesEditWidget::KBytesEditWidget( TQWidget *tqparent, const char *name, const TQStringList & ) + : TQWidget( tqparent, name) { TQHBoxLayout* Layout = new TQHBoxLayout( this ); BytesEdit = new KHE::KBytesEdit( this, "BytesEdit" ); @@ -247,9 +247,9 @@ bool KBytesEditWidget::hasSelectedData() const } -void KBytesEditWidget::repaintRange( int i1, int i2 ) +void KBytesEditWidget::tqrepaintRange( int i1, int i2 ) { - BytesEdit->repaintRange( i1, i2 ); + BytesEdit->tqrepaintRange( i1, i2 ); } diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.h b/khexedit/parts/kbytesedit/kbyteseditwidget.h index 72bfeb6..616981f 100644 --- a/khexedit/parts/kbytesedit/kbyteseditwidget.h +++ b/khexedit/parts/kbytesedit/kbyteseditwidget.h @@ -43,10 +43,11 @@ class KBytesEditWidget : public TQWidget, public KHE::BytesEditInterface, public KHE::ZoomInterface, public KHE::ClipboardInterface { Q_OBJECT + TQ_OBJECT public: /** constructor API as demanded by KGenericFactory */ - KBytesEditWidget( TQWidget *parent, const char *name, const TQStringList & = TQStringList() ); + KBytesEditWidget( TQWidget *tqparent, const char *name, const TQStringList & = TQStringList() ); public: // bytesedit interface /** hands over to the editor a new byte array. @@ -85,15 +86,15 @@ class KBytesEditWidget : public TQWidget, public KHE::BytesEditInterface, virtual bool isOverwriteOnly() const; virtual bool isReadOnly() const; virtual bool isModified() const; - /** repaint the indizes from i1 to i2 */ - virtual void repaintRange( int i1, int i2 ); + /** tqrepaint the indizes from i1 to i2 */ + virtual void tqrepaintRange( int i1, int i2 ); public: // cursor interface /** */ virtual void setCursorPosition( int Index ); // virtual bool tabChangesFocus() const; - public: // layout interface ?? + public: // tqlayout interface ?? /** sets the resizestyle for the value column. Default is KHE::FullSizeUsage */ virtual void setResizeStyle( KResizeStyle Style ); /** sets the number of bytes per line, switching the resize style to KHE::NoResize */ diff --git a/khexedit/parts/kpart/khebrowserextension.h b/khexedit/parts/kpart/khebrowserextension.h index 67a6d45..f962b0b 100644 --- a/khexedit/parts/kpart/khebrowserextension.h +++ b/khexedit/parts/kpart/khebrowserextension.h @@ -34,6 +34,7 @@ class KHexEditPart; class KHexEditBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: KHexEditBrowserExtension( KHexEditPart *P ); diff --git a/khexedit/parts/kpart/khepart.cpp b/khexedit/parts/kpart/khepart.cpp index 1fa95fb..3d17dd5 100644 --- a/khexedit/parts/kpart/khepart.cpp +++ b/khexedit/parts/kpart/khepart.cpp @@ -83,7 +83,7 @@ void KHexEditPart::setupActions( bool BrowserViewWanted ) { KActionCollection *AC = actionCollection(); // create our actions - CopyAction = BrowserViewWanted ? 0 : KStdAction::copy( HexEdit, TQT_SLOT(copy()), AC ); + CopyAction = BrowserViewWanted ? 0 : KStdAction::copy( TQT_TQOBJECT(HexEdit), TQT_SLOT(copy()), AC ); KStdAction::selectAll( this, TQT_SLOT(slotSelectAll()), AC ); KStdAction::deselect( this, TQT_SLOT(slotUnselect()), AC ); @@ -105,8 +105,8 @@ void KHexEditPart::setupActions( bool BrowserViewWanted ) ShowUnprintableAction = new KToggleAction( i18n("Show &Unprintable Chars (<32)"), 0, this, TQT_SLOT(slotSetShowUnprintable()), actionCollection(), "view_showunprintable" ); - KStdAction::zoomIn( HexEdit, TQT_SLOT(zoomIn()), actionCollection() ); - KStdAction::zoomOut( HexEdit, TQT_SLOT(zoomOut()), actionCollection() ); + KStdAction::zoomIn( TQT_TQOBJECT(HexEdit), TQT_SLOT(zoomIn()), actionCollection() ); + KStdAction::zoomOut( TQT_TQOBJECT(HexEdit), TQT_SLOT(zoomOut()), actionCollection() ); // resize style ResizeStyleAction = new KSelectAction( i18n("&Resize Style"), 0, AC, "resizestyle" ); @@ -141,7 +141,7 @@ void KHexEditPart::fitActionSettings() ShowUnprintableAction->setChecked( HexEdit->showUnprintable() ); CodingAction->setCurrentItem( (int)HexEdit->coding() ); - EncodingAction->setCurrentItem( KCharCodec::codecNames().findIndex(HexEdit->encodingName()) ); + EncodingAction->setCurrentItem( KCharCodec::codecNames().tqfindIndex(HexEdit->encodingName()) ); ResizeStyleAction->setCurrentItem( (int)HexEdit->resizeStyle() ); diff --git a/khexedit/parts/kpart/khepart.h b/khexedit/parts/kpart/khepart.h index 0526462..4c3fcd9 100644 --- a/khexedit/parts/kpart/khepart.h +++ b/khexedit/parts/kpart/khepart.h @@ -45,6 +45,7 @@ class KHexEdit; class KHexEditPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT friend class KHexEditBrowserExtension; diff --git a/khexedit/parts/kpart/khepartfactory.h b/khexedit/parts/kpart/khepartfactory.h index 15a1cee..cc918a7 100644 --- a/khexedit/parts/kpart/khepartfactory.h +++ b/khexedit/parts/kpart/khepartfactory.h @@ -27,14 +27,15 @@ class KAboutData; class KHexEditPartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: KHexEditPartFactory(); virtual ~KHexEditPartFactory(); public: - virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ); static KInstance* instance(); diff --git a/khexedit/printdialogpage.cc b/khexedit/printdialogpage.cc index 2677ac4..ff65f10 100644 --- a/khexedit/printdialogpage.cc +++ b/khexedit/printdialogpage.cc @@ -31,8 +31,8 @@ #include "printdialogpage.h" -LayoutDialogPage::LayoutDialogPage( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +LayoutDialogPage::LayoutDialogPage( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { mConfig = 0; setTitle( i18n( "Page Layout" ) ); @@ -78,14 +78,14 @@ void LayoutDialogPage::setupLayoutPage( void ) { mLayout.marginSpin[i] = new TQSpinBox( group ); mLayout.marginSpin[i]->setFixedHeight( - mLayout.marginSpin[i]->sizeHint().height() ); + mLayout.marginSpin[i]->tqsizeHint().height() ); mLayout.marginSpin[i]->setMinimumWidth( mLayout.marginSpin[i]->fontMetrics().width("M")*10 ); mLayout.marginSpin[i]->setRange( 0, INT_MAX ); TQLabel *label = new TQLabel( mLayout.marginSpin[i], name[i], group ); - label->setFixedHeight( mLayout.marginSpin[i]->sizeHint().height() ); - label->setFixedWidth( label->sizeHint().width() ); + label->setFixedHeight( mLayout.marginSpin[i]->tqsizeHint().height() ); + label->setFixedWidth( label->tqsizeHint().width() ); if( i < 2 ) { @@ -101,7 +101,7 @@ void LayoutDialogPage::setupLayoutPage( void ) text = i18n("Draw h&eader above text"); mLayout.headerCheck = new TQCheckBox( text, this ); - mLayout.headerCheck->setFixedSize( mLayout.headerCheck->sizeHint() ); + mLayout.headerCheck->setFixedSize( mLayout.headerCheck->tqsizeHint() ); connect( mLayout.headerCheck, TQT_SIGNAL( toggled(bool)), TQT_SLOT( slotDrawHeader(bool))); topLayout->addWidget( mLayout.headerCheck, 0, AlignLeft ); @@ -135,16 +135,16 @@ void LayoutDialogPage::setupLayoutPage( void ) { mLayout.headerCombo[i] = new TQComboBox( false, this ); mLayout.headerCombo[i]->setFixedHeight( - mLayout.headerCombo[i]->sizeHint().height() ); + mLayout.headerCombo[i]->tqsizeHint().height() ); mLayout.headerCombo[i]->setMinimumWidth( mLayout.headerCombo[i]->fontMetrics().width("M")*10 ); mLayout.headerLabel[i] = new TQLabel( mLayout.headerCombo[i], name[i], this ); mLayout.headerLabel[i]->setFixedHeight( - mLayout.headerLabel[i]->sizeHint().height() ); + mLayout.headerLabel[i]->tqsizeHint().height() ); mLayout.headerLabel[i]->setFixedWidth( - mLayout.headerLabel[i]->sizeHint().width() ); + mLayout.headerLabel[i]->tqsizeHint().width() ); if( i<3 ) { @@ -163,7 +163,7 @@ void LayoutDialogPage::setupLayoutPage( void ) text = i18n("Draw &footer below text"); mLayout.footerCheck = new TQCheckBox( text, this ); - mLayout.footerCheck->setFixedSize( mLayout.footerCheck->sizeHint() ); + mLayout.footerCheck->setFixedSize( mLayout.footerCheck->tqsizeHint() ); connect( mLayout.footerCheck, TQT_SIGNAL( toggled(bool)), TQT_SLOT( slotDrawFooter(bool))); topLayout->addWidget( mLayout.footerCheck, 0, AlignLeft ); @@ -181,16 +181,16 @@ void LayoutDialogPage::setupLayoutPage( void ) { mLayout.footerCombo[i] = new TQComboBox( false, this ); mLayout.footerCombo[i]->setFixedHeight( - mLayout.footerCombo[i]->sizeHint().height() ); + mLayout.footerCombo[i]->tqsizeHint().height() ); mLayout.footerCombo[i]->setMinimumWidth( mLayout.footerCombo[i]->fontMetrics().width("M")*10 ); mLayout.footerLabel[i] = new TQLabel( mLayout.footerCombo[i], name[i], this ); mLayout.footerLabel[i]->setFixedHeight( - mLayout.footerLabel[i]->sizeHint().height() ); + mLayout.footerLabel[i]->tqsizeHint().height() ); mLayout.footerLabel[i]->setFixedWidth( - mLayout.footerLabel[i]->sizeHint().width() ); + mLayout.footerLabel[i]->tqsizeHint().width() ); if( i<3 ) { diff --git a/khexedit/printdialogpage.h b/khexedit/printdialogpage.h index 8ec7b3f..6e2a1fb 100644 --- a/khexedit/printdialogpage.h +++ b/khexedit/printdialogpage.h @@ -33,9 +33,10 @@ class TQSpinBox; class LayoutDialogPage : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - LayoutDialogPage( TQWidget *parent = 0, const char *name = 0 ); + LayoutDialogPage( TQWidget *tqparent = 0, const char *name = 0 ); ~LayoutDialogPage( void ); void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ); diff --git a/khexedit/searchbar.cc b/khexedit/searchbar.cc index 73baba6..3de511d 100644 --- a/khexedit/searchbar.cc +++ b/khexedit/searchbar.cc @@ -51,8 +51,8 @@ static const char * close_xpm[] = { " ", " "}; -CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f ) - :TQFrame( parent, name, f ) +CSearchBar::CSearchBar( TQWidget *tqparent, const char *name, WFlags f ) + :TQFrame( tqparent, name, f ) { setFrameStyle( TQFrame::Panel | TQFrame::Raised ); setLineWidth( 1 ); @@ -74,7 +74,7 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f ) mFindButton->setAutoDefault(false); connect( mFindButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(start()) ); connect(mInputEdit,TQT_SIGNAL(returnPressed()),mFindButton,TQT_SLOT(animateClick())); - mFindButton->setFixedHeight( mTypeCombo->sizeHint().height() ); + mFindButton->setFixedHeight( mTypeCombo->tqsizeHint().height() ); mBackwards = new TQCheckBox( i18n("Backwards"), this ); mIgnoreCase = new TQCheckBox( i18n("Ignore case"), this ); @@ -85,7 +85,7 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f ) connect( mCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideWidget()) ); // - // Make layout + // Make tqlayout // TQHBoxLayout *hlay = new TQHBoxLayout( this, 4, 6 ); hlay->addWidget( mTypeCombo ); @@ -105,12 +105,12 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f ) // // Espen 2000-04-21 -// Qt 2.1: Seems like the TQLineEdit::returnPressed() does not work when +// TQt 2.1: Seems like the TQLineEdit::returnPressed() does not work when // I install a validator. So I catch the event manually // bool CSearchBar::eventFilter( TQObject *o, TQEvent *e ) { - if( o == mInputEdit && e->type() == TQEvent::KeyPress ) + if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mInputEdit) && e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if( ke->key() == Key_Return ) diff --git a/khexedit/searchbar.h b/khexedit/searchbar.h index 752f6d6..00b25a8 100644 --- a/khexedit/searchbar.h +++ b/khexedit/searchbar.h @@ -30,12 +30,13 @@ class TQPushButton; class TQCheckBox; class CHexValidator; -class CSearchBar : public QFrame +class CSearchBar : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CSearchBar( TQWidget *parent=0, const char *name=0, WFlags f=0 ); + CSearchBar( TQWidget *tqparent=0, const char *name=0, WFlags f=0 ); virtual bool eventFilter( TQObject *o, TQEvent *e ); public slots: diff --git a/khexedit/statusbarprogress.cc b/khexedit/statusbarprogress.cc index 872698e..fda0c9d 100644 --- a/khexedit/statusbarprogress.cc +++ b/khexedit/statusbarprogress.cc @@ -28,16 +28,16 @@ #include <klocale.h> #include <tqstyle.h> -CStatusBarProgress::CStatusBarProgress( TQWidget *parent, const char *name ) - : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0), - mOrientation( Horizontal ) +CStatusBarProgress::CStatusBarProgress( TQWidget *tqparent, const char *name ) + : TQFrame(tqparent, name), TQRangeControl(0, 100, 1, 10, 0), + mOrientation(Horizontal ) { initialize(); } CStatusBarProgress::CStatusBarProgress( Orientation orientation, - TQWidget *parent, const char *name ) - : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0), + TQWidget *tqparent, const char *name ) + : TQFrame(tqparent, name), TQRangeControl(0, 100, 1, 10, 0), mOrientation( orientation ) { initialize(); @@ -45,8 +45,8 @@ CStatusBarProgress::CStatusBarProgress( Orientation orientation, CStatusBarProgress::CStatusBarProgress( int minValue, int maxValue, int value, Orientation orientation, - TQWidget *parent, const char *name ) - : TQFrame(parent, name), TQRangeControl(minValue, maxValue, 1, 10, value), + TQWidget *tqparent, const char *name ) + : TQFrame(tqparent, name), TQRangeControl(minValue, maxValue, 1, 10, value), mOrientation(orientation) { initialize(); @@ -67,10 +67,10 @@ void CStatusBarProgress::initialize( void ) mBarPixmap = 0; mBarStyle = Solid; - mBarColor = palette().active().highlight(); - mBarTextColor = palette().active().highlightedText(); - mTextColor = palette().active().text(); - setBackgroundColor( palette().active().background() ); + mBarColor = tqpalette().active().highlight(); + mBarTextColor = tqpalette().active().highlightedText(); + mTextColor = tqpalette().active().text(); + setBackgroundColor( tqpalette().active().background() ); TQFont font( KGlobalSettings::generalFont() ); font.setBold( true ); @@ -176,7 +176,7 @@ bool CStatusBarProgress::textEnabled( void ) const return( mTextEnabled ); } -TQSize CStatusBarProgress::sizeHint( void ) const +TQSize CStatusBarProgress::tqsizeHint( void ) const { TQSize s( size() ); @@ -212,13 +212,13 @@ int CStatusBarProgress::recalcValue(int range) void CStatusBarProgress::valueChange() { - repaint(contentsRect(), FALSE); + tqrepaint(contentsRect(), FALSE); emit percentageChanged(recalcValue(100)); } void CStatusBarProgress::rangeChange() { - repaint(contentsRect(), FALSE); + tqrepaint(contentsRect(), FALSE); emit percentageChanged(recalcValue(100)); } @@ -229,7 +229,7 @@ void CStatusBarProgress::styleChange( GUIStyle ) void CStatusBarProgress::adjustStyle( void ) { - switch( style().SH_GUIStyle) + switch( tqstyle().SH_GUIStyle) { case WindowsStyle: setFrameStyle( TQFrame::NoFrame ); @@ -246,10 +246,10 @@ void CStatusBarProgress::adjustStyle( void ) void CStatusBarProgress::paletteChange( const TQPalette & ) { - mBarColor = palette().active().highlight(); - mBarTextColor = palette().active().highlightedText(); - mTextColor = palette().active().text(); - setBackgroundColor( palette().active().background() ); + mBarColor = tqpalette().active().highlight(); + mBarTextColor = tqpalette().active().highlightedText(); + mTextColor = tqpalette().active().text(); + setBackgroundColor( tqpalette().active().background() ); } void CStatusBarProgress::drawText( TQPainter *p ) @@ -259,17 +259,17 @@ void CStatusBarProgress::drawText( TQPainter *p ) if( mMsg.isEmpty() == true ) { - s = TQString("%1%").arg(recalcValue(100)); + s = TQString("%1%").tqarg(recalcValue(100)); } else { if( mCurPage > 0 ) { - s = i18n("%1... %2 of %3").arg(mMsg).arg(mCurPage).arg(mMaxPage); + s = i18n("%1... %2 of %3").tqarg(mMsg).tqarg(mCurPage).tqarg(mMaxPage); } else { - s = i18n("%1... %2%").arg(mMsg).arg(recalcValue(100)); + s = i18n("%1... %2%").tqarg(mMsg).tqarg(recalcValue(100)); } } @@ -297,7 +297,7 @@ void CStatusBarProgress::drawContents(TQPainter *p) switch( mBarStyle ) { case Solid: - if( mOrientation == Horizontal ) + if( mOrientation ==Qt::Horizontal ) { fr.setWidth(recalcValue(cr.width())); er.setLeft(fr.right() + 1); @@ -319,7 +319,7 @@ void CStatusBarProgress::drawContents(TQPainter *p) case Blocked: const int margin = 2; int max, num, dx, dy; - if( mOrientation == Horizontal ) + if( mOrientation ==Qt::Horizontal ) { fr.setHeight(cr.height() - 2 * margin); fr.setWidth((int)(0.67 * fr.height())); @@ -350,7 +350,7 @@ void CStatusBarProgress::drawContents(TQPainter *p) if (num != max) { - if( mOrientation == Horizontal ) + if( mOrientation ==Qt::Horizontal ) er.setLeft(fr.right() + 1); else er.setBottom(fr.bottom() + 1); diff --git a/khexedit/statusbarprogress.h b/khexedit/statusbarprogress.h index de93b5a..43dfd9d 100644 --- a/khexedit/statusbarprogress.h +++ b/khexedit/statusbarprogress.h @@ -28,6 +28,7 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl { Q_OBJECT + TQ_OBJECT public: /** @@ -46,18 +47,18 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl /** * Construct a default progress bar. Orientation is horizontal. */ - CStatusBarProgress(TQWidget *parent=0, const char *name=0); + CStatusBarProgress(TQWidget *tqparent=0, const char *name=0); /** * Construct a KProgress bar with an orientation. */ - CStatusBarProgress(Orientation, TQWidget *parent=0, const char *name=0); + CStatusBarProgress(Orientation, TQWidget *tqparent=0, const char *name=0); /** * Construct a KProgress bar with minimum, maximum and initial value. */ CStatusBarProgress(int minValue, int maxValue, int value, Orientation, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); /** * Destructor @@ -81,7 +82,7 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl /** * Set the orientation of the progress bar. - * Allowed values are Horizonzal and Vertical. + * Allowed values are Horizonzal andQt::Vertical. */ void setOrientation(Orientation); @@ -114,7 +115,7 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl * Returns the recommended width for vertical progress bars or * the recommended height for vertical progress bars */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: @@ -138,9 +139,9 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl private: TQPixmap *mBarPixmap; - QColor mBarColor; - QColor mBarTextColor; - QColor mTextColor; + TQColor mBarColor; + TQColor mBarTextColor; + TQColor mTextColor; TQRect fr; BarStyle mBarStyle; Orientation mOrientation; diff --git a/khexedit/stringdialog.cc b/khexedit/stringdialog.cc index 5e93f28..d960da1 100644 --- a/khexedit/stringdialog.cc +++ b/khexedit/stringdialog.cc @@ -34,12 +34,12 @@ #include <tqpushbutton.h> -CStringDialog::CStringDialog( TQWidget *parent, const char *name, bool modal ) +CStringDialog::CStringDialog( TQWidget *tqparent, const char *name, bool modal ) : KDialogBase( Plain, i18n("Extract Strings"), Help|User1|Cancel, User1, - parent, name, modal, true, i18n("&Update") ), + tqparent, name, modal, true, i18n("&Update") ), mMaxLength(0), mBusy(false), mDirty(false) { - setHelp( "khexedit/khexedit.html", TQString::null ); + setHelp( "khexedit/khexedit.html", TQString() ); TQString text; TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() ); @@ -270,14 +270,14 @@ void CStringDialog::setClean( void ) void CStringDialog::selectionChanged() { - killTimers(); + TQT_TQOBJECT(this)->killTimers(); startTimer( 200 ); } void CStringDialog::timerEvent( TQTimerEvent * ) { - killTimers(); + TQT_TQOBJECT(this)->killTimers(); TQListViewItem *item = mStringList->currentItem(); if( item == 0 ) @@ -307,7 +307,7 @@ int CStringDialog::updateList( CProgress &p ) for( const TQString *str = list.first(); str != 0; str = list.next() ) { appendListItem( *str, offsetLen ); - mMaxLength = QMAX( mMaxLength, str->length() ); + mMaxLength = TQMAX( mMaxLength, str->length() ); if( p.expired() == true ) { @@ -372,8 +372,8 @@ void CStringDialog::appendListItem( const TQString &str, uint offsetLen ) void CStringDialog::updateListInfo( void ) { - mListSizeLabel->setText( TQString("%1").arg(mStringData.count()) ); - mDisplaySizeLabel->setText( TQString("%1").arg(mStringList->childCount()) ); + mListSizeLabel->setText( TQString("%1").tqarg(mStringData.count()) ); + mDisplaySizeLabel->setText( TQString("%1").tqarg(mStringList->childCount()) ); setColumnWidth(); } diff --git a/khexedit/stringdialog.h b/khexedit/stringdialog.h index eb462f9..36b46f8 100644 --- a/khexedit/stringdialog.h +++ b/khexedit/stringdialog.h @@ -41,9 +41,10 @@ class CListView; class CStringDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CStringDialog( TQWidget *parent=0, const char *name = 0, bool modal=false ); + CStringDialog( TQWidget *tqparent=0, const char *name = 0, bool modal=false ); ~CStringDialog( void ); int updateList( CProgress &p ); diff --git a/khexedit/toplevel.cc b/khexedit/toplevel.cc index 3d65820..f23d9ad 100644 --- a/khexedit/toplevel.cc +++ b/khexedit/toplevel.cc @@ -18,7 +18,7 @@ * */ -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; #include <tqptrlist.h> #include <tqsignalmapper.h> @@ -68,43 +68,43 @@ KHexEdit::KHexEdit( void ) // // Prepare menus and status bar // - mAction.bookmarkMapper = new TQSignalMapper(this); - connect(mAction.bookmarkMapper, TQT_SIGNAL(mapped(int)), editor(), TQT_SLOT(gotoBookmark(int))); + mAction.bookmarkMapper = new TQSignalMapper(TQT_TQOBJECT(this)); + connect(mAction.bookmarkMapper, TQT_SIGNAL(mapped(int)), TQT_TQOBJECT(editor()), TQT_SLOT(gotoBookmark(int))); setupActions(); setupStatusBar(); connect( hexView(), TQT_SIGNAL( cursorChanged( SCursorState & ) ), - this, TQT_SLOT( cursorChanged( SCursorState & ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( cursorChanged( SCursorState & ) ) ); connect( hexView(), TQT_SIGNAL( editMode( CHexBuffer::EEditMode ) ), - this, TQT_SLOT( editMode( CHexBuffer::EEditMode ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( editMode( CHexBuffer::EEditMode ) ) ); connect( hexView(), TQT_SIGNAL( encodingChanged( const SEncodeState &)), - this, TQT_SLOT( encodingChanged( const SEncodeState & )) ); + TQT_TQOBJECT(this), TQT_SLOT( encodingChanged( const SEncodeState & )) ); connect( hexView(), TQT_SIGNAL( textWidth( uint ) ), - this, TQT_SLOT( textWidth( uint ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( textWidth( uint ) ) ); connect( hexView(), TQT_SIGNAL( fileState( SFileState & ) ), - this, TQT_SLOT( fileState( SFileState & ) ) ); - connect( hexView(), TQT_SIGNAL( layoutChanged( const SDisplayLayout & ) ), - this, TQT_SLOT( layoutChanged( const SDisplayLayout & ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( fileState( SFileState & ) ) ); + connect( hexView(), TQT_SIGNAL( tqlayoutChanged( const SDisplayLayout & ) ), + TQT_TQOBJECT(this), TQT_SLOT( tqlayoutChanged( const SDisplayLayout & ) ) ); connect( hexView(), TQT_SIGNAL( inputModeChanged( const SDisplayInputMode & ) ), - this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) ); connect( hexView(), TQT_SIGNAL( bookmarkChanged( TQPtrList<SCursorOffset> &)), - this, TQT_SLOT( bookmarkChanged( TQPtrList<SCursorOffset> & ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( bookmarkChanged( TQPtrList<SCursorOffset> & ) ) ); connect( hexView(), TQT_SIGNAL( fileName( const TQString &, bool ) ), - this, TQT_SLOT( fileActive( const TQString &, bool ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( fileActive( const TQString &, bool ) ) ); connect( hexView(), TQT_SIGNAL( fileRename( const TQString &, const TQString & )), - this, TQT_SLOT( fileRename( const TQString &, const TQString & ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( fileRename( const TQString &, const TQString & ) ) ); connect( hexView(), TQT_SIGNAL( fileClosed( const TQString & ) ), - this, TQT_SLOT( fileClosed( const TQString & ) ) ); - connect( editor(), TQT_SIGNAL( errorLoadFile( const TQString & ) ), - this, TQT_SLOT( removeRecentFile( const TQString & ) ) ); - connect( editor(), TQT_SIGNAL( operationChanged( bool ) ), - this, TQT_SLOT( operationChanged( bool ) ) ); - connect( editor(), TQT_SIGNAL( removeRecentFiles() ), - this, TQT_SLOT( removeRecentFiles() ) ); + TQT_TQOBJECT(this), TQT_SLOT( fileClosed( const TQString & ) ) ); + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( errorLoadFile( const TQString & ) ), + TQT_TQOBJECT(this), TQT_SLOT( removeRecentFile( const TQString & ) ) ); + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( operationChanged( bool ) ), + TQT_TQOBJECT(this), TQT_SLOT( operationChanged( bool ) ) ); + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( removeRecentFiles() ), + TQT_TQOBJECT(this), TQT_SLOT( removeRecentFiles() ) ); connect( mManager, TQT_SIGNAL( conversionClosed() ), - this, TQT_SLOT(conversionClosed()) ); + TQT_TQOBJECT(this), TQT_SLOT(conversionClosed()) ); connect( mManager, TQT_SIGNAL( searchBarClosed() ), - this, TQT_SLOT(searchBarClosed()) ); + TQT_TQOBJECT(this), TQT_SLOT(searchBarClosed()) ); // // Read configuration from file and set the default editor size. @@ -125,68 +125,68 @@ KHexEdit::~KHexEdit( void ) void KHexEdit::setupActions( void ) { - KStdAction::openNew( editor(), TQT_SLOT(newFile()), actionCollection() ); - KStdAction::open( editor(), TQT_SLOT(open()), actionCollection() ); + KStdAction::openNew( TQT_TQOBJECT(editor()), TQT_SLOT(newFile()), actionCollection() ); + KStdAction::open( TQT_TQOBJECT(editor()), TQT_SLOT(open()), actionCollection() ); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); mAction.insert = new KAction( i18n("&Insert..."), CTRL+Key_I, - editor(), TQT_SLOT(insertFile()), actionCollection(), "insert_file" ); - mAction.openRecent = KStdAction::openRecent( this, TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() ); - mAction.save = KStdAction::save( editor(), TQT_SLOT(save()), actionCollection() ); - mAction.saveAs = KStdAction::saveAs( editor(), TQT_SLOT(saveAs()), actionCollection() ); - mAction.revert = KStdAction::revert( editor(), TQT_SLOT(reload()), actionCollection() ); - //mAction.revert = KStdAction::revert( this, TQT_SLOT(resizeTest()), actionCollection() ); - - mAction.close = KStdAction::close( editor(), TQT_SLOT(close()), actionCollection() ); - mAction.print = KStdAction::print( editor(), TQT_SLOT(print()), actionCollection() ); + TQT_TQOBJECT(editor()), TQT_SLOT(insertFile()), actionCollection(), "insert_file" ); + mAction.openRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() ); + mAction.save = KStdAction::save( TQT_TQOBJECT(editor()), TQT_SLOT(save()), actionCollection() ); + mAction.saveAs = KStdAction::saveAs( TQT_TQOBJECT(editor()), TQT_SLOT(saveAs()), actionCollection() ); + mAction.revert = KStdAction::revert( TQT_TQOBJECT(editor()), TQT_SLOT(reload()), actionCollection() ); + //mAction.revert = KStdAction::revert( TQT_TQOBJECT(this), TQT_SLOT(resizeTest()), actionCollection() ); + + mAction.close = KStdAction::close( TQT_TQOBJECT(editor()), TQT_SLOT(close()), actionCollection() ); + mAction.print = KStdAction::print( TQT_TQOBJECT(editor()), TQT_SLOT(print()), actionCollection() ); mAction.exportData = new KAction( i18n("E&xport..."), 0, - editor(), TQT_SLOT(exportDialog()), actionCollection(), "export" ); + TQT_TQOBJECT(editor()), TQT_SLOT(exportDialog()), actionCollection(), "export" ); mAction.cancel = new KAction( i18n("&Cancel Operation"), - "stop", 0, editor(), TQT_SLOT(stop()), actionCollection(), "cancel" ); + "stop", 0, TQT_TQOBJECT(editor()), TQT_SLOT(stop()), actionCollection(), "cancel" ); mAction.readOnly = new KToggleAction( i18n("&Read Only"), - 0, editor(), TQT_SLOT(toggleWriteProtection()),actionCollection(), "read_only" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleWriteProtection()),actionCollection(), "read_only" ); mAction.resizeLock = new KToggleAction( i18n("&Allow Resize"), - 0, editor(), TQT_SLOT(toggleResizeLock()),actionCollection(), "resize_lock" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleResizeLock()),actionCollection(), "resize_lock" ); mAction.newWindow = new KAction( i18n("N&ew Window"), - 0, this, TQT_SLOT(newWindow()),actionCollection(), "new_window" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(newWindow()),actionCollection(), "new_window" ); mAction.closeWindow= new KAction( i18n("Close &Window"), - 0, this, TQT_SLOT(closeWindow()),actionCollection(), "close_window" ); - mAction.quit = KStdAction::quit( this, TQT_SLOT(closeProgram()), actionCollection() ); - - mAction.undo = KStdAction::undo( editor(), TQT_SLOT(undo()), actionCollection() ); - mAction.redo = KStdAction::redo( editor(), TQT_SLOT(redo()), actionCollection() ); - mAction.cut = KStdAction::cut( editor(), TQT_SLOT(cut()), actionCollection() ); - mAction.copy = KStdAction::copy( editor(), TQT_SLOT(copy()), actionCollection() ); - mAction.paste = KStdAction::paste( editor(), TQT_SLOT(paste()), actionCollection() ); - mAction.selectAll = KStdAction::selectAll(editor(), TQT_SLOT(selectAll()),actionCollection() ); - mAction.unselect = KStdAction::deselect(editor(), TQT_SLOT(unselect()), actionCollection()); - mAction.find = KStdAction::find( editor(), TQT_SLOT(find()), actionCollection() ); - mAction.findNext = KStdAction::findNext(editor(), TQT_SLOT(findNext()), actionCollection() ); - mAction.findPrev = KStdAction::findPrev(editor(),TQT_SLOT(findPrevious()),actionCollection() ); - mAction.replace = KStdAction::replace( editor(), TQT_SLOT(replace()), actionCollection() ); + 0, TQT_TQOBJECT(this), TQT_SLOT(closeWindow()),actionCollection(), "close_window" ); + mAction.quit = KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(closeProgram()), actionCollection() ); + + mAction.undo = KStdAction::undo( TQT_TQOBJECT(editor()), TQT_SLOT(undo()), actionCollection() ); + mAction.redo = KStdAction::redo( TQT_TQOBJECT(editor()), TQT_SLOT(redo()), actionCollection() ); + mAction.cut = KStdAction::cut( TQT_TQOBJECT(editor()), TQT_SLOT(cut()), actionCollection() ); + mAction.copy = KStdAction::copy( TQT_TQOBJECT(editor()), TQT_SLOT(copy()), actionCollection() ); + mAction.paste = KStdAction::paste( TQT_TQOBJECT(editor()), TQT_SLOT(paste()), actionCollection() ); + mAction.selectAll = KStdAction::selectAll( TQT_TQOBJECT(editor()), TQT_SLOT(selectAll()),actionCollection() ); + mAction.unselect = KStdAction::deselect( TQT_TQOBJECT(editor()), TQT_SLOT(unselect()), actionCollection()); + mAction.tqfind = KStdAction::find( TQT_TQOBJECT(editor()), TQT_SLOT(tqfind()), actionCollection() ); + mAction.findNext = KStdAction::findNext( TQT_TQOBJECT(editor()), TQT_SLOT(findNext()), actionCollection() ); + mAction.findPrev = KStdAction::findPrev( TQT_TQOBJECT(editor()),TQT_SLOT(findPrevious()),actionCollection() ); + mAction.tqreplace = KStdAction::replace( TQT_TQOBJECT(editor()), TQT_SLOT(tqreplace()), actionCollection() ); mAction.gotoOffset = new KAction( i18n("&Goto Offset..."), CTRL+Key_G, - editor(), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" ); + TQT_TQOBJECT(editor()), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" ); mAction.insertPattern = new KAction( i18n("&Insert Pattern..."), CTRL+Key_Insert, - editor(), TQT_SLOT(insertPattern()), actionCollection(), "insert_pattern" ); + TQT_TQOBJECT(editor()), TQT_SLOT(insertPattern()), actionCollection(), "insert_pattern" ); mAction.copyAsText = new KAction( i18n("Copy as &Text"), 0, - editor(), TQT_SLOT(copyText()), actionCollection(), "copy_as_text" ); + TQT_TQOBJECT(editor()), TQT_SLOT(copyText()), actionCollection(), "copy_as_text" ); mAction.pasteToNewFile = new KAction( i18n("Paste into New &File"), 0, - editor(), TQT_SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" ); + TQT_TQOBJECT(editor()), TQT_SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" ); mAction.pasteToNewWindow = new KAction( i18n("Paste into New &Window"), 0, - this, TQT_SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" ); + TQT_TQOBJECT(this), TQT_SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" ); mAction.hexadecimal = new KRadioAction( i18n("&Hexadecimal"), - 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_hex" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_hex" ); mAction.decimal = new KRadioAction( i18n("&Decimal"), - 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_dec" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_dec" ); mAction.octal = new KRadioAction( i18n("&Octal"), - 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_oct" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_oct" ); mAction.binary = new KRadioAction( i18n("&Binary"), - 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_bin" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_bin" ); mAction.textOnly = new KRadioAction( i18n("&Text"), - 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_text" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_text" ); mAction.hexadecimal->setExclusiveGroup( "displayMode" ); mAction.decimal->setExclusiveGroup( "displayMode" ); mAction.octal->setExclusiveGroup( "displayMode" ); @@ -194,104 +194,104 @@ actionCollection()); mAction.textOnly->setExclusiveGroup( "displayMode" ); mAction.showOffsetColumn = new KToggleAction( i18n("Show O&ffset Column"), - 0, editor(), TQT_SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" ); mAction.showTextColumn = new KToggleAction( i18n("Show Te&xt Field"), - 0, editor(), TQT_SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" ); mAction.offsetAsDecimal = new KToggleAction( i18n("Off&set as Decimal"), - 0, editor(), TQT_SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" ); mAction.dataUppercase = new KToggleAction( i18n("&Upper Case (Data)"), - 0, editor(), TQT_SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" ); mAction.offsetUppercase = new KToggleAction( i18n("Upper &Case (Offset)"), - 0, editor(), TQT_SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" ); + 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" ); mAction.defaultEncoding = new KRadioAction( i18n("&Default encoding", "&Default"), - 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_default" ); + 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_default" ); mAction.usAsciiEncoding = new KRadioAction( i18n("US-&ASCII (7 bit)"), - 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ascii"); + 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_ascii"); mAction.ebcdicEncoding = new KRadioAction( i18n("&EBCDIC"), - 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ebcdic" ); + 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_ebcdic" ); // mAction.customEncoding = new KAction( i18n("&Custom..."), -// 0, editor(), TQT_SLOT( encoding()), actionCollection(), "enc_custom" ); +// 0, TQT_TQOBJECT(editor()), TQT_SLOT( encoding()), actionCollection(), "enc_custom" ); mAction.defaultEncoding->setExclusiveGroup( "encodingMode" ); mAction.usAsciiEncoding->setExclusiveGroup( "encodingMode" ); mAction.ebcdicEncoding->setExclusiveGroup( "encodingMode" ); mAction.strings = new KAction( i18n("&Extract Strings..."), 0, - editor(), TQT_SLOT(strings()), actionCollection(), "extract_strings" ); + TQT_TQOBJECT(editor()), TQT_SLOT(strings()), actionCollection(), "extract_strings" ); // mAction.recordViewer = new KAction( i18n("&Record Viewer"), 0, -// editor(), TQT_SLOT(recordView()), actionCollection(), "record_viewer" ); +// TQT_TQOBJECT(editor()), TQT_SLOT(recordView()), actionCollection(), "record_viewer" ); mAction.filter = new KAction( i18n("&Binary Filter..."), 0, - editor(), TQT_SLOT(filter()), actionCollection(), "binary_filter" ); + TQT_TQOBJECT(editor()), TQT_SLOT(filter()), actionCollection(), "binary_filter" ); mAction.characterTable = new KAction( i18n("&Character Table"), 0, - editor(), TQT_SLOT(chart()), actionCollection(), "char_table" ); + TQT_TQOBJECT(editor()), TQT_SLOT(chart()), actionCollection(), "char_table" ); mAction.converter = new KAction( i18n("C&onverter"), 0, - editor(), TQT_SLOT(converter()), actionCollection(), "converter" ); + TQT_TQOBJECT(editor()), TQT_SLOT(converter()), actionCollection(), "converter" ); mAction.statistics = new KAction( i18n("&Statistics"), 0, - editor(), TQT_SLOT(statistics()), actionCollection(), "statistics" ); + TQT_TQOBJECT(editor()), TQT_SLOT(statistics()), actionCollection(), "statistics" ); - mAction.addBookmark = KStdAction::addBookmark( editor(), + mAction.addBookmark = KStdAction::addBookmark( TQT_TQOBJECT(editor()), TQT_SLOT(addBookmark()), actionCollection() ); mAction.replaceBookmark = new KAction( i18n("&Replace Bookmark"), CTRL+Key_E, - editor(), TQT_SLOT(replaceBookmark()), actionCollection(), "replace_bookmark"); + TQT_TQOBJECT(editor()), TQT_SLOT(replaceBookmark()), actionCollection(), "replace_bookmark"); mAction.removeBookmark = new KAction( i18n("R&emove Bookmark"), CTRL+Key_U, - editor(), TQT_SLOT(removeBookmark()), actionCollection(), "remove_bookmark" ); + TQT_TQOBJECT(editor()), TQT_SLOT(removeBookmark()), actionCollection(), "remove_bookmark" ); mAction.removeAllBookmark = new KAction( i18n("Re&move All"), 0, - editor(), TQT_SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" ); + TQT_TQOBJECT(editor()), TQT_SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" ); mAction.nextBookmark = new KAction( i18n("Goto &Next Bookmark"), - ALT+Key_Down, editor(), + ALT+Key_Down, TQT_TQOBJECT(editor()), TQT_SLOT(gotoNextBookmark()), actionCollection(), "next_bookmark" ); mAction.prevBookmark = new KAction( i18n("Goto &Previous Bookmark"), - ALT+Key_Up, editor(), + ALT+Key_Up, TQT_TQOBJECT(editor()), TQT_SLOT(gotoPrevBookmark()), actionCollection(), "prev_bookmark" ); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); mAction.showFullPath = new KToggleAction( i18n("Show F&ull Path"), - 0, this, TQT_SLOT(showFullPath()), actionCollection(), "show_full_path" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(showFullPath()), actionCollection(), "show_full_path" ); mAction.tabHide = new KRadioAction( i18n("&Hide"), - 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" ); mAction.tabShowAboveEditor = new KRadioAction( i18n("&Above Editor"), - 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_above" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_above" ); mAction.tabShowBelowEditor = new KRadioAction( i18n("&Below Editor"), - 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_below" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_below" ); mAction.tabHide->setExclusiveGroup( "editorTab" ); mAction.tabShowAboveEditor->setExclusiveGroup( "editorTab" ); mAction.tabShowBelowEditor->setExclusiveGroup( "editorTab" ); mAction.conversionHide = new KRadioAction( i18n("&Hide"), - 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_hide"); + 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_hide"); mAction.conversionFloat = new KRadioAction( i18n("&Floating"), - 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_float"); + 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_float"); mAction.conversionEmbed = new KRadioAction( i18n("&Embed in Main Window"), - 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_embed"); + 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_embed"); mAction.conversionHide->setExclusiveGroup( "conversionField" ); mAction.conversionFloat->setExclusiveGroup( "conversionField" ); mAction.conversionEmbed->setExclusiveGroup( "conversionField" ); mAction.searchHide = new KRadioAction( i18n("&Hide"), - 0, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_hide" ); + 0, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_hide" ); mAction.searchShowAboveEditor = new KRadioAction( i18n("&Above Editor"), - Key_F5, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_above" ); + Key_F5, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_above" ); mAction.searchShowBelowEditor = new KRadioAction( i18n("&Below Editor"), - Key_F6, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_below" ); + Key_F6, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_below" ); mAction.searchHide->setExclusiveGroup( "searchBar" ); mAction.searchShowAboveEditor->setExclusiveGroup( "searchBar" ); mAction.searchShowBelowEditor->setExclusiveGroup( "searchBar" ); - KStdAction::saveOptions(this, TQT_SLOT(writeConfiguration()), actionCollection()); - KStdAction::preferences(editor(),TQT_SLOT(options()),actionCollection() ); + KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(writeConfiguration()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(editor()) ,TQT_SLOT(options()),actionCollection() ); // mAction.favorites = new KAction( i18n("P&rofiles..."), 0, -// editor(), TQT_SLOT(favorites()), actionCollection(), "favorites" ); +// TQT_TQOBJECT(editor()), TQT_SLOT(favorites()), actionCollection(), "favorites" ); - KStdAction::help( this, TQT_SLOT(appHelpActivated()), actionCollection() ); + KStdAction::help( TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection() ); mDragLabel = new CDragLabel(this); mDragLabel->setPixmap( UserIcon( "hexdrag" ) ); - mDragLabel->setDragMask( UserIcon( "hexmask" ) ); + mDragLabel->setDragMask( UserIcon( "hextqmask" ) ); mDragLabel->setEnabled( false ); // Enabled once we open a document TQToolTip::add( mDragLabel, i18n("Drag document") ); - (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, editor(), TQT_SLOT(options()), actionCollection(), "drag_document"); + (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, TQT_TQOBJECT(editor()), TQT_SLOT(options()), actionCollection(), "drag_document"); createGUI("khexeditui.rc", false); @@ -300,7 +300,7 @@ actionCollection()); int id = 100; toolBar(0)->insertButton( MainBarIcon("lock"), id, TQT_SIGNAL(clicked()), - editor(), TQT_SLOT(toggleWriteProtection()), true, + TQT_TQOBJECT(editor()), TQT_SLOT(toggleWriteProtection()), true, i18n("Toggle write protection") ); toolBar(0)->alignItemRight( id ); mWriteProtectButton = toolBar(0)->getButton(id); @@ -316,14 +316,14 @@ void KHexEdit::setupStatusBar( void ) { CStatusBarProgress *progess = new CStatusBarProgress( statusBar() ); statusBar()->addWidget( progess, 10 ); - connect( progess, TQT_SIGNAL(pressed()), editor(), TQT_SLOT(stop()) ); - connect( editor(), TQT_SIGNAL( setProgress( int ) ), + connect( progess, TQT_SIGNAL(pressed()), TQT_TQOBJECT(editor()), TQT_SLOT(stop()) ); + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgress( int ) ), progess, TQT_SLOT( setValue( int ) ) ); - connect( editor(), TQT_SIGNAL( setProgress( int, int ) ), + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgress( int, int ) ), progess, TQT_SLOT( setValue( int, int ) ) ); - connect( editor(), TQT_SIGNAL( enableProgressText( bool ) ), + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( enableProgressText( bool ) ), progess, TQT_SLOT( setTextEnabled( bool ) ) ); - connect( editor(), TQT_SIGNAL( setProgressText( const TQString & ) ), + connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgressText( const TQString & ) ), progess, TQT_SLOT( setText( const TQString & ) ) ); statusBar()->insertFixedItem( i18n("Selection: 0000:0000 0000:0000"), @@ -391,7 +391,7 @@ void KHexEdit::initialize( bool openFiles ) maxItems = 1; for( unsigned int i = 1 ; i <= maxItems ; i++ ) { - const TQString key = TQString( "File%1" ).arg( i ); + const TQString key = TQString( "File%1" ).tqarg( i ); const TQString value = config->readPathEntry( key ); if (!value.isEmpty()) @@ -411,7 +411,7 @@ void KHexEdit::initialize( bool openFiles ) // is displayed, then the editor will not be visible until the error // is confirmed and the (modal) dialog is closed. // - TQTimer::singleShot( 100, this, TQT_SLOT(delayedStartupOpen()) ); + TQTimer::singleShot( 100, TQT_TQOBJECT(this), TQT_SLOT(delayedStartupOpen()) ); } @@ -479,7 +479,7 @@ void KHexEdit::addRecentFile( const TQString &fileName ) return; } - if( fileName.contains( i18n( "Untitled" ), false ) ) + if( fileName.tqcontains( i18n( "Untitled" ), false ) ) { return; } @@ -498,7 +498,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName ) return; } - if( fileName.contains( i18n( "Untitled" ), false ) ) + if( fileName.tqcontains( i18n( "Untitled" ), false ) ) { return; } @@ -511,7 +511,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName ) void KHexEdit::renameRecentFile(const TQString &curName, const TQString &newName) { - if( curName.contains( i18n( "Untitled" ), false ) ) + if( curName.tqcontains( i18n( "Untitled" ), false ) ) { addRecentFile( newName ); } @@ -533,7 +533,7 @@ void KHexEdit::slotFileOpenRecent( const KURL& url ) else { // ### TODO: support network transparency - KMessageBox::error( this, i18n("Non local recent file: %1").arg( url.prettyURL() ) ); + KMessageBox::error( this, i18n("Non local recent file: %1").tqarg( url.prettyURL() ) ); } } @@ -545,7 +545,7 @@ KHexEdit *KHexEdit::newWindow( void ) { TQString msg = i18n( "Can not create new window.\n" ); msg += hexError( Err_NoMemory ); - KMessageBox::error( topLevelWidget(), msg ); + KMessageBox::error( tqtopLevelWidget(), msg ); return(0); } hexEdit->show(); @@ -582,7 +582,7 @@ void KHexEdit::closeProgram( void ) TQString msg = i18n("" "There are windows with unsaved modified documents. " "If you quit now, these modifications will be lost."); - int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg, TQString::null, KStdGuiItem::quit() ); + int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg, TQString(), KStdGuiItem::quit() ); if( reply == KMessageBox::Continue ) { break; @@ -755,11 +755,11 @@ void KHexEdit::cursorChanged( SCursorState &state ) } else { - SDisplayLayout &layout = editor()->layout(); + SDisplayLayout &tqlayout = editor()->tqlayout(); - if( layout.offsetMode == SDisplayLayout::hexadecimal ) + if( tqlayout.offsetMode == SDisplayLayout::hexadecimal ) { - if( layout.offsetUpperCase == false ) + if( tqlayout.offsetUpperCase == false ) { offset += TQString().sprintf( " %04x:%04x-%u", state.offset>>16, state.offset&0x0000FFFF, state.cell ); @@ -788,7 +788,7 @@ void KHexEdit::fileState( SFileState &state ) { if( state.valid == true ) { - statusBar()->changeItem( i18n("Size: %1").arg( state.size ), status_Size); + statusBar()->changeItem( i18n("Size: %1").tqarg( state.size ), status_Size); statusBar()->changeItem( state.modified ? "!" : "", status_Modified); if( mIsModified != state.modified ) @@ -807,23 +807,23 @@ void KHexEdit::fileState( SFileState &state ) -void KHexEdit::layoutChanged( const SDisplayLayout &layout ) +void KHexEdit::tqlayoutChanged( const SDisplayLayout &tqlayout ) { KRadioAction *radioAction; - if( layout.primaryMode == SDisplayLayout::hexadecimal ) + if( tqlayout.primaryMode == SDisplayLayout::hexadecimal ) { radioAction = mAction.hexadecimal; } - else if( layout.primaryMode == SDisplayLayout::decimal ) + else if( tqlayout.primaryMode == SDisplayLayout::decimal ) { radioAction = mAction.decimal; } - else if( layout.primaryMode == SDisplayLayout::octal ) + else if( tqlayout.primaryMode == SDisplayLayout::octal ) { radioAction = mAction.octal; } - else if( layout.primaryMode == SDisplayLayout::binary ) + else if( tqlayout.primaryMode == SDisplayLayout::binary ) { radioAction = mAction.binary; } @@ -841,15 +841,15 @@ void KHexEdit::layoutChanged( const SDisplayLayout &layout ) mAction.dataUppercase->blockSignals(true); mAction.offsetUppercase->blockSignals(true); - mAction.showOffsetColumn->setChecked( layout.offsetVisible ); + mAction.showOffsetColumn->setChecked( tqlayout.offsetVisible ); mAction.showTextColumn->setEnabled( - layout.primaryMode != SDisplayLayout::textOnly ); + tqlayout.primaryMode != SDisplayLayout::textOnly ); mAction.showTextColumn->setChecked( - layout.secondaryMode != SDisplayLayout::hide ); + tqlayout.secondaryMode != SDisplayLayout::hide ); mAction.offsetAsDecimal->setChecked( - layout.offsetMode != SDisplayLayout::hexadecimal); - mAction.dataUppercase->setChecked( layout.primaryUpperCase ); - mAction.offsetUppercase->setChecked( layout.offsetUpperCase ); + tqlayout.offsetMode != SDisplayLayout::hexadecimal); + mAction.dataUppercase->setChecked( tqlayout.primaryUpperCase ); + mAction.offsetUppercase->setChecked( tqlayout.offsetUpperCase ); mAction.showOffsetColumn->blockSignals(false); mAction.showTextColumn->blockSignals(false); @@ -857,23 +857,23 @@ void KHexEdit::layoutChanged( const SDisplayLayout &layout ) mAction.dataUppercase->blockSignals(false); mAction.offsetUppercase->blockSignals(false); - if( layout.primaryMode == SDisplayLayout::hexadecimal ) + if( tqlayout.primaryMode == SDisplayLayout::hexadecimal ) { statusBar()->changeItem( i18n("Hex"), status_Layout ); } - else if( layout.primaryMode == SDisplayLayout::decimal ) + else if( tqlayout.primaryMode == SDisplayLayout::decimal ) { statusBar()->changeItem( i18n("Dec"), status_Layout ); } - else if( layout.primaryMode == SDisplayLayout::octal ) + else if( tqlayout.primaryMode == SDisplayLayout::octal ) { statusBar()->changeItem( i18n("Oct"), status_Layout ); } - else if( layout.primaryMode == SDisplayLayout::binary ) + else if( tqlayout.primaryMode == SDisplayLayout::binary ) { statusBar()->changeItem( i18n("Bin"), status_Layout ); } - else if( layout.primaryMode == SDisplayLayout::textOnly ) + else if( tqlayout.primaryMode == SDisplayLayout::textOnly ) { statusBar()->changeItem( i18n("Txt"), status_Layout ); } @@ -922,8 +922,8 @@ void KHexEdit::bookmarkChanged( TQPtrList<SCursorOffset> &list ) for( SCursorOffset *p=list.first(); p!=0; p=list.next(), i++ ) { offset.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF ); - text = i18n("Offset: %1").arg(offset); - KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), this, text.latin1()); + text = i18n("Offset: %1").tqarg(offset); + KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), TQT_TQOBJECT(this), text.latin1()); int key = acceleratorNumKey( i ); if( key > 0 ) { @@ -1021,7 +1021,7 @@ void KHexEdit::encodingChanged( const SEncodeState &encodeState ) if( mSelectionSize == 0 ) { - statusBar()->changeItem( i18n("Encoding: %1").arg(encodeState.name), + statusBar()->changeItem( i18n("Encoding: %1").tqarg(encodeState.name), status_Selection ); } } @@ -1186,7 +1186,7 @@ void KHexEdit::setSelectionText( uint selectionOffset, uint selectionSize ) else { statusBar()->changeItem( - i18n("Encoding: %1").arg(hexView()->encoding().name), status_Selection); + i18n("Encoding: %1").tqarg(hexView()->encoding().name), status_Selection); } } @@ -1232,7 +1232,7 @@ void KHexEdit::removeDocument( const TQString &fileName ) { TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); - documentMenu->removeItemAt( mDocumentList.findIndex(*it) ); + documentMenu->removeItemAt( mDocumentList.tqfindIndex(*it) ); mDocumentList.remove( it ); for( uint i=0; i < mDocumentList.count(); i++ ) @@ -1259,7 +1259,7 @@ void KHexEdit::renameDocument( const TQString &curName, const TQString &newName if( *it == curName ) { TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); - documentMenu->changeItem( newName, mDocumentList.findIndex(*it) ); + documentMenu->changeItem( newName, mDocumentList.tqfindIndex(*it) ); mDocumentList.insert( it, newName ); mDocumentList.remove( it ); return; diff --git a/khexedit/toplevel.h b/khexedit/toplevel.h index f65cb9f..b15517c 100644 --- a/khexedit/toplevel.h +++ b/khexedit/toplevel.h @@ -48,6 +48,7 @@ class CDragLabel; class KHexEdit : public KMainWindow { Q_OBJECT + TQ_OBJECT enum StatusBarId { @@ -84,10 +85,10 @@ class KHexEdit : public KMainWindow KAction *paste; KAction *selectAll; KAction *unselect; - KAction *find; + KAction *tqfind; KAction *findNext; KAction *findPrev; - KAction *replace; + KAction *tqreplace; KAction *gotoOffset; KAction *insertPattern; KAction *copyAsText; @@ -156,7 +157,7 @@ class KHexEdit : public KMainWindow void operationChanged( bool state ); void cursorChanged( SCursorState &state ); void fileState( SFileState &state ); - void layoutChanged( const SDisplayLayout &layout ); + void tqlayoutChanged( const SDisplayLayout &tqlayout ); void inputModeChanged( const SDisplayInputMode &mode ); void bookmarkChanged( TQPtrList<SCursorOffset> &list ); void removeRecentFile( const TQString &fileName ); @@ -248,7 +249,7 @@ protected: inline void KHexEdit::addStartupFile( const TQString &fileName ) { mStartupFileList.prepend( fileName ); - mStartupOffsetList.prepend( TQString("%1").arg(mStartupOffset,0,16) ); + mStartupOffsetList.prepend( TQString("%1").tqarg(mStartupOffset,0,16) ); mStartupOffset = 0; } diff --git a/kjots/CHANGES b/kjots/CHANGES index 9815d90..f8fcbe8 100644 --- a/kjots/CHANGES +++ b/kjots/CHANGES @@ -10,17 +10,17 @@ new in version 0.5 (Aaron J. Seigo) (Carsten Pfeiffer <pfeiffer@kde.org>) - use KEdit instead of QMultiLineEdit directly - -> gains Search & replace + undo + -> gains Search & tqreplace + undo - allocate KTMainWindow on the heap to avoid double deletion on quit new in version 0.4 (Mario Weilguni <mweilguni@kde.org>) - works now with Qt 2.0 -- fixed broken layout of main window -- layout improvements in AskFileName() -- layout improvements in SubjList() +- fixed broken tqlayout of main window +- tqlayout improvements in AskFileName() +- tqlayout improvements in SubjList() - compiles without warnings - "Apply" button is only activated when changes were made -- improved layout of configuration dialog +- improved tqlayout of configuration dialog - fixed a bug in the font selection - now compiles with EGCS ( Robert Williams ) @@ -59,10 +59,10 @@ new in version 0.2.1 new in version 0.2.0 -- changed the layout to be more KDE conforming (toolbar, statusbar,...) +- changed the tqlayout to be more KDE conforming (toolbar, statusbar,...) - folders are now called books and entries are pages - added subject to each page -- you may popup a window with a list of all subjects and use it to find +- you may popup a window with a list of all subjects and use it to tqfind pages more easily - further reduced the minimum size of the window diff --git a/kjots/KJotsMain.cpp b/kjots/KJotsMain.cpp index e1dedc9..0f9e645 100644 --- a/kjots/KJotsMain.cpp +++ b/kjots/KJotsMain.cpp @@ -72,7 +72,7 @@ KJotsMain::KJotsMain(const char* name) // the subject list subjectList = new KListView(splitter, "subjectList"); subjectList->setRootIsDecorated(true); - subjectList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + subjectList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); subjectList->setMinimumWidth(subjectList->fontMetrics().maxWidth() * 10 + 5); subjectList->addColumn(i18n("Pages")); subjectList->setFullWidth(true); @@ -90,7 +90,7 @@ KJotsMain::KJotsMain(const char* name) textStack = new TQWidgetStack(splitter); me_text = new KJotsEdit(textStack, "me_text"); - me_text->setFocusPolicy(TQWidget::StrongFocus); + me_text->setFocusPolicy(TQ_StrongFocus); me_text->setEnabled(false); textStack->addWidget(me_text); connect(me_text, TQT_SIGNAL(findSuccessful()), this, TQT_SLOT(slotFindSuccessful())); @@ -101,72 +101,72 @@ KJotsMain::KJotsMain(const char* name) TQVBoxLayout *bookGrid = new TQVBoxLayout(f_main, KDialog::marginHint(), KDialog::spacingHint()); bookGrid->addWidget(splitter, 0, 0); bookGrid->setMargin(0); - splitter->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, 2, 1)); + splitter->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, 2, 1)); // create actions - actions[ACTION_NEXT_BOOK] = new KAction(i18n("Next Book"), TQString::null, CTRL + Key_D, this, + actions[ACTION_NEXT_BOOK] = new KAction(i18n("Next Book"), TQString(), CTRL + Key_D, TQT_TQOBJECT(this), TQT_SLOT(nextBook()), actionCollection(), "go_next_book"); - actions[ACTION_PREV_BOOK] = new KAction(i18n("Previous Book"), TQString::null, CTRL + SHIFT + Key_D, this, + actions[ACTION_PREV_BOOK] = new KAction(i18n("Previous Book"), TQString(), CTRL + SHIFT + Key_D, TQT_TQOBJECT(this), TQT_SLOT(prevBook()), actionCollection(), "go_prev_book"); - actions[ACTION_NEXT_PAGE] = new KAction(i18n("Next Page"), TQString::null, CTRL + Key_PageDown, this, + actions[ACTION_NEXT_PAGE] = new KAction(i18n("Next Page"), TQString(), CTRL + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(nextPage()), actionCollection(), "go_next_page"); - actions[ACTION_PREV_PAGE] = new KAction(i18n("Previous Page"), TQString::null, CTRL + Key_PageUp, this, + actions[ACTION_PREV_PAGE] = new KAction(i18n("Previous Page"), TQString(), CTRL + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(prevPage()), actionCollection(), "go_prev_page"); - actions[ACTION_NEW_PAGE] = KStdAction::openNew(this, TQT_SLOT(newEntry()), actionCollection()); + actions[ACTION_NEW_PAGE] = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newEntry()), actionCollection()); actions[ACTION_NEW_PAGE]->setText(i18n("&New Page")); - actions[ACTION_NEW_BOOK] = new KAction(i18n("New &Book..."), "contents", CTRL + SHIFT + Key_N, this, + actions[ACTION_NEW_BOOK] = new KAction(i18n("New &Book..."), "contents", CTRL + SHIFT + Key_N, TQT_TQOBJECT(this), TQT_SLOT(createNewBook()), actionCollection(), "new_book"); exportPageMenu = new KActionMenu(i18n("Export Page"), actionCollection(), "save_page_to"); - actions[ACTION_PAGE2TEXT] = new KAction(i18n("To Text File..."), TQString::null, 0, this, + actions[ACTION_PAGE2TEXT] = new KAction(i18n("To Text File..."), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(writePage()), actionCollection(), "save_page_to_ascii"); actions[ACTION_PAGE2TEXT]->plug(exportPageMenu->popupMenu()); - actions[ACTION_PAGE2HTML] = new KAction(i18n("To HTML File..."), TQString::null, 0, this, + actions[ACTION_PAGE2HTML] = new KAction(i18n("To HTML File..."), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(writePageToHTML()), actionCollection(), "save_page_to_html"); actions[ACTION_PAGE2HTML]->plug(exportPageMenu->popupMenu()); exportBookMenu = new KActionMenu(i18n("Export Book"), actionCollection(), "save_book_to"); - actions[ACTION_BOOK2TEXT] = new KAction(i18n("To Text File..."), TQString::null, 0, this, + actions[ACTION_BOOK2TEXT] = new KAction(i18n("To Text File..."), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(writeBook()), actionCollection(), "save_book_to_ascii"); actions[ACTION_BOOK2TEXT]->plug(exportBookMenu->popupMenu()); - actions[ACTION_BOOK2HTML] = new KAction(i18n("To HTML File..."), TQString::null, 0, this, + actions[ACTION_BOOK2HTML] = new KAction(i18n("To HTML File..."), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(writeBookToHTML()), actionCollection(), "save_book_to_html"); actions[ACTION_BOOK2HTML]->plug(exportBookMenu->popupMenu()); - actions[ACTION_DELETE_PAGE] = new KAction(i18n("&Delete Page"), "editdelete", CTRL + Key_Delete, this, + actions[ACTION_DELETE_PAGE] = new KAction(i18n("&Delete Page"), "editdelete", CTRL + Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(deleteEntry()), actionCollection(), "del_page"); - actions[ACTION_DELETE_BOOK] = new KAction(i18n("Delete Boo&k"), "editdelete", CTRL + SHIFT + Key_Delete, this, + actions[ACTION_DELETE_BOOK] = new KAction(i18n("Delete Boo&k"), "editdelete", CTRL + SHIFT + Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(deleteBook()), actionCollection(), "del_folder"); actions[ACTION_MANUAL_SAVE] = new KAction(i18n("Manual Save"), 0, KStdAccel::save(), - this, TQT_SLOT(autoSave()), actionCollection(), "manual_save"); - actions[ACTION_PRINT] = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection()); - actions[ACTION_QUIT] = KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); + TQT_TQOBJECT(this), TQT_SLOT(autoSave()), actionCollection(), "manual_save"); + actions[ACTION_PRINT] = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection()); + actions[ACTION_TQUIT] = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); - actions[ACTION_CUT] = KStdAction::cut(me_text, TQT_SLOT(cut()), actionCollection()); + actions[ACTION_CUT] = KStdAction::cut(TQT_TQOBJECT(me_text), TQT_SLOT(cut()), actionCollection()); connect(me_text, TQT_SIGNAL(copyAvailable(bool)), actions[ACTION_CUT], TQT_SLOT(setEnabled(bool))); actions[ACTION_CUT]->setEnabled(false); - actions[ACTION_COPY] = KStdAction::copy(me_text, TQT_SLOT(copy()), actionCollection()); + actions[ACTION_COPY] = KStdAction::copy(TQT_TQOBJECT(me_text), TQT_SLOT(copy()), actionCollection()); connect(me_text, TQT_SIGNAL(copyAvailable(bool)), actions[ACTION_COPY], TQT_SLOT(setEnabled(bool))); actions[ACTION_COPY]->setEnabled(false); - actions[ACTION_PASTE2TITLE] = new KAction(i18n("Copy &into Page Title"), "editcopy", CTRL+Key_T, this, + actions[ACTION_PASTE2TITLE] = new KAction(i18n("Copy &into Page Title"), "editcopy", CTRL+Key_T, TQT_TQOBJECT(this), TQT_SLOT(copySelection()), actionCollection(), "copyIntoTitle"); connect(me_text, TQT_SIGNAL(copyAvailable(bool)), actions[ACTION_PASTE2TITLE], TQT_SLOT(setEnabled(bool))); actions[ACTION_PASTE2TITLE]->setEnabled(false); - actions[ACTION_PASTE] = KStdAction::pasteText(me_text, TQT_SLOT(paste()), actionCollection()); + actions[ACTION_PASTE] = KStdAction::pasteText(TQT_TQOBJECT(me_text), TQT_SLOT(paste()), actionCollection()); - actions[ACTION_FIND] = KStdAction::find( this, TQT_SLOT( slotSearch() ), actionCollection() ); - actions[ACTION_FIND_NEXT] = KStdAction::findNext( this, TQT_SLOT( slotRepeatSearch() ), actionCollection() ); + actions[ACTION_FIND] = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotSearch() ), actionCollection() ); + actions[ACTION_FIND_NEXT] = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotRepeatSearch() ), actionCollection() ); actions[ACTION_FIND_NEXT]->setEnabled(false); - actions[ACTION_REPLACE] = KStdAction::replace( this, TQT_SLOT( slotReplace() ), actionCollection() ); + actions[ACTION_REPLACE] = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), actionCollection() ); - actions[ACTION_RENAME] = new KAction(i18n("Rename..."), TQString::null, CTRL + Key_M, this, + actions[ACTION_RENAME] = new KAction(i18n("Rename..."), TQString(), CTRL + Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotRenameEntry()), actionCollection(), "rename_entry"); - actions[ACTION_INSERT_DATE] = new KAction(i18n("Insert Date"), "date", CTRL + Key_I, this, + actions[ACTION_INSERT_DATE] = new KAction(i18n("Insert Date"), "date", CTRL + Key_I, TQT_TQOBJECT(this), TQT_SLOT(insertDate()), actionCollection(), "insert_date"); - KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); bookmarkMenu = new KActionMenu(i18n("&Bookmarks"), "bookmarks", actionCollection(), "bookmarks"); KJotsBookmarks* bookmarks = new KJotsBookmarks(this); @@ -245,7 +245,7 @@ void KJotsMain::loadBooks() { TQDir dir(locateLocal("appdata","")); TQStringList files = dir.entryList(TQDir::Files|TQDir::Readable); - Q_UINT64 currentSelection = KJotsSettings::currentSelection(); + TQ_UINT64 currentSelection = KJotsSettings::currentSelection(); //TODO: Eventually we can make use of the ".book" extension here, but for //right now (2005/06/04) there's just too much legacy data out there. @@ -284,7 +284,7 @@ bool KJotsMain::createNewBook() bool ok; TQString name = KInputDialog::getText( i18n( "New Book" ), - i18n( "Book name:" ), TQString::null, &ok, this ); + i18n( "Book name:" ), TQString(), &ok, this ); if (!ok) return false; @@ -316,7 +316,7 @@ void KJotsMain::deleteBook() return; TQString msg = i18n("<qt>Are you sure you want to delete the <strong>%1</strong> book?</qt>"); - int result = KMessageBox::warningContinueCancel(topLevelWidget(), msg.arg(b->subject()), i18n("Delete Book"),KStdGuiItem::del()); + int result = KMessageBox::warningContinueCancel(tqtopLevelWidget(), msg.tqarg(b->subject()), i18n("Delete Book"),KStdGuiItem::del()); if (result!=KMessageBox::Continue) return; @@ -358,15 +358,15 @@ void KJotsMain::deleteEntry() KJotsPage* cur = currentPage(); if (!cur || - KMessageBox::warningContinueCancel(topLevelWidget(), + KMessageBox::warningContinueCancel(tqtopLevelWidget(), i18n("<qt>Are you sure you want to delete the <strong>%1</strong> page?</qt>") - .arg(cur->subject()), + .tqarg(cur->subject()), i18n("Delete Page"),KStdGuiItem::del()) != KMessageBox::Continue) { return; } - KJotsBook* bk = cur->parentBook(); + KJotsBook* bk = cur->tqparentBook(); KJotsPage* nxt = dynamic_cast<KJotsPage*>(cur->nextSibling()); me_text->setEntry(0); @@ -493,7 +493,7 @@ void KJotsMain::saveBookToFile(bool plainText) } if (!KIO::NetAccess::exists(res.URLs[0], true, this) || - KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").arg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) + KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").tqarg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) { tryAgain = false; } @@ -534,7 +534,7 @@ void KJotsMain::savePageToFile(bool plainText) } if (!KIO::NetAccess::exists(res.URLs[0], true, this) || - KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").arg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) + KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").tqarg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) { tryAgain = false; } @@ -573,7 +573,7 @@ void KJotsMain::slotQuit() void KJotsMain::insertDate() { - me_text->insert(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), true) + " "); + me_text->insert(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime(), true) + " "); } void KJotsMain::updateMenu() @@ -657,7 +657,7 @@ void KJotsMain::slotFindSuccessful() void KJotsMain::showListviewContextMenu(KListView*, TQListViewItem* i, const TQPoint& p) { if ( invalidMoveFlag ) return; //Prevent race condition - KActionMenu* am = new KActionMenu(this); + KActionMenu* am = new KActionMenu(TQT_TQOBJECT(this)); if (!i) { @@ -701,7 +701,7 @@ void KJotsMain::linkClicked(const TQString& link) return; } - Q_UINT64 target = link.toULongLong(); + TQ_UINT64 target = link.toULongLong(); TQListViewItemIterator it( subjectList ); while ( it.current() ) { KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(it.current()); @@ -769,7 +769,7 @@ TQString KJotsMain::currentBookmarkTitle() while ( item ) { KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(item); - item = item->parent(); + item = item->tqparent(); if ( item ) { @@ -804,7 +804,7 @@ TQString KJotsMain::currentBookmarkURL() */ void KJotsMain::jumpToBookmark(const TQString& bookmark) { - Q_UINT64 id = bookmark.toULongLong(); + TQ_UINT64 id = bookmark.toULongLong(); if ( id ) { @@ -825,9 +825,9 @@ void KJotsMain::jumpToBookmark(const TQString& bookmark) //in the future. CREATION DATE: 2005/06/10 KMessageBox::information(this, - i18n("This bookmark is from an older version of KJots and is not fully supported. It may or may not work. You should delete and recreate this bookmark."), TQString::null, "oldBookmarkWarning"); + i18n("This bookmark is from an older version of KJots and is not fully supported. It may or may not work. You should delete and recreate this bookmark."), TQString(), "oldBookmarkWarning"); - int slash = bookmark.findRev('/'); + int slash = bookmark.tqfindRev('/'); if (slash != -1) { @@ -865,7 +865,7 @@ void KJotsMain::jumpToBookmark(const TQString& bookmark) { if ( ++pageCount == pageNo ) { - static_cast<TQListViewItem*>(entry)->parent()->setOpen(true); + static_cast<TQListViewItem*>(entry)->tqparent()->setOpen(true); subjectList->ensureItemVisible(entry); subjectList->setSelected(entry, true); jumpToEntry(entry); @@ -914,12 +914,12 @@ void KJotsMain::nextBook() */ void KJotsMain::prevBook() { - //Don't get caught by parent book. + //Don't get caught by tqparent book. TQListViewItem *startingPoint = subjectList->currentItem(); if ( !startingPoint ) return; //sanity check if ( dynamic_cast<KJotsPage*>(startingPoint) ) - startingPoint = startingPoint->parent(); + startingPoint = startingPoint->tqparent(); TQListViewItemIterator it ( startingPoint ); do { @@ -1043,7 +1043,7 @@ void KJotsMain::updateCaption() while ( item ) { KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(item); - item = item->parent(); + item = item->tqparent(); if ( item ) { @@ -1081,7 +1081,7 @@ void KJotsMain::slotItemMoved(TQListViewItem *item, TQListViewItem* afterFirst, //afterFirst doesn't work like we need it to. We want it to point to the //previous sibling, not just the entry directly above it. - if ( afterFirst && afterFirst->parent() != entry->parentBook() ) + if ( afterFirst && afterFirst->tqparent() != entry->tqparentBook() ) { TQListViewItemIterator it ( afterFirst ); afterFirst = 0; @@ -1090,13 +1090,13 @@ void KJotsMain::slotItemMoved(TQListViewItem *item, TQListViewItem* afterFirst, while ( it.current() ) { //No other items were above this one. - if ( it.current() == entry->parentBook() ) + if ( it.current() == entry->tqparentBook() ) { break; } //Found a previous sibling! - if ( it.current()->parent() == entry->parentBook() ) + if ( it.current()->tqparent() == entry->tqparentBook() ) { afterFirst = it.current(); break; @@ -1108,7 +1108,7 @@ void KJotsMain::slotItemMoved(TQListViewItem *item, TQListViewItem* afterFirst, KJotsEntryBase *entryAfter = dynamic_cast<KJotsEntryBase*>(afterFirst); - if ( entry->isPage() && !item->parent() ) + if ( entry->isPage() && !item->tqparent() ) { invalidMoveFlag=true; //Don't do anything while we're stuck here. subjectList->setItemsMovable(false); @@ -1119,14 +1119,14 @@ void KJotsMain::slotItemMoved(TQListViewItem *item, TQListViewItem* afterFirst, i18n("All pages must be inside a book. " "Would you like to create a new book to put the page in, " "or would you prefer to not move the page at all?"), - TQString::null, + TQString(), i18n("Create New Book"), i18n("Do Not Move Page")) == KMessageBox::No || !createNewBook()) { //We have to move item back. subjectList->takeItem(item); - entry->parentBook()->insertItem(item); + entry->tqparentBook()->insertItem(item); entry->moveItem(afterFirst); } else { subjectList->takeItem(item); @@ -1149,11 +1149,11 @@ void KJotsMain::slotItemMoved(TQListViewItem *item, TQListViewItem* afterFirst, if ( entryAfter ) { - //Set the old parent book to dirty, since it just lost a page. + //Set the old tqparent book to dirty, since it just lost a page. if ( entryAfter->isBook() ) entryAfter->setDirty(true); else - entryAfter->parentBook()->setDirty(true); + entryAfter->tqparentBook()->setDirty(true); } return; @@ -1173,7 +1173,7 @@ KJotsBook* KJotsMain::currentBook() { return dynamic_cast<KJotsBook*>(e); } - e = dynamic_cast<KJotsEntryBase*>(e->KListViewItem::parent()); + e = dynamic_cast<KJotsEntryBase*>(e->KListViewItem::tqparent()); } return 0; diff --git a/kjots/KJotsMain.h b/kjots/KJotsMain.h index eaa801b..61c830b 100644 --- a/kjots/KJotsMain.h +++ b/kjots/KJotsMain.h @@ -67,7 +67,7 @@ class KJotsEdit; #define ACTION_DELETE_BOOK 11 #define ACTION_MANUAL_SAVE 12 #define ACTION_PRINT 13 -#define ACTION_QUIT 14 +#define ACTION_TQUIT 14 #define ACTION_CUT 15 #define ACTION_COPY 16 #define ACTION_PASTE2TITLE 17 @@ -82,6 +82,7 @@ class KJotsEdit; class KJotsMain : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KJotsMain( const char* name = 0 ); diff --git a/kjots/confpagefont.ui b/kjots/confpagefont.ui index e89e5b5..85ff558 100644 --- a/kjots/confpagefont.ui +++ b/kjots/confpagefont.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>confPageFont</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>confPageFont</cstring> </property> @@ -31,7 +31,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kfontdialog.h</includehint> </includehints> diff --git a/kjots/confpagemisc.ui b/kjots/confpagemisc.ui index ef66e21..390bfb3 100644 --- a/kjots/confpagemisc.ui +++ b/kjots/confpagemisc.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>confPageMisc</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>confPageMisc</cstring> </property> @@ -42,7 +42,7 @@ <string>This is the number of minutes KJots will wait before automatically saving changes.</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -66,7 +66,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -83,7 +83,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -100,14 +100,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_AutoSave</cstring> </property> @@ -121,7 +121,7 @@ <string>When "Enable autosave" is checked, KJots will automatically save changes made to books at the interval defined below.</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_Unicode</cstring> </property> @@ -145,7 +145,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> </includehints> diff --git a/kjots/kjotsbookmarks.cpp b/kjots/kjotsbookmarks.cpp index 21ce6e8..7259713 100644 --- a/kjots/kjotsbookmarks.cpp +++ b/kjots/kjotsbookmarks.cpp @@ -23,9 +23,9 @@ #include "KJotsMain.h" #include "kjotsbookmarks.h" -KJotsBookmarks::KJotsBookmarks(KJotsMain* parent, const char* name) - : TQObject(parent, name), - m_kjots(parent) +KJotsBookmarks::KJotsBookmarks(KJotsMain* tqparent, const char* name) + : TQObject(tqparent, name), + m_kjots(tqparent) { } diff --git a/kjots/kjotsbookmarks.h b/kjots/kjotsbookmarks.h index 9fa533d..831b4e5 100644 --- a/kjots/kjotsbookmarks.h +++ b/kjots/kjotsbookmarks.h @@ -30,9 +30,10 @@ class KJotsMain; class KJotsBookmarks : public TQObject, public KBookmarkOwner { Q_OBJECT + TQ_OBJECT public: - KJotsBookmarks(KJotsMain* parent = 0, const char* name = 0); + KJotsBookmarks(KJotsMain* tqparent = 0, const char* name = 0); ~KJotsBookmarks(); virtual void openBookmarkURL(const TQString& url); diff --git a/kjots/kjotsedit.cpp b/kjots/kjotsedit.cpp index 2e4c09d..6fdba79 100644 --- a/kjots/kjotsedit.cpp +++ b/kjots/kjotsedit.cpp @@ -36,12 +36,12 @@ //---------------------------------------------------------------------- // MYMULTIEDIT //---------------------------------------------------------------------- -KJotsEdit::KJotsEdit (TQWidget* parent, const char* name) - : KEdit(parent, name), +KJotsEdit::KJotsEdit (TQWidget* tqparent, const char* name) + : KEdit(tqparent, name), m_entry(0) { // no rich text until printing and other such issues are worked out - setTextFormat(Qt::PlainText); + setTextFormat(TQt::PlainText); setWordWrap(TQTextEdit::WidgetWidth); setLinkUnderline(true); web_menu = new KPopupMenu(this);; @@ -55,7 +55,7 @@ KJotsEdit::~KJotsEdit() void KJotsEdit::mousePressEvent( TQMouseEvent *e ) { - if(e->button() == RightButton && + if(e->button() == Qt::RightButton && hasSelectedText()) { KURL url(selectedText()); @@ -135,7 +135,7 @@ void KJotsEdit::setEntry (KJotsPage *entry) m_entry = entry; setText(entry->body()); removeSelection(); - repaint(); + tqrepaint(); setEnabled(true); setFocus(); entry->setEditor(this); diff --git a/kjots/kjotsedit.h b/kjots/kjotsedit.h index d214ce3..d54a627 100644 --- a/kjots/kjotsedit.h +++ b/kjots/kjotsedit.h @@ -30,11 +30,12 @@ class KJotsPage; class KJotsEdit : public KEdit { Q_OBJECT + TQ_OBJECT public: - KJotsEdit (TQWidget* parent=0, const char* name=0); + KJotsEdit (TQWidget* tqparent=0, const char* name=0); ~KJotsEdit (); - void print(TQString title = TQString::null); + void print(TQString title = TQString()); void setEntry(KJotsPage*); signals: diff --git a/kjots/kjotsentry.cpp b/kjots/kjotsentry.cpp index dab39c8..d15bf5c 100644 --- a/kjots/kjotsentry.cpp +++ b/kjots/kjotsentry.cpp @@ -46,9 +46,9 @@ // helper functions for HTML output TQString prepForHTML(TQString text) { - text.replace("<", "<"); - text.replace(">", ">"); - text.replace("\n", "<br>"); + text.tqreplace("<", "<"); + text.tqreplace(">", ">"); + text.tqreplace("\n", "<br>"); return text; } @@ -69,20 +69,20 @@ TQString htmlFooter() // KJotsEntryBase // -KJotsEntryBase::KJotsEntryBase(KListView* parent, TQListViewItem* after=0) - :KListViewItem(parent,after) +KJotsEntryBase::KJotsEntryBase(KListView* tqparent, TQListViewItem* after=0) + :KListViewItem(tqparent,after) { m_id = 0; m_saveInProgress = m_dirty = false; m_parent = 0; } -KJotsEntryBase::KJotsEntryBase(KListViewItem* parent, TQListViewItem* after=0) - :KListViewItem(parent,after) +KJotsEntryBase::KJotsEntryBase(KListViewItem* tqparent, TQListViewItem* after=0) + :KListViewItem(tqparent,after) { m_id = 0; m_saveInProgress = m_dirty = false; - m_parent = dynamic_cast<KJotsBook*>(parent); + m_parent = dynamic_cast<KJotsBook*>(tqparent); } void KJotsEntryBase::setSubject(const TQString& subj) @@ -99,13 +99,13 @@ void KJotsEntryBase::setText(int column, const TQString& text) } /*! - \brief Sets a new parent. + \brief Sets a new tqparent. This is mostly just used during drag-and-drop reordering in the list view. - We need to keep track of the previous parent in case the move is invalid. + We need to keep track of the previous tqparent in case the move is invalid. */ void KJotsEntryBase::resetParent() { - m_parent = dynamic_cast<KJotsBook*>(TQListViewItem::parent()); + m_parent = dynamic_cast<KJotsBook*>(TQListViewItem::tqparent()); } /*! @@ -117,12 +117,12 @@ void KJotsEntryBase::resetParent() * with preexisting IDs. Seeing as how we are using an unsigned long long, I am * comfortable with the amount of time we have to worry about this. */ -void KJotsEntryBase::setId(Q_UINT64 id) +void KJotsEntryBase::setId(TQ_UINT64 id) { //Find an unused id... if ( id == 0 ) { - Q_UINT64 lastId = KJotsSettings::lastId(); + TQ_UINT64 lastId = KJotsSettings::lastId(); //TODO: In theory, we could wrap. The universe may end beforehand tho. id = ++lastId; @@ -139,17 +139,17 @@ void KJotsEntryBase::setId(Q_UINT64 id) This function should ONLY be called when saving the file, as it performs other functions than generating XML. */ -void KJotsEntryBase::generateXml( TQDomDocument &doc, TQDomElement &parent ) +void KJotsEntryBase::generateXml( TQDomDocument &doc, TQDomElement &tqparent ) { TQDomElement title = doc.createElement( "Title" ); title.appendChild( doc.createTextNode( subject() )); - parent.appendChild( title ); + tqparent.appendChild( title ); TQDomElement id = doc.createElement( "ID" ); TQString id_string; id_string.setNum(m_id); id.appendChild( doc.createTextNode(id_string) ); - parent.appendChild( id ); + tqparent.appendChild( id ); setDirty( false ); return; @@ -217,14 +217,14 @@ int KJotsEntryBase::printTitleBox(TQString title, KPrinter& printer, TQPainter& // KJotsBook // -KJotsBook::KJotsBook(KListView* parent, TQListViewItem* after) - : KJotsEntryBase(parent, after) +KJotsBook::KJotsBook(KListView* tqparent, TQListViewItem* after) + : KJotsEntryBase(tqparent, after) { init(); } -KJotsBook::KJotsBook(KListViewItem* parent, TQListViewItem* after) - : KJotsEntryBase(parent, after) +KJotsBook::KJotsBook(KListViewItem* tqparent, TQListViewItem* after) + : KJotsEntryBase(tqparent, after) { init(); } @@ -264,7 +264,7 @@ bool KJotsBook::isBookFile(const TQString& filename) { if ( folder.open(IO_ReadWrite) ) { - TQTextStream st(static_cast<TQIODevice*>(&folder)); + TQTextStream st(TQT_TQIODEVICE(&folder)); st.setEncoding( KJotsSettings::unicode() ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale ); TQString buf = st.readLine().stripWhiteSpace(); @@ -306,7 +306,7 @@ bool KJotsBook::openBook(const TQString& filename) if ( file.exists() && file.open(IO_ReadWrite) ) //TODO: Implement read-only mode? { - TQTextStream st(static_cast<TQIODevice*>(&file)); + TQTextStream st(TQT_TQIODEVICE(&file)); st.setEncoding( KJotsSettings::unicode() ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale ); TQString data = st.read(); @@ -354,7 +354,7 @@ bool KJotsBook::openBook(const TQString& filename) if ( !m_fileName.isEmpty() && !m_fileName.endsWith(".book") ) { //some old books have incorrect names. So we save a new copy, then kill the old file - m_fileName = TQString::null; //trick ourselves into thinking we're a new book + m_fileName = TQString(); //trick ourselves into thinking we're a new book saveBook(); file.remove(); } @@ -388,7 +388,7 @@ bool KJotsBook::openBook(const TQString& filename) */ bool KJotsBook::loadOldBook(TQFile &file) { - TQTextStream st(static_cast<TQIODevice*>(&file)); + TQTextStream st(TQT_TQIODEVICE(&file)); st.setEncoding( KJotsSettings::unicode() ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale ); TQString buf = st.readLine(); @@ -412,7 +412,7 @@ bool KJotsBook::loadOldBook(TQFile &file) entry->setBody(body); } - body = TQString::null; + body = TQString(); TQString title = buf.mid(10, buf.length()); // now catch the page id @@ -428,7 +428,7 @@ bool KJotsBook::loadOldBook(TQFile &file) int pos = 0; - while ((pos = buf.find('\\',pos)) != -1) + while ((pos = buf.tqfind('\\',pos)) != -1) if (buf[++pos] == '\\') buf.remove(pos, 1 ); @@ -488,7 +488,7 @@ void KJotsBook::saveBook(void) void KJotsBook::deleteBook() { TQFile::remove(m_fileName); - m_fileName = TQString::null; + m_fileName = TQString(); } void KJotsBook::rename() @@ -532,9 +532,9 @@ void KJotsBook::saveToFile(KURL url, bool plainText, const TQString& encoding) //revisions will likely use it. I don't want to make the translators add, remove, //and re-add translations, so I'm just keeping this here for now. m_saveProgressDialog = new KProgressDialog(listView(), "bookSaveInProgress", - i18n("Saving %1").arg(subject()), + i18n("Saving %1").tqarg(subject()), i18n("Saving the contents of %1 to %2") - .arg(subject(), url.prettyURL()), + .tqarg(subject(), url.prettyURL()), true); m_saveProgressDialog->progressBar()->setTotalSteps(1); @@ -613,7 +613,7 @@ void KJotsBook::print(TQFont& defaultFont) printer.setFullPage(false); printer.setCreator("KJots"); - if (!printer.setup(listView(), i18n("Print: %1").arg(subject()))) + if (!printer.setup(listView(), i18n("Print: %1").tqarg(subject()))) { return; } @@ -657,7 +657,7 @@ bool KJotsBook::isDirty() //Am I dirty? if ( KJotsEntryBase::isDirty() ) return true; - //Check all children to see if any of them are dirty + //Check all tqchildren to see if any of them are dirty KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild()); while ( entry ) { @@ -672,10 +672,10 @@ bool KJotsBook::isDirty() \brief Creates XML code and performs necessary tasks to save file. This function should ONLY be called when saving the file. */ -void KJotsBook::generateXml( TQDomDocument &doc, TQDomElement &parent ) +void KJotsBook::generateXml( TQDomDocument &doc, TQDomElement &tqparent ) { TQDomElement book = doc.createElement( "KJotsBook" ); - parent.appendChild( book ); + tqparent.appendChild( book ); KJotsEntryBase::generateXml(doc, book); //let the base class save important stuff @@ -690,9 +690,9 @@ void KJotsBook::generateXml( TQDomDocument &doc, TQDomElement &parent ) entry = dynamic_cast<KJotsEntryBase*>(entry->nextSibling()); } - if ( !m_fileName.isEmpty() && TQListViewItem::parent() ) + if ( !m_fileName.isEmpty() && TQListViewItem::tqparent() ) { - //Hmmmm... We were originally loaded from a file, but now we have a parent, so + //Hmmmm... We were originally loaded from a file, but now we have a tqparent, so //we must have been moved into another tree. Remove the old file now that we //have saved ourselves into the new tree. deleteBook(); @@ -763,7 +763,7 @@ TQString KJotsBook::getToc() KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild()); while ( entry ) { TQString htmlSubject = prepForHTML(entry->subject()); - toc += TQString("<li><a href=\"#%1\">").arg(entry->id()) + htmlSubject + "</a></li>"; + toc += TQString("<li><a href=\"#%1\">").tqarg(entry->id()) + htmlSubject + "</a></li>"; KJotsBook *book = dynamic_cast<KJotsBook*>(entry); if ( book ) toc += book->getToc(); @@ -787,13 +787,13 @@ TQString KJotsBook::generateHtml( KJotsEntryBase* top, bool diskMode ) if ( top == this ) { - toc = TQString("<h1><a name=\"%1\">%2</a></h1>").arg(id()).arg(htmlTitle); + toc = TQString("<h1><a name=\"%1\">%2</a></h1>").tqarg(id()).tqarg(htmlTitle); } else { if ( diskMode ) { - toc = TQString("<h2><a name=\"%1\">%2</a></h2>").arg(id()).arg(htmlTitle); + toc = TQString("<h2><a name=\"%1\">%2</a></h2>").tqarg(id()).tqarg(htmlTitle); } else { - toc = TQString("<h2><a name=\"%1\" href=\"%2\">%3</a></h2>").arg(id()).arg(id()).arg(htmlTitle); + toc = TQString("<h2><a name=\"%1\" href=\"%2\">%3</a></h2>").tqarg(id()).tqarg(id()).tqarg(htmlTitle); } } @@ -843,8 +843,8 @@ TQString KJotsBook::generateText( void ) // KJotsPage // -KJotsPage::KJotsPage(KJotsBook* parent, TQListViewItem *after) - : KJotsEntryBase(parent,after), +KJotsPage::KJotsPage(KJotsBook* tqparent, TQListViewItem *after) + : KJotsEntryBase(tqparent,after), m_editor(0) { m_isBook = false; @@ -982,7 +982,7 @@ void KJotsPage::slotSaveResult(KIO::Job *) void KJotsPage::print(TQFont& defaultFont) { - KJotsEntryBase* book = dynamic_cast<KJotsEntryBase*>(KListViewItem::parent()); + KJotsEntryBase* book = dynamic_cast<KJotsEntryBase*>(KListViewItem::tqparent()); TQString docName = book->subject(); if (!subject().isNull()) @@ -995,7 +995,7 @@ void KJotsPage::print(TQFont& defaultFont) printer.setFullPage(false); printer.setCreator("KJots"); - if (printer.setup(listView(), i18n("Print: %1").arg(docName))) + if (printer.setup(listView(), i18n("Print: %1").tqarg(docName))) { TQPainter painter( &printer ); painter.setFont(defaultFont); @@ -1052,10 +1052,10 @@ TQString KJotsPage::defaultSubject() { int page = 0; - if ( parentBook() ) + if ( tqparentBook() ) { //We can't use childCount() here because it will count books, too. - KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(parentBook()->firstChild()); + KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(tqparentBook()->firstChild()); while ( entry ) { if ( entry->isPage() ) ++page; @@ -1066,7 +1066,7 @@ TQString KJotsPage::defaultSubject() page = 1; } - return i18n("Page %1").arg(page); + return i18n("Page %1").tqarg(page); } /*! @@ -1116,17 +1116,17 @@ bool KJotsPage::isDirty() /*! \brief Creates XML code and performs necessary tasks to save file. This function should ONLY be called when saving the file. -*/void KJotsPage::generateXml( TQDomDocument &doc, TQDomElement &parent ) +*/void KJotsPage::generateXml( TQDomDocument &doc, TQDomElement &tqparent ) { TQDomElement page = doc.createElement( "KJotsPage" ); - parent.appendChild( page ); + tqparent.appendChild( page ); KJotsEntryBase::generateXml(doc, page); //let the base class save important stuff TQDomElement text = doc.createElement( "Text" ); TQString saveText = body(); - if ( saveText.contains("]]>") ) { - saveText.replace("]]>","]]>"); + if ( saveText.tqcontains("]]>") ) { + saveText.tqreplace("]]>","]]>"); text.setAttribute("fixed", "1"); } text.appendChild( doc.createCDATASection( saveText )); @@ -1153,7 +1153,7 @@ void KJotsPage::parseXml( TQDomElement &me ) TQString bodyText = e.text(); if ( e.hasAttribute("fixed") ) { - bodyText.replace("]]>", "]]>"); + bodyText.tqreplace("]]>", "]]>"); } setBody(bodyText); } @@ -1181,23 +1181,23 @@ TQString KJotsPage::generateHtml( KJotsEntryBase *top, bool diskMode ) TQString htmlSubject = prepForHTML(subject()); if ( top == this || diskMode ) { - html += TQString("<h3><a name=\"%1\">%2</a></h3>").arg(id()).arg(htmlSubject); + html += TQString("<h3><a name=\"%1\">%2</a></h3>").tqarg(id()).tqarg(htmlSubject); } else { - html += TQString("<h3><a name=\"%1\" href=\"%2\">%3</a></h3>").arg(id()).arg(id()).arg(htmlSubject); + html += TQString("<h3><a name=\"%1\" href=\"%2\">%3</a></h3>").tqarg(id()).tqarg(id()).tqarg(htmlSubject); } html += prepForHTML(body()); html += "<br><table border=1><tr>"; - html += TQString("<td><a href=\"#%1\">%2</a></td>").arg(id()).arg(subject()); + html += TQString("<td><a href=\"#%1\">%2</a></td>").tqarg(id()).tqarg(subject()); if ( top != this ) { - KJotsBook *parent = parentBook(); - while ( parent ) + KJotsBook *tqparent = tqparentBook(); + while ( tqparent ) { - html += TQString("<td><a href=\"#%1\">%2</a></td>").arg(parent->id()).arg(parent->subject()); - if ( parent == top ) break; - parent = parent->parentBook(); + html += TQString("<td><a href=\"#%1\">%2</a></td>").tqarg(tqparent->id()).tqarg(tqparent->subject()); + if ( tqparent == top ) break; + tqparent = tqparent->tqparentBook(); } } html += TQString("</tr></table>"); diff --git a/kjots/kjotsentry.h b/kjots/kjotsentry.h index c953ec7..2967eb3 100644 --- a/kjots/kjotsentry.h +++ b/kjots/kjotsentry.h @@ -49,6 +49,7 @@ namespace KIO class KJotsEntryBase : public TQObject, public KListViewItem { Q_OBJECT + TQ_OBJECT public: KJotsEntryBase(KListView*, TQListViewItem*); KJotsEntryBase(KListViewItem*, TQListViewItem*); @@ -70,10 +71,10 @@ class KJotsEntryBase : public TQObject, public KListViewItem void setDirty(bool d) { m_dirty = d; } //!< Toggles the dirty flag. virtual bool isDirty() { return m_dirty; }; //!< Accessor for dirty flag. - Q_UINT64 id() { return m_id; } - void setId(Q_UINT64); + TQ_UINT64 id() { return m_id; } + void setId(TQ_UINT64); - KJotsBook *parentBook() { return m_parent; } + KJotsBook *tqparentBook() { return m_parent; } void resetParent(); bool isBook() const { return m_isBook; } @@ -86,7 +87,7 @@ class KJotsEntryBase : public TQObject, public KListViewItem bool m_isBook; //!< used for speed and code clarity. private: - Q_UINT64 m_id; //!< unique ID for this entry + TQ_UINT64 m_id; //!< unique ID for this entry bool m_dirty; //!< Set when this entry has been changed. KJotsBook *m_parent; //!< used during drag-n-drop moving }; @@ -98,6 +99,7 @@ class KJotsEntryBase : public TQObject, public KListViewItem class KJotsBook : public KJotsEntryBase { Q_OBJECT + TQ_OBJECT public: KJotsBook(KListView*, TQListViewItem* after = 0); KJotsBook(KListViewItem*, TQListViewItem* after = 0); @@ -141,8 +143,9 @@ class KJotsBook : public KJotsEntryBase class KJotsPage : public KJotsEntryBase { Q_OBJECT + TQ_OBJECT public: - KJotsPage(KJotsBook* parent, TQListViewItem* after = 0); + KJotsPage(KJotsBook* tqparent, TQListViewItem* after = 0); ~KJotsPage(); public: diff --git a/klaptopdaemon/Makefile.am b/klaptopdaemon/Makefile.am index 8a2e737..a70a155 100644 --- a/klaptopdaemon/Makefile.am +++ b/klaptopdaemon/Makefile.am @@ -13,6 +13,7 @@ kded_klaptopdaemon_la_LDFLAGS = $(all_libraries) -module -avoid-version -lXtst kded_klaptopdaemon_la_LIBADD = $(LIB_KDEUI) $(LIB_XSS) libkcmlaptop.la klaptop_acpi_helper_SOURCES = acpi_helper.cpp +klaptop_acpi_helper_LDADD = $(LIB_QT) klaptop_check_SOURCES = laptop_check.cpp klaptop_check_LDFLAGS = $(all_libraries) @@ -41,7 +42,7 @@ dummy.cpp: noinst_PROGRAMS = makecrc makecrc_SOURCES = makecrc.cpp -makecrc_LDADD = $(LIBZ) +makecrc_LDADD = $(LIBZ) $(LIB_QT) crcresult.h: makecrc klaptop_acpi_helper ./makecrc >crcresult.h diff --git a/klaptopdaemon/acpi.cpp b/klaptopdaemon/acpi.cpp index 94bb124..d0fd472 100644 --- a/klaptopdaemon/acpi.cpp +++ b/klaptopdaemon/acpi.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999, 2003 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -39,7 +39,7 @@ #include <kstandarddirs.h> #include <kprocess.h> -// other Qt headers: +// other TQt headers: #include <tqlayout.h> #include <tqlabel.h> #include <tqcheckbox.h> @@ -51,8 +51,8 @@ #include <tqtooltip.h> extern void wake_laptop_daemon(); -AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) - : KCModule(parent, name) +AcpiConfig::AcpiConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages @@ -63,7 +63,7 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) TQLabel *tmp_label = new TQLabel( i18n("This panel provides information about your system's ACPI implementation " "and lets you have access to some of the extra features provided by ACPI"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); tmp_label = new TQLabel( i18n("NOTE: the Linux ACPI implementation is still a 'work in progress'. " @@ -73,12 +73,12 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) "You should test these features very gingerly - save all your work, check them " "on and try a suspend/standby/hibernate from the popup menu on the battery icon " "in the panel if it fails to come back successfully uncheck the box again."), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); tmp_label = new TQLabel( i18n("Some changes made on this page may require you to quit the laptop panel " "and start it again to take effect"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); bool can_enable = laptop_portable::has_acpi(1); // is helper ready @@ -132,7 +132,7 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) "/proc/acpi/sleep writeable by anyone every time your system boots " "or use the button below to make the KDE ACPI helper application " "set-uid root"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); ll = new TQHBoxLayout(); TQPushButton *setupButton = new TQPushButton(i18n("Setup Helper Application"), this); @@ -145,7 +145,7 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); @@ -185,7 +185,7 @@ void AcpiConfig::setupHelper() KMessageBox::sorry(0, i18n("The ACPI helper cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly."), i18n("KLaptopDaemon")); } - laptop_portable::acpi_set_mask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); + laptop_portable::acpi_set_tqmask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); bool can_enable = laptop_portable::has_acpi(1); // is helper ready enableStandby->setEnabled(can_enable); enableSuspend->setEnabled(can_enable); @@ -206,7 +206,7 @@ void AcpiConfig::save() enablesoftwaresuspend = (enableSoftwareSuspendHibernate?enableSoftwareSuspendHibernate->isChecked():0); enableperformance = enablePerformance->isChecked(); enablethrottle = enableThrottle->isChecked(); - laptop_portable::acpi_set_mask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); + laptop_portable::acpi_set_tqmask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); config->setGroup("AcpiDefault"); diff --git a/klaptopdaemon/acpi.h b/klaptopdaemon/acpi.h index fc9b261..e98934b 100644 --- a/klaptopdaemon/acpi.h +++ b/klaptopdaemon/acpi.h @@ -3,7 +3,7 @@ * * Copyright (c) 2002 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -40,8 +40,9 @@ class TQPushButton; class AcpiConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - AcpiConfig( TQWidget *parent=0, const char* name=0); + AcpiConfig( TQWidget *tqparent=0, const char* name=0); ~AcpiConfig( ); void save( void ); diff --git a/klaptopdaemon/acpi_helper.cpp b/klaptopdaemon/acpi_helper.cpp index cf5c980..0640986 100644 --- a/klaptopdaemon/acpi_helper.cpp +++ b/klaptopdaemon/acpi_helper.cpp @@ -110,7 +110,7 @@ void run_program(const char *path, const int action) if ((err = stat(path, &sb)) != 0 || sb.st_mode&S_IWOTH) { if (err != 0) { - fprintf(stderr, "Can't find %s\n", path); + fprintf(stderr, "Can't tqfind %s\n", path); return; } else { fprintf(stderr, "%s is writeable by anyone - we don't trust it\n", path); diff --git a/klaptopdaemon/apm.cpp b/klaptopdaemon/apm.cpp index 397bbb6..228683f 100644 --- a/klaptopdaemon/apm.cpp +++ b/klaptopdaemon/apm.cpp @@ -4,7 +4,7 @@ * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -40,7 +40,7 @@ #include <kstandarddirs.h> #include <kprocess.h> -// other Qt headers: +// other TQt headers: #include <tqlayout.h> #include <tqlabel.h> #include <tqcheckbox.h> @@ -51,8 +51,8 @@ #include <tqtooltip.h> extern void wake_laptop_daemon(); -ApmConfig::ApmConfig (TQWidget * parent, const char *name) - : KCModule(parent, name) +ApmConfig::ApmConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages @@ -63,7 +63,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) TQLabel *tmp_label = new TQLabel( i18n("This panel lets you configure your APM system and lets " "you have access to some of the extra features provided by it"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); tmp_label = new TQLabel( i18n("NOTE: some APM implementations have buggy suspend/standby " @@ -71,12 +71,12 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) "all your work, check them on and try a suspend/standby from " "the popup menu on the battery icon in the panel if it fails to come " "back successfully uncheck the box again."), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); tmp_label = new TQLabel( i18n("Some changes made on this page may require you to quit the laptop panel " "and start it again to take effect"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); bool can_enable = laptop_portable::has_apm(1); // is helper ready @@ -100,8 +100,8 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) "ways you can enable this application, either make the file " "/proc/apm writeable by anyone every time your system boots " "or use the button below to make the %1 application " - "set-uid root").arg(apm_name), this ); - tmp_label->setAlignment( Qt::WordBreak ); + "set-uid root").tqarg(apm_name), this ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); TQHBoxLayout *ll = new TQHBoxLayout(top_layout); TQPushButton *setupButton = new TQPushButton(i18n("Setup Helper Application"), this); @@ -114,7 +114,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) tmp_label = new TQLabel( i18n("Your system seems to have 'Software Suspend' installed, this can " "be used to hibernate or 'suspend to disk' your system if you want " "to use this for hibernation check the box below"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); enableSoftwareSuspendHibernate = new TQCheckBox( i18n("Enable software suspend for hibernate"), this ); top_layout->addWidget( enableSoftwareSuspendHibernate ); @@ -126,7 +126,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) "Suspend utility - KDE provides a utility to do this, if you " "wish to use it you must make it set-uid root, the button " "below will do this for you"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); ll = new TQHBoxLayout(this); TQPushButton *setupSSButton = new TQPushButton(i18n("Setup SS Helper Application"), this); @@ -141,7 +141,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); @@ -158,7 +158,7 @@ void ApmConfig::setupHelper() if (!kdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " - "to allow the privileges of the %1 application to change.").arg(apm_name), + "to allow the privileges of the %1 application to change.").tqarg(apm_name), "KLaptopDaemon", KStdGuiItem::cont(), ""); if (rc == KMessageBox::Continue) { @@ -170,10 +170,10 @@ void ApmConfig::setupHelper() proc.start(KProcess::Block); // run it sync so has_apm below sees the results } } else { - KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").arg(TQString(apm_name)), + KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").tqarg(TQString(apm_name)), i18n("KLaptopDaemon")); } - laptop_portable::apm_set_mask(enablestandby, enablesuspend); + laptop_portable::apm_set_tqmask(enablestandby, enablesuspend); bool can_enable = laptop_portable::has_apm(1); // is helper ready enableStandby->setEnabled(can_enable); enableSuspend->setEnabled(can_enable); @@ -207,7 +207,7 @@ void ApmConfig::setupHelper2() // we use the acpi helper to do software suspend KMessageBox::sorry(0, i18n("The Software Suspend helper cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly."), i18n("KLaptopDaemon")); } - laptop_portable::software_suspend_set_mask(enablesoftwaresuspend); + laptop_portable::software_suspend_set_tqmask(enablesoftwaresuspend); bool can_enable = laptop_portable::has_software_suspend(2); // is helper ready enableSoftwareSuspendHibernate->setEnabled(can_enable); wake_laptop_daemon(); @@ -218,9 +218,9 @@ void ApmConfig::save() { enablestandby = enableStandby->isChecked(); enablesuspend = enableSuspend->isChecked(); - laptop_portable::apm_set_mask(enablestandby, enablesuspend); + laptop_portable::apm_set_tqmask(enablestandby, enablesuspend); enablesoftwaresuspend = (enableSoftwareSuspendHibernate ? enableSoftwareSuspendHibernate->isChecked():0); - laptop_portable::software_suspend_set_mask(enablesoftwaresuspend); + laptop_portable::software_suspend_set_tqmask(enablesoftwaresuspend); config->setGroup("ApmDefault"); diff --git a/klaptopdaemon/apm.h b/klaptopdaemon/apm.h index b6e6ed3..f99e726 100644 --- a/klaptopdaemon/apm.h +++ b/klaptopdaemon/apm.h @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -40,8 +40,9 @@ class TQPushButton; class ApmConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - ApmConfig( TQWidget *parent=0, const char* name=0); + ApmConfig( TQWidget *tqparent=0, const char* name=0); ~ApmConfig( ); void save( void ); diff --git a/klaptopdaemon/battery.cpp b/klaptopdaemon/battery.cpp index 0c337d7..6f1d7ab 100644 --- a/klaptopdaemon/battery.cpp +++ b/klaptopdaemon/battery.cpp @@ -5,7 +5,7 @@ * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * Copyright (c) 2006 Flavio Castelli <flavio.castelli@gmail.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ #include <kmessagebox.h> #include <krichtextlabel.h> -// other Qt headers: +// other TQt headers: #include <tqlayout.h> #include <tqlabel.h> #include <tqcheckbox.h> @@ -51,8 +51,8 @@ extern void wake_laptop_daemon(); -BatteryConfig::BatteryConfig (TQWidget * parent, const char *name) - : KCModule(parent, name), +BatteryConfig::BatteryConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name), editPoll(0), iconloader(0), buttonNoBattery(0), @@ -112,10 +112,10 @@ BatteryConfig::BatteryConfig (TQWidget * parent, const char *name) // group box to hold the icons together TQVGroupBox* icons_groupbox = new TQVGroupBox( i18n("Select Battery Icons"), this ); - icons_groupbox->layout()->setSpacing( KDialog::spacingHint() ); - top_layout->addWidget( icons_groupbox, 0, Qt::AlignLeft ); + icons_groupbox->tqlayout()->setSpacing( KDialog::spacingHint() ); + top_layout->addWidget( icons_groupbox, 0, TQt::AlignLeft ); - // layout to hold the icons inside the groupbox + // tqlayout to hold the icons inside the groupbox TQGrid *icon_grid = new TQGrid( 3 /*cols*/, icons_groupbox ); icon_grid->setSpacing( KDialog::spacingHint() ); @@ -140,7 +140,7 @@ BatteryConfig::BatteryConfig (TQWidget * parent, const char *name) TQHBoxLayout *hl = new TQHBoxLayout(); top_layout->addLayout(hl); - TQHGroupBox *hb = new TQHGroupBox(i18n("Current Battery Status"), this); + TQHGroupBox *hb = new TQHGroupBox(i18n("Current Battery tqStatus"), this); for (int i = 0; i < num_batteries; i++) { TQWidget *wp; @@ -171,7 +171,7 @@ BatteryConfig::BatteryConfig (TQWidget * parent, const char *name) } // TODO: remove linefeed from string, can't do it right now coz we have a string freeze - TQLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").replace("\n"," "), this); + TQLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").tqreplace("\n"," "), this); top_layout->addWidget(explain, 0); laptop_portable::extra_config(this, config, top_layout); } @@ -179,7 +179,7 @@ BatteryConfig::BatteryConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); startMonitor = new TQPushButton( i18n("&Start Battery Monitor"), this); connect(startMonitor, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStartMonitor())); - top_layout->addWidget( startMonitor, 0, Qt::AlignRight ); + top_layout->addWidget( startMonitor, 0, TQt::AlignRight ); load(); } @@ -283,7 +283,7 @@ void BatteryConfig::slotStartMonitor() { wake_laptop_daemon(); if (!enablemonitor) { - KMessageBox::information(0, i18n("<qt>The battery monitor has been started, but the tray icon is currently disabled. You can make it appear by selecting the <b>Show battery monitor</b> entry on this page and applying your changes.</qt>"), TQString::null, "howToEnableMonitor"); + KMessageBox::information(0, i18n("<qt>The battery monitor has been started, but the tray icon is currently disabled. You can make it appear by selecting the <b>Show battery monitor</b> entry on this page and applying your changes.</qt>"), TQString(), "howToEnableMonitor"); } } @@ -295,14 +295,14 @@ BatteryConfig::ConvertIcon(int percent, TQPixmap &pm, TQPixmap &result) int w = image.width(); int h = image.height(); int count = 0; - QRgb rgb; + TQRgb rgb; int x, y; for (x = 0; x < w; x++) for (y = 0; y < h; y++) { rgb = image.pixel(x, y); - if (qRed(rgb) == 0xff && - qGreen(rgb) == 0xff && - qBlue(rgb) == 0xff) + if (tqRed(rgb) == 0xff && + tqGreen(rgb) == 0xff && + tqBlue(rgb) == 0xff) count++; } int c = (count*percent)/100; @@ -315,7 +315,7 @@ BatteryConfig::ConvertIcon(int percent, TQPixmap &pm, TQPixmap &result) if (c) { uint ui; - QRgb blue = qRgb(0x00,0x00,0xff); + TQRgb blue = tqRgb(0x00,0x00,0xff); if (image.depth() <= 8) { ui = image.numColors(); // this fix thanks to Sven Krumpke @@ -328,9 +328,9 @@ BatteryConfig::ConvertIcon(int percent, TQPixmap &pm, TQPixmap &result) for (y = h-1; y >= 0; y--) for (x = 0; x < w; x++) { rgb = image.pixel(x, y); - if (qRed(rgb) == 0xff && - qGreen(rgb) == 0xff && - qBlue(rgb) == 0xff) { + if (tqRed(rgb) == 0xff && + tqGreen(rgb) == 0xff && + tqBlue(rgb) == 0xff) { image.setPixel(x, y, ui); c--; if (c <= 0) diff --git a/klaptopdaemon/battery.h b/klaptopdaemon/battery.h index 687f238..8500803 100644 --- a/klaptopdaemon/battery.h +++ b/klaptopdaemon/battery.h @@ -5,7 +5,7 @@ * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * Copyright (c) 2006 Flavio Castelli <flavio.castelli@gmail.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -45,8 +45,9 @@ class TQLabel; class BatteryConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - BatteryConfig( TQWidget *parent=0, const char* name=0); + BatteryConfig( TQWidget *tqparent=0, const char* name=0); ~BatteryConfig( ); void save( void ); diff --git a/klaptopdaemon/buttons.cpp b/klaptopdaemon/buttons.cpp index 3c05359..4c4c65d 100644 --- a/klaptopdaemon/buttons.cpp +++ b/klaptopdaemon/buttons.cpp @@ -4,7 +4,7 @@ * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -44,8 +44,8 @@ #include <tqtooltip.h> extern void wake_laptop_daemon(); -ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name) - : KCModule(parent, name), +ButtonsConfig::ButtonsConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name), lidBox(0), lidStandby(0), lidSuspend(0), @@ -120,7 +120,7 @@ ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name) if (laptop_portable::has_button(laptop_portable::LidButton)) { lidBox = new TQVButtonGroup(i18n("Lid Switch Closed"), this); - lidBox->layout()->setSpacing( KDialog::spacingHint() ); + lidBox->tqlayout()->setSpacing( KDialog::spacingHint() ); TQToolTip::add( lidBox, i18n( "Select which actions will occur when the laptop's lid is closed" ) ); hlay->addWidget( lidBox ); @@ -196,7 +196,7 @@ ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name) if (laptop_portable::has_button(laptop_portable::PowerButton)) { powerBox = new TQVButtonGroup(i18n("Power Switch Pressed"), this); - powerBox->layout()->setSpacing( KDialog::spacingHint() ); + powerBox->tqlayout()->setSpacing( KDialog::spacingHint() ); TQToolTip::add( powerBox, i18n( "Select which actions will occur when the laptop's power button is pressed" ) ); hlay->addWidget( powerBox ); @@ -273,12 +273,12 @@ ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name) "or power switch on your laptop is pressed. Some laptops may already " "automatically do things like this, if you cannot disable them in your BIOS " "you probably should not enable anything in this panel."), this); - explain->setAlignment( Qt::WordBreak ); + explain->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget(explain); top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); } } diff --git a/klaptopdaemon/buttons.h b/klaptopdaemon/buttons.h index 6c548a0..9263f5f 100644 --- a/klaptopdaemon/buttons.h +++ b/klaptopdaemon/buttons.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -40,8 +40,9 @@ class KComboBox; class ButtonsConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - ButtonsConfig( TQWidget *parent=0, const char* name=0); + ButtonsConfig( TQWidget *tqparent=0, const char* name=0); ~ButtonsConfig(); void save( void ); void load(); diff --git a/klaptopdaemon/checkcrc.h b/klaptopdaemon/checkcrc.h index 149f28b..0538750 100644 --- a/klaptopdaemon/checkcrc.h +++ b/klaptopdaemon/checkcrc.h @@ -2,7 +2,7 @@ * checkcrc.h * * Copyright (c) 2003 Paul Campbell <paul@taniwha.com> - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify diff --git a/klaptopdaemon/daemon_state.cpp b/klaptopdaemon/daemon_state.cpp index 49d4ade..37db2ee 100644 --- a/klaptopdaemon/daemon_state.cpp +++ b/klaptopdaemon/daemon_state.cpp @@ -83,16 +83,16 @@ void daemon_state::load() bool enablehibernate = config->readBoolEntry("EnableHibernate", false); bool enableperformance = config->readBoolEntry("EnablePerformance", false); bool enablethrottle = config->readBoolEntry("EnableThrottle", false); - laptop_portable::acpi_set_mask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); + laptop_portable::acpi_set_tqmask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); config->setGroup("ApmDefault"); enablestandby = config->readBoolEntry("EnableStandby", false); enablesuspend = config->readBoolEntry("EnableSuspend", false); - laptop_portable::apm_set_mask(enablestandby, enablesuspend); + laptop_portable::apm_set_tqmask(enablestandby, enablesuspend); config->setGroup("SoftwareSuspendDefault"); enablehibernate = config->readBoolEntry("EnableHibernate", false); - laptop_portable::software_suspend_set_mask(enablehibernate); + laptop_portable::software_suspend_set_tqmask(enablehibernate); exists = laptop_portable::has_power_management(); has_brightness = laptop_portable::has_brightness(); diff --git a/klaptopdaemon/daemon_state.h b/klaptopdaemon/daemon_state.h index 3a0e4b3..a219c0a 100644 --- a/klaptopdaemon/daemon_state.h +++ b/klaptopdaemon/daemon_state.h @@ -56,9 +56,9 @@ public: int power_action[2]; // what to do when this action is triggered int power_brightness[2]; // which brightness level to switch to bool power_brightness_enabled[2]; // and whether to switch - QString power_performance[2]; // which performance level to switch to + TQString power_performance[2]; // which performance level to switch to bool power_performance_enabled[2]; // and whether to switch - QString power_throttle[2]; // which throttling level to switch to + TQString power_throttle[2]; // which throttling level to switch to bool power_throttle_enabled[2]; // and whether to switch bool lav_enabled[2]; // check LAV first float lav_val[2]; // don't act if higher than this @@ -81,9 +81,9 @@ public: bool do_brightness[2]; int val_brightness[2]; bool do_performance[2]; - QString val_performance[2]; + TQString val_performance[2]; bool do_throttle[2]; - QString val_throttle[2]; + TQString val_throttle[2]; bool time_based_action_low, time_based_action_critical; int low[4]; int poll; // how often to pol diff --git a/klaptopdaemon/daemondock.cpp b/klaptopdaemon/daemondock.cpp index a49f312..32ed524 100644 --- a/klaptopdaemon/daemondock.cpp +++ b/klaptopdaemon/daemondock.cpp @@ -48,13 +48,13 @@ #include <kiconeffect.h> extern void wake_laptop_daemon(); -laptop_dock::laptop_dock( laptop_daemon* parent ) +laptop_dock::laptop_dock( laptop_daemon* tqparent ) : KSystemTray() { setCaption(i18n("KLaptop Daemon")); KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages _pcmcia = NULL; - pdaemon = parent; + pdaemon = tqparent; current_code = -1; brightness_widget = 0; instance = new KInstance("klaptopdaemon"); @@ -202,7 +202,7 @@ laptop_dock::invokeBrightness() brightness_slider->setMinimumHeight(40); brightness_slider->setMinimumWidth(15); connect(brightness_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(invokeBrightnessSlider(int))); - brightness_widget->resize(brightness_widget->sizeHint()); + brightness_widget->resize(brightness_widget->tqsizeHint()); } else { brightness_slider->setValue(255-brightness); } @@ -215,7 +215,7 @@ laptop_dock::invokeBrightness() TQPoint pos = TQCursor::pos(); int x = pos.x(); int y = pos.y(); - y -= brightness_widget->geometry().height(); + y -= brightness_widget->tqgeometry().height(); int w = brightness_widget->width(); int h = brightness_widget->height(); if (x+w > sw) @@ -268,7 +268,7 @@ void laptop_dock::slotGoRoot(int /*id*/) { void laptop_dock::slotHide() { - int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to hide the battery monitor? Your battery will still be monitored in the background."), TQString::null, i18n("Hide Monitor"), i18n("Do Not Hide"), "hideConfirm"); + int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to hide the battery monitor? Your battery will still be monitored in the background."), TQString(), i18n("Hide Monitor"), i18n("Do Not Hide"), "hideConfirm"); if (confirm != KMessageBox::Yes) return; @@ -286,12 +286,12 @@ void laptop_dock::slotHide() { void laptop_dock::slotQuit() { - int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to quit the battery monitor?"), TQString::null, KStdGuiItem::quit(), KStdGuiItem::cancel(), "quitConfirm"); + int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to quit the battery monitor?"), TQString(), KStdGuiItem::quit(), KStdGuiItem::cancel(), "quitConfirm"); if (confirm != KMessageBox::Yes) return; - confirm = KMessageBox::questionYesNo(0, i18n("Do you wish to disable the battery monitor from starting in the future?"), TQString::null, i18n("Disable"), i18n("Keep Enabled"), "restartMonitor"); + confirm = KMessageBox::questionYesNo(0, i18n("Do you wish to disable the battery monitor from starting in the future?"), TQString(), i18n("Disable"), i18n("Keep Enabled"), "restartMonitor"); if (confirm == KMessageBox::Yes) { // just tell ourselves to hide the battery @@ -362,7 +362,7 @@ KPCMCIAInfo *f = new KPCMCIAInfo(_pcmcia); void laptop_dock::mousePressEvent( TQMouseEvent *event ) { - if(event->button() == LeftButton) { + if(event->button() == Qt::LeftButton) { TQPopupMenu *popup = new TQPopupMenu(0, "popup"); if (!pdaemon->exists()) { @@ -375,10 +375,10 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) TQString num3; num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); - tmp = i18n("%1:%2 hours left").arg(pdaemon->left/60).arg(num3); + tmp = i18n("%1:%2 hours left").tqarg(pdaemon->left/60).tqarg(num3); } else { // no remaining time available - tmp = i18n("%1% charged").arg(pdaemon->val); + tmp = i18n("%1% charged").tqarg(pdaemon->val); } } else { tmp = i18n("No Battery"); @@ -402,7 +402,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) TQString speed = laptop_portable::cpu_frequency(); if (!speed.isEmpty()) { popup->insertSeparator(); - popup->insertItem(i18n("CPU: %1").arg(speed)); + popup->insertItem(i18n("CPU: %1").tqarg(speed)); } } @@ -449,7 +449,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) // add a few bits of information thisSub->insertSeparator(); - thisSub->insertItem(slotname.arg(thiscard->num()+1)); + thisSub->insertItem(slotname.tqarg(thiscard->num()+1)); if (thiscard->status() & CARD_STATUS_READY) thisSub->insertItem(i18n("Ready")); if (thiscard->status() & CARD_STATUS_BUSY) @@ -469,15 +469,15 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) } void laptop_dock::mouseReleaseEvent( TQMouseEvent *e ) { - if ( !rect().contains( e->pos() ) ) + if ( !TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) return; switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: break; - case MidButton: + case Qt::MidButton: // fall through - case RightButton: + case Qt::RightButton: { KPopupMenu *menu = contextMenu(); contextMenuAboutToShow( menu ); @@ -519,7 +519,7 @@ void laptop_dock::invokeLockSuspend() { DCOPClient* client = kapp->dcopClient(); if (client) - client->send("kdesktop", "KScreensaverIface", "lock()", ""); + client->send("kdesktop", "KScreensaverIface", "lock()", TQString("")); laptop_portable::invoke_suspend(); } @@ -568,23 +568,23 @@ void laptop_dock::displayPixmap() // at this point, we have the file to display. so display it TQImage image = pm.convertToImage(); - const TQBitmap *bmmask = pm.mask(); - TQImage mask; - if (bmmask) - mask = bmmask->convertToImage(); + const TQBitmap *bmtqmask = pm.tqmask(); + TQImage tqmask; + if (bmtqmask) + tqmask = bmtqmask->convertToImage(); int w = image.width(); int h = image.height(); int count = 0; - QRgb rgb; + TQRgb rgb; int x, y; for (x = 0; x < w; x++) for (y = 0; y < h; y++) - if (!bmmask || mask.pixelIndex(x, y) != 0){ + if (!bmtqmask || tqmask.pixelIndex(x, y) != 0){ rgb = image.pixel(x, y); - if (qRed(rgb) == 0xff && - qGreen(rgb) == 0xff && - qBlue(rgb) == 0xff) + if (tqRed(rgb) == 0xff && + tqGreen(rgb) == 0xff && + tqBlue(rgb) == 0xff) count++; } int c = (count*pdaemon->val)/100; @@ -597,7 +597,7 @@ void laptop_dock::displayPixmap() if (c) { uint ui; - QRgb blue = qRgb(0x00,0x00,0xff); + TQRgb blue = tqRgb(0x00,0x00,0xff); if (image.depth() <= 8) { ui = image.numColors(); // this fix thanks to Sven Krumpke @@ -609,11 +609,11 @@ void laptop_dock::displayPixmap() for (y = h-1; y >= 0; y--) for (x = 0; x < w; x++) - if (!bmmask || mask.pixelIndex(x, y) != 0){ + if (!bmtqmask || tqmask.pixelIndex(x, y) != 0){ rgb = image.pixel(x, y); - if (qRed(rgb) == 0xff && - qGreen(rgb) == 0xff && - qBlue(rgb) == 0xff) { + if (tqRed(rgb) == 0xff && + tqGreen(rgb) == 0xff && + tqBlue(rgb) == 0xff) { image.setPixel(x, y, ui); c--; if (c <= 0) @@ -641,10 +641,10 @@ quit: num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); tmp = i18n("Plugged in - %1% charged (%2:%3 hours left)") - .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3); + .tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); } else { // no remaining time available - tmp = i18n("Plugged in - %1% charged").arg(pdaemon->val); + tmp = i18n("Plugged in - %1% charged").tqarg(pdaemon->val); } } else { tmp = i18n("Plugged in - no battery"); @@ -658,9 +658,9 @@ quit: num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); tmp = i18n("Running on batteries - %1% charged (%2:%3 hours left)") - .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3); + .tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); } else { - tmp = i18n("Running on batteries - %1% charged").arg(pdaemon->val); + tmp = i18n("Running on batteries - %1% charged").tqarg(pdaemon->val); } } else { // running without any power source... @@ -708,7 +708,7 @@ quit: // and which has a transparent background. // Unfortunately this required the following twisted code because for some // reason text that is drawn on a transparent pixmap is invisible - // (apparently the alpha channel isn't changed when the text is drawn). + // (aptqparently the alpha channel isn't changed when the text is drawn). // Therefore I have to draw the text on a solid background and then remove // the background by making it transparent with TQPixmap::setMask. This // involves the slow createHeuristicMask() function (from the API docs: @@ -722,11 +722,11 @@ quit: // unread messages, but every other approach I tried failed miserably. // IK, 2003-09-22 TQPixmap percentagePixmap( oldPixmapWidth, oldPixmapHeight ); - percentagePixmap.fill( Qt::white ); + percentagePixmap.fill( TQt::white ); TQPainter p( &percentagePixmap ); p.setFont( percentageFont ); - p.setPen( Qt::black ); - p.drawText( percentagePixmap.rect(), Qt::AlignCenter, levelString ); + p.setPen( TQt::black ); + p.drawText( percentagePixmap.rect(), TQt::AlignCenter, levelString ); percentagePixmap.setMask( percentagePixmap.createHeuristicMask() ); TQImage percentageImage = percentagePixmap.convertToImage(); @@ -743,8 +743,8 @@ quit: { TQPixmap q; q.convertFromImage(image); - if (bmmask) - q.setMask(*bmmask); + if (bmtqmask) + q.setMask(*bmtqmask); setPixmap(q); } adjustSize(); diff --git a/klaptopdaemon/daemondock.h b/klaptopdaemon/daemondock.h index 5cb78c9..f16acaf 100644 --- a/klaptopdaemon/daemondock.h +++ b/klaptopdaemon/daemondock.h @@ -41,9 +41,10 @@ class KPopupMenu; class laptop_dock : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - laptop_dock(laptop_daemon* parent); + laptop_dock(laptop_daemon* tqparent); ~laptop_dock(); void displayPixmap(); @@ -89,8 +90,8 @@ private: TQVBox *brightness_widget; TQSlider *brightness_slider; laptop_daemon *pdaemon; - QPixmap pm; - QPopupMenu *performance_popup, *throttle_popup; + TQPixmap pm; + TQPopupMenu *performance_popup, *throttle_popup; int current_code; KPCMCIA *_pcmcia; TQMap<int,KPCMCIACard *> _ejectActions, diff --git a/klaptopdaemon/kpcmcia.cpp b/klaptopdaemon/kpcmcia.cpp index 50d7b4c..762959b 100644 --- a/klaptopdaemon/kpcmcia.cpp +++ b/klaptopdaemon/kpcmcia.cpp @@ -175,7 +175,7 @@ tv.tv_sec = 0; tv.tv_usec = 0; TQTextStream ts(&f); bool foundit = false; TQString _thisreg = "^Socket %1: "; - TQRegExp thisreg ( _thisreg.arg(_num) ); + TQRegExp thisreg ( _thisreg.tqarg(_num) ); if (flock(f.handle(), LOCK_SH)) return updated; @@ -186,8 +186,8 @@ tv.tv_sec = 0; tv.tv_usec = 0; TQString s; if (ts.eof()) break; s = ts.readLine(); - if (s.contains(thisreg)) { - _cardname = s.right(s.length() - s.find(':') - 1); + if (s.tqcontains(thisreg)) { + _cardname = s.right(s.length() - s.tqfind(':') - 1); _cardname = _cardname.stripWhiteSpace(); foundit = true; CHECK_CHANGED(oldValues, _cardname); @@ -200,23 +200,23 @@ tv.tv_sec = 0; tv.tv_usec = 0; int end; s.simplifyWhiteSpace(); - end = s.find(TQRegExp("[ \r\t\n]")); + end = s.tqfind(TQRegExp("[ \r\t\n]")); s = s.remove(0, end+1); - end = s.find(TQRegExp("[ \r\t\n]")); + end = s.tqfind(TQRegExp("[ \r\t\n]")); _type = s; _type.truncate(end); s = s.remove(0, end+1); - end = s.find(TQRegExp("[ \r\t\n]")); + end = s.tqfind(TQRegExp("[ \r\t\n]")); _module = s; _module.truncate(end); s = s.remove(0, end+1); - end = s.find(TQRegExp("[ \r\t\n]")); + end = s.tqfind(TQRegExp("[ \r\t\n]")); s = s.remove(0, end+1); - end = s.find(TQRegExp("[ \r\t\n]")); + end = s.tqfind(TQRegExp("[ \r\t\n]")); _device = s; _device.truncate(end); s = s.remove(0, end+1); @@ -500,7 +500,7 @@ TQFile df("/proc/devices"); TQString thisreg; thisreg = "^[0-9]+ %1$"; - thisreg = thisreg.arg(x); + thisreg = thisreg.tqarg(x); if (df.open(IO_ReadOnly)) { TQTextStream t(&df); @@ -508,7 +508,7 @@ TQString thisreg; while (!t.eof()) { s = t.readLine(); - if (s.contains(TQRegExp(thisreg))) { + if (s.tqcontains(TQRegExp(thisreg))) { int n = (s.left(3).stripWhiteSpace()).toInt(); df.close(); return n; @@ -523,7 +523,7 @@ static int openDevice(dev_t dev) { TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName()); TQString ext = "_socket%1"; - tmp_path += ext.arg((int)dev); + tmp_path += ext.tqarg((int)dev); int rc = mknod(tmp_path.latin1(), (S_IFCHR | S_IREAD), dev); if (rc < 0) return -1; diff --git a/klaptopdaemon/kpcmcia.h b/klaptopdaemon/kpcmcia.h index 4480683..489d3e8 100644 --- a/klaptopdaemon/kpcmcia.h +++ b/klaptopdaemon/kpcmcia.h @@ -177,7 +177,8 @@ private: class KPCMCIA : public TQObject { -Q_OBJECT + Q_OBJECT + TQ_OBJECT public: KPCMCIA(int maxSlots = 8, const char *stabPath = "/var/run/stab"); diff --git a/klaptopdaemon/kpcmciainfo.cpp b/klaptopdaemon/kpcmciainfo.cpp index 3e91f2d..2b4c315 100644 --- a/klaptopdaemon/kpcmciainfo.cpp +++ b/klaptopdaemon/kpcmciainfo.cpp @@ -36,8 +36,8 @@ #include "kpcmciainfo.h" -KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *parent, const char *name) - : KDialog(parent, name, false), _pcmcia(pcmcia) { +KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *tqparent, const char *name) + : KDialog(tqparent, name, false), _pcmcia(pcmcia) { setMinimumSize(300,400); @@ -57,14 +57,14 @@ KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *parent, const char *name) prepareCards(); - _mainTab->resize(KDialog::sizeHint()); - resize(KDialog::sizeHint()); + _mainTab->resize(KDialog::tqsizeHint()); + resize(KDialog::tqsizeHint()); connect(_pcmcia, TQT_SIGNAL(cardUpdated(int)), this, TQT_SLOT(updateCard(int))); _sb = new KStatusBar(this); _sb->insertItem(i18n("Ready."), 0, 1, true); - _sb->resize(KDialog::sizeHint()); + _sb->resize(KDialog::tqsizeHint()); _mainGrid->addMultiCellWidget(_sb, 8, 8, 0, 4); _mainGrid->setRowStretch(8, 0); @@ -91,7 +91,7 @@ void KPCMCIAInfo::showTab(int num) { } -void KPCMCIAInfo::slotResetStatus() { +void KPCMCIAInfo::slotResettqStatus() { _sb->changeItem(i18n("Ready."), 0); } @@ -99,12 +99,12 @@ void KPCMCIAInfo::slotResetStatus() { void KPCMCIAInfo::statusNotice(const TQString& text, int life) { _sb->changeItem(text, 0); if (life > 0) - TQTimer::singleShot(life, this, TQT_SLOT(slotResetStatus())); + TQTimer::singleShot(life, this, TQT_SLOT(slotResettqStatus())); } -void KPCMCIAInfo::slotTabSetStatus(const TQString& text) { +void KPCMCIAInfo::slotTabSettqStatus(const TQString& text) { statusNotice(text); } @@ -134,9 +134,9 @@ void KPCMCIAInfo::prepareCards() { TQString tabname = i18n("Card Slot %1"); KPCMCIAInfoPage *tp = new KPCMCIAInfoPage(_pcmcia->getCard(i), _mainTab); connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update())); - connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&))); - tp->resize(_mainTab->sizeHint()); - _mainTab->addTab(tp, tabname.arg(i+1)); + connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSettqStatus(const TQString&))); + tp->resize(_mainTab->tqsizeHint()); + _mainTab->addTab(tp, tabname.tqarg(i+1)); _pages.insert(i, tp); } } @@ -149,8 +149,8 @@ void KPCMCIAInfo::prepareCards() { /////////////////////////////////////////////////////////////////////////// -KPCMCIAInfoPage::KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *parent, const char *name) - : TQFrame(parent, name), _card(card) { +KPCMCIAInfoPage::KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *tqparent, const char *name) + : TQFrame(tqparent, name), _card(card) { _mainGrid = new TQGridLayout(this, 10, 10); if (!_card) { // display an error @@ -233,13 +233,13 @@ void KPCMCIAInfoPage::update() { if (_card) { TQString tmp; _card_name->setText(_card->name()); - _card_name->resize(_card_name->sizeHint()); + _card_name->resize(_card_name->tqsizeHint()); tmp = i18n("Card type: %1 "); - _card_type->setText(tmp.arg(_card->type())); - _card_type->resize(_card_type->sizeHint()); + _card_type->setText(tmp.tqarg(_card->type())); + _card_type->resize(_card_type->tqsizeHint()); tmp = i18n("Driver: %1"); - _card_driver->setText(tmp.arg(_card->driver())); - _card_driver->resize(_card_driver->sizeHint()); + _card_driver->setText(tmp.tqarg(_card->driver())); + _card_driver->resize(_card_driver->tqsizeHint()); tmp = i18n("IRQ: %1%2"); TQString tmp2; switch (_card->intType()) { @@ -256,33 +256,33 @@ void KPCMCIAInfoPage::update() { tmp2 = ""; }; if (_card->irq() <= 0) - _card_irq->setText(tmp.arg(i18n("none")).arg("")); - else _card_irq->setText(tmp.arg(_card->irq()).arg(tmp2)); - _card_irq->resize(_card_irq->sizeHint()); + _card_irq->setText(tmp.tqarg(i18n("none")).tqarg("")); + else _card_irq->setText(tmp.tqarg(_card->irq()).tqarg(tmp2)); + _card_irq->resize(_card_irq->tqsizeHint()); tmp = i18n("I/O port(s): %1"); if (_card->ports().isEmpty()) - _card_io->setText(tmp.arg(i18n("none"))); - else _card_io->setText(tmp.arg(_card->ports())); - _card_io->resize(_card_io->sizeHint()); + _card_io->setText(tmp.tqarg(i18n("none"))); + else _card_io->setText(tmp.tqarg(_card->ports())); + _card_io->resize(_card_io->tqsizeHint()); tmp = i18n("Bus: %1 bit %2"); if (_card->busWidth() == 0) _card_bus->setText(i18n("Bus: unknown")); - else _card_bus->setText(tmp.arg(_card->busWidth()).arg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus"))); - _card_bus->resize(_card_bus->sizeHint()); + else _card_bus->setText(tmp.tqarg(_card->busWidth()).tqarg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus"))); + _card_bus->resize(_card_bus->tqsizeHint()); tmp = i18n("Device: %1"); - _card_dev->setText(tmp.arg(_card->device())); - _card_dev->resize(_card_dev->sizeHint()); + _card_dev->setText(tmp.tqarg(_card->device())); + _card_dev->resize(_card_dev->tqsizeHint()); tmp = i18n("Power: +%1V"); - _card_vcc->setText(tmp.arg(_card->vcc()/10)); - _card_vcc->resize(_card_vcc->sizeHint()); + _card_vcc->setText(tmp.tqarg(_card->vcc()/10)); + _card_vcc->resize(_card_vcc->tqsizeHint()); tmp = i18n("Programming power: +%1V, +%2V"); - _card_vpp->setText(tmp.arg(_card->vpp()/10).arg(_card->vpp2()/10)); - _card_vpp->resize(_card_vpp->sizeHint()); + _card_vpp->setText(tmp.tqarg(_card->vpp()/10).tqarg(_card->vpp2()/10)); + _card_vpp->resize(_card_vpp->tqsizeHint()); tmp = i18n("Configuration base: 0x%1"); if (_card->configBase() == 0) _card_cfgbase->setText(i18n("Configuration base: none")); - else _card_cfgbase->setText(tmp.arg(_card->configBase(), -1, 16)); - _card_cfgbase->resize(_card_cfgbase->sizeHint()); + else _card_cfgbase->setText(tmp.tqarg(_card->configBase(), -1, 16)); + _card_cfgbase->resize(_card_cfgbase->tqsizeHint()); if (!(_card->status() & (CARD_STATUS_READY|CARD_STATUS_SUSPEND))) { _card_ej_ins->setText(i18n("&Insert")); diff --git a/klaptopdaemon/kpcmciainfo.h b/klaptopdaemon/kpcmciainfo.h index f4c49b0..f8700a2 100644 --- a/klaptopdaemon/kpcmciainfo.h +++ b/klaptopdaemon/kpcmciainfo.h @@ -39,9 +39,10 @@ class KPushButton; class KPCMCIAInfo : public KDialog { Q_OBJECT + TQ_OBJECT public: - KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *parent = NULL, const char *name = 0); + KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *tqparent = NULL, const char *name = 0); virtual ~KPCMCIAInfo(); void showTab(int num); @@ -51,8 +52,8 @@ public slots: void slotClose(); void update(); void updateCard(int num); - void slotResetStatus(); - void slotTabSetStatus(const TQString& text); + void slotResettqStatus(); + void slotTabSettqStatus(const TQString& text); signals: void updateNow(); @@ -77,8 +78,9 @@ class TQLabel; class KPCMCIAInfoPage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *parent = NULL, const char *name = 0); + KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *tqparent = NULL, const char *name = 0); virtual ~KPCMCIAInfoPage(); public slots: diff --git a/klaptopdaemon/krichtextlabel.cpp b/klaptopdaemon/krichtextlabel.cpp index 089635d..a604b0d 100644 --- a/klaptopdaemon/krichtextlabel.cpp +++ b/klaptopdaemon/krichtextlabel.cpp @@ -35,20 +35,20 @@ static TQString qrichtextify( const TQString& text ) *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal ); } - return lines.join(TQString::null); + return lines.join(TQString()); } -KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name ) - : TQLabel ( parent, name ) { - m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); - setAlignment( Qt::WordBreak ); +KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *tqparent, const char *name ) + : TQLabel ( tqparent, name ) { + m_defaultWidth = TQMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); + tqsetAlignment( TQt::WordBreak ); setText(text); } -KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name ) - : TQLabel ( parent, name ) { - m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); - setAlignment( Qt::WordBreak ); +KRichTextLabel::KRichTextLabel( TQWidget *tqparent, const char *name ) + : TQLabel ( tqparent, name ) { + m_defaultWidth = TQMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); + tqsetAlignment( TQt::WordBreak ); } void KRichTextLabel::setDefaultWidth(int defaultWidth) @@ -62,7 +62,7 @@ TQSizePolicy KRichTextLabel::sizePolicy() const return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false); } -TQSize KRichTextLabel::minimumSizeHint() const +TQSize KRichTextLabel::tqminimumSizeHint() const { TQString qt_text = qrichtextify( text() ); int pref_width = 0; @@ -97,9 +97,9 @@ TQSize KRichTextLabel::minimumSizeHint() const return TQSize(pref_width, rt.height()); } -TQSize KRichTextLabel::sizeHint() const +TQSize KRichTextLabel::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } void KRichTextLabel::setText( const TQString &text ) { diff --git a/klaptopdaemon/krichtextlabel.h b/klaptopdaemon/krichtextlabel.h index 40ead03..42e7a75 100644 --- a/klaptopdaemon/krichtextlabel.h +++ b/klaptopdaemon/krichtextlabel.h @@ -24,29 +24,30 @@ #include <kdelibs_export.h> /** - * @short A replacement for TQLabel that supports richtext and proper layout management + * @short A replacement for TQLabel that supports richtext and proper tqlayout management * * @author Waldo Bastian <bastian@kde.org> */ /* - * QLabel + * TQLabel */ class KDEUI_EXPORT KRichTextLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: /** * Default constructor. */ - KRichTextLabel( TQWidget *parent, const char *name = 0 ); - KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 ); + KRichTextLabel( TQWidget *tqparent, const char *name = 0 ); + KRichTextLabel( const TQString &text, TQWidget *tqparent, const char *name = 0 ); int defaultWidth() const { return m_defaultWidth; } void setDefaultWidth(int defaultWidth); - virtual TQSize minimumSizeHint() const; - virtual TQSize sizeHint() const; + virtual TQSize tqminimumSizeHint() const; + virtual TQSize tqsizeHint() const; TQSizePolicy sizePolicy() const; public slots: diff --git a/klaptopdaemon/laptop_daemon.cpp b/klaptopdaemon/laptop_daemon.cpp index 5b710c5..36faefa 100644 --- a/klaptopdaemon/laptop_daemon.cpp +++ b/klaptopdaemon/laptop_daemon.cpp @@ -102,7 +102,7 @@ laptop_daemon::laptop_daemon(const TQCString& obj): KDEDModule(obj) sony_disp = 0; connect(this, TQT_SIGNAL(signal_checkBattery()), TQT_SLOT(checkBatteryNow())); - //hasAudio = (audioServer.serverStatus() == 0) ? true : false; + //hasAudio = (audioServer.servertqStatus() == 0) ? true : false; // FIXME: make these configurable. Some system definitely don't // use /var/run/stab @@ -537,13 +537,13 @@ void laptop_daemon::haveBatteryLow(int t, const int num, const int type) if (type) { if (s.time_based_action_critical) { KPassivePopup::message(i18n("Battery power is running out."), - i18n("%1 % charge left.").arg(num), + i18n("%1 % charge left.").tqarg(num), BarIcon("laptop_battery"), dock_widget, 0, 20000); } else { // Will this ever be reached? KPassivePopup::message(i18n("Battery power is running out."), - i18n("%1 % charge left.").arg(num), + i18n("%1 % charge left.").tqarg(num), BarIcon("laptop_battery"), dock_widget, 0, 20000); } diff --git a/klaptopdaemon/laptop_daemon.h b/klaptopdaemon/laptop_daemon.h index 7617a0d..f5ba767 100644 --- a/klaptopdaemon/laptop_daemon.h +++ b/klaptopdaemon/laptop_daemon.h @@ -74,6 +74,7 @@ class laptop_dock; class laptop_daemon: public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP public: laptop_daemon(const TQCString& obj); @@ -167,7 +168,7 @@ protected: int saved_brightness_val; TQString saved_performance_val, saved_throttle_val; TQTimer *wake_timer; // the timer for the above running - QPoint wakepos; // the mouse pos at the beginning of time + TQPoint wakepos; // the mouse pos at the beginning of time void WakeUpAuto(); TQTimer *backoffTimer; // backoff diff --git a/klaptopdaemon/linux/bulkmem.h b/klaptopdaemon/linux/bulkmem.h index e0bafc8..cb59aa5 100644 --- a/klaptopdaemon/linux/bulkmem.h +++ b/klaptopdaemon/linux/bulkmem.h @@ -71,7 +71,7 @@ typedef struct eraseq_hdr_t { eraseq_entry_t *QueueEntryArray; } eraseq_hdr_t; -#define ERASE_QUEUED 0x00 +#define ERASE_TQUEUED 0x00 #define ERASE_IN_PROGRESS(n) (((n) > 0) && ((n) < 0x80)) #define ERASE_IDLE 0xff #define ERASE_PASSED 0xe0 @@ -125,25 +125,25 @@ typedef struct mtd_request_t { u_int TransferLength; u_int Function; u_long MediaID; - u_int Status; + u_int tqStatus; u_int Timeout; } mtd_request_t; /* Fields in MTD Function */ -#define MTD_REQ_ACTION 0x003 -#define MTD_REQ_ERASE 0x000 -#define MTD_REQ_READ 0x001 -#define MTD_REQ_WRITE 0x002 -#define MTD_REQ_COPY 0x003 -#define MTD_REQ_NOERASE 0x004 -#define MTD_REQ_VERIFY 0x008 -#define MTD_REQ_READY 0x010 -#define MTD_REQ_TIMEOUT 0x020 -#define MTD_REQ_LAST 0x040 -#define MTD_REQ_FIRST 0x080 -#define MTD_REQ_KERNEL 0x100 - -/* Status codes */ +#define MTD_RETQ_ACTION 0x003 +#define MTD_RETQ_ERASE 0x000 +#define MTD_RETQ_READ 0x001 +#define MTD_RETQ_WRITE 0x002 +#define MTD_RETQ_COPY 0x003 +#define MTD_RETQ_NOERASE 0x004 +#define MTD_RETQ_VERIFY 0x008 +#define MTD_RETQ_READY 0x010 +#define MTD_RETQ_TIMEOUT 0x020 +#define MTD_RETQ_LAST 0x040 +#define MTD_RETQ_FIRST 0x080 +#define MTD_RETQ_KERNEL 0x100 + +/* tqStatus codes */ #define MTD_WAITREQ 0x00 #define MTD_WAITTIMER 0x01 #define MTD_WAITRDY 0x02 diff --git a/klaptopdaemon/linux/ciscode.h b/klaptopdaemon/linux/ciscode.h index 1c536d1..622b923 100644 --- a/klaptopdaemon/linux/ciscode.h +++ b/klaptopdaemon/linux/ciscode.h @@ -66,7 +66,7 @@ #define PRODID_OLICOM_OC2232 0x3222 #define MANFID_OMEGA 0x0137 -#define PRODID_OMEGA_QSP_100 0x0025 +#define PRODID_OMEGA_TQSP_100 0x0025 #define MANFID_OSITECH 0x0140 #define PRODID_OSITECH_JACK_144 0x0001 @@ -75,10 +75,10 @@ #define MANFID_PSION 0x016c -#define MANFID_QUATECH 0x0137 -#define PRODID_QUATECH_DUAL_RS232 0x0012 -#define PRODID_QUATECH_DUAL_RS232_D1 0x0007 -#define PRODID_QUATECH_QUAD_RS232 0x001b +#define MANFID_TQUATECH 0x0137 +#define PRODID_TQUATECH_DUAL_RS232 0x0012 +#define PRODID_TQUATECH_DUAL_RS232_D1 0x0007 +#define PRODID_TQUATECH_TQUAD_RS232 0x001b #define MANFID_SMC 0x0108 #define PRODID_SMC_ETHER 0x0105 diff --git a/klaptopdaemon/linux/cisreg.h b/klaptopdaemon/linux/cisreg.h index ebe54fc..48f6f83 100644 --- a/klaptopdaemon/linux/cisreg.h +++ b/klaptopdaemon/linux/cisreg.h @@ -38,12 +38,12 @@ #define COR_MFC_CONFIG_MASK 0x38 #define COR_FUNC_ENA 0x01 #define COR_ADDR_DECODE 0x02 -#define COR_IREQ_ENA 0x04 +#define COR_IRETQ_ENA 0x04 #define COR_LEVEL_REQ 0x40 #define COR_SOFT_RESET 0x80 /* - * Card Configuration and Status Register + * Card Configuration and tqStatus Register */ #define CCSR_INTR_ACK 0x01 #define CCSR_INTR_PENDING 0x02 @@ -72,13 +72,13 @@ #define SCR_COPY_NUM 0x70 /* - * Extended Status Register + * Extended tqStatus Register */ -#define ESR_REQ_ATTN_ENA 0x01 -#define ESR_REQ_ATTN 0x10 +#define ESR_RETQ_ATTN_ENA 0x01 +#define ESR_RETQ_ATTN 0x10 /* - * CardBus Function Status Registers + * CardBus Function tqStatus Registers */ #define CBFN_EVENT 0x00 #define CBFN_MASK 0x04 diff --git a/klaptopdaemon/linux/cistpl.h b/klaptopdaemon/linux/cistpl.h index 8fee55b..6fab93a 100644 --- a/klaptopdaemon/linux/cistpl.h +++ b/klaptopdaemon/linux/cistpl.h @@ -312,7 +312,7 @@ typedef struct cistpl_ide_interface_t { /* First feature byte */ #define CISTPL_IDE_SILICON 0x04 -#define CISTPL_IDE_UNIQUE 0x08 +#define CISTPL_IDE_UNITQUE 0x08 #define CISTPL_IDE_DUAL 0x10 /* Second feature byte */ @@ -353,7 +353,7 @@ typedef struct cistpl_bar_t { typedef struct cistpl_config_t { u_char last_idx; u_int base; - u_int rmask[4]; + u_int rtqmask[4]; u_char subtuples; } cistpl_config_t; @@ -398,8 +398,8 @@ typedef struct cistpl_io_t { } cistpl_io_t; typedef struct cistpl_irq_t { - u_int IRQInfo1; - u_int IRQInfo2; + u_int IRTQInfo1; + u_int IRTQInfo2; } cistpl_irq_t; #define CISTPL_MEM_MAX_WIN 8 diff --git a/klaptopdaemon/linux/cs.h b/klaptopdaemon/linux/cs.h index b8610ca..69a38e0 100644 --- a/klaptopdaemon/linux/cs.h +++ b/klaptopdaemon/linux/cs.h @@ -62,11 +62,11 @@ typedef struct adjust_t { #define RES_IO_RANGE 2 #define RES_IRQ 3 /* Attribute field */ -#define RES_IRQ_TYPE 0x03 -#define RES_IRQ_TYPE_EXCLUSIVE 0 -#define RES_IRQ_TYPE_TIME 1 -#define RES_IRQ_TYPE_DYNAMIC 2 -#define RES_IRQ_CSC 0x04 +#define RES_IRTQ_TYPE 0x03 +#define RES_IRTQ_TYPE_EXCLUSIVE 0 +#define RES_IRTQ_TYPE_TIME 1 +#define RES_IRTQ_TYPE_DYNAMIC 2 +#define RES_IRTQ_CSC 0x04 #define RES_SHARED 0x08 #define RES_RESERVED 0x10 #define RES_ALLOCATED 0x20 @@ -96,11 +96,11 @@ typedef struct config_info_t { u_int Vcc, Vpp1, Vpp2; u_int IntType; u_int ConfigBase; - u_char Status, Pin, Copy, Option, ExtStatus; + u_char tqStatus, Pin, Copy, Option, ExttqStatus; u_int Present; u_int CardValues; u_int AssignedIRQ; - u_int IRQAttributes; + u_int IRTQAttributes; ioaddr_t BasePort1; ioaddr_t NumPorts1; u_int Attributes1; @@ -143,7 +143,7 @@ typedef struct modconf_t { } modconf_t; /* Attributes for ModifyConfiguration */ -#define CONF_IRQ_CHANGE_VALID 0x100 +#define CONF_IRTQ_CHANGE_VALID 0x100 #define CONF_VCC_CHANGE_VALID 0x200 #define CONF_VPP1_CHANGE_VALID 0x400 #define CONF_VPP2_CHANGE_VALID 0x800 @@ -154,7 +154,7 @@ typedef struct config_req_t { u_int Vcc, Vpp1, Vpp2; u_int IntType; u_int ConfigBase; - u_char Status, Pin, Copy, ExtStatus; + u_char tqStatus, Pin, Copy, ExttqStatus; u_char ConfigIndex; u_int Present; } config_req_t; @@ -194,36 +194,36 @@ typedef struct io_req_t { typedef struct irq_req_t { u_int Attributes; u_int AssignedIRQ; - u_int IRQInfo1, IRQInfo2; + u_int IRTQInfo1, IRTQInfo2; void *Handler; void *Instance; } irq_req_t; /* Attributes for RequestIRQ and ReleaseIRQ */ -#define IRQ_TYPE 0x03 -#define IRQ_TYPE_EXCLUSIVE 0x00 -#define IRQ_TYPE_TIME 0x01 -#define IRQ_TYPE_DYNAMIC_SHARING 0x02 -#define IRQ_FORCED_PULSE 0x04 -#define IRQ_FIRST_SHARED 0x08 -#define IRQ_HANDLE_PRESENT 0x10 -#define IRQ_PULSE_ALLOCATED 0x100 - -/* Bits in IRQInfo1 field */ -#define IRQ_MASK 0x0f -#define IRQ_NMI_ID 0x01 -#define IRQ_IOCK_ID 0x02 -#define IRQ_BERR_ID 0x04 -#define IRQ_VEND_ID 0x08 -#define IRQ_INFO2_VALID 0x10 -#define IRQ_LEVEL_ID 0x20 -#define IRQ_PULSE_ID 0x40 -#define IRQ_SHARE_ID 0x80 - -typedef struct eventmask_t { +#define IRTQ_TYPE 0x03 +#define IRTQ_TYPE_EXCLUSIVE 0x00 +#define IRTQ_TYPE_TIME 0x01 +#define IRTQ_TYPE_DYNAMIC_SHARING 0x02 +#define IRTQ_FORCED_PULSE 0x04 +#define IRTQ_FIRST_SHARED 0x08 +#define IRTQ_HANDLE_PRESENT 0x10 +#define IRTQ_PULSE_ALLOCATED 0x100 + +/* Bits in IRTQInfo1 field */ +#define IRTQ_MASK 0x0f +#define IRTQ_NMI_ID 0x01 +#define IRTQ_IOCK_ID 0x02 +#define IRTQ_BERR_ID 0x04 +#define IRTQ_VEND_ID 0x08 +#define IRTQ_INFO2_VALID 0x10 +#define IRTQ_LEVEL_ID 0x20 +#define IRTQ_PULSE_ID 0x40 +#define IRTQ_SHARE_ID 0x80 + +typedef struct eventtqmask_t { u_int Attributes; u_int EventMask; -} eventmask_t; +} eventtqmask_t; #define CONF_EVENT_MASK_VALID 0x01 @@ -407,7 +407,7 @@ enum service { GetClientInfo, GetConfigurationInfo, GetEventMask, GetFirstClient, GetFirstPartion, GetFirstRegion, GetFirstTuple, GetNextClient, GetNextPartition, GetNextRegion, GetNextTuple, - GetStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage, + GettqStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage, MapPhySocket, MapPhyWindow, ModifyConfiguration, ModifyWindow, OpenMemory, ParseTuple, ReadMemory, RegisterClient, RegisterEraseQueue, RegisterMTD, RegisterTimer, diff --git a/klaptopdaemon/linux/k_compat.h b/klaptopdaemon/linux/k_compat.h index 2b14312..d18eaa5 100644 --- a/klaptopdaemon/linux/k_compat.h +++ b/klaptopdaemon/linux/k_compat.h @@ -124,19 +124,19 @@ #endif #if (LINUX_VERSION_CODE < VERSION(2,1,51)) -#define INVALIDATE_INODES(r) invalidate_inodes(r) +#define INVALIDATE_INODES(r) tqinvalidate_inodes(r) #else #define INVALIDATE_INODES(r) \ do { struct super_block *sb = get_super(r); \ - if (sb) invalidate_inodes(sb); } while (0) + if (sb) tqinvalidate_inodes(sb); } while (0) #endif #if (LINUX_VERSION_CODE < VERSION(2,1,60)) -#define IRQ_MAP(irq, dev) irq2dev_map[irq] = dev +#define IRTQ_MAP(irq, dev) irq2dev_map[irq] = dev #define FOPS(i,f,b,c,p) (i,f,b,c) #define FPOS (file->f_pos) #else -#define IRQ_MAP(irq, dev) while (0) +#define IRTQ_MAP(irq, dev) while (0) #define FOPS(i,f,b,c,p) (f,b,c,p) #define FPOS (*ppos) #endif @@ -240,7 +240,7 @@ #endif typedef unsigned long k_time_t; -#define ACQUIRE_RESOURCE_LOCK do {} while (0) +#define ACTQUIRE_RESOURCE_LOCK do {} while (0) #define RELEASE_RESOURCE_LOCK do {} while (0) #endif /* _LINUX_K_COMPAT_H */ diff --git a/klaptopdaemon/linux/ss.h b/klaptopdaemon/linux/ss.h index 57ad769..b9dbb39 100644 --- a/klaptopdaemon/linux/ss.h +++ b/klaptopdaemon/linux/ss.h @@ -25,7 +25,7 @@ typedef struct ss_callback_t { void *info; } ss_callback_t; -/* Definitions for card status flags for GetStatus */ +/* Definitions for card status flags for GettqStatus */ #define SS_WRPROT 0x0001 #define SS_CARDLOCK 0x0002 #define SS_EJECTION 0x0004 @@ -44,7 +44,7 @@ typedef struct ss_callback_t { /* for InquireSocket */ typedef struct socket_cap_t { u_int features; - u_int irq_mask; + u_int irq_tqmask; u_int map_size; u_char pci_irq; u_char cardbus; @@ -56,7 +56,7 @@ typedef struct socket_cap_t { /* for GetSocket, SetSocket */ typedef struct socket_state_t { u_int flags; - u_int csc_mask; + u_int csc_tqmask; u_char Vcc, Vpp; u_char io_irq; } socket_state_t; @@ -105,7 +105,7 @@ typedef struct cb_bridge_map { enum ss_service { SS_RegisterCallback, SS_InquireSocket, - SS_GetStatus, SS_GetSocket, SS_SetSocket, + SS_GettqStatus, SS_GetSocket, SS_SetSocket, SS_GetIOMap, SS_SetIOMap, SS_GetMemMap, SS_SetMemMap, SS_GetBridge, SS_SetBridge, SS_ProcSetup }; diff --git a/klaptopdaemon/main.cpp b/klaptopdaemon/main.cpp index ca30218..c39f153 100644 --- a/klaptopdaemon/main.cpp +++ b/klaptopdaemon/main.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -48,46 +48,46 @@ extern void wake_laptop_daemon(); extern "C" { - KDE_EXPORT KCModule *create_pcmcia(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_pcmcia(TQWidget *tqparent, const char *) { - return new PcmciaConfig(parent, "kcmlaptop"); + return new PcmciaConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_bwarning(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_bwarning(TQWidget *tqparent, const char *) { - return new WarningConfig(0, parent, "kcmlaptop"); + return new WarningConfig(0, tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_cwarning(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_cwarning(TQWidget *tqparent, const char *) { - return new WarningConfig(1, parent, "kcmlaptop"); + return new WarningConfig(1, tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_battery(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_battery(TQWidget *tqparent, const char *) { - return new BatteryConfig(parent, "kcmlaptop"); + return new BatteryConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_power(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_power(TQWidget *tqparent, const char *) { - return new PowerConfig(parent, "kcmlaptop"); + return new PowerConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_acpi(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_acpi(TQWidget *tqparent, const char *) { - return new AcpiConfig(parent, "kcmlaptop"); + return new AcpiConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_apm(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_apm(TQWidget *tqparent, const char *) { - return new ApmConfig(parent, "kcmlaptop"); + return new ApmConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_Profile(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_Profile(TQWidget *tqparent, const char *) { - return new ProfileConfig(parent, "kcmlaptop"); + return new ProfileConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_sony(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_sony(TQWidget *tqparent, const char *) { - return new SonyConfig(parent, "kcmlaptop"); + return new SonyConfig(tqparent, "kcmlaptop"); } - KDE_EXPORT KCModule *create_buttons(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_buttons(TQWidget *tqparent, const char *) { - return new ButtonsConfig(parent, "kcmlaptop"); + return new ButtonsConfig(tqparent, "kcmlaptop"); } KDE_EXPORT void init_battery() @@ -111,9 +111,9 @@ extern "C" wake_laptop_daemon(); } - KDE_EXPORT KCModule *create_laptop(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_laptop(TQWidget *tqparent, const char *) { - return new LaptopModule(parent, "kcmlaptop"); + return new LaptopModule(tqparent, "kcmlaptop"); } KDE_EXPORT void init_laptop() @@ -124,8 +124,8 @@ extern "C" -LaptopModule::LaptopModule(TQWidget *parent, const char *) - : KCModule(parent, "kcmlaptop") +LaptopModule::LaptopModule(TQWidget *tqparent, const char *) + : KCModule(tqparent, "kcmlaptop") { { // export ACPI options KConfig config("kcmlaptoprc", true /*readonly*/, false /*no globals*/); @@ -136,34 +136,34 @@ LaptopModule::LaptopModule(TQWidget *parent, const char *) bool enablehibernate = config.readBoolEntry("EnableHibernate", false); bool enableperformance = config.readBoolEntry("EnablePerformance", false); bool enablethrottle = config.readBoolEntry("EnableThrottle", false); - laptop_portable::acpi_set_mask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); + laptop_portable::acpi_set_tqmask(enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle); config.setGroup("ApmDefault"); enablestandby = config.readBoolEntry("EnableStandby", false); enablesuspend = config.readBoolEntry("EnableSuspend", false); - laptop_portable::apm_set_mask(enablestandby, enablesuspend); + laptop_portable::apm_set_tqmask(enablestandby, enablesuspend); config.setGroup("SoftwareSuspendDefault"); enablehibernate = config.readBoolEntry("EnableHibernate", false); - laptop_portable::software_suspend_set_mask(enablehibernate); + laptop_portable::software_suspend_set_tqmask(enablehibernate); } - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); tab = new TQTabWidget(this); - layout->addWidget(tab); + tqlayout->addWidget(tab); - battery = new BatteryConfig(parent, "kcmlaptop"); + battery = new BatteryConfig(tqparent, "kcmlaptop"); tab->addTab(battery, i18n("&Battery")); connect(battery, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); - power = new PowerConfig(parent, "kcmlaptop"); + power = new PowerConfig(tqparent, "kcmlaptop"); tab->addTab(power, i18n("&Power Control")); connect(power, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); - warning = new WarningConfig(0, parent, "kcmlaptop"); + warning = new WarningConfig(0, tqparent, "kcmlaptop"); tab->addTab(warning, i18n("Low Battery &Warning")); connect(warning, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); - critical = new WarningConfig(1, parent, "kcmlaptop"); + critical = new WarningConfig(1, tqparent, "kcmlaptop"); tab->addTab(critical, i18n("Low Battery &Critical")); connect(critical, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); @@ -175,28 +175,28 @@ LaptopModule::LaptopModule(TQWidget *parent, const char *) int current_throttle; bool has_throttling = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list); if (laptop_portable::has_brightness() || has_profile || has_throttling) { - profile = new ProfileConfig(parent, "kcmlaptop"); + profile = new ProfileConfig(tqparent, "kcmlaptop"); tab->addTab(profile, i18n("Default Power Profiles")); connect(profile, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); } else { profile = 0; } if (laptop_portable::has_button(laptop_portable::LidButton) || laptop_portable::has_button(laptop_portable::PowerButton)) { - buttons = new ButtonsConfig(parent, "kcmlaptop"); + buttons = new ButtonsConfig(tqparent, "kcmlaptop"); tab->addTab(buttons, i18n("Button Actions")); connect(buttons, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); } else { buttons = 0; } if (laptop_portable::has_acpi()) { - acpi = new AcpiConfig(parent, "kcmlaptop"); + acpi = new AcpiConfig(tqparent, "kcmlaptop"); tab->addTab(acpi, i18n("&ACPI Config")); connect(acpi, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); } else { acpi = 0; } if (laptop_portable::has_apm()) { - apm = new ApmConfig(parent, "kcmlaptop"); + apm = new ApmConfig(tqparent, "kcmlaptop"); tab->addTab(apm, i18n("&APM Config")); connect(apm, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); } else { @@ -213,7 +213,7 @@ LaptopModule::LaptopModule(TQWidget *parent, const char *) } } if (do_sony) { - sony = new SonyConfig(parent, "kcmlaptop"); + sony = new SonyConfig(tqparent, "kcmlaptop"); tab->addTab(sony, i18n("&Sony Laptop Config")); connect(sony, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); } else { diff --git a/klaptopdaemon/main.h b/klaptopdaemon/main.h index c944817..ddefe22 100644 --- a/klaptopdaemon/main.h +++ b/klaptopdaemon/main.h @@ -3,7 +3,7 @@ * * Copyright (c) 2002 Paul Campbell paul@taniwha.com * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -44,10 +44,11 @@ class ButtonsConfig; class LaptopModule : public KCModule { Q_OBJECT + TQ_OBJECT public: - LaptopModule(TQWidget *parent, const char *name); + LaptopModule(TQWidget *tqparent, const char *name); void load(); void save(); diff --git a/klaptopdaemon/makecrc.cpp b/klaptopdaemon/makecrc.cpp index ce3d415..ee87bcc 100644 --- a/klaptopdaemon/makecrc.cpp +++ b/klaptopdaemon/makecrc.cpp @@ -2,7 +2,7 @@ * makecrc.cpp * * Copyright (c) 2003 Paul Campbell <paul@taniwha.com> - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify diff --git a/klaptopdaemon/pcmcia.cpp b/klaptopdaemon/pcmcia.cpp index c44567a..4bde3b3 100644 --- a/klaptopdaemon/pcmcia.cpp +++ b/klaptopdaemon/pcmcia.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -37,8 +37,8 @@ #include "portable.h" #include "version.h" -PcmciaConfig::PcmciaConfig (TQWidget * parent, const char *name) - : KCModule(parent, name) +PcmciaConfig::PcmciaConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name) { KAboutData *about = new KAboutData(I18N_NOOP("kcmlaptop"), @@ -84,7 +84,7 @@ PcmciaConfig::PcmciaConfig (TQWidget * parent, const char *name) TQString s1 = LAPTOP_VERSION; TQString s2 = i18n("Version: ")+s1; TQLabel* vers = new TQLabel(s2, this); - vers->setMinimumSize(vers->sizeHint()); + vers->setMinimumSize(vers->tqsizeHint()); v1->addWidget(vers, 0); top_layout->activate(); diff --git a/klaptopdaemon/pcmcia.h b/klaptopdaemon/pcmcia.h index f9579f9..18eec79 100644 --- a/klaptopdaemon/pcmcia.h +++ b/klaptopdaemon/pcmcia.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -41,8 +41,9 @@ class PcmciaConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - PcmciaConfig( TQWidget *parent=0, const char* name=0); + PcmciaConfig( TQWidget *tqparent=0, const char* name=0); void save( void ); void load(); diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp index f1b28fa..fda010b 100644 --- a/klaptopdaemon/portable.cpp +++ b/klaptopdaemon/portable.cpp @@ -5,7 +5,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -199,7 +199,7 @@ pmu_read(apm_info *ap) int timerem = 0; int maxcharge = 0; for (int i = 0; i < bcnt; i++) { - TQFile bf(TQString("/proc/pmu/battery_%1").arg(i)); + TQFile bf(TQString("/proc/pmu/battery_%1").tqarg(i)); if (!bf.exists() || !bf.open(IO_ReadOnly)) continue; @@ -304,7 +304,7 @@ readit: char buff2[1024]; if (fgets(buff2, sizeof(buff), f) == NULL) break; - if (strstr(buff2, "Status:") != NULL || + if (strstr(buff2, "tqStatus:") != NULL || strstr(buff2, "state:") != NULL) { if (strstr(buff2, "on-line") != NULL) { fclose(f); @@ -333,7 +333,7 @@ static void acpi_read_batteries() { f = new TQFile(bat.info_file); if (f && f->exists() && f->open(IO_ReadOnly)) { while(f->readLine(buff,1024) > 0) { - if (buff.contains("design capacity low:", false)) { + if (buff.tqcontains("design capacity low:", false)) { TQRegExp rx("(\\d*)\\D*$"); rx.search(buff); bat.cap_low = rx.cap(1).toInt(); @@ -341,7 +341,7 @@ static void acpi_read_batteries() { bat.cap_low = 0; continue; } - if (buff.contains("last full capacity:", false)) { + if (buff.tqcontains("last full capacity:", false)) { TQRegExp rx("(\\d*)\\D*$"); rx.search(buff); bat.cap = rx.cap(1).toInt(); @@ -363,7 +363,7 @@ static void acpi_read_batteries() { f = new TQFile(bat.state_file); if (f && f->exists() && f->open(IO_ReadOnly)) { while(f->readLine(buff,1024) > 0) { - if (buff.contains("present rate:", false)) { + if (buff.tqcontains("present rate:", false)) { TQRegExp rx("(\\d*)\\D*$"); rx.search(buff); bat.rate = rx.cap(1).toInt(); @@ -372,7 +372,7 @@ static void acpi_read_batteries() { present = true; continue; } - if (buff.contains("remaining capacity:", false)) { + if (buff.tqcontains("remaining capacity:", false)) { TQRegExp rx("(\\d*)\\D*$"); rx.search(buff); bat.remaining = rx.cap(1).toInt(); @@ -602,7 +602,7 @@ laptop_portable::has_software_suspend(int type) } void -laptop_portable::software_suspend_set_mask(bool hibernate) +laptop_portable::software_suspend_set_tqmask(bool hibernate) { software_suspend_is_preferred = hibernate; } @@ -677,17 +677,17 @@ has_acpi_power() return(val); } -static unsigned long acpi_sleep_enabled = 0x00; // acpi sleep functions enabled mask +static unsigned long acpi_sleep_enabled = 0x00; // acpi sleep functions enabled tqmask static bool has_acpi_sleep(int state) { static int known=0; - static unsigned long mask=0; + static unsigned long tqmask=0; if (known != last_seed) { known = last_seed; - mask = 0; + tqmask = 0; TQFile p("/sys/power/state"); TQFile f("/proc/acpi/sleep"); @@ -701,11 +701,11 @@ has_acpi_sleep(int state) TQString s = *i; if (s.compare("standby")==0) - mask |= (1<<1); + tqmask |= (1<<1); else if (s.compare("mem")==0) - mask |= (1<<3); + tqmask |= (1<<3); else if (s.compare("disk")==0) - mask |= (1<<4); + tqmask |= (1<<4); } p.close(); } @@ -719,19 +719,19 @@ has_acpi_sleep(int state) if (s[0] == 'S') { int c = s[1].digitValue(); if (c >= 0 && c <= 9) - mask |= 1<<c; + tqmask |= 1<<c; } } f.close(); } } - return((mask&acpi_sleep_enabled&(1<<state)) != 0); + return((tqmask&acpi_sleep_enabled&(1<<state)) != 0); } static bool acpi_performance_enabled = 0; static bool acpi_throttle_enabled = 0; void -laptop_portable::acpi_set_mask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle) +laptop_portable::acpi_set_tqmask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle) { acpi_sleep_enabled = (standby ? (1<<1)|(1<<2) : 0) | @@ -755,7 +755,7 @@ invoke_acpi_helper(const char *param, const char *param2, const char *param3) proc.start(KProcess::Block); // helper runs fast and we want to see the result } -static unsigned long apm_sleep_enabled = 0x0c; // apm sleep functions enabled mask +static unsigned long apm_sleep_enabled = 0x0c; // apm sleep functions enabled tqmask static bool has_apm_sleep(int state) { @@ -763,7 +763,7 @@ has_apm_sleep(int state) } void -laptop_portable::apm_set_mask(bool standby, bool suspend) +laptop_portable::apm_set_tqmask(bool standby, bool suspend) { apm_sleep_enabled = (standby ? 1<<2 : 0) | @@ -939,14 +939,14 @@ int laptop_portable::has_hibernation() // to get any software they lack // -KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) +KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent) { if (access("/proc/acpi", F_OK) == 0) { // probably has default kernel ACPI installed - KActiveLabel* explain = new KActiveLabel(i18n("Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel."), parent); + KActiveLabel* explain = new KActiveLabel(i18n("Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel."), tqparent); return(explain); } - KActiveLabel* explain = new KActiveLabel(i18n("Your computer doesn't have the Linux APM (Advanced Power Management) or ACPI software installed, or doesn't have the APM kernel drivers installed - check out the <a href=\"http://www.linuxdoc.org/HOWTO/Laptop-HOWTO.html\">Linux Laptop-HOWTO</a> document for information on how to install APM."), parent); + KActiveLabel* explain = new KActiveLabel(i18n("Your computer doesn't have the Linux APM (Advanced Power Management) or ACPI software installed, or doesn't have the APM kernel drivers installed - check out the <a href=\"http://www.linuxdoc.org/HOWTO/Laptop-HOWTO.html\">Linux Laptop-HOWTO</a> document for information on how to install APM."), tqparent); return(explain); } @@ -954,23 +954,23 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) // // explain to the user what they need to do to get suspend/resume to work from user mode // -TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) +TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent) { if (::has_apm()) { // TODO: remove linefeed from string, can't do it right now coz we have a string freeze TQLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also " "be able to choose 'suspend' and 'standby' in the above " "dialog - check out the help button below to find out " - "how to do this").replace("\n", TQString::null), parent); + "how to do this").tqreplace("\n", TQString()), tqparent); return(note); } if (::has_acpi()) { // TODO: remove linefeed from string, can't do it right now coz we have a string freeze - TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString::null), parent); + TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").tqreplace("\n", TQString()), tqparent); return(note); } // TODO: remove linefeed from string, can't do it right now coz we have a string freeze - TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString::null), parent); + TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").tqreplace("\n", TQString()), tqparent); return(note); } @@ -1040,20 +1040,20 @@ void get_pcmcia_info() // pcmcia support - this will be replaced by better - pcmcia support being worked on by // others // -TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent) +TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent) { if (x == 0) get_pcmcia_info(); if (!present) { if (x == 1) - return(new TQLabel(i18n("No PCMCIA controller detected"), parent)); - return(new TQLabel(i18n(""), parent)); + return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent)); + return(new TQLabel(i18n(""), tqparent)); } else { switch (x) { - case 0: return(new TQLabel(i18n("Card 0:"), parent)); - case 1: return(new TQLabel(tmp0, parent)); - case 2: return(new TQLabel(i18n("Card 1:"), parent)); - default:return(new TQLabel(tmp1, parent)); + case 0: return(new TQLabel(i18n("Card 0:"), tqparent)); + case 1: return(new TQLabel(tmp0, tqparent)); + case 2: return(new TQLabel(i18n("Card 1:"), tqparent)); + default:return(new TQLabel(tmp1, tqparent)); } } } @@ -1226,7 +1226,7 @@ laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQS for(unsigned int i = 0; i < acpi_batteries.count(); ++i) { acpi_battery_info& bat = acpi_batteries[i]; names.append(bat.name); - values.append(TQString("%1").arg(bat.percentage)); + values.append(TQString("%1").tqarg(bat.percentage)); state.append(bat.present ? "yes" : "no"); } return; @@ -1330,11 +1330,11 @@ TQString laptop_portable::cpu_frequency() { continue; if (ll.first().stripWhiteSpace() == "cpu MHz") { - rc = i18n("%1 MHz (%2)").arg(ll.last().stripWhiteSpace()).arg(rc); + rc = i18n("%1 MHz (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); break; } else if (ll.first().stripWhiteSpace() == "clock") { - rc = TQString("%1 (%2)").arg(ll.last().stripWhiteSpace()).arg(rc); + rc = TQString("%1 (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); break; } } @@ -1580,8 +1580,8 @@ get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index, while (!f.atEnd() && i < MAP_SIZE) { TQString l; f.readLine(l, 500); - if (l.contains("active limit", false)) { - TQRegExp rx(TQString("%1(\\d+)").arg(p)); + if (l.tqcontains("active limit", false)) { + TQRegExp rx(TQString("%1(\\d+)").tqarg(p)); if (rx.search(l) >= 0) { bool ok; int min = rx.cap(1).toInt(&ok); @@ -1706,7 +1706,7 @@ static int get_cpufreq_24_state(TQStringList &states, int ¤t, const TQStri f.close(); cpufreq_minmax_frequency[i] = buffer; unsigned int val = buffer.toUInt() / 1000; - states.append(i18n("%1 MHz").arg(val)); + states.append(i18n("%1 MHz").tqarg(val)); if(buffer.stripWhiteSpace() == cur) current = i; } @@ -1835,7 +1835,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g int current, result; if((result = get_acpi_list('P', acpi_performance_map, "/performance", performance_list, current, acpi_performance_cpu, false, acpi_performance_enable))) { char tmp[20]; - int ind = performance_list.findIndex(val); + int ind = performance_list.tqfindIndex(val); if (ind < 0 || ind >= MAP_SIZE || current == ind) return; snprintf(tmp, sizeof(tmp), "%d", acpi_performance_map[ind]); @@ -1857,7 +1857,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g invoke_acpi_helper("--cpufreq-25", tmp.latin1(), 0); return; case CPUFREQ_24: - int target = performance_list.findIndex(val); + int target = performance_list.tqfindIndex(val); invoke_acpi_helper("--cpufreq-24", cpufreq_cpu.latin1(), cpufreq_minmax_frequency[target].latin1()); return; } @@ -1871,7 +1871,7 @@ laptop_portable::set_system_throttling(TQString val) // val = string given by ge { if (::has_acpi()) { char tmp[20]; - int ind = throttle_list.findIndex(val); + int ind = throttle_list.tqfindIndex(val); if (ind < 0 || ind >= MAP_SIZE) return; snprintf(tmp, sizeof(tmp), "%d", acpi_throttle_map[ind]); @@ -1909,7 +1909,7 @@ acpi_check_button(const char *prefix, TQString &result) while (!f.atEnd()) { TQString l; f.readLine(l, 500); - if (l.contains("state:")) { + if (l.tqcontains("state:")) { result = name; v = 1; break; @@ -2139,7 +2139,7 @@ int laptop_portable::has_hibernation() // explain to the user what they need to do if has_power_management() returned 0 // to get any software they lack // -KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) +KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent) { int fd; KActiveLabel *explain; @@ -2148,22 +2148,22 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) if (fd == -1) { switch (errno) { case ENOENT: - explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the FreeBSD handbook on how to create a device node for the APM device driver (man 4 apm)."), parent); + explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the FreeBSD handbook on how to create a device node for the APM device driver (man 4 apm)."), tqparent); break; case EACCES: - explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you are logged in as root right now, you have a problem, otherwise contact your local sysadmin and ask for read/write access to /dev/apm."), parent); + explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you are logged in as root right now, you have a problem, otherwise contact your local sysadmin and ask for read/write access to /dev/apm."), tqparent); break; case ENXIO: - explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), parent); + explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), tqparent); break; break; default: - explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), parent); + explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), tqparent); break; } } else { close(fd); - explain = new KActiveLabel(i18n("APM has most likely been disabled."), parent); + explain = new KActiveLabel(i18n("APM has most likely been disabled."), tqparent); } return(explain); @@ -2172,9 +2172,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) // // explain to the user what they need to do to get suspend/resume to work from user mode // -TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) +TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent) { - TQLabel* note = new TQLabel(" ", parent); + TQLabel* note = new TQLabel(" ", tqparent); return(note); } @@ -2183,11 +2183,11 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) // pcmcia support - this will be replaced by better - pcmcia support being worked on by // others // -TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent) +TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent) { if (x == 0) - return(new TQLabel(i18n("No PCMCIA controller detected"), parent)); - return(new TQLabel(i18n(""), parent)); + return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent)); + return(new TQLabel(i18n(""), tqparent)); } // // puts us into standby mode @@ -2239,7 +2239,7 @@ void laptop_portable::invoke_hibernation() //ACPI specific - chances are you don't need to implement this one // void -laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool ) +laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool ) { // INSERT HERE } @@ -2258,7 +2258,7 @@ int laptop_portable::has_apm(int type) } void -laptop_portable::apm_set_mask(bool , bool ) +laptop_portable::apm_set_tqmask(bool , bool ) { } @@ -2267,7 +2267,7 @@ laptop_portable::apm_set_mask(bool , bool ) // adds extra widgets to the battery panel // void -laptop_portable::extra_config(TQWidget * /*parent*/, KConfig * /*config*/, TQVBoxLayout * /*layout*/) +laptop_portable::extra_config(TQWidget * /*tqparent*/, KConfig * /*config*/, TQVBoxLayout * /*tqlayout*/) { // INSERT HERE } @@ -2423,7 +2423,7 @@ laptop_portable::has_software_suspend(int /*type*/) } void -laptop_portable::software_suspend_set_mask(bool /*hibernate*/) +laptop_portable::software_suspend_set_tqmask(bool /*hibernate*/) { // software_suspend_is_preferred = hibernate; } @@ -2544,7 +2544,7 @@ int laptop_portable::has_hibernation() // explain to the user what they need to do if has_power_management() returned 0 // to get any software they lack // -KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) +KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent) { int fd; KActiveLabel *explain; @@ -2553,22 +2553,22 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) if (fd == -1) { switch (errno) { case ENOENT: - explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the NetBSD documentation on how to create a device node for the APM device driver (man 4 apm)."), parent); + explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the NetBSD documentation on how to create a device node for the APM device driver (man 4 apm)."), tqparent); break; case EACCES: - explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you have APM compiled into the kernel this should not happen."), parent); + explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you have APM compiled into the kernel this should not happen."), tqparent); break; case ENXIO: - explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), parent); + explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), tqparent); break; break; default: - explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), parent); + explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), tqparent); break; } } else { close(fd); - explain = new KActiveLabel(i18n("APM has most likely been disabled."), parent); + explain = new KActiveLabel(i18n("APM has most likely been disabled."), tqparent); } return(explain); @@ -2577,10 +2577,10 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) // // explain to the user what they need to do to get suspend/resume to work from user mode // -TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) +TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent) { // INSERT HERE - TQLabel* note = new TQLabel(" ", parent); + TQLabel* note = new TQLabel(" ", tqparent); return(note); } @@ -2588,12 +2588,12 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) // pcmcia support - this will be replaced by better - pcmcia support being worked on by // others // -TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent) +TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent) { // INSERT HERE if (x == 0) - return(new TQLabel(i18n("No PCMCIA controller detected"), parent)); - return(new TQLabel(i18n(""), parent)); + return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent)); + return(new TQLabel(i18n(""), tqparent)); } // @@ -2636,7 +2636,7 @@ void laptop_portable::invoke_hibernation() //ACPI specific - chances are you don't need to implement this one // void -laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool ) +laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool ) { // INSERT HERE } @@ -2655,7 +2655,7 @@ int laptop_portable::has_apm(int type) } void -laptop_portable::apm_set_mask(bool , bool ) +laptop_portable::apm_set_tqmask(bool , bool ) { } @@ -2861,9 +2861,9 @@ int laptop_portable::has_hibernation() // explain to the user what they need to do if has_power_management() returned 0 // to get any software they lack // -KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) +KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent) { - KActiveLabel* explain = new KActiveLabel(i18n("Your computer or operating system is not supported by the current version of the\nKDE laptop control panels. If you want help porting these panels to work with it\nplease contact paul@taniwha.com."), parent); + KActiveLabel* explain = new KActiveLabel(i18n("Your computer or operating system is not supported by the current version of the\nKDE laptop control panels. If you want help porting these panels to work with it\nplease contact paul@taniwha.com."), tqparent); // INSERT HERE return(explain); } @@ -2871,9 +2871,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent) // // explain to the user what they need to do to get suspend/resume to work from user mode // -TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) +TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent) { - TQLabel* note = new TQLabel(" ", parent); + TQLabel* note = new TQLabel(" ", tqparent); // INSERT HERE return(note); } @@ -2883,12 +2883,12 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent) // pcmcia support - this will be replaced by better - pcmcia support being worked on by // others // -TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent) +TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent) { // INSERT HERE if (x == 0) - return(new TQLabel(i18n("No PCMCIA controller detected"), parent)); - return(new TQLabel(i18n(""), parent)); + return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent)); + return(new TQLabel(i18n(""), tqparent)); } // // puts us into standby mode @@ -2917,7 +2917,7 @@ void laptop_portable::invoke_hibernation() //ACPI specific - chances are you don't need to implement this one // void -laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool ) +laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool ) { // INSERT HERE } @@ -2929,7 +2929,7 @@ int laptop_portable::has_acpi(int) } void -laptop_portable::apm_set_mask(bool, bool) +laptop_portable::apm_set_tqmask(bool, bool) { // INSERT HERE } @@ -2945,7 +2945,7 @@ int laptop_portable::has_apm(int) // adds extra widgets to the battery panel // void -laptop_portable::extra_config(TQWidget *parent, KConfig *config, TQVBoxLayout *layout) +laptop_portable::extra_config(TQWidget *tqparent, KConfig *config, TQVBoxLayout *tqlayout) { // INSERT HERE } @@ -3080,7 +3080,7 @@ laptop_portable::has_software_suspend(int type) } void -laptop_portable::software_suspend_set_mask(bool hibernate) +laptop_portable::software_suspend_set_tqmask(bool hibernate) { // software_suspend_is_preferred = hibernate; } diff --git a/klaptopdaemon/portable.h b/klaptopdaemon/portable.h index a9fa703..d530fd4 100644 --- a/klaptopdaemon/portable.h +++ b/klaptopdaemon/portable.h @@ -72,9 +72,9 @@ public: static void set_brightness(bool blank, int val); // val = 0-255 255 brightest, 0 means dimmest (if !blank it must be still visible), static int get_brightness(); // returns 0-255 brightness, -1 if you can't static TQString cpu_frequency(); // Returns the cpu freq. - static KActiveLabel *no_power_management_explanation(TQWidget *parent); - static TQLabel *how_to_do_suspend_resume(TQWidget *parent); - static TQLabel *pcmcia_info(int x, TQWidget *parent); + static KActiveLabel *no_power_management_explanation(TQWidget *tqparent); + static TQLabel *how_to_do_suspend_resume(TQWidget *tqparent); + static TQLabel *pcmcia_info(int x, TQWidget *tqparent); /** * Put this computer into standby mode. @@ -98,10 +98,10 @@ public: static void get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values); // get multiple battery status static bool has_lav(); // true if the following returns a valid value static float get_load_average(); // current short term load average - static void extra_config(TQWidget *parent, KConfig *config, TQVBoxLayout *layout); - static void acpi_set_mask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle); - static void apm_set_mask(bool standby, bool suspend); - static void software_suspend_set_mask(bool hibernate); + static void extra_config(TQWidget *tqparent, KConfig *config, TQVBoxLayout *tqlayout); + static void acpi_set_tqmask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle); + static void apm_set_tqmask(bool standby, bool suspend); + static void software_suspend_set_tqmask(bool hibernate); /** * Get a list of available performance profiles. diff --git a/klaptopdaemon/power.cpp b/klaptopdaemon/power.cpp index dadf654..e033148 100644 --- a/klaptopdaemon/power.cpp +++ b/klaptopdaemon/power.cpp @@ -4,7 +4,7 @@ * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -45,8 +45,8 @@ #include <tqtooltip.h> extern void wake_laptop_daemon(); -PowerConfig::PowerConfig (TQWidget * parent, const char *name) - : KCModule(parent, name), +PowerConfig::PowerConfig (TQWidget * tqparent, const char *name) + : KCModule(tqparent, name), nopowerBox(0), nopowerStandby(0), nopowerSuspend(0), @@ -122,7 +122,7 @@ PowerConfig::PowerConfig (TQWidget * parent, const char *name) nopowerBox = new TQVButtonGroup(i18n("Not Powered"), this); TQToolTip::add( nopowerBox, i18n( "Options in this box apply when the laptop is unplugged from the wall and has been idle for a while" ) ); - nopowerBox->layout()->setSpacing( KDialog::spacingHint() ); + nopowerBox->tqlayout()->setSpacing( KDialog::spacingHint() ); hlay->addWidget( nopowerBox ); if (can_standby) { @@ -214,7 +214,7 @@ PowerConfig::PowerConfig (TQWidget * parent, const char *name) powerBox = new TQVButtonGroup(i18n("Powered"), this); - powerBox->layout()->setSpacing( KDialog::spacingHint() ); + powerBox->tqlayout()->setSpacing( KDialog::spacingHint() ); TQToolTip::add( powerBox, i18n( "Options in this box apply when the laptop is plugged into the wall and has been idle for a while" ) ); hlay->addWidget( powerBox ); @@ -305,19 +305,19 @@ PowerConfig::PowerConfig (TQWidget * parent, const char *name) "it works as a sort of extreme screen saver. You can configure different " "timeouts and types of behavior depending on whether or not your laptop is " "plugged in to the mains supply."), this ); - explain->setAlignment( Qt::WordBreak ); + explain->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget(explain); if (can_standby) { TQLabel* explain3 = new TQLabel(i18n("Different laptops may respond to 'standby' in different ways - in many " "it is only a temporary state and may not be useful for you."), this); - explain3->setAlignment( Qt::WordBreak ); - top_layout->addWidget(explain3, 0, Qt::AlignLeft); + explain3->tqsetAlignment( TQt::WordBreak ); + top_layout->addWidget(explain3, 0, TQt::AlignLeft); } top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); } } diff --git a/klaptopdaemon/power.h b/klaptopdaemon/power.h index c5d7761..d856dcd 100644 --- a/klaptopdaemon/power.h +++ b/klaptopdaemon/power.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -41,8 +41,9 @@ class KDoubleSpinBox; class PowerConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - PowerConfig( TQWidget *parent=0, const char* name=0); + PowerConfig( TQWidget *tqparent=0, const char* name=0); ~PowerConfig(); void save( void ); void load(); diff --git a/klaptopdaemon/profile.cpp b/klaptopdaemon/profile.cpp index db3cfde..d8f442f 100644 --- a/klaptopdaemon/profile.cpp +++ b/klaptopdaemon/profile.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -40,7 +40,7 @@ #include <kmessagebox.h> #include <kcombobox.h> -// other Qt headers: +// other TQt headers: #include <tqlayout.h> #include <tqlabel.h> #include <tqcheckbox.h> @@ -53,8 +53,8 @@ extern void wake_laptop_daemon(); -ProfileConfig::ProfileConfig(TQWidget * parent, const char *name) - : KCModule(parent, name) +ProfileConfig::ProfileConfig(TQWidget * tqparent, const char *name) + : KCModule(tqparent, name) { TQStringList performance_list; int current_performance; @@ -205,15 +205,15 @@ ProfileConfig::ProfileConfig(TQWidget * parent, const char *name) TQLabel *tmp_label = new TQLabel(i18n("This panel allows you to set default values for system attributes " "so that they change when the laptop is plugged in to the wall or " "running on batteries."), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); tmp_label = new TQLabel(i18n("You can also set options for these values that will be set by low battery " "conditions, or system inactivity in the other panels"), this ); - tmp_label->setAlignment( Qt::WordBreak ); + tmp_label->tqsetAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); diff --git a/klaptopdaemon/profile.h b/klaptopdaemon/profile.h index 72c13db..2d44e59 100644 --- a/klaptopdaemon/profile.h +++ b/klaptopdaemon/profile.h @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -42,8 +42,9 @@ class KComboBox; class ProfileConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - ProfileConfig( TQWidget *parent=0, const char* name=0); + ProfileConfig( TQWidget *tqparent=0, const char* name=0); ~ProfileConfig( ); void save( void ); diff --git a/klaptopdaemon/sony.cpp b/klaptopdaemon/sony.cpp index b97b05e..3ecbf35 100644 --- a/klaptopdaemon/sony.cpp +++ b/klaptopdaemon/sony.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2002 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -42,7 +42,7 @@ #include <kmessagebox.h> #include <krichtextlabel.h> -// other Qt headers: +// other TQt headers: #include <tqlayout.h> #include <tqlabel.h> #include <tqcheckbox.h> @@ -55,8 +55,8 @@ extern void wake_laptop_daemon(); -SonyConfig::SonyConfig(TQWidget * parent, const char *name) - : KCModule(parent, name) +SonyConfig::SonyConfig(TQWidget * tqparent, const char *name) + : KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages @@ -68,7 +68,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name) // TODO: remove linefeed from string, can't do it right now coz we have a string freeze top_layout->addWidget(new KRichTextLabel(i18n("This panel allows you to control some of the features of the\n" "'sonypi' device for your laptop - you should not enable the options below if you\nalso " - "use the 'sonypid' program in your system").replace("\n", " "), this)); + "use the 'sonypid' program in your system").tqreplace("\n", " "), this)); enableScrollBar = new TQCheckBox( i18n("Enable &scroll bar"), this ); TQToolTip::add( enableScrollBar, i18n( "When checked this box enables the scrollbar so that it works under KDE" ) ); @@ -86,7 +86,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name) // TODO: remove linefeed from string, can't do it right now coz we have a string freeze top_layout->addWidget(new KRichTextLabel(i18n("The /dev/sonypi is not accessable, if you wish to use the above features its\n" - "protections need to be changed. Clicking on the button below will change them\n").replace("\n", " "), this)); + "protections need to be changed. Clicking on the button below will change them\n").tqreplace("\n", " "), this)); TQHBoxLayout *ll = new TQHBoxLayout(); TQPushButton *setupButton = new TQPushButton(i18n("Setup /dev/sonypi"), this); connect( setupButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper()) ); @@ -99,7 +99,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); diff --git a/klaptopdaemon/sony.h b/klaptopdaemon/sony.h index b82cd09..80648e2 100644 --- a/klaptopdaemon/sony.h +++ b/klaptopdaemon/sony.h @@ -3,7 +3,7 @@ * * Copyright (c) 2002 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -41,8 +41,9 @@ class TQPushButton; class SonyConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - SonyConfig( TQWidget *parent=0, const char* name=0); + SonyConfig( TQWidget *tqparent=0, const char* name=0); ~SonyConfig( ); void save( void ); diff --git a/klaptopdaemon/warning.cpp b/klaptopdaemon/warning.cpp index c098718..826489a 100644 --- a/klaptopdaemon/warning.cpp +++ b/klaptopdaemon/warning.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -44,8 +44,8 @@ extern void wake_laptop_daemon(); -WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) - : KCModule(parent, name), +WarningConfig::WarningConfig (int t, TQWidget * tqparent, const char *name) + : KCModule(tqparent, name), checkSuspend(0), checkStandby(0), checkHibernate(0) @@ -84,9 +84,9 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) editCriticalPercent->setSuffix(i18n("keep short, unit in spinbox", "%")); TQToolTip::add(editCriticalPercent, i18n("When this amount of battery life is left the actions below will be triggered")); grid->addWidget(checkCriticalTime, curRow, 0); - grid->addWidget(editCriticalTime, curRow++, Qt::AlignLeft); + grid->addWidget(editCriticalTime, curRow++, TQt::AlignLeft); grid->addWidget(checkCriticalPercent, curRow, 0); - grid->addWidget(editCriticalPercent, curRow++, Qt::AlignLeft); + grid->addWidget(editCriticalPercent, curRow++, TQt::AlignLeft); connect(editCriticalTime, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged())); connect(editCriticalPercent, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged())); @@ -104,9 +104,9 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) editLowPercent->setSuffix(i18n("keep short, unit in spinbox", "%")); TQToolTip::add(editLowPercent, i18n("When this amount of battery life is left the actions below will be triggered")); grid->addWidget(checkLowTime, curRow, 0); - grid->addWidget(editLowTime, curRow++, Qt::AlignLeft); + grid->addWidget(editLowTime, curRow++, TQt::AlignLeft); grid->addWidget(checkLowPercent, curRow, 0); - grid->addWidget(editLowPercent, curRow++, Qt::AlignLeft); + grid->addWidget(editLowPercent, curRow++, TQt::AlignLeft); connect(editLowTime, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged())); connect(editLowPercent, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged())); @@ -164,7 +164,7 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) if (can_brightness) { checkBrightness = new TQCheckBox(i18n("Panel b&rightness"), this); - checkBrightness->setMinimumSize(checkBrightness->sizeHint()); + checkBrightness->setMinimumSize(checkBrightness->tqsizeHint()); TQToolTip::add( checkBrightness, i18n( "If enabled the back panel brightness will change" ) ); grid->addWidget(checkBrightness, curRow, 0); connect(checkBrightness, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(brightness_changed(bool))); @@ -236,23 +236,23 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) TQVButtonGroup *b = new TQVButtonGroup(i18n("System State Change"), this); TQToolTip::add( b, i18n( "You may choose one of the following to occur when the battery gets low" ) ); - b->layout()->setSpacing( KDialog::spacingHint() ); + b->tqlayout()->setSpacing( KDialog::spacingHint() ); if (can_standby) { checkStandby = new TQRadioButton(i18n("Standb&y"), b); TQToolTip::add( checkStandby, i18n( "Move the system into the standby state - a temporary lower power state" ) ); - checkStandby->setMinimumSize(checkStandby->sizeHint()); + checkStandby->setMinimumSize(checkStandby->tqsizeHint()); connect(checkStandby, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged())); } if (can_suspend) { checkSuspend = new TQRadioButton(i18n("&Suspend"), b); TQToolTip::add( checkSuspend, i18n( "Move the system into the suspend state - also known as 'save-to-ram'" ) ); - checkSuspend->setMinimumSize(checkSuspend->sizeHint()); + checkSuspend->setMinimumSize(checkSuspend->tqsizeHint()); connect(checkSuspend, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged())); } if (can_hibernate) { checkHibernate = new TQRadioButton(i18n("H&ibernate"), b); TQToolTip::add( checkHibernate, i18n( "Move the system into the hibernate state - also known as 'save-to-disk'" ) ); - checkHibernate->setMinimumSize(checkHibernate->sizeHint()); + checkHibernate->setMinimumSize(checkHibernate->tqsizeHint()); connect(checkHibernate, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged())); } // setup the logout option @@ -266,7 +266,7 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) checkNone = new TQRadioButton(i18n("&None"), b); connect(checkNone, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged())); - grid->addMultiCellWidget(b, curRow, curRow, 0, 1, Qt::AlignLeft|Qt::AlignTop); + grid->addMultiCellWidget(b, curRow, curRow, 0, 1, TQt::AlignLeft|TQt::AlignTop); curRow++; @@ -276,7 +276,7 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) } else { explain = new TQLabel(i18n("This panel controls how and when you receive warnings that your battery power is about to run out"), this); } - explain->setAlignment( Qt::WordBreak ); + explain->tqsetAlignment( TQt::WordBreak ); grid->addMultiCellWidget(explain, curRow, curRow, 0, 1); ++curRow; @@ -288,8 +288,8 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) } grid->setRowStretch(curRow++, 1); - grid->addWidget(new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), - curRow, 1, Qt::AlignRight); + grid->addWidget(new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), + curRow, 1, TQt::AlignRight); } my_load(1); @@ -560,7 +560,7 @@ void WarningConfig::enablePlaySound(bool enable) void WarningConfig::browseRunCommand() { - KURL url = KFileDialog::getOpenURL(TQString::null, TQString::null, this ); + KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this ); if( url.isEmpty() ) return; @@ -577,7 +577,7 @@ void WarningConfig::browseRunCommand() void WarningConfig::browsePlaySound() { - KURL url = KFileDialog::getOpenURL(TQString::null, TQString::null, this ); + KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this ); if( url.isEmpty() ) return; diff --git a/klaptopdaemon/warning.h b/klaptopdaemon/warning.h index f51808d..2c52348 100644 --- a/klaptopdaemon/warning.h +++ b/klaptopdaemon/warning.h @@ -4,7 +4,7 @@ * Copyright (c) 1999 Paul Campbell <paul@taniwha.com> * Copyright (c) 2002 Marc Mutz <mutz@kde.org> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -41,8 +41,9 @@ class KComboBox; class WarningConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - WarningConfig(int x, TQWidget *parent=0, const char* name=0); + WarningConfig(int x, TQWidget *tqparent=0, const char* name=0); ~WarningConfig(); void save( void ); void load(); diff --git a/klaptopdaemon/xautolock.cc b/klaptopdaemon/xautolock.cc index 630b175..51e1637 100644 --- a/klaptopdaemon/xautolock.cc +++ b/klaptopdaemon/xautolock.cc @@ -32,7 +32,7 @@ extern "C" { #include <X11/extensions/dpms.h> #ifndef HAVE_DPMSINFO_PROTO -Status DPMSInfo ( Display *, CARD16 *, BOOL * ); +tqStatus DPMSInfo ( Display *, CARD16 *, BOOL * ); #endif } #endif @@ -246,14 +246,14 @@ bool XAutoLock::x11Event( XEvent* ev ) // don't futher process key events that were received only because XAutoLock wants them if( ev->type == KeyPress && !ev->xkey.send_event && !xautolock_useXidle && !xautolock_useMit - && !TQWidget::find( ev->xkey.window )) + && !TQWidget::tqfind( ev->xkey.window )) return true; return false; } bool XAutoLock::ignoreWindow( WId w ) { - if( w != qt_xrootwin() && TQWidget::find( w )) + if( w != qt_xrootwin() && TQWidget::tqfind( w )) return true; return false; } diff --git a/klaptopdaemon/xautolock.h b/klaptopdaemon/xautolock.h index 35b5320..e248e5e 100644 --- a/klaptopdaemon/xautolock.h +++ b/klaptopdaemon/xautolock.h @@ -17,9 +17,10 @@ // Detect user inactivity. // Named XAutoLock after the program that it is based on. // -class XAutoLock : public QWidget +class XAutoLock : public TQWidget { Q_OBJECT + TQ_OBJECT public: XAutoLock(); ~XAutoLock(); diff --git a/klaptopdaemon/xautolock_diy.c b/klaptopdaemon/xautolock_diy.c index b9df2f8..1aacf5e 100644 --- a/klaptopdaemon/xautolock_diy.c +++ b/klaptopdaemon/xautolock_diy.c @@ -95,24 +95,24 @@ static void selectEvents (Window window, Bool substructureOnly) { Window root; /* root window of the window */ - Window parent; /* parent of the window */ - Window* children; /* children of the window */ - unsigned nofChildren = 0; /* number of children */ + Window tqparent; /* tqparent of the window */ + Window* tqchildren; /* tqchildren of the window */ + unsigned nofChildren = 0; /* number of tqchildren */ unsigned i; /* loop counter */ XWindowAttributes attribs; /* attributes of the window */ if( xautolock_ignoreWindow( window )) return; /* - * Start by querying the server about the root and parent windows. + * Start by querying the server about the root and tqparent windows. */ - if (!XQueryTree (queue.display, window, &root, &parent, - &children, &nofChildren)) + if (!XQueryTree (queue.display, window, &root, &tqparent, + &tqchildren, &nofChildren)) { return; } - if (nofChildren) (void) XFree ((char*) children); + if (nofChildren) (void) XFree ((char*) tqchildren); /* * Build the appropriate event mask. The basic idea is that we don't @@ -132,7 +132,7 @@ selectEvents (Window window, Bool substructureOnly) } else { - if (parent == None) /* the *real* rootwindow */ + if (tqparent == None) /* the *real* rootwindow */ { attribs.all_event_masks = attribs.do_not_propagate_mask = KeyPressMask; @@ -168,7 +168,7 @@ selectEvents (Window window, Bool substructureOnly) } /* - * Now ask for the list of children again, since it might have changed + * Now ask for the list of tqchildren again, since it might have changed * in between the last time and us selecting SubstructureNotifyMask. * * There is a (very small) chance that we might process a subtree twice: @@ -178,21 +178,21 @@ selectEvents (Window window, Bool substructureOnly) * XGrabServer(), but that'd be an impolite thing to do, and since it * isn't required... */ - if (!XQueryTree (queue.display, window, &root, &parent, - &children, &nofChildren)) + if (!XQueryTree (queue.display, window, &root, &tqparent, + &tqchildren, &nofChildren)) { return; } /* - * Now do the same thing for all children. + * Now do the same thing for all tqchildren. */ for (i = 0; i < nofChildren; ++i) { - selectEvents (children[i], substructureOnly); + selectEvents (tqchildren[i], substructureOnly); } - if (nofChildren) (void) XFree ((char*) children); + if (nofChildren) (void) XFree ((char*) tqchildren); } #if 0 diff --git a/klaptopdaemon/xautolock_engine.c b/klaptopdaemon/xautolock_engine.c index 62f968a..08094e7 100644 --- a/klaptopdaemon/xautolock_engine.c +++ b/klaptopdaemon/xautolock_engine.c @@ -74,7 +74,7 @@ xautolock_queryPointer (Display* d) { Window dummyWin; /* as it says */ int dummyInt; /* as it says */ - unsigned mask; /* modifier mask */ + unsigned tqmask; /* modifier tqmask */ int rootX; /* as it says */ int rootY; /* as it says */ int corner; /* corner index */ @@ -104,7 +104,7 @@ xautolock_queryPointer (Display* d) * of pointer events. */ if (!XQueryPointer (d, root, &root, &dummyWin, &rootX, &rootY, - &dummyInt, &dummyInt, &mask)) + &dummyInt, &dummyInt, &tqmask)) { /* * Pointer has moved to another screen, so let's find out which one. @@ -121,7 +121,7 @@ xautolock_queryPointer (Display* d) if ( rootX == prevRootX && rootY == prevRootY - && mask == prevMask) + && tqmask == prevMask) { xautolock_corner_t* corners = xautolock_corners; /* @@ -186,7 +186,7 @@ xautolock_queryPointer (Display* d) #endif prevRootX = rootX; prevRootY = rootY; - prevMask = mask; + prevMask = tqmask; xautolock_resetTriggers (); } @@ -224,7 +224,7 @@ evaluateTriggers (Display* d) * when we are finally re-enabled. */ #ifdef VMS - if (vmsStatus == 0) + if (vmstqStatus == 0) { #else /* VMS */ if (lockerPid) @@ -336,7 +336,7 @@ evaluateTriggers (Display* d) || now >= lockTrigger) { #ifdef VMS - if (vmsStatus != 0) + if (vmstqStatus != 0) #else /* VMS */ if (!lockerPid) #endif /* VMS */ @@ -350,9 +350,9 @@ evaluateTriggers (Display* d) case 0: (void) close (ConnectionNumber (d)); #ifdef VMS - vmsStatus = 0; + vmstqStatus = 0; lockerPid = lib$spawn ((lockNow ? &nowLockerDescr : &lockerDescr), - 0, 0, &1, 0, 0, &vmsStatus); + 0, 0, &1, 0, 0, &vmstqStatus); if (!(lockerPid & 1)) exit (lockerPid); @@ -380,7 +380,7 @@ evaluateTriggers (Display* d) * Nevertheless, simply resetting the screensaver is a * convenience action that aids many xlock users, and doesn't * harm anyone (*). The problem with older versions of xlock - * is that they can be told to replace (= disable) the real + * is that they can be told to tqreplace (= disable) the real * screensaver, but forget to reset that same screensaver if * it was already active at the time xlock starts. I guess * xlock initially wasn't designed to be run without a user diff --git a/kmilo/asus/asus.cpp b/kmilo/asus/asus.cpp index 1af8780..12690f1 100644 --- a/kmilo/asus/asus.cpp +++ b/kmilo/asus/asus.cpp @@ -42,7 +42,7 @@ namespace KMilo { -AsusMonitor::AsusMonitor(TQObject* parent, const char* name, const TQStringList& args): Monitor(parent, name, args) +AsusMonitor::AsusMonitor(TQObject* tqparent, const char* name, const TQStringList& args): Monitor(tqparent, name, args) { } @@ -183,7 +183,7 @@ bool AsusMonitor::readProc(asus_state_struct* asus_state) int AsusMonitor::readProcEntry(const TQString &name) { - TQFile f(TQString("/proc/acpi/asus/%1").arg(name).local8Bit()); + TQFile f(TQString("/proc/acpi/asus/%1").tqarg(name).local8Bit()); if (f.open(IO_ReadOnly)) { diff --git a/kmilo/asus/asus.h b/kmilo/asus/asus.h index c809eea..1d1132d 100644 --- a/kmilo/asus/asus.h +++ b/kmilo/asus/asus.h @@ -42,7 +42,7 @@ typedef struct */ class AsusMonitor: public Monitor { public: - AsusMonitor(TQObject *parent, const char *name, const TQStringList&); + AsusMonitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~AsusMonitor(); /** diff --git a/kmilo/delli8k/delli8k.cpp b/kmilo/delli8k/delli8k.cpp index d63c8c7..063fa74 100644 --- a/kmilo/delli8k/delli8k.cpp +++ b/kmilo/delli8k/delli8k.cpp @@ -43,8 +43,8 @@ namespace KMilo { -DellI8kMonitor::DellI8kMonitor( TQObject* parent, const char* name, const TQStringList& args ) - : Monitor( parent, name, args ) +DellI8kMonitor::DellI8kMonitor( TQObject* tqparent, const char* name, const TQStringList& args ) + : Monitor( tqparent, name, args ) { } diff --git a/kmilo/delli8k/delli8k.h b/kmilo/delli8k/delli8k.h index 424f80a..1d3ead8 100644 --- a/kmilo/delli8k/delli8k.h +++ b/kmilo/delli8k/delli8k.h @@ -45,7 +45,7 @@ namespace KMilo { class DellI8kMonitor: public Monitor { public: - DellI8kMonitor( TQObject *parent, const char *name, const TQStringList& ); + DellI8kMonitor( TQObject *tqparent, const char *name, const TQStringList& ); virtual ~DellI8kMonitor(); /** diff --git a/kmilo/demo/demo.cpp b/kmilo/demo/demo.cpp index c985e08..a2875f6 100644 --- a/kmilo/demo/demo.cpp +++ b/kmilo/demo/demo.cpp @@ -26,8 +26,8 @@ namespace KMilo { -Demo::Demo(TQObject *parent, const char *name, const TQStringList& args) -: Monitor(parent, name, args) { +Demo::Demo(TQObject *tqparent, const char *name, const TQStringList& args) +: Monitor(tqparent, name, args) { } diff --git a/kmilo/demo/demo.h b/kmilo/demo/demo.h index a1d02d4..5a1aabe 100644 --- a/kmilo/demo/demo.h +++ b/kmilo/demo/demo.h @@ -26,7 +26,7 @@ class Demo : public KMilo::Monitor { public: - Demo(TQObject *parent, const char *name, const TQStringList&); + Demo(TQObject *tqparent, const char *name, const TQStringList&); virtual ~Demo(); virtual bool init(); diff --git a/kmilo/generic/generic_monitor.cpp b/kmilo/generic/generic_monitor.cpp index 14e79e0..a97726e 100644 --- a/kmilo/generic/generic_monitor.cpp +++ b/kmilo/generic/generic_monitor.cpp @@ -42,8 +42,8 @@ using namespace KMilo; -GenericMonitor::GenericMonitor(TQObject *parent, const char *name, const TQStringList& args) -: Monitor(parent, name, args) +GenericMonitor::GenericMonitor(TQObject *tqparent, const char *name, const TQStringList& args) +: Monitor(tqparent, name, args) { _poll = false; m_displayType = Monitor::None; @@ -91,10 +91,10 @@ bool GenericMonitor::init() { "Help", KShortcut("XF86Launch0"), TQT_SLOT(launchHelp()) }, { "Light Bulb", KShortcut("XF86LightBulb"), TQT_SLOT(lightBulb()) }, { "Battery", KShortcut("XF86LaunchB"), TQT_SLOT(pmBattery()) }, - { "FastVolumeUp", Qt::Key_VolumeUp, TQT_SLOT(fastVolumeUp()) }, - { "FastVolumeDown", Qt::Key_VolumeDown, TQT_SLOT(fastVolumeDown()) }, - { "SlowVolumeUp", Qt::CTRL+Qt::Key_VolumeUp, TQT_SLOT(slowVolumeUp()) }, - { "SlowVolumeDown", Qt::CTRL+Qt::Key_VolumeDown, TQT_SLOT(slowVolumeDown()) }, + { "FastVolumeUp", TQt::Key_VolumeUp, TQT_SLOT(fastVolumeUp()) }, + { "FastVolumeDown", TQt::Key_VolumeDown, TQT_SLOT(fastVolumeDown()) }, + { "SlowVolumeUp", TQt::CTRL+TQt::Key_VolumeUp, TQT_SLOT(slowVolumeUp()) }, + { "SlowVolumeDown", TQt::CTRL+TQt::Key_VolumeDown, TQT_SLOT(slowVolumeDown()) }, { "Mute", KShortcut("XF86AudioMute"), TQT_SLOT(mute()) } }; @@ -105,7 +105,7 @@ bool GenericMonitor::init() for (int i = 0; i < len; i++) { si = shortcuts[i]; - ga->insert(si.name, TQString::null, TQString::null, + ga->insert(si.name, TQString(), TQString(), si.symbol, si.symbol, this, si.slot, false); @@ -218,10 +218,10 @@ void GenericMonitor::volumeChange(int direction, int step) /* Following snippet of code may seem to be overcomplicated, but it works for both devices with * volume grain < 100 (32 tested) and devices with volume grain > 100 (256 tested) while preserving * accuracy for devices with fine grain and preserving usability for devices with rough grain. */ - int userVisibleVolume = qRound(m_volume * 100.0 / (m_maxVolume - m_minVolume)); + int userVisibleVolume = tqRound(m_volume * 100.0 / (m_maxVolume - m_minVolume)); userVisibleVolume += direction * step; // add requested volume step long previousVolume = m_volume; - m_volume = qRound(m_minVolume + userVisibleVolume * (m_maxVolume - m_minVolume) / 100.0); + m_volume = tqRound(m_minVolume + userVisibleVolume * (m_maxVolume - m_minVolume) / 100.0); if (m_volume == previousVolume) // if the change was rounded to zero m_volume += direction; @@ -240,7 +240,7 @@ void GenericMonitor::fastVolumeDown() { volumeChange(-1, m_volumeStepFast); } void GenericMonitor::displayVolume() { - _interface->displayProgress(i18n("Volume"), qRound(m_volume * 100.0 / (m_maxVolume - m_minVolume))); + _interface->displayProgress(i18n("Volume"), tqRound(m_volume * 100.0 / (m_maxVolume - m_minVolume))); // If we got this far, the DCOP communication with kmix works, // so we don't have to test the result. @@ -248,7 +248,7 @@ void GenericMonitor::displayVolume() kmixClient->send("setAbsoluteVolume", m_volumeDeviceIdx, m_volume); if(m_extraDeviceIdx != -1) // for simplicity, use relative volume rather that absolute (extra precision is not needed here) - kmixClient->send("setVolume", m_extraDeviceIdx, qRound(m_volume * 100.0 / (m_maxVolume - m_minVolume))); + kmixClient->send("setVolume", m_extraDeviceIdx, tqRound(m_volume * 100.0 / (m_maxVolume - m_minVolume))); // if mute then unmute if (m_mute) @@ -356,7 +356,7 @@ void GenericMonitor::launchBrowser() void GenericMonitor::launchSearch() { - launch("search", "kfind"); + launch("search", "ktqfind"); } void GenericMonitor::launchHomeFolder() diff --git a/kmilo/generic/generic_monitor.h b/kmilo/generic/generic_monitor.h index 6d67ac8..5c35b61 100644 --- a/kmilo/generic/generic_monitor.h +++ b/kmilo/generic/generic_monitor.h @@ -36,7 +36,7 @@ namespace KMilo { -// now the key data (from kkeyserver_x11.h and $QTDIR/include/tqnamespace.h) +// now the key data (from kkeyserver_x11.h and $TQTDIR/include/tqnamespace.h) struct ShortcutInfo { const char* name; @@ -48,9 +48,10 @@ struct ShortcutInfo class GenericMonitor : public Monitor { Q_OBJECT + TQ_OBJECT public: - GenericMonitor(TQObject *parent, const char *name, const TQStringList&); + GenericMonitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~GenericMonitor(); virtual bool init(); diff --git a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui index ac376f3..e77244f 100644 --- a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui +++ b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCMKVaioGeneral</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCMKVaioGeneral</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>tlOff</cstring> </property> @@ -36,7 +36,7 @@ <string>Cannot find the <i>Sony Programmable Interrupt Controller</i>. If this is a Sony Vaio Laptop, make sure the <b>sonypi</b> driver module loads without failures.</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frameMain</cstring> </property> @@ -53,7 +53,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>bgBattery</cstring> </property> @@ -64,14 +64,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>mTLBattery</cstring> </property> <property name="text"> <string>Remaining battery capacity:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -98,7 +98,7 @@ </color> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>tlAC</cstring> </property> @@ -109,7 +109,7 @@ <property name="text"> <string>AC</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -139,7 +139,7 @@ </color> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>tlBat1</cstring> </property> @@ -150,7 +150,7 @@ <property name="text"> <string>Bat 1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -175,7 +175,7 @@ </color> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>tlBat2</cstring> </property> @@ -186,13 +186,13 @@ <property name="text"> <string>Bat 2</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>bgGeneral</cstring> </property> @@ -203,7 +203,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mCbPowerMsgs</cstring> </property> @@ -211,7 +211,7 @@ <string>Periodically inform about battery and AC adapter status</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mCbBackButtonMsg</cstring> </property> @@ -219,7 +219,7 @@ <string>Show battery and AC status on Back button press</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbReportUnknownEvents</cstring> </property> @@ -256,14 +256,14 @@ <includes> <include location="local" impldecl="in implementation">kcmkvaio_general.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>changed();</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot>slotChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kprogress.h</includehint> <includehint>kled.h</includehint> diff --git a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h index 96d4938..e017799 100644 --- a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h +++ b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmilo/kmilo_kvaio/kcmkvaio/main.cpp b/kmilo/kmilo_kvaio/kcmkvaio/main.cpp index 4cf9707..e8a05e2 100644 --- a/kmilo/kmilo_kvaio/kcmkvaio/main.cpp +++ b/kmilo/kmilo_kvaio/kcmkvaio/main.cpp @@ -46,8 +46,8 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kvaio, KVaioModuleFactory("kcmkvaio")) #define CONFIG_FILE "kmilodrc" -KVaioModule::KVaioModule(TQWidget *parent, const char *name, const TQStringList &) - : KCModule(KVaioModuleFactory::instance(), parent, name) +KVaioModule::KVaioModule(TQWidget *tqparent, const char *name, const TQStringList &) + : KCModule(KVaioModuleFactory::instance(), tqparent, name) { KAboutData *about = new KAboutData(I18N_NOOP("kcmkvaio"), @@ -61,12 +61,12 @@ KVaioModule::KVaioModule(TQWidget *parent, const char *name, const TQStringList "mirko@kde.org"); setAboutData( about ); - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); mKVaioGeneral = new KCMKVaioGeneral(this); - layout->addWidget( mKVaioGeneral ); - layout->addStretch(); + tqlayout->addWidget( mKVaioGeneral ); + tqlayout->addStretch(); - mDriver = new KVaioDriverInterface(this); + mDriver = new KVaioDriverInterface(TQT_TQOBJECT(this)); mDriverAvailable = mDriver->connectToDriver(false); mTimer = new TQTimer(this); mTimer->start(231); @@ -100,7 +100,7 @@ void KVaioModule::save() config.writeEntry("Report_Unknown_Events", mKVaioGeneral->cbReportUnknownEvents->isChecked()); - config.writeEntry("PeriodicallyReportPowerStatus", + config.writeEntry("PeriodicallyReportPowertqStatus", mKVaioGeneral->mCbPowerMsgs->isChecked() ); config.writeEntry("PowerStatusOnBackButton", mKVaioGeneral->mCbBackButtonMsg->isChecked() ); @@ -139,7 +139,7 @@ void KVaioModule::load(bool useDefaults) mKVaioGeneral->cbReportUnknownEvents->setChecked (config.readBoolEntry("Report_Unknown_Events", false)); mKVaioGeneral->mCbPowerMsgs->setChecked - (config.readBoolEntry("PeriodicallyReportPowerStatus", false) ); + (config.readBoolEntry("PeriodicallyReportPowertqStatus", false) ); mKVaioGeneral->mCbBackButtonMsg->setChecked (config.readBoolEntry("PowerStatusOnBackButton", true) ); @@ -156,7 +156,7 @@ void KVaioModule::timeout() bool bat1Avail = false, bat2Avail = false, acConnected = false; int bat1Remaining = 0, bat1Max = 0, bat2Remaining = 0, bat2Max = 0; - if(mDriver->getBatteryStatus(bat1Avail, bat1Remaining, bat1Max, + if(mDriver->getBatterytqStatus(bat1Avail, bat1Remaining, bat1Max, bat2Avail, bat2Remaining, bat2Max, acConnected) ) { diff --git a/kmilo/kmilo_kvaio/kcmkvaio/main.h b/kmilo/kmilo_kvaio/kcmkvaio/main.h index bf014c9..b7dbade 100644 --- a/kmilo/kmilo_kvaio/kcmkvaio/main.h +++ b/kmilo/kmilo_kvaio/kcmkvaio/main.h @@ -31,9 +31,10 @@ class KCMKVaioGeneral; class KVaioModule : public KCModule { Q_OBJECT + TQ_OBJECT public: - KVaioModule(TQWidget *parent, const char *name, const TQStringList &); + KVaioModule(TQWidget *tqparent, const char *name, const TQStringList &); void save(); void load(); diff --git a/kmilo/kmilo_kvaio/kmilo_kvaio.cpp b/kmilo/kmilo_kvaio/kmilo_kvaio.cpp index 1f4a886..fa22f0b 100644 --- a/kmilo/kmilo_kvaio/kmilo_kvaio.cpp +++ b/kmilo/kmilo_kvaio/kmilo_kvaio.cpp @@ -8,7 +8,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -26,9 +26,9 @@ #include "kvaio.h" #include "kmilointerface.h" -KMiloKVaio::KMiloKVaio(TQObject *parent, const char *name, +KMiloKVaio::KMiloKVaio(TQObject *tqparent, const char *name, const TQStringList& args) - : Monitor(parent, name, args), + : Monitor(tqparent, name, args), m_kvaio(0) { _poll = false; diff --git a/kmilo/kmilo_kvaio/kmilo_kvaio.h b/kmilo/kmilo_kvaio/kmilo_kvaio.h index ffcc604..b351f58 100644 --- a/kmilo/kmilo_kvaio/kmilo_kvaio.h +++ b/kmilo/kmilo_kvaio/kmilo_kvaio.h @@ -8,7 +8,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -35,9 +35,10 @@ class KVaio; class KMiloKVaio : public KMilo::Monitor { // Q_OBJECT + TQ_OBJECT public: - KMiloKVaio(TQObject *parent, + KMiloKVaio(TQObject *tqparent, const char *name, const TQStringList&); virtual ~KMiloKVaio(); diff --git a/kmilo/kmilo_kvaio/kvaio.cpp b/kmilo/kmilo_kvaio/kvaio.cpp index 167ddcb..b19c8ef 100644 --- a/kmilo/kmilo_kvaio/kvaio.cpp +++ b/kmilo/kmilo_kvaio/kvaio.cpp @@ -8,7 +8,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -55,12 +55,12 @@ extern "C" { } -KVaio::KVaio(KMiloKVaio *parent, const char* name) - : TQObject(parent, name), +KVaio::KVaio(KMiloKVaio *tqparent, const char* name) + : TQObject(tqparent, name), mDisp(0), mTimer (new TQTimer (this) ) { - myparent = parent; + mytqparent = tqparent; mDriver = new KVaioDriverInterface(this); @@ -163,7 +163,7 @@ void KVaio::slotVaioEvent(int event) case SONYPI_EVENT_BACK_PRESSED: if (mShowPowerStatusOnBackButton) { - showBatteryStatus (true); + showBatterytqStatus (true); } break; default: @@ -176,7 +176,7 @@ void KVaio::slotVaioEvent(int event) bool KVaio::showTextMsg(const TQString& msg) { - return myparent->showTextMsg(msg); + return mytqparent->showTextMsg(msg); } @@ -184,7 +184,7 @@ bool KVaio::showTextMsg(const TQString& msg) bool KVaio::showProgressMsg(const TQString& msg, int value) { m_progress = value; - return myparent->showProgressMsg(msg,value); + return mytqparent->showProgressMsg(msg,value); } void KVaio::blankScreen() @@ -244,7 +244,7 @@ bool KVaio::isKScreensaverAvailable() // kdDebug() << "KVaio::showTextMsg: kded is registered at dcop server." // << endl; objects = mClient.remoteObjects("kdesktop"); - if(objects.contains("KScreensaverIface")) + if(objects.tqcontains("KScreensaverIface")) { // kdDebug() << "KVaio::showTextMsg: kmilod is available at kded." // << endl; @@ -278,7 +278,7 @@ bool KVaio::isKMiloDAvailable() // kdDebug() << "KVaio::showTextMsg: kded is registered at dcop server." // << endl; objects = mClient.remoteObjects("kded"); - if(objects.contains("kmilod")) + if(objects.tqcontains("kmilod")) { // kdDebug() << "KVaio::showTextMsg: kmilod is available at kded." // << endl; @@ -306,16 +306,16 @@ void KVaio::loadConfiguration(KConfig *k) mReportUnknownEvents = k->readBoolEntry("Report_Unknown_Events", false); - mReportPowerStatus = - k->readBoolEntry("PeriodicallyReportPowerStatus", false); + mReportPowertqStatus = + k->readBoolEntry("PeriodicallyReportPowertqStatus", false); mShowPowerStatusOnBackButton = k->readBoolEntry("PowerStatusOnBackButton", true); kdDebug() << "KVaio::loadConfiguration: " << endl << " mReportUnknownEvents: " << mReportUnknownEvents << endl - << " mReportPowerStatus: " - << mReportPowerStatus << endl + << " mReportPowertqStatus: " + << mReportPowertqStatus << endl << "mShowPowerStatusOnBackButton: " << mShowPowerStatusOnBackButton << endl; } @@ -327,31 +327,31 @@ const KVaioDriverInterface* KVaio::driver() void KVaio::slotTimeout () { - showBatteryStatus (); + showBatterytqStatus (); mTimer->start (4000, true); } -bool KVaio::showBatteryStatus ( bool force ) +bool KVaio::showBatterytqStatus ( bool force ) { static bool acConnectedCache = false; static int previousChargeCache = -1; bool bat1Avail = false, bat2Avail = false, acConnected = false; int bat1Remaining = 0, bat1Max = 0, bat2Remaining = 0, bat2Max = 0; bool displayBatteryMsg = false; - bool displayACStatus = false; + bool displayACtqStatus = false; TQString text, acMsg; TQTextStream stream(text, IO_WriteOnly); // ----- - // only display on startup if mReportPowerStatus is true: - if (mReportPowerStatus==false || !force) + // only display on startup if mReportPowertqStatus is true: + if (mReportPowertqStatus==false || !force) { return true; } // query all necessary information: - (void) mDriver->getBatteryStatus(bat1Avail, bat1Remaining, bat1Max, + (void) mDriver->getBatterytqStatus(bat1Avail, bat1Remaining, bat1Max, bat2Avail, bat2Remaining, bat2Max, acConnected); @@ -364,7 +364,7 @@ bool KVaio::showBatteryStatus ( bool force ) if (acConnectedCache != acConnected || force) { - displayACStatus = true; + displayACtqStatus = true; acConnectedCache = acConnected; } @@ -379,10 +379,10 @@ bool KVaio::showBatteryStatus ( bool force ) } // ----- prepare text messages - if (displayACStatus || displayBatteryMsg) + if (displayACtqStatus || displayBatteryMsg) { - if (displayACStatus) + if (displayACtqStatus) { acMsg = acConnected ? i18n ("AC Connected") : i18n ("AC Disconnected"); } @@ -397,7 +397,7 @@ bool KVaio::showBatteryStatus ( bool force ) case 3: case 2: case 1: - stream << i18n("Caution: Battery is Almost Empty (%1% remaining).").arg(remaining); + stream << i18n("Caution: Battery is Almost Empty (%1% remaining).").tqarg(remaining); break; case 0: stream << i18n("Alert: Battery is Empty!"); @@ -406,11 +406,11 @@ bool KVaio::showBatteryStatus ( bool force ) stream << i18n("No Battery Inserted."); break; default: - stream << i18n("Remaining Battery Capacity: %1%").arg( remaining ); + stream << i18n("Remaining Battery Capacity: %1%").tqarg( remaining ); }; // show a message if the battery status changed by more then 10% or on startup - if (displayACStatus) + if (displayACtqStatus) { stream << endl << acMsg; } diff --git a/kmilo/kmilo_kvaio/kvaio.h b/kmilo/kmilo_kvaio/kvaio.h index fac0290..2e2d723 100644 --- a/kmilo/kmilo_kvaio/kvaio.h +++ b/kmilo/kmilo_kvaio/kvaio.h @@ -8,7 +8,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -53,12 +53,13 @@ class KMiloKVaio; * @author Mirko Boehm <mirko@hackerbuero.org> * @version 0.2 */ -class KVaio : public QObject +class KVaio : public TQObject { Q_OBJECT + TQ_OBJECT public: -// KVaio(TQObject *parent = 0, const char *name =0); - KVaio(KMiloKVaio *parent = 0, const char *name =0); +// KVaio(TQObject *tqparent = 0, const char *name =0); + KVaio(KMiloKVaio *tqparent = 0, const char *name =0); virtual ~KVaio(); const KVaioDriverInterface *driver(); @@ -73,7 +74,7 @@ protected: bool isKMiloDAvailable(); bool showTextMsg(const TQString& msg); bool showProgressMsg(const TQString& msg, int progress); - bool showBatteryStatus ( bool force = false); + bool showBatterytqStatus ( bool force = false); protected slots: void slotVaioEvent(int); void slotTimeout(); @@ -90,7 +91,7 @@ private: bool retrieveVolume(); void displayVolume(); - KMiloKVaio *myparent; + KMiloKVaio *mytqparent; DCOPRef *kmixClient, *kmixWindow; @@ -105,7 +106,7 @@ private: int m_BrightnessStep; bool mReportUnknownEvents; - bool mReportPowerStatus; + bool mReportPowertqStatus; bool mShowPowerStatusOnBackButton; TQTimer *mTimer; }; diff --git a/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp b/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp index 20a7a72..873633d 100644 --- a/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp +++ b/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp @@ -9,7 +9,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -64,8 +64,8 @@ extern "C" { #define SONYPI_IOCGBLUE _IOR('v', 8, __u8) #define SONYPI_IOCSBLUE _IOW('v', 9, __u8) -KVaioDriverInterface::KVaioDriverInterface(TQObject *parent) - : TQObject(parent), +KVaioDriverInterface::KVaioDriverInterface(TQObject *tqparent) + : TQObject(tqparent), mFd(0), mNotifier(0) { @@ -162,7 +162,7 @@ void KVaioDriverInterface::setBrightness(int value) } } -bool KVaioDriverInterface::getBatteryStatus( +bool KVaioDriverInterface::getBatterytqStatus( bool& bat1Avail, int& bat1Remaining, int& bat1Max, bool& bat2Avail, int& bat2Remaining, int& bat2Max, bool& acConnected) @@ -181,7 +181,7 @@ bool KVaioDriverInterface::getBatteryStatus( bat2Avail = batFlags & SONYPI_BFLAGS_B2; acConnected = batFlags & SONYPI_BFLAGS_AC; -// kdDebug() << "KVaioDriverInterface::getBatteryStatus: battery 1: " +// kdDebug() << "KVaioDriverInterface::getBatterytqStatus: battery 1: " // << (bat1Avail ? "available" : "not available") << endl // << " battery 2: " // << (bat2Avail ? "available" : "not available") << endl diff --git a/kmilo/kmilo_kvaio/kvaiodriverinterface.h b/kmilo/kmilo_kvaio/kvaiodriverinterface.h index 190caa1..6087b93 100644 --- a/kmilo/kmilo_kvaio/kvaiodriverinterface.h +++ b/kmilo/kmilo_kvaio/kvaiodriverinterface.h @@ -9,7 +9,7 @@ http://www.kde.org http://www.hackerbuero.org $ $ License: LGPL with the following explicit clarification: - This code may be linked against any version of the Qt toolkit + This code may be linked against any version of the TQt toolkit from Troll Tech, Norway. $ $Id$ @@ -31,18 +31,19 @@ extern "C" class TQSocketNotifier; -class KVaioDriverInterface : public QObject +class KVaioDriverInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: - KVaioDriverInterface(TQObject *parent=0); + KVaioDriverInterface(TQObject *tqparent=0); bool connectToDriver(bool listen = true); void disconnectFromDriver(); /** Return the current display brightness, a value between 0 and 255. Returns -1 if the setting cannot be retrieved. */ int brightness(); /** Get the battery status. */ - bool getBatteryStatus(bool& bat1Avail, int& bat1Remaining, int& bat1Max, + bool getBatterytqStatus(bool& bat1Avail, int& bat1Remaining, int& bat1Max, bool& bat2Avail, int& bat2Remaining, int& bat2Max, bool& acConnected); public slots: diff --git a/kmilo/kmilod/defaultskin.cpp b/kmilo/kmilod/defaultskin.cpp index 6667a88..f8275a8 100644 --- a/kmilo/kmilod/defaultskin.cpp +++ b/kmilo/kmilod/defaultskin.cpp @@ -41,8 +41,8 @@ DefaultSkin::DefaultSkin() { connect(&_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); - _widget = new DefaultWidget(0, "Screen Indicator", Qt::WX11BypassWM); - _widget->setFocusPolicy(TQWidget::NoFocus); + _widget = new DefaultWidget(0, "Screen Indicator", TQt::WX11BypassWM); + _widget->setFocusPolicy(TQ_NoFocus); KWin::setOnAllDesktops(_widget->winId(), true); KWin::setState( _widget->winId(), NET::StaysOnTop | NET::Sticky @@ -100,10 +100,10 @@ void DefaultSkin::show() { #if KDE_IS_VERSION(3,1,90) TQRect r = KGlobalSettings::splashScreenDesktopGeometry(); #else - TQRect r = TQApplication::desktop()->geometry(); + TQRect r = TQApplication::desktop()->tqgeometry(); #endif - // _label->resize(_label->minimumSizeHint()); - // _widget->resize(_label->minimumSizeHint()); + // _label->resize(_label->tqminimumSizeHint()); + // _widget->resize(_label->tqminimumSizeHint()); _widget->move(r.center() - TQPoint(_widget->width()/2, _widget->height()/2)); _widget->show(); diff --git a/kmilo/kmilod/defaultskin.h b/kmilo/kmilod/defaultskin.h index 62bea16..82a3184 100644 --- a/kmilo/kmilod/defaultskin.h +++ b/kmilo/kmilod/defaultskin.h @@ -32,6 +32,7 @@ class DefaultWidget; class DefaultSkin : public TQObject, public KMilo::DisplaySkin { Q_OBJECT + TQ_OBJECT public: DefaultSkin(); virtual ~DefaultSkin(); diff --git a/kmilo/kmilod/defaultwidget.ui b/kmilo/kmilod/defaultwidget.ui index 65c19d8..41ad25f 100644 --- a/kmilo/kmilod/defaultwidget.ui +++ b/kmilo/kmilod/defaultwidget.ui @@ -3,7 +3,7 @@ <comment>Default widget for the default display for kmilod Released under the terms of the GNU GPL.</comment> <author>George Staikos <staikos@kde.org</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DefaultWidget</cstring> </property> @@ -11,11 +11,11 @@ Released under the terms of the GNU GPL.</comment> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="0"> + <widget class="TQWidgetStack" row="0" column="0"> <property name="name"> <cstring>_widgetStack</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -26,20 +26,20 @@ Released under the terms of the GNU GPL.</comment> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>_textOnly</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -50,18 +50,18 @@ Released under the terms of the GNU GPL.</comment> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>_progressText</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QProgressBar" row="0" column="1" colspan="2"> + <widget class="TQProgressBar" row="0" column="1" colspan="2"> <property name="name"> <cstring>_progress</cstring> </property> @@ -82,5 +82,5 @@ Released under the terms of the GNU GPL.</comment> </widget> </grid> </widget> -<layoutdefaults spacing="2" margin="2"/> +<tqlayoutdefaults spacing="2" margin="2"/> </UI> diff --git a/kmilo/kmilod/kmilod.h b/kmilo/kmilod/kmilod.h index 6fdfb52..24f7fd8 100644 --- a/kmilo/kmilod/kmilod.h +++ b/kmilo/kmilod/kmilod.h @@ -36,6 +36,7 @@ class KMiloInterface; class KMiloD : public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP public: KMiloD(const TQCString &name); diff --git a/kmilo/kmilod/kmilointerface.h b/kmilo/kmilod/kmilointerface.h index 16e1567..1b22ff0 100644 --- a/kmilo/kmilod/kmilointerface.h +++ b/kmilo/kmilod/kmilointerface.h @@ -32,6 +32,7 @@ namespace KMilo { // FIXME: make put the methods into .cpp file when the header is installed. class KMiloInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: KMiloInterface(KMiloD *p) : TQObject() { _p = p; } virtual ~KMiloInterface() {} diff --git a/kmilo/kmilod/monitor.cpp b/kmilo/kmilod/monitor.cpp index 84f0e03..955fccd 100644 --- a/kmilo/kmilod/monitor.cpp +++ b/kmilo/kmilod/monitor.cpp @@ -22,8 +22,8 @@ #include "monitor.h" -KMilo::Monitor::Monitor(TQObject *parent, const char *name, const TQStringList&) -: TQObject(parent, name) { +KMilo::Monitor::Monitor(TQObject *tqparent, const char *name, const TQStringList&) +: TQObject(tqparent, name) { _poll = true; } @@ -38,7 +38,7 @@ KMilo::Monitor::DisplayType KMilo::Monitor::poll() { return None; } int KMilo::Monitor::progress() const { return 42; } -TQString KMilo::Monitor::message() const { return TQString::null; } +TQString KMilo::Monitor::message() const { return TQString(); } TQPixmap KMilo::Monitor::customPixmap() const { return TQPixmap(); } bool KMilo::Monitor::init() { return true; } diff --git a/kmilo/kmilod/monitor.h b/kmilo/kmilod/monitor.h index d50045b..7053752 100644 --- a/kmilo/kmilod/monitor.h +++ b/kmilo/kmilod/monitor.h @@ -37,7 +37,7 @@ class KMiloInterface; class KDE_EXPORT Monitor : public TQObject { public: - Monitor(TQObject *parent, const char *name, const TQStringList&); + Monitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~Monitor(); /** diff --git a/kmilo/powerbook/pb_monitor.cpp b/kmilo/powerbook/pb_monitor.cpp index 5b1fae2..516992e 100644 --- a/kmilo/powerbook/pb_monitor.cpp +++ b/kmilo/powerbook/pb_monitor.cpp @@ -33,8 +33,8 @@ extern "C" { namespace KMilo { -PowerBookMonitor::PowerBookMonitor(TQObject *parent, const char *name, const TQStringList& args) -: Monitor(parent, name, args) { +PowerBookMonitor::PowerBookMonitor(TQObject *tqparent, const char *name, const TQStringList& args) +: Monitor(tqparent, name, args) { _serverPort = -1; _clientPort = -1; _progress = 0; diff --git a/kmilo/powerbook/pb_monitor.h b/kmilo/powerbook/pb_monitor.h index 13b9885..b4e4c85 100644 --- a/kmilo/powerbook/pb_monitor.h +++ b/kmilo/powerbook/pb_monitor.h @@ -26,7 +26,7 @@ class PowerBookMonitor : public KMilo::Monitor { public: - PowerBookMonitor(TQObject *parent, const char *name, const TQStringList&); + PowerBookMonitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~PowerBookMonitor(); virtual bool init(); diff --git a/kmilo/powerbook2/pb_monitor.cpp b/kmilo/powerbook2/pb_monitor.cpp index 340d38b..20ba17b 100644 --- a/kmilo/powerbook2/pb_monitor.cpp +++ b/kmilo/powerbook2/pb_monitor.cpp @@ -49,9 +49,9 @@ const TQString tpmodes[] = { I18N_NOOP("No Tap"), I18N_NOOP("Tap"), I18N_NOOP("D namespace KMilo { -PowerBookMonitor::PowerBookMonitor(TQObject *parent, const char *name, +PowerBookMonitor::PowerBookMonitor(TQObject *tqparent, const char *name, const TQStringList& args) - : Monitor(parent, name, args), + : Monitor(tqparent, name, args), m_progress( 0 ) { init_libpbb(); @@ -79,7 +79,7 @@ Monitor::DisplayType PowerBookMonitor::poll() Monitor::DisplayType rc = None; // Drain the queue, send the last message struct tagitem* tag = readMessage(); - m_message = TQString::null; + m_message = TQString(); while ( tag && tag->tag != TAG_END ) { switch ( tag->tag ) { case TAG_VOLUME: @@ -98,7 +98,7 @@ Monitor::DisplayType PowerBookMonitor::poll() { rc = Monitor::Tap; TQString marg = tpmodes[ tag->data & 3 ]; - m_message = i18n( "Operating mode set to: %1." ).arg( marg ); + m_message = i18n( "Operating mode set to: %1." ).tqarg( marg ); } break; default: diff --git a/kmilo/powerbook2/pb_monitor.h b/kmilo/powerbook2/pb_monitor.h index e9dfb71..2adb4d8 100644 --- a/kmilo/powerbook2/pb_monitor.h +++ b/kmilo/powerbook2/pb_monitor.h @@ -34,7 +34,7 @@ namespace KMilo { class PowerBookMonitor : public KMilo::Monitor { public: - PowerBookMonitor(TQObject *parent, const char *name, const TQStringList&); + PowerBookMonitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~PowerBookMonitor(); virtual bool init(); diff --git a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui index 771b7bf..3a25893 100644 --- a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui +++ b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCMThinkpadGeneral</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCMThinkpadGeneral</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>tlOff</cstring> </property> @@ -33,7 +33,7 @@ <string>Could not read /dev/nvram. If you have an IBM Thinkpad load the nvram Linux module <em>insmod nvram</em> and create the node <em>mknod /dev/nvram c 10 144</em> then make the device readable <em>chmod 664 /dev/nvram</em> or writable <em>chmod 666 /dev/nvram</em>.<p> nvram must be writable for software volume control required for R30/R31 models and for using a custom volume change step.</string> </property> </widget> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>bgGeneral</cstring> </property> @@ -44,7 +44,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>mCbRun</cstring> </property> @@ -52,7 +52,7 @@ <string>Run Thinkpad Buttons KMilo plugin</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>mCbSoftwareVolume</cstring> </property> @@ -60,15 +60,15 @@ <string>Change volume in software (required by R30/R31)</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout27</cstring> + <cstring>tqlayout27</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel2_5</cstring> </property> @@ -76,7 +76,7 @@ <string>Command for Mail button:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel2_6</cstring> </property> @@ -97,7 +97,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -118,7 +118,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>volumeStepLabel</cstring> </property> @@ -153,7 +153,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -161,7 +161,7 @@ <string>Command for Home button:</string> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>mSpinboxVolumeStep</cstring> </property> @@ -193,7 +193,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -284,14 +284,14 @@ <includes> <include location="local" impldecl="in implementation">kcmthinkpad_general.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>changed();</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot>slotChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h index 6ccc675..de8615e 100644 --- a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h +++ b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h @@ -22,7 +22,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmilo/thinkpad/kcmthinkpad/main.cpp b/kmilo/thinkpad/kcmthinkpad/main.cpp index b98dc28..ffb9e8b 100644 --- a/kmilo/thinkpad/kcmthinkpad/main.cpp +++ b/kmilo/thinkpad/kcmthinkpad/main.cpp @@ -54,8 +54,8 @@ K_EXPORT_COMPONENT_FACTORY( kcm_thinkpad, KCMThinkpadModuleFactory("kcmthinkpad" #define CONFIG_FILE "kmilodrc" -KCMThinkpadModule::KCMThinkpadModule(TQWidget* parent, const char* name, const TQStringList&) - : KCModule(KCMThinkpadModuleFactory::instance(), parent, name) { +KCMThinkpadModule::KCMThinkpadModule(TQWidget* tqparent, const char* name, const TQStringList&) + : KCModule(KCMThinkpadModuleFactory::instance(), tqparent, name) { KAboutData* about = new KAboutData(I18N_NOOP("kcmthinkpad"), I18N_NOOP("KDE Control Module for IBM Thinkpad " @@ -68,10 +68,10 @@ KCMThinkpadModule::KCMThinkpadModule(TQWidget* parent, const char* name, const T "jr@jriddell.org"); setAboutData( about ); - TQVBoxLayout* layout = new TQVBoxLayout(this); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this); m_KCMThinkpadGeneral = new KCMThinkpadGeneral(this); - layout->addWidget( m_KCMThinkpadGeneral ); - layout->addStretch(); + tqlayout->addWidget( m_KCMThinkpadGeneral ); + tqlayout->addStretch(); load(); @@ -116,7 +116,7 @@ KCMThinkpadModule::KCMThinkpadModule(TQWidget* parent, const char* name, const T "R30/R31 models and to use a custom volume " "change step, set the nvram device to world " "writeable: <em>chmod 666 " - "/dev/nvram</em>").arg(m_nvramFile)); + "/dev/nvram</em>").tqarg(m_nvramFile)); #endif } else { m_KCMThinkpadGeneral->tlOff->setText(i18n("Thinkpad Buttons KMilo Plugin Ready For Configuration")); @@ -175,7 +175,7 @@ void KCMThinkpadModule::load(bool useDefaults) { m_KCMThinkpadGeneral->mSpinboxVolumeStep->setValue(config.readNumEntry("volumeStep", 14)); m_KCMThinkpadGeneral->commandExec->setURL(config.readEntry("buttonThinkpad", KDE_BINDIR "/konsole")); m_KCMThinkpadGeneral->commandExecHome->setURL(config.readEntry("buttonHome", KDE_BINDIR "/konqueror")); - m_KCMThinkpadGeneral->commandExecSearch->setURL(config.readEntry("buttonSearch", KDE_BINDIR "/kfind")); + m_KCMThinkpadGeneral->commandExecSearch->setURL(config.readEntry("buttonSearch", KDE_BINDIR "/ktqfind")); m_KCMThinkpadGeneral->commandExecMail->setURL(config.readEntry("buttonMail", KDE_BINDIR "/kmail")); m_KCMThinkpadGeneral->commandExecZoom->setURL(config.readEntry("buttonZoom", KDE_BINDIR "/ksnapshot")); m_nvramFile = config.readEntry("nvram", "/dev/nvram"); diff --git a/kmilo/thinkpad/kcmthinkpad/main.h b/kmilo/thinkpad/kcmthinkpad/main.h index 1fdedb5..5719185 100644 --- a/kmilo/thinkpad/kcmthinkpad/main.h +++ b/kmilo/thinkpad/kcmthinkpad/main.h @@ -31,9 +31,10 @@ class KCMThinkPadGeneral; class KCMThinkpadModule : public KCModule { Q_OBJECT + TQ_OBJECT public: - KCMThinkpadModule(TQWidget* parent, const char* name, const TQStringList&); + KCMThinkpadModule(TQWidget* tqparent, const char* name, const TQStringList&); void save(); void load(); diff --git a/kmilo/thinkpad/thinkpad.cpp b/kmilo/thinkpad/thinkpad.cpp index 034c6bd..593612d 100644 --- a/kmilo/thinkpad/thinkpad.cpp +++ b/kmilo/thinkpad/thinkpad.cpp @@ -43,7 +43,7 @@ namespace KMilo { -ThinkPadMonitor::ThinkPadMonitor(TQObject* parent, const char* name, const TQStringList& args): Monitor(parent, name, args) { +ThinkPadMonitor::ThinkPadMonitor(TQObject* tqparent, const char* name, const TQStringList& args): Monitor(tqparent, name, args) { m_progress = 0; m_volume = 50; //set in retrieveVolume() } @@ -445,7 +445,7 @@ void ThinkPadMonitor::reconfigure(KConfig* config) { m_volumeStep = config->readNumEntry("volumeStep", defaultVolumeStep); m_buttonThinkpad = config->readEntry("buttonThinkpad", "/usr/bin/konsole"); m_buttonHome = config->readEntry("buttonHome", "/usr/bin/konqueror"); - m_buttonSearch = config->readEntry("buttonSearch", "/usr/bin/kfind"); + m_buttonSearch = config->readEntry("buttonSearch", "/usr/bin/ktqfind"); m_buttonMail = config->readEntry("buttonMail", "/usr/bin/kmail"); m_buttonZoom = config->readEntry("buttonZoom", "/usr/bin/ksnapshot"); } diff --git a/kmilo/thinkpad/thinkpad.h b/kmilo/thinkpad/thinkpad.h index dc843ca..e4cd952 100644 --- a/kmilo/thinkpad/thinkpad.h +++ b/kmilo/thinkpad/thinkpad.h @@ -83,7 +83,7 @@ typedef struct { */ class ThinkPadMonitor : public Monitor { public: - ThinkPadMonitor(TQObject *parent, const char *name, const TQStringList&); + ThinkPadMonitor(TQObject *tqparent, const char *name, const TQStringList&); virtual ~ThinkPadMonitor(); /** diff --git a/kregexpeditor/Comments b/kregexpeditor/Comments index 71f4470..bdd63dc 100644 --- a/kregexpeditor/Comments +++ b/kregexpeditor/Comments @@ -1,4 +1,4 @@ (1) If I do not resize the widget to be reparented then it will take up all - the size of its new parent, and the parent will never receive a - repaint event, and will thus never get a chance to resize its new child - to a proper size (This is namely done in repaintEvent() ). + the size of its new tqparent, and the tqparent will never receive a + tqrepaint event, and will thus never get a chance to resize its new child + to a proper size (This is namely done in tqrepaintEvent() ). diff --git a/kregexpeditor/KMultiFormListBox/ccp.cpp b/kregexpeditor/KMultiFormListBox/ccp.cpp index d868591..ff2d6c3 100644 --- a/kregexpeditor/KMultiFormListBox/ccp.cpp +++ b/kregexpeditor/KMultiFormListBox/ccp.cpp @@ -23,7 +23,7 @@ #include "ccp.h" #include <tqobjectlist.h> #include <tqpopupmenu.h> -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -32,15 +32,15 @@ CCP::CCP(KMultiFormListBoxMultiVisible *ee_, KMultiFormListBoxEntry *eee_) : TQObject() { ee = ee_; eee = eee_; - install(eee); + install(TQT_TQOBJECT(eee)); } void CCP::install(TQObject *elm) { elm->installEventFilter(this); - const TQObjectList *children = elm->children(); - if (children) { - TQObjectListIt it = TQObjectListIt(*children); + const TQObjectList tqchildren = elm->childrenListObject(); + if (!tqchildren.isEmpty()) { + TQObjectListIt it = TQObjectListIt(tqchildren); while (TQObject *child=it.current()) { if (child->inherits("KMultiFormListBoxMultiVisible")) { @@ -58,7 +58,7 @@ void CCP::install(TQObject *elm) bool CCP::eventFilter(TQObject *, TQEvent *event) { if (event->type() != TQEvent::MouseButtonPress || - ((TQMouseEvent *) event)->button() != RightButton || + ((TQMouseEvent *) event)->button() != Qt::RightButton || ((TQMouseEvent *) event)->state() != TQEvent::ControlButton) { return false; } diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.cpp b/kregexpeditor/KMultiFormListBox/indexWindow.cpp index dccb184..f81ea07 100644 --- a/kregexpeditor/KMultiFormListBox/indexWindow.cpp +++ b/kregexpeditor/KMultiFormListBox/indexWindow.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include "indexWindow.moc" @@ -46,7 +46,7 @@ void indexWindow::lbSelected(int index) void indexWindow::finish(int index) { itemSelected = index; - qApp->exit_loop(); + tqApp->exit_loop(); } @@ -71,7 +71,7 @@ int indexWindow::exec(const TQPoint & /*start*/, int /*width*/) // 23 Feb. 2003 11:28 -- Jesper K. Pedersen /* // calculate the height of all the elements together. - // I need to do it this way, as sizeHint doesn't report the correct size + // I need to do it this way, as tqsizeHint doesn't report the correct size // and itemHeight doesn't neither. int elm_h = lb->item(0)->height(lb) * lb->count(); elm_h += 2*lb->frameWidth(); @@ -79,17 +79,17 @@ int indexWindow::exec(const TQPoint & /*start*/, int /*width*/) TQWidget *desktop = TQApplication::desktop(); int desktop_h = desktop->height(); int rest_h = desktop_h - start.y(); - int below_h = QMAX(rest_h, 200); + int below_h = TQMAX(rest_h, 200); int start_y = start.y(); if (rest_h < 200 && elm_h > 200) { - start_y = desktop_h-QMIN(elm_h,200); + start_y = desktop_h-TQMIN(elm_h,200); } - setGeometry(start.x(), start_y, width, QMIN(elm_h, below_h)); + setGeometry(start.x(), start_y, width, TQMIN(elm_h, below_h)); show(); - qApp->enter_loop(); + tqApp->enter_loop(); return itemSelected; */ return 0; diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.h b/kregexpeditor/KMultiFormListBox/indexWindow.h index ab20e73..833c789 100644 --- a/kregexpeditor/KMultiFormListBox/indexWindow.h +++ b/kregexpeditor/KMultiFormListBox/indexWindow.h @@ -38,9 +38,10 @@ @internal **/ -class indexWindow : public QWidget{ +class indexWindow : public TQWidget{ Q_OBJECT + TQ_OBJECT public: indexWindow(); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp index 4a740c5..0dfa991 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqmessagebox.h> #else @@ -38,8 +38,8 @@ const uchar indexButtonBits[] = { }; -KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, TQWidget *parent, const char *name) - : TQScrollView(parent, name) +KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, TQWidget *tqparent, const char *name) + : TQScrollView(tqparent, name) { factory = fact; @@ -94,9 +94,9 @@ void KMultiFormListBoxMultiVisible::updateClipperContent() // calculate the required size. for (TQWidget *child = elms->first(); child; child=elms->next()) { - maxWidth = QMAX(maxWidth, child->sizeHint().width()); + maxWidth = TQMAX(maxWidth, child->tqsizeHint().width()); if (strcmp(child->name(), "seperator") != 0) { - totalHeight += child->sizeHint().height(); + totalHeight += child->tqsizeHint().height(); count++; } else { @@ -116,7 +116,7 @@ void KMultiFormListBoxMultiVisible::updateClipperContent() for (TQWidget *child2 = elms->first(); child2; child2=elms->next()) { int h; if ( strcmp(child2->name(),"seperator") != 0) { - h = child2->sizeHint().height(); + h = child2->tqsizeHint().height(); h += extra; } else { @@ -154,7 +154,7 @@ void KMultiFormListBoxMultiVisible::append(KMultiFormListBoxEntry *elm) void KMultiFormListBoxMultiVisible::delElement(TQWidget *elm) { - int index = elms->find(elm); + int index = elms->tqfind(elm); TQWidget *next = elms->at(index+1); if (strcmp(next->name(),"seperator") != 0) { elms->removeRef(next); @@ -186,7 +186,7 @@ void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry * // Find the location to insert the new element. int index = elms->count(); if (after) { - index = elms->findRef(after); + index = elms->tqfindRef(after); } // Now show the new element. @@ -266,14 +266,14 @@ void KMultiFormListBoxMultiVisible::cut(KMultiFormListBoxEntry *elm) } TQDataStream stream(clipboard, IO_WriteOnly); - factory->toStream( elm, stream ); + factory->toStream( TQT_TQOBJECT(elm), stream ); delElement(elm); } void KMultiFormListBoxMultiVisible::copy(KMultiFormListBoxEntry *elm) { TQDataStream stream(clipboard, IO_WriteOnly); - factory->toStream(elm, stream); + factory->toStream(TQT_TQOBJECT(elm), stream); } void KMultiFormListBoxMultiVisible::paste(KMultiFormListBoxEntry *oldElm) @@ -285,7 +285,7 @@ void KMultiFormListBoxMultiVisible::paste(KMultiFormListBoxEntry *oldElm) KMultiFormListBoxEntry *newElm = factory->create(viewport()); TQDataStream stream( clipboard, IO_ReadOnly ); - factory->fromStream(stream, newElm); + factory->fromStream(stream, TQT_TQOBJECT(newElm)); insertElmIntoWidget(newElm,oldElm); } diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h index 309044a..f0e5d79 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h @@ -35,6 +35,7 @@ class KMultiFormListBoxMultiVisible :public TQScrollView, KMultiFormListBoxShower { Q_OBJECT + TQ_OBJECT friend class KMultiFormListBox; @@ -42,9 +43,9 @@ private: /** @param factory A factory used to generate the instances of KMultiFormListBoxEntry class which is repeated in the KMultiFormListBox - @param parent A pointer to the parent widget + @param tqparent A pointer to the tqparent widget */ - KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, TQWidget *parent = 0, const char *name = 0); + KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, TQWidget *tqparent = 0, const char *name = 0); /** @return The elements in the KMultiFormListBox diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp index c0e6090..6f9246c 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kmessagebox.h> @@ -27,10 +27,10 @@ #include "widgetwindow.h" #include "windowlistboxitem.h" -KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, +KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *tqparent, bool showUpDownButtons, bool showHelpButton, TQString addButtonText,const char *name) - : TQWidget( parent, name ) + : TQWidget( tqparent, name ) { _layout = new TQVBoxLayout(this); @@ -150,7 +150,7 @@ void KMultiFormListBoxWindowed::slotDeleteEntry() WindowListboxItem *item = selected(); if (item) { int answer = - KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); + KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").tqarg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); if (answer == KMessageBox::Continue) { delete item; slotUpdateButtonState(); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h index 873c406..ca3f8bf 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h @@ -18,7 +18,7 @@ #ifndef __kmultiformlistboxwindowed #define __kmultiformlistboxwindowed -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqlistbox.h> #else @@ -38,11 +38,12 @@ class WindowListboxItem; class KMultiFormListBoxWindowed :public TQWidget, KMultiFormListBoxShower { Q_OBJECT + TQ_OBJECT friend class KMultiFormListBox; private: - KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, + KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *tqparent, bool showUpDownButtons, bool showHelpButton, TQString addButtonText, const char *name); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp index 0aa384e..8ddb5c7 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp @@ -15,16 +15,16 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "kmultiformlistbox.moc" #endif #include "kmultiformlistbox-multivisible.h" #include "kmultiformlistbox-windowed.h" -KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, TQWidget *parent, +KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, TQWidget *tqparent, bool showUpDownButtons, bool showHelpButton, TQString addButtonText, - const char *name ) : TQWidget( parent, name ) + const char *name ) : TQWidget( tqparent, name ) { switch ( tp ) { @@ -40,9 +40,9 @@ KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiF TQWidget *widget = theWidget->qWidget(); - TQHBoxLayout *layout = new TQHBoxLayout( this ); + TQHBoxLayout *tqlayout = new TQHBoxLayout( this ); _factory = factory; - layout->addWidget( widget ); + tqlayout->addWidget( widget ); } void KMultiFormListBox::append( KMultiFormListBoxEntry *element ) @@ -77,7 +77,7 @@ void KMultiFormListBox::toStream( TQDataStream& stream ) const const KMultiFormListBoxEntryList elms = elements(); stream << elms.count(); for ( TQPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it) - _factory->toStream( *it, stream ); + _factory->toStream( TQT_TQOBJECT(*it), stream ); } void KMultiFormListBox::fromStream( TQDataStream& stream ) @@ -97,7 +97,7 @@ void KMultiFormListBox::fromStream( TQDataStream& stream ) KMultiFormListBoxEntryList elms = elements(); for (TQPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it) - _factory->fromStream( stream, *it ); + _factory->fromStream( stream, TQT_TQOBJECT(*it) ); } diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h index fd11648..0a23863 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h @@ -25,7 +25,7 @@ #include <tqlayout.h> #include <tqscrollview.h> -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -63,6 +63,7 @@ class KMultiFormListBoxMultiVisible; class KMultiFormListBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -71,11 +72,11 @@ public: /** @param factory A factory used to generate the instances of KMultiFormListBoxEntry class which is repeated in the KMultiFormListBox - @param parent A pointer to the parent widget + @param tqparent A pointer to the tqparent widget **/ KMultiFormListBox(KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp=Windowed, - TQWidget *parent = 0, bool showUpDownButtons = true, + TQWidget *tqparent = 0, bool showUpDownButtons = true, bool showHelpButton = true, TQString addButtonText = i18n("Add"), const char *name = 0); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp index e885c29..5631078 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "kmultiformlistboxentry.moc" #endif diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h index 313f026..c51ac16 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h @@ -31,8 +31,8 @@ button. If you want to use this in you KMultiFormListBox, then you must do the following: @li Create a @ref TQPushButton as a sub-widget to your KMultiFormListBoxEntry. - @li Override the @ref indexButton method to return your QPushButton - @li Override the @ref idxString to return a @ref QString + @li Override the @ref indexButton method to return your TQPushButton + @li Override the @ref idxString to return a @ref TQString with a textual representation of the content in this KMultiFormListBoxEntry. This string will be used in the drop-down box which the user gets when he presses the Idx button. @@ -45,12 +45,13 @@ indexWindowPos method to return a start point for the drop down window and a width. **/ -class KMultiFormListBoxEntry : public QWidget +class KMultiFormListBoxEntry : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMultiFormListBoxEntry(TQWidget *parent, const char *name) : TQWidget(parent,name) {} + KMultiFormListBoxEntry(TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) {} virtual TQPushButton *indexButton() { return 0; } virtual TQWidget *valueWidget() { return 0; } @@ -59,7 +60,7 @@ public: // This function must return a string representing the KMultiFormListBox. This is // used when showing the fast-search menu available from the `Idx' button. - virtual TQString idxString() { return TQString::fromLatin1(""); } + virtual TQString idxString() { return TQString::tqfromLatin1(""); } public slots: void acceptIndexButton(); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp index 08a800a..8432ccf 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp @@ -18,8 +18,8 @@ #include "kmultiformlistboxfactory.h" #include <tqframe.h> -TQWidget *KMultiFormListBoxFactory::separator(TQWidget *parent) { - TQFrame* sep = new TQFrame( parent ); +TQWidget *KMultiFormListBoxFactory::separator(TQWidget *tqparent) { + TQFrame* sep = new TQFrame( tqparent ); sep->setFrameStyle( TQFrame::HLine | TQFrame::Sunken); sep->setLineWidth(1); return sep; diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h index dc0bcce..61a78aa 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h @@ -47,23 +47,23 @@ public: a subclass of this class. This instance will be owned by the caller of this function. - @param parent A pointer to the parent of this KMultiFormListBoxEntry widget + @param tqparent A pointer to the tqparent of this KMultiFormListBoxEntry widget returned. @return A fresh @ref KMultiFormListBoxEntry to be used in an instance of the @ref KMultiFormListBox class. **/ - virtual KMultiFormListBoxEntry *create(TQWidget *parent) = 0; + virtual KMultiFormListBoxEntry *create(TQWidget *tqparent) = 0; /** This method is used to get a separator between the elements in an @ref KMultiFormListBox. The widget returned from this method will be owned by the caller. - @param parent A pointer to the parent of the TQWidget returned. + @param tqparent A pointer to the tqparent of the TQWidget returned. @return A widget which must be used as a separator between the @ref KMultiFormListBoxEntry elements in an @ref KMultiFormListBox. **/ - virtual TQWidget *separator(TQWidget *parent); + virtual TQWidget *separator(TQWidget *tqparent); }; #endif /* kmultiformlistbox */ diff --git a/kregexpeditor/KMultiFormListBox/widgetwindow.cpp b/kregexpeditor/KMultiFormListBox/widgetwindow.cpp index e94210d..73bfcd6 100644 --- a/kregexpeditor/KMultiFormListBox/widgetwindow.cpp +++ b/kregexpeditor/KMultiFormListBox/widgetwindow.cpp @@ -47,7 +47,7 @@ void WidgetWindow::init(KMultiFormListBoxFactory *factory, KListBox *lb, KMultiF myWidget = factory->create(frame); } TQDataStream stream( _backup, IO_WriteOnly ); - myFact->toStream( myWidget, stream ); + myFact->toStream( TQT_TQOBJECT(myWidget), stream ); lay->addWidget(myWidget); @@ -86,7 +86,7 @@ void WidgetWindow::slotCancel() } else { TQDataStream stream( _backup, IO_ReadOnly ); - myFact->fromStream( stream, myWidget ); + myFact->fromStream( stream, TQT_TQOBJECT(myWidget) ); } KDialogBase::slotCancel(); } @@ -96,9 +96,9 @@ WidgetWindow *WidgetWindow::clone() WidgetWindow *item = new WidgetWindow(myFact, listbox); TQByteArray data; TQDataStream ws( data, IO_WriteOnly ); - myFact->toStream( myWidget, ws ); + myFact->toStream( TQT_TQOBJECT(myWidget), ws ); TQDataStream rs( data, IO_ReadOnly ); - myFact->fromStream( rs, item->myWidget ); + myFact->fromStream( rs, TQT_TQOBJECT(item->myWidget) ); item->slotOk(); return item; @@ -107,7 +107,7 @@ WidgetWindow *WidgetWindow::clone() void WidgetWindow::display() { TQDataStream stream( _backup, IO_WriteOnly); - myFact->toStream( myWidget, stream ); + myFact->toStream( TQT_TQOBJECT(myWidget), stream ); show(); } diff --git a/kregexpeditor/KMultiFormListBox/widgetwindow.h b/kregexpeditor/KMultiFormListBox/widgetwindow.h index 647b2ef..eea6500 100644 --- a/kregexpeditor/KMultiFormListBox/widgetwindow.h +++ b/kregexpeditor/KMultiFormListBox/widgetwindow.h @@ -18,7 +18,7 @@ #ifndef __configwindow #define __configwindow -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqlistbox.h> #else diff --git a/kregexpeditor/KMultiFormListBox/windowlistboxitem.h b/kregexpeditor/KMultiFormListBox/windowlistboxitem.h index 5e9d0f6..6cad532 100644 --- a/kregexpeditor/KMultiFormListBox/windowlistboxitem.h +++ b/kregexpeditor/KMultiFormListBox/windowlistboxitem.h @@ -26,7 +26,7 @@ class KMultiFormListBoxEntry; /** @internal */ -class WindowListboxItem :public QListBoxText +class WindowListboxItem :public TQListBoxText { friend class WidgetWindow; friend class KMultiFormListBoxWindowed; diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp index 113e3d1..31d7b5c 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp @@ -24,7 +24,7 @@ void KWidgetStreamer::toStream(const TQObject* from, TQDataStream& stream ) { if ( from->inherits("KMultiFormListBox") ) { - // Hmm, we'll trust Qt that this dynamic_cast won't fail! + // Hmm, we'll trust TQt that this dynamic_cast won't fail! dynamic_cast<const KMultiFormListBox*>(from)->toStream( stream ); } @@ -34,7 +34,7 @@ void KWidgetStreamer::toStream(const TQObject* from, TQDataStream& stream ) void KWidgetStreamer::fromStream( TQDataStream& stream, TQObject* to ) { if ( to->inherits("KMultiFormListBox") ) { - // Hmm, we'll trust Qt that this dynamic_cast won't fail! + // Hmm, we'll trust TQt that this dynamic_cast won't fail! dynamic_cast<KMultiFormListBox*>(to)->fromStream( stream ); } @@ -44,15 +44,15 @@ void KWidgetStreamer::fromStream( TQDataStream& stream, TQObject* to ) void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stream ) { - // Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc. + // Only handle widgets. Alternatives to widgets are tqlayouts, validators, timers, etc. if ( ! from->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Serializing all the children (if any). - const TQObjectList* children = from->children(); - if ( children ) { - stream << children->count(); - for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it ) { + // Serializing all the tqchildren (if any). + const TQObjectList tqchildren = from->childrenListObject(); + if ( !tqchildren.isEmpty() ) { + stream << tqchildren.count(); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) { toStream( *it, stream ); } } @@ -79,18 +79,18 @@ void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stre void KWidgetStreamer::propertyFromStream( TQDataStream& stream, TQObject* to ) { - // Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc. + // Only handle widgets. Alternatives to widgets are tqlayouts, validators, timers, etc. if ( ! to->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Stream in all the children (if any) - const TQObjectList* children = to->children(); + // Stream in all the tqchildren (if any) + const TQObjectList tqchildren = to->childrenListObject(); unsigned int count; stream >> count; - if ( children ) { - Q_ASSERT( count == children->count() ); - for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it ) + if ( !tqchildren.isEmpty() ) { + Q_ASSERT( count == tqchildren.count() ); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) fromStream( stream, *it ); } else { @@ -115,63 +115,63 @@ KWidgetStreamer::KWidgetStreamer () { TQStringList l; - // QCheckBox + // TQCheckBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked") << TQString::fromLatin1("tristate"); - _map.insert(TQString::fromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked") << TQString::tqfromLatin1("tristate"); + _map.insert(TQString::tqfromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); - // QComboBox + // TQComboBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("editable") << TQString::fromLatin1("currentItem") - << TQString::fromLatin1("maxCount") << TQString::fromLatin1("insertionPolicy") - << TQString::fromLatin1("autoCompletion"); - _map.insert(TQString::fromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("editable") << TQString::tqfromLatin1("currentItem") + << TQString::tqfromLatin1("maxCount") << TQString::tqfromLatin1("insertionPolicy") + << TQString::tqfromLatin1("autoCompletion"); + _map.insert(TQString::tqfromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); - // QDial + // TQDial l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("tracking") << TQString::fromLatin1("wrapping") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQDIAL_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("tracking") << TQString::tqfromLatin1("wrapping") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQDIAL_OBJECT_NAME_STRING), l); - // QLCDNumber + // TQLCDNumber l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("numDigits") << TQString::fromLatin1("mode") - << TQString::fromLatin1("segmentStyle") << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("numDigits") << TQString::tqfromLatin1("mode") + << TQString::tqfromLatin1("segmentStyle") << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); - // QLineEdit + // TQLineEdit l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("text") << TQString::fromLatin1("maxLength") - << TQString::fromLatin1("echoMode") << TQString::fromLatin1("alignment"); - _map.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("text") << TQString::tqfromLatin1("maxLength") + << TQString::tqfromLatin1("echoMode") << TQString::tqfromLatin1("tqalignment"); + _map.insert(TQString::tqfromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); - // QMultiLineEdit + // TQMultiLineEdit l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("text") - << TQString::fromLatin1("alignment"); - _map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("text") + << TQString::tqfromLatin1("tqalignment"); + _map.insert(TQString::tqfromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); - // QRadioButton + // TQRadioButton l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked"); - _map.insert(TQString::fromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked"); + _map.insert(TQString::tqfromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); - // QSlider + // TQSlider l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); - // QSpinBox + // TQSpinBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); } diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h index 6ac3349..d04382f 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h @@ -37,7 +37,7 @@ <pre> KWidgetStreamer streamer; KWidgetStreamer::PropertyMap& map = streamer.propertyMap(); - KWidgetStreamer::PropertyList& list = *map.find("TQLCDNumber"); + KWidgetStreamer::PropertyList& list = *map.tqfind(TQLCDNUMBER_OBJECT_NAME_STRING); list.remove("numDigits"); </pre> **/ diff --git a/kregexpeditor/altnregexp.cpp b/kregexpeditor/altnregexp.cpp index ef8b8de..b9b01ec 100644 --- a/kregexpeditor/altnregexp.cpp +++ b/kregexpeditor/altnregexp.cpp @@ -29,7 +29,7 @@ void AltnRegExp::addRegExp( RegExp *elm ) addChild( elm ); } -RegExpList AltnRegExp::children() const +RegExpList AltnRegExp::tqchildren() const { return list; } diff --git a/kregexpeditor/altnregexp.h b/kregexpeditor/altnregexp.h index c126c5f..37614f1 100644 --- a/kregexpeditor/altnregexp.h +++ b/kregexpeditor/altnregexp.h @@ -30,7 +30,7 @@ public: AltnRegExp( bool selected ); void addRegExp( RegExp * ); - RegExpList children() const; + RegExpList tqchildren() const; virtual bool check( ErrorMap&, bool first, bool last ); virtual int precedence() const { return 1;} diff --git a/kregexpeditor/altnwidget.cpp b/kregexpeditor/altnwidget.cpp index d1855d4..ae13e43 100644 --- a/kregexpeditor/altnwidget.cpp +++ b/kregexpeditor/altnwidget.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -28,31 +28,31 @@ #include "altnregexp.h" #include <tqpainter.h> -AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - :MultiContainerWidget(editorWindow, parent, name == 0 ? "AltnWidget" : name) + :MultiContainerWidget(editorWindow, tqparent, name == 0 ? "AltnWidget" : name) { DragAccepter *accepter = new DragAccepter(editorWindow, this); accepter->resize(0,0); // See note (1) in Comments - _children.append(accepter); + _tqchildren.append(accepter); _text = i18n("Alternatives"); } AltnWidget::AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name) - :MultiContainerWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name) + :MultiContainerWidget( editorWindow, tqparent, name ) { DragAccepter *accepter = new DragAccepter(editorWindow, this); accepter->resize(0,0); // See note (1) in Comments - _children.append(accepter); + _tqchildren.append(accepter); _text = i18n("Alternatives"); - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); ConcWidget* conc; if ( ! (conc = dynamic_cast<ConcWidget*>( child ) ) ) { - conc = new ConcWidget( editorWindow, child, parent ); + conc = new ConcWidget( editorWindow, child, tqparent ); } append( conc ); } @@ -65,12 +65,12 @@ void AltnWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child) ConcWidget *conc = new ConcWidget(_editorWindow, child,this); MultiContainerWidget::addNewChild( accepter, conc ); updateDrawLineInfo(); - repaint(); + tqrepaint(); } void AltnWidget::setConcChild(ConcWidget *child) { - addNewConcChild( dynamic_cast<DragAccepter*>(_children.at(0)), child ); + addNewConcChild( dynamic_cast<DragAccepter*>(_tqchildren.at(0)), child ); } void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child) @@ -81,21 +81,21 @@ void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child) } -TQSize AltnWidget::sizeHint() const +TQSize AltnWidget::tqsizeHint() const { - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); // Skip the first child, as we only need half of the size of the first and the // last drag accepter. Does, however, not apply when there only is onw child. - if ( _children.count() != 1 ) + if ( _tqchildren.count() != 1 ) ++it; - _childrenWidth = 0; - _childrenHeight = 0; + _tqchildrenWidth = 0; + _tqchildrenHeight = 0; for ( ; *it ; ++it) { - TQSize thisChildSize = (*it)->sizeHint(); - _childrenWidth = QMAX(_childrenWidth, thisChildSize.width()); - _childrenHeight += thisChildSize.height(); + TQSize thisChildSize = (*it)->tqsizeHint(); + _tqchildrenWidth = TQMAX(_tqchildrenWidth, thisChildSize.width()); + _tqchildrenHeight += thisChildSize.height(); } // Now add the size of the header @@ -104,21 +104,21 @@ TQSize AltnWidget::sizeHint() const int headerWidth = _textSize.width() + 2 * bdSize + 2; - _childrenWidth = QMAX(_childrenWidth, headerWidth); + _tqchildrenWidth = TQMAX(_tqchildrenWidth, headerWidth); - return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw ); + return TQSize(_tqchildrenWidth + 2*pw, _tqchildrenHeight + _textSize.height() + 1*pw ); } void AltnWidget::paintEvent( TQPaintEvent *e) { - Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) ); + Q_ASSERT( dynamic_cast<DragAccepter*>(_tqchildren.at(0)) ); // if this fails, then I should check the location of the show() - Q_ASSERT( _children.count() == 1 || - ( _children.count() >=3 && - dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) ); + Q_ASSERT( _tqchildren.count() == 1 || + ( _tqchildren.count() >=3 && + dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)) ) ); int offset = 0; - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -136,27 +136,27 @@ void AltnWidget::paintEvent( TQPaintEvent *e) painter.drawLine(mySize.width()-pw, startY, mySize.width()-pw, mySize.height()); painter.drawLine(0,mySize.height()-pw, mySize.width()-pw, mySize.height()-pw); - //---- Run through all the children and place them at the correct location. + //---- Run through all the tqchildren and place them at the correct location. offset = _textSize.height(); xOffset = pw; - for (unsigned int i = 0; i < _children.count(); i++ ) { + for (unsigned int i = 0; i < _tqchildren.count(); i++ ) { - RegExpWidget* child = _children.at(i); + RegExpWidget* child = _tqchildren.at(i); - TQSize childSize = child->sizeHint(); + TQSize childSize = child->tqsizeHint(); TQSize curChildSize = child->size(); //-------------------------------------- place the child int x = xOffset; int y = offset; int h = childSize.height(); - if ( ( _children.count() != 1 ) && ( i == 0 || i == _children.count() -1 ) ) { + if ( ( _tqchildren.count() != 1 ) && ( i == 0 || i == _tqchildren.count() -1 ) ) { // first and last DragAccepter should only be half size. h /= 2; } - int w = _childrenWidth; + int w = _tqchildrenWidth; child->setGeometry( x, y, w, h ); if ( w != curChildSize.width() || h != curChildSize.height() ) { // I resized the child, so give it a chance to relect thus. @@ -172,7 +172,7 @@ RegExp* AltnWidget::regExp() const { AltnRegExp *regexp = new AltnRegExp( isSelected() ); - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // start with the second element for ( ; *it; it+=2 ) { regexp->addRegExp( (*it)->regExp() ); @@ -183,8 +183,8 @@ RegExp* AltnWidget::regExp() const void AltnWidget::applyRegExpToSelection( RegExpType type ) { - for ( unsigned int i=1; i < _children.count(); i += 2 ) { - RegExpWidget* child = _children.at( i ); + for ( unsigned int i=1; i < _tqchildren.count(); i += 2 ) { + RegExpWidget* child = _tqchildren.at( i ); if ( child->hasSelection() ) { child->applyRegExpToSelection( type ); } @@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const if ( isSelected() ) return regExp(); else { - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past DragAccepter for ( ; *it; it+=2 ) { if ( (*it)->hasSelection() ) { @@ -216,7 +216,7 @@ bool AltnWidget::validateSelection() const } bool foundASelection = false; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past DragAccepter for ( ; *it; it+=2 ) { if ( (*it)->hasSelection() ) { @@ -238,9 +238,9 @@ bool AltnWidget::validateSelection() const void AltnWidget::updateDrawLineInfo() { - for ( unsigned int i=0; i < _children.count(); i+=2 ) { - bool line = ( i != 0 && i!= _children.count()-1 ); - DragAccepter *accepter = dynamic_cast<DragAccepter*>(_children.at(i)); + for ( unsigned int i=0; i < _tqchildren.count(); i+=2 ) { + bool line = ( i != 0 && i!= _tqchildren.count()-1 ); + DragAccepter *accepter = dynamic_cast<DragAccepter*>(_tqchildren.at(i)); if (accepter) accepter->setDrawLine( line ); } diff --git a/kregexpeditor/altnwidget.h b/kregexpeditor/altnwidget.h index 589726d..8b76a66 100644 --- a/kregexpeditor/altnwidget.h +++ b/kregexpeditor/altnwidget.h @@ -29,12 +29,12 @@ class AltnRegExp; class AltnWidget :public MultiContainerWidget { public: - AltnWidget( RegExpEditorWindow* editorWindow, TQWidget *parent, + AltnWidget( RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *label = 0); AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual void applyRegExpToSelection( RegExpType type ); virtual RegExpType type() const { return ALTN; } @@ -58,8 +58,8 @@ private: mutable TQSize _textSize; mutable int _maxSelectedWidth; - mutable int _childrenWidth; - mutable int _childrenHeight; + mutable int _tqchildrenWidth; + mutable int _tqchildrenHeight; }; #endif // altnwidget diff --git a/kregexpeditor/auxbuttons.cpp b/kregexpeditor/auxbuttons.cpp index 0f30d80..d22d229 100644 --- a/kregexpeditor/auxbuttons.cpp +++ b/kregexpeditor/auxbuttons.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include "images.h" #else @@ -32,51 +32,51 @@ #include <tqtoolbutton.h> #include "util.h" -AuxButtons::AuxButtons( TQWidget* parent, const char* name = 0) - :TQDockWindow( TQDockWindow::InDock, parent, name) +AuxButtons::AuxButtons( TQWidget* tqparent, const char* name = 0) + :TQDockWindow( TQDockWindow::InDock, tqparent, name) { - TQBoxLayout* layout = boxLayout(); + TQBoxLayout* tqlayout = boxLayout(); _undo = new TQToolButton( this ); - _undo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("undo") ) ); - layout->addWidget( _undo ); + _undo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("undo") ) ); + tqlayout->addWidget( _undo ); connect( _undo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(undo()) ); TQToolTip::add( _undo, i18n( "Undo" ) ); _redo = new TQToolButton( this ); - _redo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("redo") ) ); - layout->addWidget( _redo ); + _redo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("redo") ) ); + tqlayout->addWidget( _redo ); connect( _redo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(redo()) ); TQToolTip::add( _redo, i18n( "Redo" ) ); _cut = new TQToolButton( this ); - _cut->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcut") ) ); - layout->addWidget( _cut ); + _cut->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcut") ) ); + tqlayout->addWidget( _cut ); connect( _cut, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(cut()) ); TQToolTip::add( _cut, i18n( "Cut" ) ); _copy = new TQToolButton( this ); - _copy->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcopy") ) ); - layout->addWidget( _copy ); + _copy->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcopy") ) ); + tqlayout->addWidget( _copy ); connect( _copy, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(copy()) ); TQToolTip::add( _copy, i18n( "Copy" ) ); _paste = new TQToolButton( this ); - _paste->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editpaste")) ); - layout->addWidget( _paste ); + _paste->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editpaste")) ); + tqlayout->addWidget( _paste ); connect( _paste, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(paste()) ); TQToolTip::add( _paste, i18n( "Paste" ) ); _save = new TQToolButton( this ); - _save->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("filesave")) ); - layout->addWidget( _save ); + _save->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("filesave")) ); + tqlayout->addWidget( _save ); connect( _save, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(save()) ); TQToolTip::add( _save, i18n( "Save" ) ); TQToolButton* button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("contexthelp") ) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("contexthelp") ) ); + tqlayout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEnterWhatsThis())); _undo->setEnabled( false ); diff --git a/kregexpeditor/auxbuttons.h b/kregexpeditor/auxbuttons.h index ef88ab5..a0ada03 100644 --- a/kregexpeditor/auxbuttons.h +++ b/kregexpeditor/auxbuttons.h @@ -23,12 +23,13 @@ class TQComboBox; class TQLabel; class TQToolButton; -class AuxButtons :public QDockWindow +class AuxButtons :public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - AuxButtons( TQWidget* parent, const char* name ); + AuxButtons( TQWidget* tqparent, const char* name ); signals: void undo(); diff --git a/kregexpeditor/characterswidget.cpp b/kregexpeditor/characterswidget.cpp index e0de760..f8a6870 100644 --- a/kregexpeditor/characterswidget.cpp +++ b/kregexpeditor/characterswidget.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kdialogbase.h> @@ -39,16 +39,16 @@ CharacterEdits* CharactersWidget::_configWindow = 0; -CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : RegExpWidget(editorWindow, parent, name) + : RegExpWidget(editorWindow, tqparent, name) { _regexp = new TextRangeRegExp( false /* not used */); } CharactersWidget::CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name ) - : RegExpWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name ) + : RegExpWidget( editorWindow, tqparent, name ) { _regexp = dynamic_cast<TextRangeRegExp*>( regexp->clone() ); Q_ASSERT( _regexp ); @@ -60,7 +60,7 @@ CharactersWidget::~CharactersWidget() } -TQSize CharactersWidget::sizeHint() const +TQSize CharactersWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize(metrics, title()); @@ -72,13 +72,13 @@ TQSize CharactersWidget::sizeHint() const _contentSize = HackCalculateFontSize(metrics,text()); // _contentSize = metrics.size(0, text()); - return TQSize(QMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw), + return TQSize(TQMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw), headerSize.height() + bdSize + _contentSize.height() + bdSize + 2*pw); } void CharactersWidget::paintEvent(TQPaintEvent *e) { - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -118,7 +118,7 @@ RegExp* CharactersWidget::regExp() const TQString CharactersWidget::text() const { - TQString res = TQString::fromLatin1(""); + TQString res = TQString::tqfromLatin1(""); if (_regexp->wordChar()) res += i18n("- A word character\n"); @@ -171,7 +171,7 @@ TQString CharactersWidget::title() const RegExpWidget* CharactersWidget::findWidgetToEdit( TQPoint globalPos ) { - if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) ) + if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).tqcontains( globalPos ) ) return this; else return 0; @@ -181,13 +181,13 @@ int CharactersWidget::edit() { if ( _configWindow == 0 ) { TQApplication::setOverrideCursor( WaitCursor ); - // No parent here, as this window should continue to exists. + // No tqparent here, as this window should continue to exists. _configWindow = new CharacterEdits( 0, "CharactersWidget::_configWindow" ); TQApplication::restoreOverrideCursor(); } - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2)); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().height()/2)); int ret = _configWindow->exec(_regexp ); if ( ret == TQDialog::Accepted ) { _editorWindow->updateContent( 0 ); @@ -282,8 +282,8 @@ int CharacterEdits::exec( TextRangeRegExp* regexp ) } -CharacterEdits::CharacterEdits( TQWidget *parent, const char *name) - : KDialogBase( parent, name == 0 ? "CharacterEdits" : name, true, +CharacterEdits::CharacterEdits( TQWidget *tqparent, const char *name) + : KDialogBase( tqparent, name == 0 ? "CharacterEdits" : name, true, i18n("Specify Characters"), KDialogBase::Ok | KDialogBase::Cancel) { @@ -377,13 +377,13 @@ void CharacterEdits::slotOK() } -SingleEntry::SingleEntry(TQWidget* parent, const char* name ) - :KMultiFormListBoxEntry( parent, name ) +SingleEntry::SingleEntry(TQWidget* tqparent, const char* name ) + :KMultiFormListBoxEntry( tqparent, name ) { - TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); _selector = new CharSelector( this ); - layout->addWidget( _selector ); - layout->addStretch(1); + tqlayout->addWidget( _selector ); + tqlayout->addStretch(1); } TQString SingleEntry::text() const @@ -402,22 +402,22 @@ bool SingleEntry::isEmpty() const } -RangeEntry::RangeEntry(TQWidget* parent, const char* name ) - :KMultiFormListBoxEntry( parent, name ) +RangeEntry::RangeEntry(TQWidget* tqparent, const char* name ) + :KMultiFormListBoxEntry( tqparent, name ) { - TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); TQLabel* label = new TQLabel(i18n("From:"), this ); _from = new CharSelector( this ); - layout->addWidget( label ); - layout->addWidget( _from ); + tqlayout->addWidget( label ); + tqlayout->addWidget( _from ); - layout->addStretch(1); + tqlayout->addStretch(1); label = new TQLabel(i18n("end of range","To:"), this ); _to = new CharSelector( this ); - layout->addWidget( label ); - layout->addWidget( _to ); + tqlayout->addWidget( label ); + tqlayout->addWidget( _to ); } TQString RangeEntry::fromText() const diff --git a/kregexpeditor/characterswidget.h b/kregexpeditor/characterswidget.h index faff294..f8cf390 100644 --- a/kregexpeditor/characterswidget.h +++ b/kregexpeditor/characterswidget.h @@ -18,7 +18,7 @@ #ifndef characterswidget #define characterswidget -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kdialogbase.h> @@ -41,12 +41,12 @@ class TQCheckBox; class CharactersWidget :public RegExpWidget { public: - CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *label = 0); CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); ~CharactersWidget(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return CHARSET; } virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); @@ -72,7 +72,7 @@ private: class SingleEntry :public KMultiFormListBoxEntry { public: - SingleEntry(TQWidget* parent, const char* name = 0 ); + SingleEntry(TQWidget* tqparent, const char* name = 0 ); TQString text() const; void setText( TQString text ); bool isEmpty() const; @@ -87,7 +87,7 @@ private: class RangeEntry :public KMultiFormListBoxEntry { public: - RangeEntry(TQWidget* parent, const char* name = 0 ); + RangeEntry(TQWidget* tqparent, const char* name = 0 ); TQString fromText() const; TQString toText() const; void setFrom( TQString text ); @@ -103,7 +103,7 @@ private: class SingleFactory :public KMultiFormListBoxFactory { public: - KMultiFormListBoxEntry *create(TQWidget *parent) { return new SingleEntry( parent ); } + KMultiFormListBoxEntry *create(TQWidget *tqparent) { return new SingleEntry( tqparent ); } TQWidget *separator( TQWidget* ) { return 0; } }; @@ -113,7 +113,7 @@ public: class RangeFactory :public KMultiFormListBoxFactory { public: - KMultiFormListBoxEntry *create(TQWidget *parent) { return new RangeEntry( parent ); } + KMultiFormListBoxEntry *create(TQWidget *tqparent) { return new RangeEntry( tqparent ); } TQWidget *separator( TQWidget* ) { return 0; } }; @@ -123,8 +123,9 @@ public: class CharacterEdits : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CharacterEdits(TQWidget *parent = 0, const char *name = 0); + CharacterEdits(TQWidget *tqparent = 0, const char *name = 0); public slots: int exec( TextRangeRegExp* regexp ); diff --git a/kregexpeditor/charselector.cpp b/kregexpeditor/charselector.cpp index a71c679..d5f0a07 100644 --- a/kregexpeditor/charselector.cpp +++ b/kregexpeditor/charselector.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -38,40 +38,40 @@ class expects the widgets on the stack to take up all space. StackContainer fills in this gab. */ -class StackContainer :public QWidget +class StackContainer :public TQWidget { public: - StackContainer( TQWidget* child, TQWidget* parent ) : TQWidget( parent ) + StackContainer( TQWidget* child, TQWidget* tqparent ) : TQWidget( tqparent ) { - TQHBoxLayout* layout = new TQHBoxLayout( this ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this ); child->reparent( this, TQPoint(0,0), false ); - layout->addWidget( child ); - layout->addStretch( 1 ); + tqlayout->addWidget( child ); + tqlayout->addStretch( 1 ); } }; -CharSelector::CharSelector( TQWidget* parent, const char* name ) - :TQWidget( parent, name ), _oldIndex(0) +CharSelector::CharSelector( TQWidget* tqparent, const char* name ) + :TQWidget( tqparent, name ), _oldIndex(0) { TQStringList items; - TQHBoxLayout* layout = new TQHBoxLayout( this, 0, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 0, 6 ); _type = new TQComboBox( this, "_type" ); items << i18n("Normal Character") << i18n("Unicode Char in Hex.") << i18n("Unicode Char in Oct.") - << TQString::fromLatin1("----") + << TQString::tqfromLatin1("----") << i18n("The Bell Character (\\a)") << i18n("The Form Feed Character (\\f)") << i18n("The Line Feed Character (\\n)") << i18n("The Carriage Return Character (\\r)") - << i18n("The Horizontal Tab Character (\\t)") - << i18n("The Vertical Tab Character (\\v)"); + << i18n("TheQt::Horizontal Tab Character (\\t)") + << i18n("TheQt::Vertical Tab Character (\\v)"); _type->insertStringList( items ); - layout->addWidget( _type ); + tqlayout->addWidget( _type ); _stack = new TQWidgetStack( this, "_stack" ); - layout->addWidget( _stack ); + tqlayout->addWidget( _stack ); _normal = new LimitedCharLineEdit( LimitedCharLineEdit::NORMAL, 0, "_normal" ); _stack->addWidget( new StackContainer( _normal, _stack ), 0 ); @@ -169,17 +169,17 @@ TQString CharSelector::text() const case 3: // The seperator break; case 4: - return TQString::fromLatin1("\\a"); + return TQString::tqfromLatin1("\\a"); case 5: - return TQString::fromLatin1("\\f"); + return TQString::tqfromLatin1("\\f"); case 6: - return TQString::fromLatin1("\\n"); + return TQString::tqfromLatin1("\\n"); case 7: - return TQString::fromLatin1("\\r"); + return TQString::tqfromLatin1("\\r"); case 8: - return TQString::fromLatin1("\\t"); + return TQString::tqfromLatin1("\\t"); case 9: - return TQString::fromLatin1("\\v"); + return TQString::tqfromLatin1("\\v"); } - return TQString::null; + return TQString(); } diff --git a/kregexpeditor/charselector.h b/kregexpeditor/charselector.h index 4f34e67..5ba2a88 100644 --- a/kregexpeditor/charselector.h +++ b/kregexpeditor/charselector.h @@ -24,12 +24,13 @@ class TQComboBox; class TQWidgetStack; class LimitedCharLineEdit; -class CharSelector :public QWidget +class CharSelector :public TQWidget { Q_OBJECT + TQ_OBJECT public: - CharSelector( TQWidget* parent, const char* name = 0 ); + CharSelector( TQWidget* tqparent, const char* name = 0 ); TQString text() const; void setText( TQString text ); bool isEmpty() const; diff --git a/kregexpeditor/compoundregexp.cpp b/kregexpeditor/compoundregexp.cpp index 0c5e194..150ee97 100644 --- a/kregexpeditor/compoundregexp.cpp +++ b/kregexpeditor/compoundregexp.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> diff --git a/kregexpeditor/compoundregexp.h b/kregexpeditor/compoundregexp.h index 6368359..a1038ab 100644 --- a/kregexpeditor/compoundregexp.h +++ b/kregexpeditor/compoundregexp.h @@ -26,8 +26,8 @@ class CompoundRegExp :public RegExp { public: - CompoundRegExp( bool selected, const TQString& title = TQString::null, - const TQString& description = TQString::null, + CompoundRegExp( bool selected, const TQString& title = TQString(), + const TQString& description = TQString(), bool hidden = false, bool allowReplace = false, RegExp* child = 0); virtual bool check( ErrorMap&, bool first, bool last ); diff --git a/kregexpeditor/compoundwidget.cpp b/kregexpeditor/compoundwidget.cpp index 441143f..e55d5fe 100644 --- a/kregexpeditor/compoundwidget.cpp +++ b/kregexpeditor/compoundwidget.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include "images.h" #else @@ -37,11 +37,11 @@ //================================================================================ -CompoundDetailWindow::CompoundDetailWindow( TQWidget* parent, const char* name ) - :TQWidget( parent, name ) +CompoundDetailWindow::CompoundDetailWindow( TQWidget* tqparent, const char* name ) + :TQWidget( tqparent, name ) { - TQVBoxLayout* layout = new TQVBoxLayout( this ); - layout->setAutoAdd( true ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + tqlayout->setAutoAdd( true ); TQLabel* label = new TQLabel( i18n("&Title:"), this); _title = new TQLineEdit( this ); @@ -93,17 +93,17 @@ void CompoundDetailWindow::setAllowReplace( bool b ) //================================================================================ -CompoundWidget::CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* parent, +CompoundWidget::CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* tqparent, const char* name ) - :SingleContainerWidget( editorWindow, parent, name == 0 ? "CompoundWidget" : name ) + :SingleContainerWidget( editorWindow, tqparent, name == 0 ? "CompoundWidget" : name ) { _child = new ConcWidget( editorWindow, this ); init(); } CompoundWidget::CompoundWidget( CompoundRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name ) - : SingleContainerWidget( editorWindow, parent, name == 0 ? "CompoundWidget" : name ) + TQWidget* tqparent, const char* name ) + : SingleContainerWidget( editorWindow, tqparent, name == 0 ? "CompoundWidget" : name ) { init(); _content->setTitle( regexp->title() ); @@ -135,17 +135,17 @@ void CompoundWidget::init( ) _backRefId = -1; } -TQSize CompoundWidget::sizeHint() const +TQSize CompoundWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); _textSize = metrics.size( 0, _content->title() ); int width, height; if ( _hidden ) { _pixmapSize = _up.size(); - width = 2*pw + QMAX( 2*bdSize+_textSize.width(), 2*bdSize+_pixmapSize.width()); + width = 2*pw + TQMAX( 2*bdSize+_textSize.width(), 2*bdSize+_pixmapSize.width()); height = _pixmapSize.height() + 2*bdSize + _textSize.height()+pw; } else { @@ -154,8 +154,8 @@ TQSize CompoundWidget::sizeHint() const if ( _textSize.width() != 0) headerLineWidth += 3*bdSize + _textSize.width(); - width = QMAX( 2*pw + _childSize.width(), headerLineWidth ); - height = QMAX( _textSize.height(), _pixmapSize.height() ) + + width = TQMAX( 2*pw + _childSize.width(), headerLineWidth ); + height = TQMAX( _textSize.height(), _pixmapSize.height() ) + 2*bdSize + _childSize.height() + pw; } return TQSize( width, height ); @@ -164,7 +164,7 @@ TQSize CompoundWidget::sizeHint() const void CompoundWidget::paintEvent( TQPaintEvent *e ) { - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize); @@ -182,7 +182,7 @@ void CompoundWidget::paintEvent( TQPaintEvent *e ) painter.drawPixmap( _pixmapPos, _up ); } else { - int maxH = QMAX( _textSize.height(), _pixmapSize.height() ); + int maxH = TQMAX( _textSize.height(), _pixmapSize.height() ); int offset = 0; horLineY = maxH/2; childY = maxH+bdSize; @@ -220,8 +220,8 @@ void CompoundWidget::paintEvent( TQPaintEvent *e ) } else { TQSize curSize = _child->size(); - TQSize newSize = TQSize( QMAX( _child->sizeHint().width(), mySize.width()-2*pw), - _child->sizeHint().height()); + TQSize newSize = TQSize( TQMAX( _child->tqsizeHint().width(), mySize.width()-2*pw), + _child->tqsizeHint().height()); _child->move( pw, childY ); if ( curSize != newSize ) { @@ -246,8 +246,8 @@ void CompoundWidget::slotConfigCanceled() { TQDataStream stream( _backup, IO_ReadOnly ); KWidgetStreamer streamer; - streamer.fromStream( stream, _content ); - repaint(); + streamer.fromStream( stream, TQT_TQOBJECT(_content) ); + tqrepaint(); } RegExp* CompoundWidget::regExp() const @@ -258,8 +258,8 @@ RegExp* CompoundWidget::regExp() const void CompoundWidget::mousePressEvent( TQMouseEvent* event ) { - if ( event->button() == LeftButton && - TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) { + if ( event->button() == Qt::LeftButton && + TQRect( _pixmapPos, _pixmapSize ).tqcontains( event->pos() ) ) { // Skip otherwise we will never see the mouse release // since it is eaten by Editor window. } @@ -269,38 +269,38 @@ void CompoundWidget::mousePressEvent( TQMouseEvent* event ) void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event) { - if ( event->button() == LeftButton && - TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) { + if ( event->button() == Qt::LeftButton && + TQRect( _pixmapPos, _pixmapSize ).tqcontains( event->pos() ) ) { _hidden = !_hidden; _editorWindow->updateContent( 0 ); - repaint(); // is this necesary? + tqrepaint(); // is this necesary? _editorWindow->emitChange(); } else SingleContainerWidget::mouseReleaseEvent( event ); } -bool CompoundWidget::updateSelection( bool parentSelected ) +bool CompoundWidget::updateSelection( bool tqparentSelected ) { if ( _hidden ) { - bool changed = RegExpWidget::updateSelection( parentSelected ); + bool changed = RegExpWidget::updateSelection( tqparentSelected ); _child->selectWidget( _isSelected ); if (changed) - repaint(); + tqrepaint(); return changed; } else { - return SingleContainerWidget::updateSelection( parentSelected ); + return SingleContainerWidget::updateSelection( tqparentSelected ); } } int CompoundWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().height()/2) ); TQDataStream stream( _backup, IO_WriteOnly ); KWidgetStreamer streamer; - streamer.toStream( _content, stream ); + streamer.toStream( TQT_TQOBJECT(_content), stream ); return _configWindow->exec(); } @@ -312,7 +312,7 @@ int nextId() TQPixmap CompoundWidget::getIcon( const TQString& name ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage(name) ); return pix; diff --git a/kregexpeditor/compoundwidget.h b/kregexpeditor/compoundwidget.h index 07dc099..6cea5b5 100644 --- a/kregexpeditor/compoundwidget.h +++ b/kregexpeditor/compoundwidget.h @@ -29,10 +29,10 @@ class TQCheckBox; Widget containing configuration details for @ref CompoundWidget @internal */ -class CompoundDetailWindow :public QWidget +class CompoundDetailWindow :public TQWidget { public: - CompoundDetailWindow(TQWidget* parent, const char* name = 0); + CompoundDetailWindow(TQWidget* tqparent, const char* name = 0); TQString title() const; TQString description() const; bool allowReplace() const; @@ -60,15 +60,16 @@ private: class CompoundWidget :public SingleContainerWidget { Q_OBJECT + TQ_OBJECT public: - CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* parent, + CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* tqparent, const char* name = 0); CompoundWidget( CompoundRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); - virtual bool updateSelection( bool parentSelected ); - virtual TQSize sizeHint() const; + virtual bool updateSelection( bool tqparentSelected ); + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return COMPOUND; } virtual int edit(); diff --git a/kregexpeditor/concregexp.cpp b/kregexpeditor/concregexp.cpp index cefbac4..1c8421d 100644 --- a/kregexpeditor/concregexp.cpp +++ b/kregexpeditor/concregexp.cpp @@ -29,7 +29,7 @@ void ConcRegExp::addRegExp( RegExp *regExp ) addChild( regExp ); } -RegExpList ConcRegExp::children() +RegExpList ConcRegExp::tqchildren() { return list; } diff --git a/kregexpeditor/concregexp.h b/kregexpeditor/concregexp.h index 47e3b26..15a0a66 100644 --- a/kregexpeditor/concregexp.h +++ b/kregexpeditor/concregexp.h @@ -31,7 +31,7 @@ public: ConcRegExp( bool selected ); void addRegExp( RegExp *); - RegExpList children(); + RegExpList tqchildren(); RegExp* lastRegExp(); virtual bool check( ErrorMap&, bool first, bool last ); diff --git a/kregexpeditor/concwidget.cpp b/kregexpeditor/concwidget.cpp index d76730f..fec2cc0 100644 --- a/kregexpeditor/concwidget.cpp +++ b/kregexpeditor/concwidget.cpp @@ -21,24 +21,24 @@ #include <tqpainter.h> -ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - :MultiContainerWidget(editorWindow, parent, name == 0 ? "concwidget" : name) + :MultiContainerWidget(editorWindow, tqparent, name == 0 ? "concwidget" : name) { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); accepter->show(); - _children.append(accepter); + _tqchildren.append(accepter); } ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child, - TQWidget *parent, const char *name) - :MultiContainerWidget(editorWindow, parent, name == 0 ? "concwidget" : name) + TQWidget *tqparent, const char *name) + :MultiContainerWidget(editorWindow, tqparent, name == 0 ? "concwidget" : name) { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); - _children.append(accepter); + _tqchildren.append(accepter); child->reparent(this, TQPoint(0,0), false); addNewChild(accepter, child); } @@ -48,24 +48,24 @@ ConcWidget::ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc, :MultiContainerWidget(editorWindow, 0, "Splitted ConcWidget") { init(); - _children.prepend( new DragAccepter(editorWindow, this) ); + _tqchildren.prepend( new DragAccepter(editorWindow, this) ); for (unsigned int i = end; i >= start; i--) { - RegExpWidget* child = origConc->_children.take( i ); - _children.prepend( child ); + RegExpWidget* child = origConc->_tqchildren.take( i ); + _tqchildren.prepend( child ); child->reparent( this, TQPoint(0,0), false); } - _children.prepend( new DragAccepter(editorWindow, this) ); + _tqchildren.prepend( new DragAccepter(editorWindow, this) ); } ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name ) - :MultiContainerWidget( editorWindow, parent, name == 0 ? "concwidget" : name ) + TQWidget* tqparent, const char* name ) + :MultiContainerWidget( editorWindow, tqparent, name == 0 ? "concwidget" : name ) { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); - _children.append(accepter); + _tqchildren.append(accepter); - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); append( child ); @@ -78,37 +78,37 @@ void ConcWidget::init() } -TQSize ConcWidget::sizeHint() const +TQSize ConcWidget::tqsizeHint() const { - int childrenWidth = 0; - int childrenHeight = 0; - TQPtrListIterator<RegExpWidget> it(_children); + int tqchildrenWidth = 0; + int tqchildrenHeight = 0; + TQPtrListIterator<RegExpWidget> it(_tqchildren); for ( ; *it; ++it) { - TQSize thisChildSize = (*it)->sizeHint(); - childrenWidth += thisChildSize.width(); - childrenHeight = QMAX(childrenHeight, thisChildSize.height()); + TQSize thisChildSize = (*it)->tqsizeHint(); + tqchildrenWidth += thisChildSize.width(); + tqchildrenHeight = TQMAX(tqchildrenHeight, thisChildSize.height()); } - return TQSize(childrenWidth, childrenHeight); + return TQSize(tqchildrenWidth, tqchildrenHeight); } void ConcWidget::paintEvent( TQPaintEvent *e) { - Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) ); + Q_ASSERT( dynamic_cast<DragAccepter*>(_tqchildren.at(0)) ); // if this fails, then I should check the location of the show() - Q_ASSERT( _children.count() == 1 || - ( _children.count() >=3 && - dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) ); + Q_ASSERT( _tqchildren.count() == 1 || + ( _tqchildren.count() >=3 && + dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)) ) ); - if ( _children.count() == 1) { + if ( _tqchildren.count() == 1) { // There is only an accepter, lets give it all the space. - _children.at(0)->setGeometry( 0, 0, size().width(), size().height() ); + _tqchildren.at(0)->setGeometry( 0, 0, size().width(), size().height() ); } else { - TQSize myReqSize = sizeHint(); - TQSize mySize(QMAX(myReqSize.width(), size().width()), - QMAX(myReqSize.height(), size().height())); + TQSize myReqSize = tqsizeHint(); + TQSize mySize(TQMAX(myReqSize.width(), size().width()), + TQMAX(myReqSize.height(), size().height())); // If the widget needs less space than it can get then this space should // be given to the leftmost and rightmost accepter. So lets calculate @@ -125,20 +125,20 @@ void ConcWidget::paintEvent( TQPaintEvent *e) int lastHeight = 0; int offset = 0; - for (unsigned int i = 1; i < _children.count(); i += 2 ) { - DragAccepter* accepter = dynamic_cast<DragAccepter*>(_children.at(i-1)); + for (unsigned int i = 1; i < _tqchildren.count(); i += 2 ) { + DragAccepter* accepter = dynamic_cast<DragAccepter*>(_tqchildren.at(i-1)); if (!accepter) continue; - RegExpWidget* child = _children.at(i); + RegExpWidget* child = _tqchildren.at(i); - TQSize childSize = child->sizeHint(); + TQSize childSize = child->tqsizeHint(); TQSize curChildSize = child->size(); //----------------------------- first place the accepter int x = offset; - int w = accepter->sizeHint().width(); + int w = accepter->tqsizeHint().width(); if ( i == 1 ) w+= extra; - int h = QMAX( lastHeight, childSize.height() ); + int h = TQMAX( lastHeight, childSize.height() ); int y = (mySize.height() - h)/2; accepter->setGeometry( x, y, w, h ); @@ -176,11 +176,11 @@ void ConcWidget::paintEvent( TQPaintEvent *e) //---------------------- Finally place the last accepter. DragAccepter* accepter = - dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)); + dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)); // dynamic_cast is ASSERTed at top int x = offset; int h = lastHeight; - int w = accepter->sizeHint().width() + extra; + int w = accepter->tqsizeHint().width() + extra; int y = (mySize.height()-h)/2; accepter->setGeometry( x, y, w, h ); } @@ -189,7 +189,7 @@ void ConcWidget::paintEvent( TQPaintEvent *e) void ConcWidget::mousePressEvent ( TQMouseEvent* event ) { - if ( event->button() == RightButton ) { + if ( event->button() == Qt::RightButton ) { _editorWindow->showRMBMenu( _editorWindow->hasSelection() ); } else { @@ -212,10 +212,10 @@ void ConcWidget::sizeAccepter( DragAccepter* accepter, int height, int totHeight RegExp* ConcWidget::regExp() const { - TQPtrListIterator<RegExpWidget> it( _children ); + TQPtrListIterator<RegExpWidget> it( _tqchildren ); ++it; // start with the second element. - if ( _children.count() == 3 ) { + if ( _tqchildren.count() == 3 ) { // Exactly one child (and two drag accepters) return (*it)->regExp(); } @@ -229,24 +229,24 @@ RegExp* ConcWidget::regExp() const } } -bool ConcWidget::updateSelection(bool parentSelected) +bool ConcWidget::updateSelection(bool tqparentSelected) { bool isSel = _isSelected; - bool changed = MultiContainerWidget::updateSelection( parentSelected ); + bool changed = MultiContainerWidget::updateSelection( tqparentSelected ); _maxSelectedHeight = 0; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past the first DragAccepter for ( ; *it; it +=2 ) { if ( (*it)->isSelected() ) { - _maxSelectedHeight = QMAX( _maxSelectedHeight, (*it)->sizeHint().height() ); + _maxSelectedHeight = TQMAX( _maxSelectedHeight, (*it)->tqsizeHint().height() ); } } changed = changed || isSel != _isSelected; if ( changed ) { - repaint(); + tqrepaint(); } return changed; @@ -259,8 +259,8 @@ void ConcWidget::getSelectionIndexes( int* start, int* end ) // Start with element at index 1, and skip every second element, as we // know they are dragAccepters. - for ( unsigned int index = 1; index< _children.count(); index += 2 ) { - RegExpWidget* child = _children.at(index); + for ( unsigned int index = 1; index< _tqchildren.count(); index += 2 ) { + RegExpWidget* child = _tqchildren.at(index); if ( child->isSelected() ) { // The child is selected at topmost level. @@ -276,7 +276,7 @@ void ConcWidget::getSelectionIndexes( int* start, int* end ) } if ( *start != -1 && *end == -1 ) - *end = _children.count() -2; + *end = _tqchildren.count() -2; } void ConcWidget::applyRegExpToSelection( RegExpType type ) @@ -287,7 +287,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type ) if ( start == -1 ) { // No item selected at top level - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past the first DragAccepter for ( ; *it ; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -307,7 +307,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type ) subSequence->resize(0,0); // see note (1) subSequence->reparent( newElm, TQPoint(0,0), false); - _children.insert( start, newElm ); + _tqchildren.insert( start, newElm ); newElm->show(); } } @@ -318,7 +318,7 @@ bool ConcWidget::isSelected() const // A ConcWidget should be considered selected when all its elements has been selected // otherwise empty ConcWidgets may be left behind when for example selection is deleted. bool allSelected = true; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past first DragAccepter. for ( ; *it && allSelected; it += 2 ) { allSelected = allSelected && (*it)->isSelected(); @@ -336,7 +336,7 @@ RegExp* ConcWidget::selection() const bool foundMoreThanOne = false; RegExp* regexp = 0; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Skip past the first DragAccepter for ( ; (*it) ; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -363,21 +363,21 @@ RegExp* ConcWidget::selection() const void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other) { - for ( unsigned int i=0; i<_children.count(); i+= 2 ) { - RegExpWidget *ch = _children.at( i ); + for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { + RegExpWidget *ch = _tqchildren.at( i ); if ( ch == accepter ) { // Move all the element from the `child' ConcWidget to this one. // Do not copy the first one as this is a dragAccepter, and we place the widgets // after this drag accepter. // We must take them in pairs to avoid breaking the invariant for paintEvent, // namely that every second element is a dragAccepter - for ( unsigned int j = other->_children.count()-1; j > 0 ; j-=2 ) { - RegExpWidget* newChildA = other->_children.take(j); + for ( unsigned int j = other->_tqchildren.count()-1; j > 0 ; j-=2 ) { + RegExpWidget* newChildA = other->_tqchildren.take(j); newChildA->reparent( this, TQPoint(0,0), false); - _children.insert( i+1, newChildA ); - RegExpWidget* newChildB = other->_children.take(j-1); + _tqchildren.insert( i+1, newChildA ); + RegExpWidget* newChildB = other->_tqchildren.take(j-1); newChildB->reparent( this, TQPoint(0,0), false); - _children.insert( i+1, newChildB ); + _tqchildren.insert( i+1, newChildB ); newChildA->show(); newChildB->show(); } @@ -391,7 +391,7 @@ void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other) bool ConcWidget::validateSelection() const { bool cont = true; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // skip past the DragAccepter. for ( ; *it && cont; it += 2 ) { cont = (*it)->validateSelection(); diff --git a/kregexpeditor/concwidget.h b/kregexpeditor/concwidget.h index 9a4820c..073ff6e 100644 --- a/kregexpeditor/concwidget.h +++ b/kregexpeditor/concwidget.h @@ -30,19 +30,19 @@ class ConcRegExp; class ConcWidget :public MultiContainerWidget { public: - ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child, - TQWidget *parent, const char *name=0); + TQWidget *tqparent, const char *name=0); ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc, unsigned int start, unsigned int end); ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); void init(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; - virtual bool updateSelection(bool parentSelected); + virtual bool updateSelection(bool tqparentSelected); virtual bool isSelected() const; virtual void applyRegExpToSelection( RegExpType type ); @@ -52,7 +52,7 @@ public: virtual bool validateSelection() const; virtual bool acceptWidgetInsert( RegExpType ) const { return false; } virtual bool acceptWidgetPaste() const { return false; } - bool hasAnyChildren() { return _children.count() > 1; } + bool hasAnyChildren() { return _tqchildren.count() > 1; } protected: virtual void paintEvent( TQPaintEvent *e ); diff --git a/kregexpeditor/dcbutton.cpp b/kregexpeditor/dcbutton.cpp index 4d714ca..770b101 100644 --- a/kregexpeditor/dcbutton.cpp +++ b/kregexpeditor/dcbutton.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include "dcbutton.moc" @@ -23,8 +23,8 @@ #include "dcbutton.h" -DoubleClickButton::DoubleClickButton( TQPixmap pixmap, TQWidget* parent, const char* name ) - : TQToolButton( parent, name ? name : "DoubleClickButton" ) +DoubleClickButton::DoubleClickButton( TQPixmap pixmap, TQWidget* tqparent, const char* name ) + : TQToolButton( tqparent, name ? name : "DoubleClickButton" ) { setPixmap( pixmap ); } diff --git a/kregexpeditor/dcbutton.h b/kregexpeditor/dcbutton.h index 0e2b6cf..0bdd2ca 100644 --- a/kregexpeditor/dcbutton.h +++ b/kregexpeditor/dcbutton.h @@ -25,12 +25,13 @@ class TQMouseEvent; TQToolButton extended to emit a signal on double click. @internal */ -class DoubleClickButton :public QToolButton +class DoubleClickButton :public TQToolButton { Q_OBJECT + TQ_OBJECT public: - DoubleClickButton( TQPixmap pix, TQWidget* parent, const char* name = 0); + DoubleClickButton( TQPixmap pix, TQWidget* tqparent, const char* name = 0); protected: virtual void mouseDoubleClickEvent ( TQMouseEvent * ); diff --git a/kregexpeditor/drag.cpp b/kregexpeditor/drag.cpp index e17973c..51197a4 100644 --- a/kregexpeditor/drag.cpp +++ b/kregexpeditor/drag.cpp @@ -37,13 +37,13 @@ bool RegExpWidgetDrag::canDecode( TQDragMoveEvent* event ) } RegExpWidget* RegExpWidgetDrag::decode(TQDropEvent* event, RegExpEditorWindow* window, - TQWidget* parent) + TQWidget* tqparent) { - TQByteArray payload = event->encodedData("KRegExpEditor/widgetdrag" ); + TQByteArray payload = event->tqencodedData("KRegExpEditor/widgetdrag" ); TQTextStream stream( payload, IO_ReadOnly ); TQString str = stream.read(); RegExp* regexp = WidgetFactory::createRegExp( str ); - RegExpWidget* widget = WidgetFactory::createWidget( regexp, window, parent ); + RegExpWidget* widget = WidgetFactory::createWidget( regexp, window, tqparent ); delete regexp; return widget; } @@ -58,7 +58,7 @@ const char * RegExpWidgetDrag::format ( int i ) const return 0; } -TQByteArray RegExpWidgetDrag::encodedData ( const char* format ) const +TQByteArray RegExpWidgetDrag::tqencodedData ( const char* format ) const { TQByteArray data; TQTextStream stream( data, IO_WriteOnly ); diff --git a/kregexpeditor/drag.h b/kregexpeditor/drag.h index 1ec220b..7173444 100644 --- a/kregexpeditor/drag.h +++ b/kregexpeditor/drag.h @@ -28,16 +28,16 @@ class RegExpEditorWindow; Class used for drag and drop in the RegExp widget. @internal */ -class RegExpWidgetDrag :public QDragObject +class RegExpWidgetDrag :public TQDragObject { public: RegExpWidgetDrag( RegExp* regexp , TQWidget* dragSource); ~RegExpWidgetDrag(); virtual const char * format ( int i = 0 ) const; - virtual TQByteArray encodedData ( const char * ) const; + virtual TQByteArray tqencodedData ( const char * ) const; static bool canDecode(TQDragMoveEvent* event); static RegExpWidget* decode(TQDropEvent* event, RegExpEditorWindow* window, - TQWidget* parent); + TQWidget* tqparent); private: RegExp* _regexp; }; diff --git a/kregexpeditor/dragaccepter.cpp b/kregexpeditor/dragaccepter.cpp index bbbf538..676c851 100644 --- a/kregexpeditor/dragaccepter.cpp +++ b/kregexpeditor/dragaccepter.cpp @@ -20,15 +20,15 @@ #include <tqpainter.h> -DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *parent, +DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *tqparent, const char *name) - : RegExpWidget(editorWindow, parent, name == 0 ? "dragaccepter" : name ), + : RegExpWidget(editorWindow, tqparent, name == 0 ? "dragaccepter" : name ), _drawLine( false ) { setAcceptDrops(TRUE); } -TQSize DragAccepter::sizeHint() const +TQSize DragAccepter::tqsizeHint() const { return TQSize(10,10); } @@ -46,7 +46,7 @@ void DragAccepter::paintEvent(TQPaintEvent *e) void DragAccepter::mousePressEvent ( TQMouseEvent* event ) { - if ( event->button() == RightButton ) { + if ( event->button() == Qt::RightButton ) { _editorWindow->showRMBMenu( _editorWindow->hasSelection() ); } else { @@ -56,7 +56,7 @@ void DragAccepter::mousePressEvent ( TQMouseEvent* event ) void DragAccepter::mouseReleaseEvent( TQMouseEvent* event ) { - if ( _editorWindow->isPasteing() && event->button() == LeftButton ) { + if ( _editorWindow->isPasteing() && event->button() == Qt::LeftButton ) { RegExp* regexp = _editorWindow->pasteData(); RegExpWidget *newElm = WidgetFactory::createWidget( regexp, _editorWindow, 0 ); @@ -68,24 +68,24 @@ void DragAccepter::mouseReleaseEvent( TQMouseEvent* event ) Q_ASSERT( elm ); - RegExpWidget *w = dynamic_cast<RegExpWidget*>(parent()); + RegExpWidget *w = dynamic_cast<RegExpWidget*>(tqparent()); if (w) w->addNewConcChild(this, elm); _editorWindow->updateContent( this ); _editorWindow->clearSelection( true ); } } - else if ( _editorWindow->isInserting() && event->button() == LeftButton ) { + else if ( _editorWindow->isInserting() && event->button() == Qt::LeftButton ) { if ( WidgetFactory::isContainer( _editorWindow->insertType() ) && _editorWindow->pointSelected( mapToGlobal( event->pos() ) ) ) { RegExpWidget::mouseReleaseEvent( event ); } else { RegExpWidget *child = WidgetFactory::createWidget( _editorWindow, - dynamic_cast<TQWidget*>(parent()), + dynamic_cast<TQWidget*>(tqparent()), _editorWindow->insertType() ); if ( child ) { - RegExpWidget *w = dynamic_cast<RegExpWidget*>(parent()); + RegExpWidget *w = dynamic_cast<RegExpWidget*>(tqparent()); if (w) w->addNewChild(this, child); _editorWindow->updateContent( child ); @@ -100,14 +100,14 @@ void DragAccepter::mouseReleaseEvent( TQMouseEvent* event ) void DragAccepter::dragEnterEvent(TQDragEnterEvent *event) { - bool selfDrag = ( event->source() && event->source()->topLevelWidget() == topLevelWidget() && _isSelected ); + bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() && _isSelected ); event->accept(RegExpWidgetDrag::canDecode( event ) && !selfDrag ); } void DragAccepter::dropEvent(TQDropEvent *event) { // The widget will be reparent afterward or part of it will, so no need to give - // it a parent here. + // it a tqparent here. RegExpWidget *newElm = RegExpWidgetDrag::decode( event, _editorWindow, 0 ); ConcWidget* elm; if ( !(elm = dynamic_cast<ConcWidget*>( newElm ) ) ) { @@ -116,15 +116,15 @@ void DragAccepter::dropEvent(TQDropEvent *event) Q_ASSERT( elm ); - RegExpWidget *rew = dynamic_cast<RegExpWidget*>(parent()); + RegExpWidget *rew = dynamic_cast<RegExpWidget*>(tqparent()); if (rew) rew->addNewConcChild(this, elm); - TQWidget *w = dynamic_cast<TQWidget*>(parent()); + TQWidget *w = dynamic_cast<TQWidget*>(tqparent()); if (w) w->update(); _editorWindow->updateContent( this ); - bool selfDrag = ( event->source() && event->source()->topLevelWidget() == topLevelWidget() ); + bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() ); if ( ! selfDrag ) _editorWindow->clearSelection( true ); else { diff --git a/kregexpeditor/dragaccepter.h b/kregexpeditor/dragaccepter.h index c9c6fd8..cead17f 100644 --- a/kregexpeditor/dragaccepter.h +++ b/kregexpeditor/dragaccepter.h @@ -30,9 +30,9 @@ class DragAccepter :public RegExpWidget friend class MultiContainerWidget; public: - DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *parent, + DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *tqparent, const char *name = 0); - TQSize sizeHint() const; + TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return DRAGACCEPTER; } void setDrawLine( bool drawLine ) { _drawLine = drawLine; } diff --git a/kregexpeditor/editorwindow.cpp b/kregexpeditor/editorwindow.cpp index fedd0a9..a7b793e 100644 --- a/kregexpeditor/editorwindow.cpp +++ b/kregexpeditor/editorwindow.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include "images.h" #else @@ -41,8 +41,8 @@ #include "userdefinedregexps.h" #include <tqfileinfo.h> -RegExpEditorWindow::RegExpEditorWindow( TQWidget *parent, const char *name) - : TQWidget(parent, name, Qt::WPaintUnclipped) +RegExpEditorWindow::RegExpEditorWindow( TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name, TQt::WPaintUnclipped) { _top = new ConcWidget(this, this); _layout = new TQHBoxLayout( this); @@ -95,7 +95,7 @@ void RegExpEditorWindow::mousePressEvent ( TQMouseEvent* event ) bool RegExpEditorWindow::pointSelected( TQPoint p ) const { TQRect rect = _top->selectionRect(); - return rect.contains(p); + return rect.tqcontains(p); } void RegExpEditorWindow::mouseMoveEvent ( TQMouseEvent* event ) @@ -121,8 +121,8 @@ void RegExpEditorWindow::mouseMoveEvent ( TQMouseEvent* event ) } else { TQPainter p( this ); - p.setRasterOp( Qt::NotROP ); - p.setPen( Qt::DotLine ); + p.setRasterOp( TQt::NotROP ); + p.setPen( TQt::DotLine ); // remove last selection rectangle if ( ! _lastPoint.isNull() && _undrawSelection ) { @@ -151,8 +151,8 @@ void RegExpEditorWindow::mouseReleaseEvent( TQMouseEvent *event) // remove last selection rectangle TQPainter p( this ); - p.setRasterOp( Qt::NotROP ); - p.setPen( Qt::DotLine ); + p.setRasterOp( TQt::NotROP ); + p.setPen( TQt::DotLine ); if ( ! _lastPoint.isNull() ) { p.drawRect(TQRect(_start, _lastPoint)); } @@ -168,7 +168,7 @@ bool RegExpEditorWindow::selectionOverlap( TQPoint pos, TQSize size ) const { TQRect child(pos, size); - return (_selection.intersects(child) && ! child.contains(_selection)); + return (_selection.intersects(child) && ! child.tqcontains(_selection)); } bool RegExpEditorWindow::hasSelection() const @@ -209,8 +209,8 @@ void RegExpEditorWindow::slotDoSelect() _pasteInAction = false; _insertInAction = false; - // I need to update the cursor recursively, as a repaint may not have been issued yet - // when this method is invoked. This means that when the repaint comes, the cursor may + // I need to update the cursor recursively, as a tqrepaint may not have been issued yet + // when this method is invoked. This means that when the tqrepaint comes, the cursor may // move to an other widget. _top->updateCursorRecursively(); } @@ -236,9 +236,9 @@ void RegExpEditorWindow::updateContent( TQWidget* focusChild) emit contentChanged( p ); } -TQSize RegExpEditorWindow::sizeHint() const +TQSize RegExpEditorWindow::tqsizeHint() const { - return _top->sizeHint(); + return _top->tqsizeHint(); } void RegExpEditorWindow::paintEvent( TQPaintEvent* event ) @@ -289,7 +289,7 @@ void RegExpEditorWindow::cutCopyAux( TQPoint pos ) RegExpWidgetDrag *clipboardData = new RegExpWidgetDrag( regexp, this ); delete regexp; - QClipboard* clipboard = qApp->clipboard(); + TQClipboard* clipboard = tqApp->tqclipboard(); clipboard->setData( clipboardData ); emit anythingOnClipboard( true ); emit canSave( _top->hasAnyChildren() ); @@ -298,7 +298,7 @@ void RegExpEditorWindow::cutCopyAux( TQPoint pos ) void RegExpEditorWindow::slotStartPasteAction() { - TQByteArray data = qApp->clipboard()->data()->encodedData( "KRegExpEditor/widgetdrag" ); + TQByteArray data = tqApp->tqclipboard()->data()->tqencodedData( "KRegExpEditor/widgetdrag" ); TQTextStream stream( data, IO_ReadOnly ); TQString str = stream.read(); @@ -335,7 +335,7 @@ void RegExpEditorWindow::showRMBMenu( bool enableCutCopy ) _menu->setItemEnabled( CUT, enableCutCopy ); _menu->setItemEnabled( COPY, enableCutCopy ); - if ( ! qApp->clipboard()->data()->provides( "KRegExpEditor/widgetdrag" ) ) + if ( ! tqApp->tqclipboard()->data()->provides( "KRegExpEditor/widgetdrag" ) ) _menu->setItemEnabled( PASTE, false ); else _menu->setItemEnabled( PASTE, true ); @@ -369,12 +369,12 @@ void RegExpEditorWindow::slotSave() TQString dir = WidgetWinItem::path(); TQString txt; -#ifdef QT_ONLY - txt = QInputDialog::getText( tr("Name for regexp"), tr("Enter name:") ); +#ifdef TQT_ONLY + txt = TQInputDialog::getText( tr("Name for regexp"), tr("Enter name:") ); if ( txt.isNull() ) return; #else - KLineEditDlg dlg(i18n("Enter name:"), TQString::null, this); + KLineEditDlg dlg(i18n("Enter name:"), TQString(), this); dlg.setCaption(i18n("Name for Regular Expression")); if (!dlg.exec()) return; txt = dlg.text(); @@ -383,14 +383,14 @@ void RegExpEditorWindow::slotSave() TQString fileName = dir + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQFileInfo finfo( fileName ); if ( finfo.exists() ) { - int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").arg(txt), TQString::null, i18n("Overwrite")); + int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").tqarg(txt), TQString(), i18n("Overwrite")); if ( answer != KMessageBox::Continue ) return; } TQFile file( fileName ); if ( ! file.open(IO_WriteOnly) ) { - KMessageBox::sorry( this, i18n("Could not open file for writing: %1").arg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for writing: %1").tqarg(fileName) ); return; } @@ -411,7 +411,7 @@ void RegExpEditorWindow::slotSetRegExp( RegExp* regexp ) { // I have no clue why the following line is necesarry, but if it is not here // then the editor area is messed up when calling slotSetRegExp before starting the eventloop. - qApp->processEvents(); + tqApp->processEvents(); delete _top; RegExpWidget* widget = WidgetFactory::createWidget( regexp, this, this ); @@ -431,7 +431,7 @@ void RegExpEditorWindow::updateCursorUnderPoint() { RegExpWidget* widget = _top->widgetUnderPoint( TQCursor::pos(), false ); if ( widget ) - widget->updateCursorShape(); + widget->updatetqCursorShape(); } void RegExpEditorWindow::emitVerifyRegExp() @@ -442,7 +442,7 @@ void RegExpEditorWindow::emitVerifyRegExp() TQIconSet RegExpEditorWindow::getIcon( const TQString& name ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage( name ) ); return pix; diff --git a/kregexpeditor/editorwindow.h b/kregexpeditor/editorwindow.h index 7eb565e..f1484f1 100644 --- a/kregexpeditor/editorwindow.h +++ b/kregexpeditor/editorwindow.h @@ -43,12 +43,13 @@ class TQHBoxLayout; RegExpEditorWindow which the widget is a child of. They use this pointer to start operations like rubber band selection, cut/paste etc. */ -class RegExpEditorWindow :public QWidget +class RegExpEditorWindow :public TQWidget { Q_OBJECT + TQ_OBJECT public: - RegExpEditorWindow(TQWidget *parent, const char *name = 0); + RegExpEditorWindow(TQWidget *tqparent, const char *name = 0); /** Returns an object which represent the regular expression "drawn" in @@ -109,7 +110,7 @@ public: */ void showRMBMenu( bool enableCutCopy ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: @@ -231,7 +232,7 @@ private: /** This points to the top @ref RegExpWidget in the editor window. */ ConcWidget *_top; - /** This points to the layout manager for the editor window */ + /** This points to the tqlayout manager for the editor window */ TQHBoxLayout* _layout; /** Start point and last point draw. Used when doing rubber band selection */ diff --git a/kregexpeditor/emacsregexpconverter.cpp b/kregexpeditor/emacsregexpconverter.cpp index 7d24454..0d0f6d4 100644 --- a/kregexpeditor/emacsregexpconverter.cpp +++ b/kregexpeditor/emacsregexpconverter.cpp @@ -40,10 +40,10 @@ TQString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection TQString res; bool first = true; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::fromLatin1("\\|"); + res += TQString::tqfromLatin1("\\|"); } first = false; res += toStr( *it, markSelection ); @@ -56,13 +56,13 @@ TQString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection { TQString res; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { TQString startPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit(""); if ( (*it)->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "\\(" ); - endPar = TQString::fromLatin1( "\\)" ); + startPar = TQString::tqfromLatin1( "\\(" ); + endPar = TQString::tqfromLatin1( "\\)" ); } res += startPar + toStr( *it, markSelection ) + endPar; @@ -80,7 +80,7 @@ TQString EmacsRegExpConverter::toString( LookAheadRegExp* /*regexp*/, bool /*mar haveWarned = true; } - return TQString::null; + return TQString(); } TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ ) @@ -112,7 +112,7 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel // Now insert the ranges. TQPtrList<StringPair> ranges = regexp->range(); for ( TQPtrListIterator<StringPair> it(ranges); *it; ++it ) { - txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*it)->second()); } // Ok, its time to build each part of the regexp, here comes the rule: @@ -122,20 +122,20 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel // finally if '^' is one of the characters, then it must not be the first // one! - TQString res = TQString::fromLatin1("["); + TQString res = TQString::tqfromLatin1("["); if ( regexp->negate() ) - res.append(TQString::fromLatin1("^")); + res.append(TQString::tqfromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::fromLatin1("-")); + res.append(TQString::tqfromLatin1("-")); } res += txt; @@ -153,7 +153,7 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel res.append( TQChar( '^' ) ); } - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); return res; } @@ -165,7 +165,7 @@ TQString EmacsRegExpConverter::toString( CompoundRegExp* regexp, bool markSelect TQString EmacsRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::fromLatin1( "." ); + return TQString::tqfromLatin1( "." ); } TQString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) @@ -173,18 +173,18 @@ TQString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSele static bool haveWarned = false; switch ( regexp->position()) { case PositionRegExp::BEGLINE: - return TQString::fromLatin1("^"); + return TQString::tqfromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::fromLatin1("$"); + return TQString::tqfromLatin1("$"); case PositionRegExp::WORDBOUNDARY: case PositionRegExp::NONWORDBOUNDARY: if ( ! haveWarned ) { KMessageBox::sorry( 0, i18n( "Word boundary and non word boundary is not supported in Emacs syntax" ) ); haveWarned = true; - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } } - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) @@ -195,8 +195,8 @@ TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelectio TQString endPar; if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "\\(" ); - endPar = TQString::fromLatin1( "\\)" ); + startPar = TQString::tqfromLatin1( "\\(" ); + endPar = TQString::tqfromLatin1( "\\)" ); } if (regexp->min() == 0 && regexp->max() == -1) { @@ -209,17 +209,17 @@ TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelectio return startPar + cText + endPar + TQString::fromLocal8Bit("+"); } else { - TQString res = TQString::fromLatin1(""); + TQString res = TQString::tqfromLatin1(""); for ( int i = 0; i < regexp->min(); ++i ) { - res += TQString::fromLatin1( "\\(" ) + cText + TQString::fromLatin1( "\\)" ); + res += TQString::tqfromLatin1( "\\(" ) + cText + TQString::tqfromLatin1( "\\)" ); } if ( regexp->max() != -1 ) { for ( int i = regexp->min(); i < regexp->max(); ++i ) { - res += TQString::fromLatin1("\\(") + cText + TQString::fromLatin1("\\)?"); + res += TQString::tqfromLatin1("\\(") + cText + TQString::tqfromLatin1("\\)?"); } } else - res += TQString::fromLatin1("+"); + res += TQString::tqfromLatin1("+"); return res; } @@ -244,7 +244,7 @@ TQString EmacsRegExpConverter::toString( TextRegExp* regexp, bool /*markSelectio TQString EmacsRegExpConverter::name() { - return TQString::fromLatin1( "Emacs" ); + return TQString::tqfromLatin1( "Emacs" ); } int EmacsRegExpConverter::features() diff --git a/kregexpeditor/errormap.cpp b/kregexpeditor/errormap.cpp index ecf2866..41a8c00 100644 --- a/kregexpeditor/errormap.cpp +++ b/kregexpeditor/errormap.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kmessagebox.h> @@ -47,7 +47,7 @@ void ErrorMap::lineStartError() { if ( ! _prevLineStartError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid, due to something preceding a 'line start'."), - i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineStartError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLineStartError") ); } _lineStartError = true; } @@ -56,7 +56,7 @@ void ErrorMap::lineEndError() { if ( !_prevLineEndError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid, due to something following a 'line end'."), - i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineEndError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLineEndError") ); } _lineEndError = true; } @@ -66,7 +66,7 @@ void ErrorMap::lookAheadError() { if ( !_prevLookAHeadError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid. 'Look Ahead' regular expression must be the last sub expression."), - i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLookAHeadError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLookAHeadError") ); } _lookAHeadError = true; } diff --git a/kregexpeditor/gen_qregexplexer.cpp b/kregexpeditor/gen_qregexplexer.cpp index c349dcc..12dade3 100644 --- a/kregexpeditor/gen_qregexplexer.cpp +++ b/kregexpeditor/gen_qregexplexer.cpp @@ -454,7 +454,7 @@ char *yytext; #include <tqstring.h> #include "textrangeregexp.h" #include "gen_qregexpparser.hh" -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #endif void parseRange( char* txt, int* min, int* max ); diff --git a/kregexpeditor/gen_qregexpparser.cc b/kregexpeditor/gen_qregexpparser.cc index 9f8d0a0..8a7b5bf 100644 --- a/kregexpeditor/gen_qregexpparser.cc +++ b/kregexpeditor/gen_qregexpparser.cc @@ -100,7 +100,7 @@ /* Copy the first part of user declarations. */ #line 18 "qregexpparser.y" -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -125,7 +125,7 @@ extern void setParseData( TQString str ); int yyerror (const char *); void setParseResult( RegExp* ); - RegExp* parseQtRegExp( TQString qstr, bool* ok ); + RegExp* parseTQtRegExp( TQString qstr, bool* ok ); static RegExp* parseResult; static int _index; @@ -1049,7 +1049,7 @@ yyreduce: yyval.regexp = new AltnRegExp( false ); dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( yyvsp[-1].regexp ); } - dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) ); + dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); } break; @@ -1057,7 +1057,7 @@ yyreduce: #line 107 "qregexpparser.y" { yyval.regexp = new AltnRegExp( false ); - dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) ); + dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( yyvsp[0].regexp ); } break; @@ -1160,7 +1160,7 @@ yyreduce: case 23: #line 157 "qregexpparser.y" { - TQString match = TQString::fromLocal8Bit("\\%1").arg( yyvsp[0].backRef ); + TQString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( yyvsp[0].backRef ); yyval.regexp = new TextRegExp( false, match ); KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>" "<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to " @@ -1170,7 +1170,7 @@ yyreduce: "just a workaround to ensure that the application handles the regexp at all. " "Therefore, as soon as you edit the regular expression in the graphical area, " "the back reference will be replaced by matching the text <b>%2</b> literally.") - .arg( match ).arg( match ), + .tqarg( match ).tqarg( match ), i18n("Back reference regular expressions not supported"), TQString::fromLocal8Bit("backReferenceNotSupported") ); } @@ -1192,13 +1192,13 @@ yyreduce: if ( yyvsp[0].ch == '{' || yyvsp[0].ch == '}' || yyvsp[0].ch == '[' || yyvsp[0].ch == ']' || yyvsp[0].ch == '\\' ) { yyerror( "illigal character - needs escaping" ); } - yyval.regexp = new TextRegExp( false, TQString::fromLocal8Bit("%1").arg(yyvsp[0].ch)); + yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } break; case 27: #line 182 "qregexpparser.y" - { yyval.regexp = new TextRegExp( false, TQString::fromLocal8Bit("%1").arg(yyvsp[0].ch)); } + { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } break; @@ -1427,7 +1427,7 @@ yyreturn: #line 185 "qregexpparser.y" -RegExp* parseQtRegExp( TQString qstr, bool* ok ) { +RegExp* parseTQtRegExp( TQString qstr, bool* ok ) { _index = 0; parseResult = 0; setParseData( qstr ); diff --git a/kregexpeditor/gen_qregexpparser.hh b/kregexpeditor/gen_qregexpparser.hh index 19b2558..9e75892 100644 --- a/kregexpeditor/gen_qregexpparser.hh +++ b/kregexpeditor/gen_qregexpparser.hh @@ -23,8 +23,8 @@ This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ -#ifndef BISON_GEN_QREGEXPPARSER_HH -# define BISON_GEN_QREGEXPPARSER_HH +#ifndef BISON_GEN_TQREGEXPPARSER_HH +# define BISON_GEN_TQREGEXPPARSER_HH /* Tokens. */ #ifndef YYTOKENTYPE @@ -89,5 +89,5 @@ typedef union { extern YYSTYPE qregexplval; -#endif /* not BISON_GEN_QREGEXPPARSER_HH */ +#endif /* not BISON_GEN_TQREGEXPPARSER_HH */ diff --git a/kregexpeditor/infopage.cpp b/kregexpeditor/infopage.cpp index e467c4b..90ff202 100644 --- a/kregexpeditor/infopage.cpp +++ b/kregexpeditor/infopage.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -24,11 +24,11 @@ #include "infopage.h" -InfoPage::InfoPage( TQWidget* parent, const char* name ) - :KTextBrowser( parent, name ) +InfoPage::InfoPage( TQWidget* tqparent, const char* name ) + :KTextBrowser( tqparent, name ) { TQString txt = - TQString::fromLatin1( "<qt>" ) + + TQString::tqfromLatin1( "<qt>" ) + i18n( "Translators, feel free to add yourself in the text below, asking for a postcard ;-), " "also feel free to add a section saying <h2>Translators</h2>. " "Kind regards, and thanks for your work - Jesper.", @@ -58,14 +58,14 @@ InfoPage::InfoPage( TQWidget* parent, const char* name ) "<h2>Author</h2>" "<a href=\"http://www.blackie.dk/\">Jesper K. Pedersen</a> <<a href=\"mailto:blackie@kde.org\">blackie@kde.org</a>>") - + TQString::fromLatin1( "</qt>" ); + + TQString::tqfromLatin1( "</qt>" ); setText( txt ); } void InfoPage::setSource ( const TQString& name ) { -#ifdef QT_ONLY - mimeSourceFactory()->setFilePath( TQStringList() << TQString::fromLatin1("manual/")); +#ifdef TQT_ONLY + mimeSourceFactory()->setFilePath( TQStringList() << TQString::tqfromLatin1("manual/")); TQString nm = name; if ( nm.endsWith("/") ) nm = nm.left( nm.length()-1); diff --git a/kregexpeditor/infopage.h b/kregexpeditor/infopage.h index cada15d..6367cda 100644 --- a/kregexpeditor/infopage.h +++ b/kregexpeditor/infopage.h @@ -18,7 +18,7 @@ #ifndef infopage_h #define infopage_h -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqtextbrowser.h> #else @@ -28,7 +28,7 @@ class InfoPage :public KTextBrowser { public: - InfoPage( TQWidget* parent, const char* name ); + InfoPage( TQWidget* tqparent, const char* name ); virtual void setSource ( const TQString& name ); }; diff --git a/kregexpeditor/kregexpeditorfactory.cpp b/kregexpeditor/kregexpeditorfactory.cpp index bcddd63..f3d538b 100644 --- a/kregexpeditor/kregexpeditorfactory.cpp +++ b/kregexpeditor/kregexpeditorfactory.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include <kgenericfactory.h> #include "kregexpeditorgui.h" typedef K_TYPELIST_2( KRegExpEditorGUI, KRegExpEditorGUIDialog ) Products; diff --git a/kregexpeditor/kregexpeditorgui.cpp b/kregexpeditor/kregexpeditorgui.cpp index bbf06be..11a0264 100644 --- a/kregexpeditor/kregexpeditorgui.cpp +++ b/kregexpeditor/kregexpeditorgui.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -34,13 +34,13 @@ const TQString KRegExpEditorGUI::version = TQString::fromLocal8Bit("1.0"); -KRegExpEditorGUI::KRegExpEditorGUI(TQWidget *parent, const char *name, +KRegExpEditorGUI::KRegExpEditorGUI(TQWidget *tqparent, const char *name, const TQStringList & ) - : TQWidget( parent, name) + : TQWidget( tqparent, name) { - TQHBoxLayout* layout = new TQHBoxLayout( this, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 6 ); _editor = new KRegExpEditorPrivate( this, "_editor" ); - layout->addWidget( _editor ); + tqlayout->addWidget( _editor ); connect( _editor, TQT_SIGNAL( canUndo(bool) ), this, TQT_SIGNAL( canUndo(bool) ) ); connect( _editor, TQT_SIGNAL( canRedo(bool) ), this, TQT_SIGNAL( canRedo(bool) ) ); connect( _editor, TQT_SIGNAL( changes(bool) ), this, TQT_SIGNAL( changes(bool) ) ); @@ -66,16 +66,16 @@ void KRegExpEditorGUI::setRegExp( const TQString ®exp ) _editor->slotSetRegexp( regexp ); } -KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( TQWidget *parent, +KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( TQWidget *tqparent, const char *name, const TQStringList & ) : KDialogBase( KDialogBase::Plain, i18n("Regular Expression Editor"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok, - parent, name ? name : "KRegExpDialog" ) + tqparent, name ? name : "KRegExpDialog" ) { TQFrame* frame = plainPage(); - TQVBoxLayout* layout = new TQVBoxLayout( frame, 6 ); - layout->setAutoAdd( true ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( frame, 6 ); + tqlayout->setAutoAdd( true ); _editor = new KRegExpEditorGUI( frame ); connect( _editor, TQT_SIGNAL( canUndo(bool) ), this, TQT_SIGNAL( canUndo(bool) ) ); @@ -83,8 +83,8 @@ KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( TQWidget *parent, connect( _editor, TQT_SIGNAL( changes(bool) ), this, TQT_SIGNAL( changes(bool) ) ); resize( 640, 400 ); - setHelp( TQString::null, TQString::fromLocal8Bit( "KRegExpEditor" ) ); -#ifdef QT_ONLY + setHelp( TQString(), TQString::fromLocal8Bit( "KRegExpEditor" ) ); +#ifdef TQT_ONLY connect( this, TQT_SIGNAL( helpClicked() ), _editor, TQT_SLOT( showHelp() ) ); #endif } @@ -117,20 +117,20 @@ void KRegExpEditorGUIDialog::doSomething( TQString method, void* arguments ) void KRegExpEditorGUI::doSomething( TQString method, void* arguments ) { - if ( method == TQString::fromLatin1( "setCaseSensitive" ) ) { + if ( method == TQString::tqfromLatin1( "setCaseSensitive" ) ) { _editor->setCaseSensitive( (bool) arguments ); } - else if ( method == TQString::fromLatin1("setMinimal") ) { + else if ( method == TQString::tqfromLatin1("setMinimal") ) { _editor->setMinimal( (bool) arguments ); } - else if ( method == TQString::fromLatin1("setSyntax") ) { + else if ( method == TQString::tqfromLatin1("setSyntax") ) { _editor->setSyntax( *((TQString*) arguments) ); } - else if ( method == TQString::fromLatin1("setAllowNonQtSyntax") ) { - _editor->setAllowNonQtSyntax( (bool) arguments ); + else if ( method == TQString::tqfromLatin1("setAllowNonTQtSyntax") ) { + _editor->setAllowNonTQtSyntax( (bool) arguments ); } else { - qFatal( "%s", tr("Method '%1' is not valid!").arg(method).latin1() ); + qFatal( "%s", tqtr("Method '%1' is not valid!").tqarg(method).latin1() ); } } @@ -147,14 +147,14 @@ void KRegExpEditorGUI::setMatchText( const TQString& txt ) void KRegExpEditorGUI::showHelp() { -#ifdef QT_ONLY +#ifdef TQT_ONLY _editor->showHelp(); #else - kapp->invokeHelp( TQString::null, TQString::fromLocal8Bit( "KRegExpEditor" ) ); + kapp->invokeHelp( TQString(), TQString::fromLocal8Bit( "KRegExpEditor" ) ); #endif } -#ifndef QT_ONLY +#ifndef TQT_ONLY typedef K_TYPELIST_2( KRegExpEditorGUI, KRegExpEditorGUIDialog ) Products; K_EXPORT_COMPONENT_FACTORY( libkregexpeditorgui, KGenericFactory<Products>( "kregexpeditor" ) ) diff --git a/kregexpeditor/kregexpeditorgui.h b/kregexpeditor/kregexpeditorgui.h index 48545d8..96eb234 100644 --- a/kregexpeditor/kregexpeditorgui.h +++ b/kregexpeditor/kregexpeditorgui.h @@ -18,7 +18,7 @@ #ifndef kregexpeditorgui_h #define kregexpeditorgui_h -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kdialogbase.h> @@ -37,9 +37,10 @@ class KRegExpEditorPrivate; class KDE_EXPORT KRegExpEditorGUI :public TQWidget, public KRegExpEditorInterface { Q_OBJECT - Q_PROPERTY( TQString regexp READ regExp WRITE setRegExp ) + TQ_OBJECT + TQ_PROPERTY( TQString regexp READ regExp WRITE setRegExp ) public: - KRegExpEditorGUI( TQWidget *parent, const char *name = 0, + KRegExpEditorGUI( TQWidget *tqparent, const char *name = 0, const TQStringList & = TQStringList() ); virtual TQString regExp() const; @@ -66,9 +67,10 @@ private: class KDE_EXPORT KRegExpEditorGUIDialog : public KDialogBase, public KRegExpEditorInterface { Q_OBJECT - Q_PROPERTY( TQString regexp READ regExp WRITE setRegExp ) + TQ_OBJECT + TQ_PROPERTY( TQString regexp READ regExp WRITE setRegExp ) public: - KRegExpEditorGUIDialog( TQWidget *parent, const char *name, const TQStringList &args ); + KRegExpEditorGUIDialog( TQWidget *tqparent, const char *name, const TQStringList &args ); virtual TQString regExp() const; diff --git a/kregexpeditor/kregexpeditorprivate.cpp b/kregexpeditor/kregexpeditorprivate.cpp index fad06f9..2150293 100644 --- a/kregexpeditor/kregexpeditorprivate.cpp +++ b/kregexpeditor/kregexpeditorprivate.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -46,15 +46,15 @@ #include "verifybuttons.h" #include <tqwhatsthis.h> -KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) - : TQWidget(parent, name), _updating( false ), _autoVerify( true ) +KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), _updating( false ), _autoVerify( true ) { setMinimumSize(730,300); - TQDockArea* area = new TQDockArea( Horizontal, TQDockArea::Normal, this ); + TQDockArea* area = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this ); area->setMinimumSize(2,2); - TQDockArea* verArea1 = new TQDockArea( Vertical, TQDockArea::Normal, this ); + TQDockArea* verArea1 = new TQDockArea(Qt::Vertical, TQDockArea::Normal, this ); verArea1->setMinimumSize(2,2); - TQDockArea* verArea2 = new TQDockArea( Vertical, TQDockArea::Reverse, this ); + TQDockArea* verArea2 = new TQDockArea(Qt::Vertical, TQDockArea::Reverse, this ); verArea2->setMinimumSize(2,2); // The DockWindows. @@ -67,7 +67,7 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) "you have developed and saved, and regular expressions shipped with the system." )); // Editor window - _editor = new TQSplitter( Vertical, this, "KRegExpEditorPrivate::_editor" ); + _editor = new TQSplitter(Qt::Vertical, this, "KRegExpEditorPrivate::_editor" ); _scrolledEditorWindow = new RegExpScrolledEditorWindow( _editor, "KRegExpEditorPrivate::_scrolledEditorWindow" ); @@ -138,7 +138,7 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) // connect( _verifier, TQT_SIGNAL( countChanged( int ) ), _verifyButtons, TQT_SLOT( setMatchCount( int ) ) ); - // Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match + // TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // connect( _verifyButtons, TQT_SIGNAL( gotoFirst() ), _verifier, TQT_SLOT( gotoFirst() ) ); // connect( _verifyButtons, TQT_SIGNAL( gotoPrev() ), _verifier, TQT_SLOT( gotoPrev() ) ); @@ -154,31 +154,31 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) // Line Edit - TQHBoxLayout* layout = new TQHBoxLayout( topLayout, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout, 6 ); TQLabel* label = new TQLabel( i18n("ASCII syntax:"), this ); - layout->addWidget( label ); + tqlayout->addWidget( label ); clearButton = new TQToolButton( this ); - const TQString icon( TQString::fromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); + const TQString icon( TQString::tqfromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); TQIconSet clearIcon = SmallIconSet( icon ); clearButton->setIconSet( clearIcon ); - layout->addWidget( clearButton ); + tqlayout->addWidget( clearButton ); TQToolTip::add( clearButton, i18n("Clear expression") ); _regexpEdit = new TQLineEdit( this ); - layout->addWidget( _regexpEdit ); + tqlayout->addWidget( _regexpEdit ); TQWhatsThis::add( _regexpEdit, i18n( "This is the regular expression in ASCII syntax. You are likely only " "to be interested in this if you are a programmer, and need to " "develop a regular expression using TQRegExp.<p>" "You may develop your regular expression both by using the graphical " "editor, and by typing the regular expression in this line edit.") ); -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix( "icons/error.png" ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); #endif _error = new TQLabel( this ); _error->setPixmap( pix ); - layout->addWidget( _error ); + tqlayout->addWidget( _error ); _error->hide(); _timer = new TQTimer(this); @@ -196,7 +196,7 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) accel->connectItem( accel->insertItem( CTRL+Key_Z ), this, TQT_SLOT( slotUndo() ) ); accel->connectItem( accel->insertItem( CTRL+Key_R ), this, TQT_SLOT( slotRedo() ) ); - setSyntax( TQString::fromLatin1( "Qt" ) ); + setSyntax( TQString::tqfromLatin1( "TQt" ) ); } TQString KRegExpEditorPrivate::regexp() @@ -371,7 +371,7 @@ void KRegExpEditorPrivate::setVerifyText( const TQString& fileName ) _autoVerify = false; TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").arg( fileName ) ); + KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").tqarg( fileName ) ); } else { TQTextStream s( &file ); @@ -401,11 +401,11 @@ void KRegExpEditorPrivate::setSyntax( const TQString& syntax ) RegExpConverter::setCurrent( converter ); if ( converter->canParse() ) { _regexpEdit->setReadOnly( false ); - _regexpEdit->setBackgroundMode( Qt::PaletteBase ); + _regexpEdit->setBackgroundMode( TQt::PaletteBase ); } else { _regexpEdit->setReadOnly( true ); - _regexpEdit->setBackgroundMode( Qt::PaletteBackground ); + _regexpEdit->setBackgroundMode( TQt::PaletteBackground ); } _regExpButtons->setFeatures( converter->features() ); _verifier->setHighlighter( converter->highlighter(_verifier) ); @@ -418,7 +418,7 @@ void KRegExpEditorPrivate::showHelp() _editor->hide(); } -void KRegExpEditorPrivate::setAllowNonQtSyntax( bool b ) +void KRegExpEditorPrivate::setAllowNonTQtSyntax( bool b ) { - _verifyButtons->setAllowNonQtSyntax( b ); + _verifyButtons->setAllowNonTQtSyntax( b ); } diff --git a/kregexpeditor/kregexpeditorprivate.h b/kregexpeditor/kregexpeditorprivate.h index 369334e..effbdd7 100644 --- a/kregexpeditor/kregexpeditorprivate.h +++ b/kregexpeditor/kregexpeditorprivate.h @@ -43,16 +43,17 @@ class TQToolButton; @author Jesper K. Pedersen <blackie@kde.org> @version 0.1 **/ -class KRegExpEditorPrivate :public QWidget +class KRegExpEditorPrivate :public TQWidget { Q_OBJECT + TQ_OBJECT public: - KRegExpEditorPrivate( TQWidget *parent, const char *name = 0 ); + KRegExpEditorPrivate( TQWidget *tqparent, const char *name = 0 ); TQString regexp(); void setMinimal( bool ); void setCaseSensitive( bool ); - void setAllowNonQtSyntax( bool ); + void setAllowNonTQtSyntax( bool ); protected slots: void slotUpdateEditor( const TQString & ); diff --git a/kregexpeditor/limitedcharlineedit.cpp b/kregexpeditor/limitedcharlineedit.cpp index 6322016..7137b5e 100644 --- a/kregexpeditor/limitedcharlineedit.cpp +++ b/kregexpeditor/limitedcharlineedit.cpp @@ -22,11 +22,11 @@ @internal A Validator for the @ref LimitedCharLineEdit */ -class Validator :public QValidator +class Validator :public TQValidator { public: - Validator( LimitedCharLineEdit::Mode mode, TQWidget* parent ) - :TQValidator( parent, "Validator" ), _mode(mode) + Validator( LimitedCharLineEdit::Mode mode, TQWidget* tqparent ) + :TQValidator( TQT_TQOBJECT(tqparent), "Validator" ), _mode(mode) { } @@ -56,8 +56,8 @@ void LimitedCharLineEdit::keyPressEvent ( TQKeyEvent *event ) focusNextPrevChild(true); } -LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* parent, const char* name ) - :TQLineEdit( parent, name ), _mode(mode) +LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* tqparent, const char* name ) + :TQLineEdit( tqparent, name ), _mode(mode) { if ( mode == NORMAL ) _count = 1; @@ -67,7 +67,7 @@ LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* parent, const cha _count = 4; setMaxLength( _count ); - setFixedSize( fontMetrics().width('A')*5+5, sizeHint().height()); + setFixedSize( fontMetrics().width('A')*5+5, tqsizeHint().height()); setValidator( new Validator( mode, this ) ); } diff --git a/kregexpeditor/limitedcharlineedit.h b/kregexpeditor/limitedcharlineedit.h index 13026cc..4b76250 100644 --- a/kregexpeditor/limitedcharlineedit.h +++ b/kregexpeditor/limitedcharlineedit.h @@ -24,12 +24,12 @@ TQLineEdit which only accepts a prespecified number of character. @internal */ -class LimitedCharLineEdit :public QLineEdit +class LimitedCharLineEdit :public TQLineEdit { public: enum Mode { NORMAL = 0, HEX = 1, OCT = 2 }; - LimitedCharLineEdit(Mode mode, TQWidget* parent, const char *name = 0); + LimitedCharLineEdit(Mode mode, TQWidget* tqparent, const char *name = 0); protected: virtual void keyPressEvent ( TQKeyEvent * ); diff --git a/kregexpeditor/lookaheadwidget.cpp b/kregexpeditor/lookaheadwidget.cpp index aa9f873..95e9c5c 100644 --- a/kregexpeditor/lookaheadwidget.cpp +++ b/kregexpeditor/lookaheadwidget.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -28,16 +28,16 @@ #include "concwidget.h" #include <tqpainter.h> -LookAheadWidget::LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* parent, const char* name ) - :SingleContainerWidget(editorWindow, parent, name ? name : "LookAheadWidget" ), _tp(tp) +LookAheadWidget::LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* tqparent, const char* name ) + :SingleContainerWidget(editorWindow, tqparent, name ? name : "LookAheadWidget" ), _tp(tp) { _child = new ConcWidget( editorWindow, this ); init(); } LookAheadWidget::LookAheadWidget( LookAheadRegExp* regexp, RegExpEditorWindow* editorWindow, RegExpType tp, - TQWidget* parent, const char* name ) - :SingleContainerWidget( editorWindow, parent, name ? name : "LookAheadWidget" ), _tp(tp) + TQWidget* tqparent, const char* name ) + :SingleContainerWidget( editorWindow, tqparent, name ? name : "LookAheadWidget" ), _tp(tp) { RegExpWidget* child = WidgetFactory::createWidget( regexp->child(), editorWindow, this ); if ( ! (_child = dynamic_cast<ConcWidget*>( child ) ) ) @@ -60,23 +60,23 @@ RegExp* LookAheadWidget::regExp() const _child->regExp() ); } -TQSize LookAheadWidget::sizeHint() const +TQSize LookAheadWidget::tqsizeHint() const { - // TODO: Merge with RepeatWidget::sizeHint + // TODO: Merge with RepeatWidget::tqsizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _text ); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw; - int width = 2 * pw + QMAX(_childSize.width(), 4*bdSize + _textSize.width()); + int width = 2 * pw + TQMAX(_childSize.width(), 4*bdSize + _textSize.width()); return TQSize(width,height); } void LookAheadWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with RepeatWidget::paintEvent - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); diff --git a/kregexpeditor/lookaheadwidget.h b/kregexpeditor/lookaheadwidget.h index 022e419..e5825b8 100644 --- a/kregexpeditor/lookaheadwidget.h +++ b/kregexpeditor/lookaheadwidget.h @@ -24,14 +24,15 @@ class LookAheadRegExp; class LookAheadWidget :public SingleContainerWidget { Q_OBJECT + TQ_OBJECT public: - LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* parent, const char* name = 0 ); + LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* tqparent, const char* name = 0 ); LookAheadWidget( LookAheadRegExp* regexp, RegExpEditorWindow* editorWindow, RegExpType tp, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); virtual RegExp* regExp() const; virtual RegExpType type() const { return _tp; } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); diff --git a/kregexpeditor/main.cpp b/kregexpeditor/main.cpp index 04fd3a3..58c569d 100644 --- a/kregexpeditor/main.cpp +++ b/kregexpeditor/main.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqapplication.h> #else @@ -32,7 +32,7 @@ int main( int argc, char* argv[] ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQApplication myapp( argc, argv ); #else KAboutData aboutData( "kregexpeditor", I18N_NOOP("RegExp Editor"), @@ -47,7 +47,7 @@ int main( int argc, char* argv[] ) TQVBoxLayout* lay = new TQVBoxLayout( top, 6 ); KRegExpEditorGUI* iface = new KRegExpEditorGUI( top, "_editor", TQStringList() ); - iface->doSomething( TQString::fromLatin1("setAllowNonQtSyntax"), (bool*) true ); + iface->doSomething( TQString::tqfromLatin1("setAllowNonTQtSyntax"), (bool*) true ); lay->addWidget( iface ); TQHBoxLayout* lay2 = new TQHBoxLayout( lay, 6 ); @@ -59,10 +59,10 @@ int main( int argc, char* argv[] ) lay2->addWidget( quit ); TQObject::connect( help, TQT_SIGNAL( clicked() ), iface, TQT_SLOT( showHelp() ) ); - TQObject::connect( quit, TQT_SIGNAL( clicked() ), qApp, TQT_SLOT( quit() ) ); + TQObject::connect( quit, TQT_SIGNAL( clicked() ), tqApp, TQT_SLOT( quit() ) ); top->show(); - TQObject::connect( qApp, TQT_SIGNAL( lastWindowClosed() ), qApp, TQT_SLOT( quit() ) ); + TQObject::connect( tqApp, TQT_SIGNAL( lastWindowClosed() ), tqApp, TQT_SLOT( quit() ) ); myapp.exec(); } diff --git a/kregexpeditor/multicontainerwidget.cpp b/kregexpeditor/multicontainerwidget.cpp index cf4403a..e493b86 100644 --- a/kregexpeditor/multicontainerwidget.cpp +++ b/kregexpeditor/multicontainerwidget.cpp @@ -19,16 +19,16 @@ #include "dragaccepter.h" MultiContainerWidget::MultiContainerWidget( RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name) - :RegExpWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name) + :RegExpWidget( editorWindow, tqparent, name ) { } void MultiContainerWidget::append( RegExpWidget* child ) { child->reparent( this, TQPoint(0,0), false ); - _children.append( child ); - _children.append( new DragAccepter( _editorWindow, this ) ); + _tqchildren.append( child ); + _tqchildren.append( new DragAccepter( _editorWindow, this ) ); } bool MultiContainerWidget::hasSelection() const @@ -36,7 +36,7 @@ bool MultiContainerWidget::hasSelection() const if ( _isSelected ) return true; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Move past the first dragAccepter for ( ; *it; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -49,8 +49,8 @@ bool MultiContainerWidget::hasSelection() const void MultiContainerWidget::clearSelection() { _isSelected = false; - for ( unsigned int i = 0; i< _children.count(); i++ ) { - _children.at(i)->clearSelection(); + for ( unsigned int i = 0; i< _tqchildren.count(); i++ ) { + _tqchildren.at(i)->clearSelection(); } } @@ -58,15 +58,15 @@ void MultiContainerWidget::clearSelection() void MultiContainerWidget::deleteSelection() { // run from the back to the front (which we do since we delete items on the run) - // When deleting children, delete the drag accepter to its right. - for ( int i = (int) _children.count()-2; i > 0; i -=2 ) { + // When deleting tqchildren, delete the drag accepter to its right. + for ( int i = (int) _tqchildren.count()-2; i > 0; i -=2 ) { - RegExpWidget* child = _children.at( i ); + RegExpWidget* child = _tqchildren.at( i ); if ( child->isSelected() ) { - delete _children.at( i+1 ); - _children.remove( i+1 ); + delete _tqchildren.at( i+1 ); + _tqchildren.remove( i+1 ); delete child; - _children.remove(i); + _tqchildren.remove(i); } else if ( child->hasSelection() ) { child->deleteSelection(); @@ -78,16 +78,16 @@ void MultiContainerWidget::deleteSelection() void MultiContainerWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child) { - for ( unsigned int i=0; i<_children.count(); i+= 2 ) { - RegExpWidget *ch = _children.at( i ); + for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { + RegExpWidget *ch = _tqchildren.at( i ); if ( ch == accepter ) { // Insert the new child - _children.insert( i+1, child ); + _tqchildren.insert( i+1, child ); // Insert an accepter as the next element. DragAccepter *accepter = new DragAccepter( _editorWindow, this ); - _children.insert( i+2, accepter ); + _tqchildren.insert( i+2, accepter ); // These two show's must come here otherwise a paintevent // will be invoked, where the invariant, that a accepter is located at @@ -103,25 +103,25 @@ void MultiContainerWidget::addNewChild(DragAccepter *accepter, RegExpWidget *chi qFatal("Accepter not found in list"); } -bool MultiContainerWidget::updateSelection(bool parentSelected) +bool MultiContainerWidget::updateSelection(bool tqparentSelected) { bool changed = false; bool isSel = _isSelected; - TQMemArray<bool> oldState(_children.count()); - TQMemArray<bool> newState(_children.count()); + TQMemArray<bool> oldState(_tqchildren.count()); + TQMemArray<bool> newState(_tqchildren.count()); - for (int i = 0; i< (int)_children.count();i++) { - oldState[i] = _children.at(i)->isSelected(); + for (int i = 0; i< (int)_tqchildren.count();i++) { + oldState[i] = _tqchildren.at(i)->isSelected(); } - RegExpWidget::updateSelection( parentSelected ); + RegExpWidget::updateSelection( tqparentSelected ); int first; int last; // scan for the first selected item. - for (first = 1; first < (int) _children.count(); first+= 2 ) { - RegExpWidget* child = _children.at(first); + for (first = 1; first < (int) _tqchildren.count(); first+= 2 ) { + RegExpWidget* child = _tqchildren.at(first); changed = child->updateSelection( _isSelected ) || changed; newState[first] = child->isSelected(); if ( child->isSelected() ) @@ -129,8 +129,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) } // scan for the last selected item - for (last = _children.count()-2; last>first; last -= 2) { - RegExpWidget* child = _children.at(last); + for (last = _tqchildren.count()-2; last>first; last -= 2) { + RegExpWidget* child = _tqchildren.at(last); changed = child->updateSelection( _isSelected ) || changed; newState[last] = child->isSelected(); if ( child->isSelected() ) @@ -139,18 +139,18 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) // everything between first and last must be selected. for (int j = first+2; j<last; j+=2) { - RegExpWidget* child = _children.at(j); + RegExpWidget* child = _tqchildren.at(j); changed = child->updateSelection( true ) || changed; newState[j] = true; } // update drag accepters. - for (int k = 0; k< (int) _children.count(); k+=2) { - RegExpWidget* child = _children.at(k); + for (int k = 0; k< (int) _tqchildren.count(); k+=2) { + RegExpWidget* child = _tqchildren.at(k); bool select; - if ( k == 0 || k == (int)_children.count()-1) { - // The elements at the border is only selected if the parent is selected. + if ( k == 0 || k == (int)_tqchildren.count()-1) { + // The elements at the border is only selected if the tqparent is selected. select = _isSelected; } else { @@ -164,12 +164,12 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) if (accepter) accepter->_isSelected = select; if ( select != isChildSel ) - child->repaint(); + child->tqrepaint(); } changed = changed || isSel != _isSelected; if ( changed ) { - repaint(); + tqrepaint(); } return changed; @@ -183,7 +183,7 @@ TQRect MultiContainerWidget::selectionRect() const return TQRect( mapToGlobal( TQPoint(0,0) ), size() ); else { TQRect res; - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); ++it; // Move past the first dragAccepter for ( ; *it; it +=2 ) { if ( (*it)->hasSelection() ) { @@ -192,10 +192,10 @@ TQRect MultiContainerWidget::selectionRect() const res = childSel; else { TQRect newRes; - newRes.setLeft( QMIN( res.left(), childSel.left() ) ); - newRes.setTop( QMIN( res.top(), childSel.top() ) ); - newRes.setRight( QMAX( res.right(), childSel.right() ) ); - newRes.setBottom( QMAX( res.bottom(), childSel.bottom() ) ); + newRes.setLeft( TQMIN( res.left(), childSel.left() ) ); + newRes.setTop( TQMIN( res.top(), childSel.top() ) ); + newRes.setRight( TQMAX( res.right(), childSel.right() ) ); + newRes.setBottom( TQMAX( res.bottom(), childSel.bottom() ) ); res = newRes; } } @@ -216,8 +216,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju incr = 1; } - for ( unsigned int i = start; i < _children.count(); i+=incr ) { - RegExpWidget* wid = _children.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); + for ( unsigned int i = start; i < _tqchildren.count(); i+=incr ) { + RegExpWidget* wid = _tqchildren.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); if ( wid ) return wid; } @@ -230,8 +230,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos ) { - for ( unsigned int i = 1; i < _children.count(); i+=2 ) { - RegExpWidget* wid = _children.at(i)->findWidgetToEdit( globalPos ); + for ( unsigned int i = 1; i < _tqchildren.count(); i+=2 ) { + RegExpWidget* wid = _tqchildren.at(i)->findWidgetToEdit( globalPos ); if ( wid ) return wid; } @@ -241,7 +241,7 @@ RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos ) void MultiContainerWidget::selectWidget( bool sel ) { RegExpWidget::selectWidget( sel ); - TQPtrListIterator<RegExpWidget> it(_children); + TQPtrListIterator<RegExpWidget> it(_tqchildren); for ( ; *it ; ++it ) { (*it)->selectWidget( sel ); } @@ -250,7 +250,7 @@ void MultiContainerWidget::selectWidget( bool sel ) void MultiContainerWidget::updateAll() { - for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) { + for ( TQPtrListIterator<RegExpWidget> it(_tqchildren); *it ; ++it ) { (*it)->updateAll(); } RegExpWidget::updateAll(); @@ -258,8 +258,8 @@ void MultiContainerWidget::updateAll() void MultiContainerWidget::updateCursorRecursively() { - for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) { + for ( TQPtrListIterator<RegExpWidget> it(_tqchildren); *it ; ++it ) { (*it)->updateCursorRecursively(); } - updateCursorShape(); + updatetqCursorShape(); } diff --git a/kregexpeditor/multicontainerwidget.h b/kregexpeditor/multicontainerwidget.h index 4dd6a58..9cd9eaa 100644 --- a/kregexpeditor/multicontainerwidget.h +++ b/kregexpeditor/multicontainerwidget.h @@ -21,19 +21,19 @@ #include "regexpwidget.h" /** - Abstract RegExp widget class representing widgets having multible children. + Abstract RegExp widget class representing widgets having multible tqchildren. @internal */ class MultiContainerWidget :public RegExpWidget { public: - MultiContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* parent = 0, + MultiContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* tqparent = 0, const char* name = 0); virtual bool hasSelection() const; virtual void clearSelection(); virtual void deleteSelection(); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); - virtual bool updateSelection(bool parentSelected); + virtual bool updateSelection(bool tqparentSelected); virtual TQRect selectionRect() const; virtual RegExpWidget* widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets ); virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); @@ -43,7 +43,7 @@ public: protected: void append( RegExpWidget* child ); - TQPtrList<RegExpWidget> _children; + TQPtrList<RegExpWidget> _tqchildren; }; diff --git a/kregexpeditor/myfontmetrics.cpp b/kregexpeditor/myfontmetrics.cpp index f405c69..38eb7dd 100644 --- a/kregexpeditor/myfontmetrics.cpp +++ b/kregexpeditor/myfontmetrics.cpp @@ -19,12 +19,12 @@ TQSize HackCalculateFontSize(TQFontMetrics fm, TQString str ) { - TQStringList list = TQStringList::split( TQString::fromLatin1("\n"), str ); + TQStringList list = TQStringList::split( TQString::tqfromLatin1("\n"), str ); int maxWidth = 0; int height = 0; for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { TQSize size = fm.size( 0, *it ); - maxWidth = QMAX( maxWidth, size.width() ); + maxWidth = TQMAX( maxWidth, size.width() ); height += size.height(); } return TQSize( maxWidth, height ); diff --git a/kregexpeditor/qregexpparser.y b/kregexpeditor/qregexpparser.y index 0faaf98..6e9dc5e 100644 --- a/kregexpeditor/qregexpparser.y +++ b/kregexpeditor/qregexpparser.y @@ -102,11 +102,11 @@ expression : expression TOK_Bar term { $<regexp>$ = new AltnRegExp( false ); dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( $<regexp>1 ); } - dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) ); + dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); } | TOK_Bar term { $<regexp>$ = new AltnRegExp( false ); - dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) ); + dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); dynamic_cast<AltnRegExp*>( $<regexp>$ )->addRegExp( $<regexp>2 ); } | TOK_Bar { $<regexp>$ = new AltnRegExp( false ); } @@ -155,7 +155,7 @@ atom : TOK_LeftParen expression TOK_RightParent { | TOK_Carat { $<regexp>$ = new PositionRegExp( false, PositionRegExp::BEGLINE ); } | TOK_Dot { $<regexp>$ = new DotRegExp( false ); } | TOK_BackRef { - QString match = QString::fromLocal8Bit("\\%1").arg( $<backRef>1 ); + QString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( $<backRef>1 ); $<regexp>$ = new TextRegExp( false, match ); KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>" "<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to " @@ -165,7 +165,7 @@ atom : TOK_LeftParen expression TOK_RightParent { "just a workaround to ensure that the application handles the regexp at all. " "Therefore, as soon as you edit the regular expression in the graphical area, " "the back reference will be replaced by matching the text <b>%2</b> literally.") - .arg( match ).arg( match ), + .tqarg( match ).tqarg( match ), i18n("Back reference regular expressions not supported"), QString::fromLocal8Bit("backReferenceNotSupported") ); } @@ -177,9 +177,9 @@ char : TOK_Char { if ( $<ch>1 == '{' || $<ch>1 == '}' || $<ch>1 == '[' || $<ch>1 == ']' || $<ch>1 == '\\' ) { yyerror( "illigal character - needs escaping" ); } - $<regexp>$ = new TextRegExp( false, QString::fromLocal8Bit("%1").arg($<ch>1)); + $<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($<ch>1)); } - | TOK_EscapeChar { $<regexp>$ = new TextRegExp( false, QString::fromLocal8Bit("%1").arg($<ch>1)); } + | TOK_EscapeChar { $<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($<ch>1)); } ; %% diff --git a/kregexpeditor/qt-only/clean b/kregexpeditor/qt-only/clean index 57e9a6d..c594401 100755 --- a/kregexpeditor/qt-only/clean +++ b/kregexpeditor/qt-only/clean @@ -5,8 +5,8 @@ rm -rf manual rm -rf predefined rm -rf icons rm unistd.h -find -lname \* -maxdepth 1 | xargs rm -rm moc_* +tqfind -lname \* -maxdepth 1 | xargs rm +rm tqmoc_* rm images.h rm gen_* rm -rf kregexpeditor* diff --git a/kregexpeditor/qt-only/compat.cpp b/kregexpeditor/qt-only/compat.cpp index a7a5d12..528099e 100644 --- a/kregexpeditor/qt-only/compat.cpp +++ b/kregexpeditor/qt-only/compat.cpp @@ -27,16 +27,16 @@ TQString i18n( const TQString& a, const TQString& b) { } KDialogBase::KDialogBase( int /*dialogFace*/, const TQString &caption, int buttonMask, - ButtonCode defaultButton, TQWidget *parent, const char *name, + ButtonCode defaultButton, TQWidget *tqparent, const char *name, bool modal ) - :TQDialog( parent, name, modal ) + :TQDialog( tqparent, name, modal ) { init( buttonMask, defaultButton, caption ); } -KDialogBase::KDialogBase( TQWidget* parent, const char* name, bool modal, +KDialogBase::KDialogBase( TQWidget* tqparent, const char* name, bool modal, const TQString& caption, int buttonMask ) - : TQDialog( parent, name, modal ) + : TQDialog( tqparent, name, modal ) { init( buttonMask, Ok, caption ); } @@ -92,24 +92,24 @@ void KDialogBase::slotCancel() emit finished(); } -int KMessageBox::warningYesNo(TQWidget *parent, const TQString &text, const TQString &caption ) +int KMessageBox::warningYesNo(TQWidget *tqparent, const TQString &text, const TQString &caption ) { - int code = warning( parent, caption, text, tr("No"), tr("Yes") ); + int code = warning( tqparent, caption, text, tr("No"), tr("Yes") ); if ( code == 0 ) return Yes; else return No; } -int KMessageBox::information( TQWidget* parent, const TQString& text, const TQString& caption, +int KMessageBox::information( TQWidget* tqparent, const TQString& text, const TQString& caption, const TQString& /*dontShowAgainName*/ ) { - return TQMessageBox::information( parent, caption, text ); + return TQMessageBox::information( tqparent, caption, text ); } -int KMessageBox::sorry( TQWidget* parent, const TQString& text, const TQString& caption ) +int KMessageBox::sorry( TQWidget* tqparent, const TQString& text, const TQString& caption ) { - return TQMessageBox::information( parent, caption, text ); + return TQMessageBox::information( tqparent, caption, text ); } diff --git a/kregexpeditor/qt-only/compat.h b/kregexpeditor/qt-only/compat.h index 5afa317..f09cbbf 100644 --- a/kregexpeditor/qt-only/compat.h +++ b/kregexpeditor/qt-only/compat.h @@ -29,14 +29,15 @@ TQString i18n( const TQString& a); TQString i18n( const TQString& a, const TQString& b); #define isatty(x) 0 -#define KTextBrowser QTextBrowser -#define KListBox QListBox -#define KFileDialog QFileDialog -#define KPushButton QPushButton +#define KTextBrowser TQTextBrowser +#define KListBox TQListBox +#define KFileDialog TQFileDialog +#define KPushButton TQPushButton -class KDialogBase :public QDialog +class KDialogBase :public TQDialog { Q_OBJECT + TQ_OBJECT public: enum ButtonCode {Ok = 1, Cancel, Help}; @@ -44,10 +45,10 @@ public: KDialogBase ( int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - TQWidget *parent=0, const char *name=0, bool modal=true ); + TQWidget *tqparent=0, const char *name=0, bool modal=true ); - KDialogBase( TQWidget* parent, const char* name = 0, bool modal = true, - const TQString& caption = TQString::null, + KDialogBase( TQWidget* tqparent, const char* name = 0, bool modal = true, + const TQString& caption = TQString(), int buttonMask = 0 ); void init( int buttonMask, ButtonCode /*defaultButton*/, const TQString& caption ); @@ -69,16 +70,17 @@ private: TQVBoxLayout* _layout; }; -class KMessageBox :public QMessageBox +class KMessageBox :public TQMessageBox { Q_OBJECT + TQ_OBJECT public: enum ButtonCode { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 }; - static int warningYesNo (TQWidget *parent, const TQString &text, - const TQString &caption = TQString::null ); - static int information( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null, - const TQString& /*dontShowAgainName*/ = TQString::null ); - static int sorry( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null ); + static int warningYesNo (TQWidget *tqparent, const TQString &text, + const TQString &caption = TQString() ); + static int information( TQWidget* tqparent, const TQString& text, const TQString& caption = TQString(), + const TQString& /*dontShowAgainName*/ = TQString() ); + static int sorry( TQWidget* tqparent, const TQString& text, const TQString& caption = TQString() ); }; #endif /* COMPAT_H */ diff --git a/kregexpeditor/qtregexpconverter.cpp b/kregexpeditor/qtregexpconverter.cpp index 6098097..72f9290 100644 --- a/kregexpeditor/qtregexpconverter.cpp +++ b/kregexpeditor/qtregexpconverter.cpp @@ -29,33 +29,33 @@ #include "positionregexp.h" #include "repeatregexp.h" -extern RegExp* parseQtRegExp( TQString str, bool *ok ); -extern RegExp* parseDataQtRegExp(); +extern RegExp* parseTQtRegExp( TQString str, bool *ok ); +extern RegExp* parseDataTQtRegExp(); -bool QtRegExpConverter::canParse() +bool TQtRegExpConverter::canParse() { return true; } -RegExp* QtRegExpConverter::parse( const TQString& txt, bool* ok ) +RegExp* TQtRegExpConverter::parse( const TQString& txt, bool* ok ) { - return parseQtRegExp( txt, ok ); + return parseTQtRegExp( txt, ok ); } -TQString QtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection ) +TQString TQtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection ) { TQString res; bool first = true; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::fromLatin1( "|" ); + res += TQString::tqfromLatin1( "|" ); } first = false; if ( markSelection && !regexp->isSelected() && (*it)->isSelected() ) { - res += TQString::fromLatin1("(") + toStr( *it, markSelection ) + TQString::fromLatin1(")"); + res += TQString::tqfromLatin1("(") + toStr( *it, markSelection ) + TQString::tqfromLatin1(")"); } else { res += toStr( *it, markSelection ); @@ -64,12 +64,12 @@ TQString QtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection ) return res; } -TQString QtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) +TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) { TQString res; bool childSelected = false; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { TQString startPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit(""); @@ -77,38 +77,38 @@ TQString QtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) if ( markSelection ) startPar = TQString::fromLocal8Bit("(?:"); else - startPar = TQString::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } // Note these two have different tests! They are activated in each their iteration of the loop. if ( markSelection && !childSelected && !regexp->isSelected() && (*it)->isSelected() ) { - res += TQString::fromLatin1("("); + res += TQString::tqfromLatin1("("); childSelected = true; } if ( markSelection && childSelected && !regexp->isSelected() && !(*it)->isSelected() ) { - res += TQString::fromLatin1(")"); + res += TQString::tqfromLatin1(")"); childSelected= false; } res += startPar + toStr( *it, markSelection ) + endPar; } if ( markSelection && childSelected && !regexp->isSelected() ) { - res += TQString::fromLatin1(")"); + res += TQString::tqfromLatin1(")"); } return res; } -TQString QtRegExpConverter::toString( LookAheadRegExp* regexp, bool markSelection ) +TQString TQtRegExpConverter::toString( LookAheadRegExp* regexp, bool markSelection ) { if ( regexp->lookAheadType() == LookAheadRegExp::POSITIVE ) - return TQString::fromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::tqfromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); else - return TQString::fromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::tqfromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); } -TQString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ ) +TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ ) { TQString txt; @@ -137,7 +137,7 @@ TQString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelect // Now insert the ranges. TQPtrList<StringPair> ranges = regexp->range(); for ( TQPtrListIterator<StringPair> it(ranges); *it; ++it ) { - txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*it)->second()); } // Ok, its time to build each part of the regexp, here comes the rule: @@ -147,20 +147,20 @@ TQString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelect // finally if '^' is one of the characters, then it must not be the first // one! - TQString res = TQString::fromLatin1("["); + TQString res = TQString::tqfromLatin1("["); if ( regexp->negate() ) - res.append(TQString::fromLatin1("^")); + res.append(TQString::tqfromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::fromLatin1("-")); + res.append(TQString::tqfromLatin1("-")); } res += txt; @@ -184,41 +184,41 @@ TQString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelect res.append( TQChar( '^' ) ); } - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); return res; } -TQString QtRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection ) +TQString TQtRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection ) { if ( markSelection && !regexp->isSelected() && regexp->child()->isSelected() ) - return TQString::fromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::fromLatin1( ")" ); + return TQString::tqfromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::tqfromLatin1( ")" ); else return toStr( regexp->child(), markSelection ); } -TQString QtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) +TQString TQtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::fromLatin1( "." ); + return TQString::tqfromLatin1( "." ); } -TQString QtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) +TQString TQtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) { switch (regexp->position()) { case PositionRegExp::BEGLINE: - return TQString::fromLatin1("^"); + return TQString::tqfromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::fromLatin1("$"); + return TQString::tqfromLatin1("$"); case PositionRegExp::WORDBOUNDARY: - return TQString::fromLatin1("\\b"); + return TQString::tqfromLatin1("\\b"); case PositionRegExp::NONWORDBOUNDARY: - return TQString::fromLatin1("\\B"); + return TQString::tqfromLatin1("\\B"); } Q_ASSERT( false ); - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } -TQString QtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) +TQString TQtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) { RegExp* child = regexp->child(); TQString cText = toStr( child, markSelection ); @@ -227,17 +227,17 @@ TQString QtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) if ( markSelection ) { if ( !regexp->isSelected() && child->isSelected()) { - startPar = TQString::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "(?:" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(?:" ); + endPar = TQString::tqfromLatin1( ")" ); } } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } if ( regexp->min() == 0 && regexp->max() == -1) { @@ -261,7 +261,7 @@ TQString QtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) } } -TQString QtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ ) +TQString TQtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ ) { TQValueList<TQChar> list; list << TQChar('$') @@ -283,17 +283,17 @@ TQString QtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ return res; } -TQString QtRegExpConverter::name() +TQString TQtRegExpConverter::name() { - return TQString::fromLatin1( "Qt" ); + return TQString::tqfromLatin1( "TQt" ); } -int QtRegExpConverter::features() +int TQtRegExpConverter::features() { return WordBoundary | NonWordBoundary | PosLookAhead | NegLookAhead | CharacterRangeNonItems | ExtRange; } -RegexpHighlighter* QtRegExpConverter::highlighter( TQTextEdit* edit ) +RegexpHighlighter* TQtRegExpConverter::highlighter( TQTextEdit* edit ) { return new QtRegexpHighlighter( edit ); } diff --git a/kregexpeditor/qtregexpconverter.h b/kregexpeditor/qtregexpconverter.h index d00120c..1c48bb8 100644 --- a/kregexpeditor/qtregexpconverter.h +++ b/kregexpeditor/qtregexpconverter.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef QTREGEXPCONVERTER_H -#define QTREGEXPCONVERTER_H +#ifndef TQTREGEXPCONVERTER_H +#define TQTREGEXPCONVERTER_H #include "regexpconverter.h" -class QtRegExpConverter :public RegExpConverter +class TQtRegExpConverter :public RegExpConverter { public: virtual bool canParse(); @@ -39,5 +39,5 @@ public: RegexpHighlighter* highlighter( TQTextEdit* edit ); }; -#endif /* QTREGEXPCONVERTER_H */ +#endif /* TQTREGEXPCONVERTER_H */ diff --git a/kregexpeditor/qtregexphighlighter.cpp b/kregexpeditor/qtregexphighlighter.cpp index fdf3a81..431797f 100644 --- a/kregexpeditor/qtregexphighlighter.cpp +++ b/kregexpeditor/qtregexphighlighter.cpp @@ -28,14 +28,14 @@ int QtRegexpHighlighter::highlightParagraph( const TQString & text, int endState regexp.setCaseSensitive( _caseSensitive ); regexp.setMinimal( _minimal ); - setFormat( 0, text.length(), _editor->font(), Qt::black ); + setFormat( 0, text.length(), _editor->font(), TQt::black ); if ( !regexp.isValid() || regexp.isEmpty() ) { return 0; } // ------------------------------ Process with the regular expression. - TQColor colors[] = { Qt::red, Qt::blue }; + TQColor colors[] = { TQt::red, TQt::blue }; int color = endStateOfLastPara; if ( color < 0 || color > 1 ) color = 0; @@ -63,7 +63,7 @@ int QtRegexpHighlighter::highlightParagraph( const TQString & text, int endState if ( length + (start-index) != regexp.matchedLength() ) setFormat( start+length, regexp.matchedLength()-length-(start-index), colors[color] ); - index += QMAX( 1, regexp.matchedLength() ); // ensure progress when matching for example ^ or \b + index += TQMAX( 1, regexp.matchedLength() ); // ensure progress when matching for example ^ or \b color = (color+1)%2; } return color; diff --git a/kregexpeditor/qtregexphighlighter.h b/kregexpeditor/qtregexphighlighter.h index c160ca2..8bf1c55 100644 --- a/kregexpeditor/qtregexphighlighter.h +++ b/kregexpeditor/qtregexphighlighter.h @@ -15,8 +15,8 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifndef QTREGEXPHIGHLIGHTER_H -#define QTREGEXPHIGHLIGHTER_H +#ifndef TQTREGEXPHIGHLIGHTER_H +#define TQTREGEXPHIGHLIGHTER_H #include "regexphighlighter.h" #include <tqtextedit.h> @@ -30,5 +30,5 @@ private: TQTextEdit* _editor; }; -#endif /* QTREGEXPHIGHLIGHTER_H */ +#endif /* TQTREGEXPHIGHLIGHTER_H */ diff --git a/kregexpeditor/regexp.cpp b/kregexpeditor/regexp.cpp index 0b583d7..c5961a3 100644 --- a/kregexpeditor/regexp.cpp +++ b/kregexpeditor/regexp.cpp @@ -28,7 +28,7 @@ RegExp::RegExp( bool selected ) : _parent(0), _destructing( false ), _selected( RegExp::~RegExp() { _destructing = true; - for ( TQPtrListIterator<RegExp> it(_children); *it; ++it ) { + for ( TQPtrListIterator<RegExp> it(_tqchildren); *it; ++it ) { delete *it; } if ( _parent ) @@ -38,20 +38,20 @@ RegExp::~RegExp() void RegExp::addChild( RegExp* child ) { - _children.append( child ); + _tqchildren.append( child ); child->setParent( this ); } void RegExp::removeChild( RegExp* child ) { if ( ! _destructing ) { - _children.remove( child ); + _tqchildren.remove( child ); } } -void RegExp::setParent( RegExp* parent ) +void RegExp::setParent( RegExp* tqparent ) { - _parent = parent; + _parent = tqparent; } RegExp* RegExp::readRegExp( TQDomElement top, const TQString& version ) @@ -68,7 +68,7 @@ RegExp* RegExp::readRegExp( TQDomElement top, const TQString& version ) TQString RegExp::toXmlString() const { TQDomDocument doc; - doc.setContent( TQString::fromLatin1( "<RegularExpression/>" ) ); + doc.setContent( TQString::tqfromLatin1( "<RegularExpression/>" ) ); TQDomNode top = doc.documentElement(); top.toElement().setAttribute(TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version); diff --git a/kregexpeditor/regexp.h b/kregexpeditor/regexp.h index 5b2bcae..ba828bb 100644 --- a/kregexpeditor/regexp.h +++ b/kregexpeditor/regexp.h @@ -44,7 +44,7 @@ public: void addChild( RegExp* child ); void removeChild( RegExp* child ); - void setParent( RegExp* parent ); + void setParent( RegExp* tqparent ); RegExp* clone() const; virtual bool operator==( const RegExp& other ) const { return ( type() == other.type() ); } @@ -59,7 +59,7 @@ protected: private: RegExp() {} // disable - TQPtrList<RegExp> _children; + TQPtrList<RegExp> _tqchildren; RegExp* _parent; bool _destructing; bool _selected; diff --git a/kregexpeditor/regexpbuttons.cpp b/kregexpeditor/regexpbuttons.cpp index 88e581e..f854f21 100644 --- a/kregexpeditor/regexpbuttons.cpp +++ b/kregexpeditor/regexpbuttons.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include "images.h" #else @@ -34,30 +34,30 @@ #include <tqsignalmapper.h> #include "regexpconverter.h" -RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) - : TQDockWindow( TQDockWindow::InDock, parent, name), _keepMode(false) +RegExpButtons::RegExpButtons( TQWidget *tqparent, const char *name ) + : TQDockWindow( TQDockWindow::InDock, tqparent, name), _keepMode(false) { - TQBoxLayout *layout = boxLayout(); + TQBoxLayout *tqlayout = boxLayout(); _grp = new TQButtonGroup(this); _grp->hide(); _grp->setExclusive( true ); - _mapper = new TQSignalMapper( this, "RegExpButtons::_mapper" ); + _mapper = new TQSignalMapper( TQT_TQOBJECT(this), "RegExpButtons::_mapper" ); connect( _mapper, TQT_SIGNAL( mapped(int) ), this, TQT_SIGNAL( clicked(int) ) ); // The "select" button. _selectBut = new TQToolButton( this); -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage( "select" ) ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); #endif _selectBut->setPixmap( pix ); - layout->addWidget( _selectBut ); + tqlayout->addWidget( _selectBut ); _grp->insert(_selectBut); _selectBut->setToggleButton( true ); connect( _selectBut, TQT_SIGNAL(clicked()), TQT_SIGNAL(doSelect())); @@ -76,19 +76,19 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) but = insert(TEXT, "text", i18n("Text"), i18n( "<qt>This will insert a text field, where you may write text. The text you write will " "be matched literally. (i.e. you do not need to escape any characters)</qt>" ) ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(CHARSET, "characters", i18n("A single character specified in a range"), i18n("<qt>This will match a single character from a predefined range.<p>" "When you insert this widget a dialog box will appear, which lets you specify " "which characters this <i>regexp item</i> will match.</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(DOT, "anychar", i18n("Any character"), i18n("<qt>This will match any single character</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(REPEAT, "repeat", i18n("Repeated content"), @@ -102,14 +102,14 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) "is <tt>abc</tt>, then this <i>regexp item</i> will match the empty string, " "the string <tt>abc</tt>, the string <tt>abcabc</tt>, the string <tt>abcabcabcabc</tt>, " "etc.</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(ALTN, "altn", i18n("Alternatives"), i18n("<qt>This <i>regexp item</i> will match any of its alternatives.</p>" "You specify alternatives by placing <i>regexp items</i> on top of " "each other inside this widget.</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(COMPOUND, "compound", i18n("Compound regexp"), @@ -118,53 +118,53 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) "a small box. This makes it easier for you to get an overview of large " "<i>regexp items</i>. This is especially useful if you load a predefined <i>regexp item</i> " "you perhaps don't care about the inner workings of.") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(BEGLINE, "begline", i18n("Beginning of line"), i18n("<qt>This will match the beginning of a line.</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(ENDLINE, "endline", i18n("End of line"), i18n("<qt>This will match the end of a line.</qt>") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); _wordBoundary = insert(WORDBOUNDARY, "wordboundary", i18n("Word boundary"), i18n("<qt>This asserts a word boundary (This part does not actually match any characters)</qt>") ); - layout->addWidget( _wordBoundary ); + tqlayout->addWidget( _wordBoundary ); _nonWordBoundary = insert(NONWORDBOUNDARY, "nonwordboundary", i18n("Non Word boundary"), i18n("<qt>This asserts a non-word boundary " "(This part does not actually match any characters)</qt>") ); - layout->addWidget( _nonWordBoundary ); + tqlayout->addWidget( _nonWordBoundary ); _posLookAhead = insert(POSLOOKAHEAD, "poslookahead", i18n("Positive Look Ahead"), i18n("<qt>This asserts a regular expression (This part does not actually match any characters). " "You can only use this at the end of a regular expression.</qt>") ); - layout->addWidget( _posLookAhead ); + tqlayout->addWidget( _posLookAhead ); _negLookAhead = insert(NEGLOOKAHEAD, "neglookahead", i18n("Negative Look Ahead"), i18n("<qt>This asserts a regular expression that must not match " "(This part does not actually match any characters). " "You can only use this at the end of a regular expression.</qt>") ); - layout->addWidget( _negLookAhead ); + tqlayout->addWidget( _negLookAhead ); } DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, TQString tooltip, TQString whatsthis) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; - pix.convertFromImage( qembed_findImage( TQString::fromLatin1( name ) ) ); + pix.convertFromImage( qembed_findImage( TQString::tqfromLatin1( name ) ) ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/")+TQString::fromLatin1(name) + - TQString::fromLatin1(".png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/")+TQString::tqfromLatin1(name) + + TQString::tqfromLatin1(".png") ), KIcon::Toolbar ); #endif DoubleClickButton* but = new DoubleClickButton( pix, this, "RegExpButtons::but"); - _mapper->setMapping( but, tp ); + _mapper->setMapping( TQT_TQOBJECT(but), tp ); connect( but, TQT_SIGNAL( clicked() ), _mapper, TQT_SLOT( map() ) ); connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSetNonKeepMode() ) ); diff --git a/kregexpeditor/regexpbuttons.h b/kregexpeditor/regexpbuttons.h index 6565746..6219422 100644 --- a/kregexpeditor/regexpbuttons.h +++ b/kregexpeditor/regexpbuttons.h @@ -26,12 +26,13 @@ class TQToolButton; class TQSignalMapper; -class RegExpButtons :public QDockWindow +class RegExpButtons :public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - RegExpButtons( TQWidget *parent, const char *name = 0 ); + RegExpButtons( TQWidget *tqparent, const char *name = 0 ); void setFeatures( int features ); protected: diff --git a/kregexpeditor/regexpconverter.cpp b/kregexpeditor/regexpconverter.cpp index 2678591..951f0d7 100644 --- a/kregexpeditor/regexpconverter.cpp +++ b/kregexpeditor/regexpconverter.cpp @@ -53,7 +53,7 @@ TQString RegExpConverter::toStr( RegExp* regexp, bool markSelection ) case RegExp::TEXTRANGE: return toString( static_cast<TextRangeRegExp*>( regexp ), markSelection ); } qWarning("We shouldn't get here!"); - return TQString::fromLatin1( "" ); + return TQString::tqfromLatin1( "" ); } diff --git a/kregexpeditor/regexphighlighter.h b/kregexpeditor/regexphighlighter.h index 9a8003c..02537b6 100644 --- a/kregexpeditor/regexphighlighter.h +++ b/kregexpeditor/regexphighlighter.h @@ -20,7 +20,7 @@ #define REGEXPHIGHLIGHTER_H #include <tqsyntaxhighlighter.h> -class RegexpHighlighter :public QSyntaxHighlighter +class RegexpHighlighter :public TQSyntaxHighlighter { public: RegexpHighlighter( TQTextEdit* edit ); diff --git a/kregexpeditor/regexpwidget.cpp b/kregexpeditor/regexpwidget.cpp index a64b0c4..ec3c846 100644 --- a/kregexpeditor/regexpwidget.cpp +++ b/kregexpeditor/regexpwidget.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include "regexpwidget.moc" @@ -33,9 +33,9 @@ const int RegExpWidget::pw = 1; const int RegExpWidget::bdSize = 5; const int RegExpWidget::space = 5; -RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : TQWidget(parent, name ? name : "RegExpWidget", WNoMousePropagation ), + : TQWidget(tqparent, name ? name : "RegExpWidget", WNoMousePropagation ), _editorWindow( editorWindow ), _isSelected( false ), _isToplevel( false ) { } @@ -43,29 +43,29 @@ RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, void RegExpWidget::addNewChild(DragAccepter *, RegExpWidget *) { - qFatal("This widget should not expect any children"); + qFatal("This widget should not expect any tqchildren"); } void RegExpWidget::addNewConcChild(DragAccepter *, ConcWidget *) { - qFatal("This widget should not expect any children"); + qFatal("This widget should not expect any tqchildren"); } void RegExpWidget::setConcChild(ConcWidget *) { - qFatal("This widget should not expect any children"); + qFatal("This widget should not expect any tqchildren"); } -bool RegExpWidget::updateSelection(bool parentSelected) +bool RegExpWidget::updateSelection(bool tqparentSelected) { - bool selected = ( parentSelected || + bool selected = ( tqparentSelected || _editorWindow->selectionOverlap( mapToGlobal( TQPoint(0,0) ), size() ) ) && !_isToplevel; if ( _isSelected != selected ) { // Selection state changed _isSelected = selected; - repaint(); + tqrepaint(); return true; } return false; @@ -119,7 +119,7 @@ void RegExpWidget::mousePressEvent ( TQMouseEvent* event ) if ( _editorWindow->isPasteing() || _editorWindow->isInserting() ) return; - if ( event->button() == LeftButton ) { + if ( event->button() == Qt::LeftButton ) { if ( ! _editorWindow->pointSelected( TQCursor::pos() ) ) { _editorWindow->clearSelection( true ); if ( dynamic_cast<DragAccepter*>(this) == 0 && dynamic_cast<ConcWidget*>(this) == 0 ) { @@ -131,12 +131,12 @@ void RegExpWidget::mousePressEvent ( TQMouseEvent* event ) event->button(), event->state()); TQApplication::sendEvent( _editorWindow, &ev ); } - else if ( event->button() == RightButton ) { + else if ( event->button() == Qt::RightButton ) { _editorWindow->showRMBMenu( true ); } - // currently (Qt3.0) it seems like qt do not accept that the accept flag is set, - // and thus sends the event to the parent - given that the following line is in. + // currently (TQt3.0) it seems like qt do not accept that the accept flag is set, + // and thus sends the event to the tqparent - given that the following line is in. // It doesn't make any change to leave it out. // 25 Oct. 2001 19:03 -- Jesper K. Pedersen // TQWidget::mousePressEvent( event ); @@ -164,10 +164,10 @@ TQRect RegExpWidget::selectionRect() const void RegExpWidget::enterEvent( TQEvent * ) { - updateCursorShape(); + updatetqCursorShape(); } -void RegExpWidget::updateCursorShape() +void RegExpWidget::updatetqCursorShape() { TQCursor cursor; @@ -191,7 +191,7 @@ void RegExpWidget::updateCursorShape() void RegExpWidget::updateCursorRecursively() { - updateCursorShape(); + updatetqCursorShape(); } @@ -207,7 +207,7 @@ bool RegExpWidget::acceptWidgetInsert( RegExpType tp ) const RegExpWidget* RegExpWidget::widgetUnderPoint( TQPoint globalPos, bool ) { - if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).contains( globalPos ) ) + if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).tqcontains( globalPos ) ) return this; else return 0; diff --git a/kregexpeditor/regexpwidget.h b/kregexpeditor/regexpwidget.h index b6e44cd..27a57d1 100644 --- a/kregexpeditor/regexpwidget.h +++ b/kregexpeditor/regexpwidget.h @@ -29,26 +29,27 @@ class RegExpEditorWindow; Base class for all regular expression widgets. @internal */ -class RegExpWidget :public QWidget +class RegExpWidget :public TQWidget { Q_OBJECT + TQ_OBJECT public: - RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *label = 0); /*====================================================================== Construction, child management ======================================================================*/ /** - Add `child' to the parent of this widget in place of `accepter' + Add `child' to the tqparent of this widget in place of `accepter' This method only applies to container widgets (see @ref SingleContainerWidget, and @ref MultiContainerWidget). */ virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); /** - Inserts all the children of `child' into this widget in place of + Inserts all the tqchildren of `child' into this widget in place of `accepter'. This method only applies to container widgets (see @ref SingleContainerWidget, and @ref MultiContainerWidget). @@ -82,7 +83,7 @@ public: virtual bool isSelected() const; /** - Returns true if this widget or one of its children is selected. + Returns true if this widget or one of its tqchildren is selected. */ virtual bool hasSelection() const; @@ -90,15 +91,15 @@ public: /** Update selection information for this widget. - @param parentSelected indicates whether the parent is selected. + @param tqparentSelected indicates whether the tqparent is selected. @return true if the selection state has changed for the widget since - the last time the widget was painted. `repaint' is invoked on the widget if + the last time the widget was painted. `tqrepaint' is invoked on the widget if selection state is changed, to ensure that selection is visible. */ - virtual bool updateSelection(bool parentSelected); + virtual bool updateSelection(bool tqparentSelected); /** - Clears the selection and repaints the widget if `update' is true. + Clears the selection and tqrepaints the widget if `update' is true. */ virtual void clearSelection(); @@ -147,7 +148,7 @@ public: @li accept cursor for insert/paste @li reject cursor for insert/paste */ - void updateCursorShape(); + void updatetqCursorShape(); virtual void updateCursorRecursively(); diff --git a/kregexpeditor/repeatregexp.cpp b/kregexpeditor/repeatregexp.cpp index e037016..3a03e90 100644 --- a/kregexpeditor/repeatregexp.cpp +++ b/kregexpeditor/repeatregexp.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include "kmessagebox.h" @@ -58,7 +58,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version ) if ( !ok ) { KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element " "<b>%2</b></p><p>It contained the value <b>%3</b></p>") - .arg(TQString::fromLatin1("lower")).arg(TQString::fromLatin1("Repeat")).arg(lower), + .tqarg(TQString::tqfromLatin1("lower")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(lower), i18n("Error While Loading From XML File") ) ; _lower = 0; } @@ -66,7 +66,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version ) if ( !ok ) { KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element " "<b>%2</b></p><p>It contained the value <b>%3</b></p>") - .arg(TQString::fromLatin1("upper")).arg(TQString::fromLatin1("Repeat")).arg(upper), + .tqarg(TQString::tqfromLatin1("upper")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(upper), i18n("Error While Loading From XML File") ) ; _upper = -1; } diff --git a/kregexpeditor/repeatwidget.cpp b/kregexpeditor/repeatwidget.cpp index 80fa2ab..e284895 100644 --- a/kregexpeditor/repeatwidget.cpp +++ b/kregexpeditor/repeatwidget.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -35,17 +35,17 @@ #include <tqvbuttongroup.h> #include "kwidgetstreamer.h" -RepeatWidget::RepeatWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +RepeatWidget::RepeatWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : SingleContainerWidget(editorWindow, parent, name ? name : "RepeatWidget") + : SingleContainerWidget(editorWindow, tqparent, name ? name : "RepeatWidget") { _child = new ConcWidget(editorWindow, this); init(); } RepeatWidget::RepeatWidget( RepeatRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name ) - :SingleContainerWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name ) + :SingleContainerWidget( editorWindow, tqparent, name ) { init(); RegExpWidget* child = WidgetFactory::createWidget( regexp->child(), editorWindow, this ); @@ -85,23 +85,23 @@ void RepeatWidget::init() } -TQSize RepeatWidget::sizeHint() const +TQSize RepeatWidget::tqsizeHint() const { - // TODO: Merge with LookAheadWidget::sizeHint + // TODO: Merge with LookAheadWidget::tqsizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _content->text() ); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw; - int width = 2 * pw + QMAX(_childSize.width(), 4*bdSize + _textSize.width()); + int width = 2 * pw + TQMAX(_childSize.width(), 4*bdSize + _textSize.width()); return TQSize(width,height); } void RepeatWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with LookAheadWidget::paintEvent - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -151,24 +151,24 @@ void RepeatWidget::slotConfigCanceled() { TQDataStream stream( _backup, IO_ReadOnly ); KWidgetStreamer streamer; - streamer.fromStream( stream, _content ); - repaint(); + streamer.fromStream( stream, TQT_TQOBJECT(_content) ); + tqrepaint(); } int RepeatWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().height()/2) ); TQDataStream stream( _backup, IO_WriteOnly ); KWidgetStreamer streamer; - streamer.toStream( _content, stream ); + streamer.toStream( TQT_TQOBJECT(_content), stream ); return _configWindow->exec(); } //-------------------------------------------------------------------------------- -RepeatRangeWindow::RepeatRangeWindow( TQWidget* parent, const char* name ) - : TQVBox( parent, name ? name : "RepeatRangeWindow" ) +RepeatRangeWindow::RepeatRangeWindow( TQWidget* tqparent, const char* name ) + : TQVBox( tqparent, name ? name : "RepeatRangeWindow" ) { setSpacing( 6 ); @@ -218,14 +218,14 @@ RepeatRangeWindow::RepeatRangeWindow( TQWidget* parent, const char* name ) } -void RepeatRangeWindow::createLine( TQWidget* parent, TQString text, TQSpinBox** spin, REPEATTYPE tp ) +void RepeatRangeWindow::createLine( TQWidget* tqparent, TQString text, TQSpinBox** spin, REPEATTYPE tp ) { - TQRadioButton* radioBut = new TQRadioButton(text, parent); - *spin = new TQSpinBox( 1, 999, 1, parent); + TQRadioButton* radioBut = new TQRadioButton(text, tqparent); + *spin = new TQSpinBox( 1, 999, 1, tqparent); (*spin)->setValue(1); - (void) new TQLabel(i18n("time(s)"), parent); + (void) new TQLabel(i18n("time(s)"), tqparent); _group->insert(radioBut, tp); } @@ -271,7 +271,7 @@ TQString RepeatRangeWindow::text() case ATMOST: return i18n("Repeated at Most 1 Time", "Repeated at Most %n Times", _mostTimes->value() ); case EXACTLY: return i18n("Repeated Exactly 1 Time", "Repeated Exactly %n Times", _exactlyTimes->value() ); case MINMAX: return i18n("Repeated From %1 to %2 Times") - .arg( _rangeFrom->value() ).arg( _rangeTo->value() ); + .tqarg( _rangeFrom->value() ).tqarg( _rangeTo->value() ); } qFatal("Fall through!"); return TQString::fromLocal8Bit(""); diff --git a/kregexpeditor/repeatwidget.h b/kregexpeditor/repeatwidget.h index e150cac..14b3dec 100644 --- a/kregexpeditor/repeatwidget.h +++ b/kregexpeditor/repeatwidget.h @@ -30,14 +30,15 @@ class RepeatRegExp; Widget containging the configuration for a @ref RepeatWidget @internal */ -class RepeatRangeWindow :public QVBox +class RepeatRangeWindow :public TQVBox { Q_OBJECT + TQ_OBJECT public: enum REPEATTYPE {ANY, ATLEAST, ATMOST, EXACTLY, MINMAX}; - RepeatRangeWindow( TQWidget* parent, const char* name = 0 ); + RepeatRangeWindow( TQWidget* tqparent, const char* name = 0 ); TQString text(); int min(); int max(); @@ -50,7 +51,7 @@ protected slots: private: - void createLine( TQWidget* parent, TQString text, TQSpinBox** spin, REPEATTYPE tp ); + void createLine( TQWidget* tqparent, TQString text, TQSpinBox** spin, REPEATTYPE tp ); TQSpinBox* _leastTimes; TQSpinBox* _mostTimes; @@ -71,14 +72,15 @@ private: class RepeatWidget :public SingleContainerWidget { Q_OBJECT + TQ_OBJECT public: - RepeatWidget( RegExpEditorWindow* editorWindow, TQWidget *parent, + RepeatWidget( RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); RepeatWidget( RepeatRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); void init(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return REPEAT; } virtual int edit(); diff --git a/kregexpeditor/scrollededitorwindow.cpp b/kregexpeditor/scrollededitorwindow.cpp index eddd293..cd88321 100644 --- a/kregexpeditor/scrollededitorwindow.cpp +++ b/kregexpeditor/scrollededitorwindow.cpp @@ -15,15 +15,15 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "scrollededitorwindow.moc" #endif #include "scrollededitorwindow.h" #include "editorwindow.h" -RegExpScrolledEditorWindow::RegExpScrolledEditorWindow( TQWidget* parent, const char* name) - : TQWidget(parent, name) +RegExpScrolledEditorWindow::RegExpScrolledEditorWindow( TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name) { _scrollView = new TQScrollView( this ); _editorWindow = new RegExpEditorWindow( _scrollView->viewport()); @@ -106,7 +106,7 @@ void RegExpScrolledEditorWindow::resizeEvent( TQResizeEvent *event ) void RegExpScrolledEditorWindow::slotUpdateContentSize( TQPoint focusPoint ) { - TQSize childSize = _editorWindow->sizeHint(); + TQSize childSize = _editorWindow->tqsizeHint(); TQSize vpSize = _scrollView->viewportSize(10,10); bool change = false; diff --git a/kregexpeditor/scrollededitorwindow.h b/kregexpeditor/scrollededitorwindow.h index 35aa14e..e49940e 100644 --- a/kregexpeditor/scrollededitorwindow.h +++ b/kregexpeditor/scrollededitorwindow.h @@ -27,11 +27,12 @@ class RegExp; /** Regular Expression editor window. */ -class RegExpScrolledEditorWindow :public QWidget +class RegExpScrolledEditorWindow :public TQWidget { Q_OBJECT + TQ_OBJECT public: - RegExpScrolledEditorWindow( TQWidget *parent = 0, const char* name = 0); + RegExpScrolledEditorWindow( TQWidget *tqparent = 0, const char* name = 0); RegExp* regExp(); private: diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp index 3620fc3..c9ed250 100644 --- a/kregexpeditor/selectablelineedit.cpp +++ b/kregexpeditor/selectablelineedit.cpp @@ -16,14 +16,14 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "selectablelineedit.moc" #endif #include "selectablelineedit.h" -SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, const char* name) - : TQLineEdit( parent, name ), _owner(owner) +SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* tqparent, const char* name) + : TQLineEdit( tqparent, name ), _owner(owner) { connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotKeyPressed() ) ); @@ -33,29 +33,29 @@ SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, c void SelectableLineEdit::setSelected( bool selected ) { if ( selected ) { - TQPalette pal = palette().copy(); + TQPalette pal = TQPalette(tqpalette()); pal.setBrush( TQColorGroup::Base, gray ); setPalette( pal ); } else { unsetPalette(); } - repaint(); + tqrepaint(); } -TQSize SelectableLineEdit::sizeHint() const +TQSize SelectableLineEdit::tqsizeHint() const { int frameWidth = frame() ? 8 : 4; // from TQLineEdit source TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); int charWidth = metrics.maxWidth(); - int height = TQLineEdit::sizeHint().height(); + int height = TQLineEdit::tqsizeHint().height(); int width; if ( hasFocus() ) width = actualSize+6*charWidth + frameWidth; else - width = QMAX(actualSize, charWidth) + frameWidth; + width = TQMAX(actualSize, charWidth) + frameWidth; return TQSize( width , height ); } @@ -67,7 +67,7 @@ void SelectableLineEdit::slotKeyPressed() int actualSize = metrics.width( text() ); if ( actualSize > size().width()-frameWidth ) { - repaint(); - emit parentPleaseUpdate(); + tqrepaint(); + emit tqparentPleaseUpdate(); } } diff --git a/kregexpeditor/selectablelineedit.h b/kregexpeditor/selectablelineedit.h index dfe356a..b50af86 100644 --- a/kregexpeditor/selectablelineedit.h +++ b/kregexpeditor/selectablelineedit.h @@ -31,20 +31,21 @@ class RegExpWidget; @internal */ -class SelectableLineEdit :public QLineEdit +class SelectableLineEdit :public TQLineEdit { Q_OBJECT + TQ_OBJECT public: - SelectableLineEdit( RegExpWidget* owner, TQWidget* parent = 0, const char* name = 0); + SelectableLineEdit( RegExpWidget* owner, TQWidget* tqparent = 0, const char* name = 0); void setSelected( bool selected ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected slots: void slotKeyPressed(); signals: - void parentPleaseUpdate(); + void tqparentPleaseUpdate(); private: RegExpWidget* _owner; diff --git a/kregexpeditor/singlecontainerwidget.cpp b/kregexpeditor/singlecontainerwidget.cpp index 68b5612..2c2707c 100644 --- a/kregexpeditor/singlecontainerwidget.cpp +++ b/kregexpeditor/singlecontainerwidget.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "singlecontainerwidget.moc" #endif @@ -23,17 +23,17 @@ #include "concwidget.h" SingleContainerWidget::SingleContainerWidget(RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name) - : RegExpWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name) + : RegExpWidget( editorWindow, tqparent, name ) { } -bool SingleContainerWidget::updateSelection( bool parentSelected ) +bool SingleContainerWidget::updateSelection( bool tqparentSelected ) { - bool changed = RegExpWidget::updateSelection( parentSelected ); + bool changed = RegExpWidget::updateSelection( tqparentSelected ); changed = _child->updateSelection( _isSelected ) && changed; if (changed) - repaint(); + tqrepaint(); return changed; } @@ -98,7 +98,7 @@ RegExpWidget* SingleContainerWidget::findWidgetToEdit( TQPoint globalPos ) RegExpWidget* wid = _child->findWidgetToEdit( globalPos ); if ( wid ) return wid; - else if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) ) + else if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).tqcontains( globalPos ) ) return this; else return 0; @@ -126,7 +126,7 @@ void SingleContainerWidget::updateAll() void SingleContainerWidget::updateCursorRecursively() { _child->updateCursorRecursively(); - updateCursorShape(); + updatetqCursorShape(); } diff --git a/kregexpeditor/singlecontainerwidget.h b/kregexpeditor/singlecontainerwidget.h index 7578ce4..7a88a62 100644 --- a/kregexpeditor/singlecontainerwidget.h +++ b/kregexpeditor/singlecontainerwidget.h @@ -25,12 +25,13 @@ class SingleContainerWidget :public RegExpWidget { Q_OBJECT + TQ_OBJECT public: - SingleContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* parent, + SingleContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* tqparent, const char* name = 0); - virtual bool updateSelection( bool parentSelected ); + virtual bool updateSelection( bool tqparentSelected ); virtual bool hasSelection() const; virtual void clearSelection(); virtual void deleteSelection(); diff --git a/kregexpeditor/test-without-dl/main.cpp b/kregexpeditor/test-without-dl/main.cpp index a66355f..5b0fe14 100644 --- a/kregexpeditor/test-without-dl/main.cpp +++ b/kregexpeditor/test-without-dl/main.cpp @@ -19,13 +19,13 @@ #include <kcmdlineargs.h> #include <tqfile.h> #include "../kregexpeditorgui.h" -class ShootABug :public QObject +class ShootABug :public TQObject { public: virtual bool eventFilter( TQObject* recv, TQEvent* event ) { if ( event->type() == TQEvent::MouseButtonPress && - dynamic_cast<TQMouseEvent*>(event)->state() == Qt::ControlButton ) { + dynamic_cast<TQMouseEvent*>(event)->state() == TQt::ControlButton ) { // Ctrl + left mouse click. qDebug("----------------------------------------------------"); @@ -47,12 +47,12 @@ int main( int argc, char* argv[] ) KCmdLineArgs::init(argc, argv, "RegExp Example","",""); KApplication myapp( argc, argv ); - qApp->installEventFilter( new ShootABug() ); + tqApp->installEventFilter( new ShootABug() ); KRegExpEditorGUIDialog* iface = new KRegExpEditorGUIDialog( 0, "_editor", TQStringList() ); - iface->setRegExp( TQString::fromLatin1( "#include" ) ); + iface->setRegExp( TQString::tqfromLatin1( "#include" ) ); iface->doSomething( "setMinimal", (void*) false ); - iface->doSomething( "setSyntax", (void*) new TQString( TQString::fromLatin1( "Emacs" ) ) ); + iface->doSomething( "setSyntax", (void*) new TQString( TQString::tqfromLatin1( "Emacs" ) ) ); iface->doSomething( "setShowSyntaxCombo", (bool*) true ); TQFile file("/packages/kde-src/kdeutils/kregexpeditor/test/main.cpp"); diff --git a/kregexpeditor/textrangeregexp.cpp b/kregexpeditor/textrangeregexp.cpp index 0f80964..78c2696 100644 --- a/kregexpeditor/textrangeregexp.cpp +++ b/kregexpeditor/textrangeregexp.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -127,7 +127,7 @@ bool TextRangeRegExp::load( TQDomElement top, const TQString& /*version*/ ) addRange( from, to ); } else { - KMessageBox::sorry( 0, i18n("<p>Invalid sub element to element <b>TextRange</b>. Tag was <b>%1</b></p>").arg(child.tagName()), + KMessageBox::sorry( 0, i18n("<p>Invalid sub element to element <b>TextRange</b>. Tag was <b>%1</b></p>").tqarg(child.tagName()), i18n("Error While Loading From XML File") ) ; return false; } diff --git a/kregexpeditor/textregexp.cpp b/kregexpeditor/textregexp.cpp index e9b493f..d53d916 100644 --- a/kregexpeditor/textregexp.cpp +++ b/kregexpeditor/textregexp.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kmessagebox.h> @@ -62,7 +62,7 @@ bool TextRegExp::load( TQDomElement top, const TQString& /*version*/) _text = txtNode.data(); } else { - _text = TQString::fromLatin1( "" ); + _text = TQString::tqfromLatin1( "" ); } return true; diff --git a/kregexpeditor/textregexp.h b/kregexpeditor/textregexp.h index 1dd222e..51a7158 100644 --- a/kregexpeditor/textregexp.h +++ b/kregexpeditor/textregexp.h @@ -27,7 +27,7 @@ class TextRegExp :public RegExp { public: - TextRegExp( bool selected, TQString text = TQString::null); + TextRegExp( bool selected, TQString text = TQString()); virtual bool check( ErrorMap&, bool first, bool last ); virtual int precedence() const { diff --git a/kregexpeditor/textwidget.cpp b/kregexpeditor/textwidget.cpp index 3ca0d28..4f5045e 100644 --- a/kregexpeditor/textwidget.cpp +++ b/kregexpeditor/textwidget.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "textwidget.moc" #endif @@ -24,16 +24,16 @@ #include "selectablelineedit.h" #include <tqlayout.h> -TextWidget::TextWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +TextWidget::TextWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - :RegExpWidget(editorWindow, parent, name) + :RegExpWidget(editorWindow, tqparent, name) { init( TQString::fromLocal8Bit("") ); } TextWidget::TextWidget( TextRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name ) - : RegExpWidget( editorWindow, parent, name ) + TQWidget* tqparent, const char* name ) + : RegExpWidget( editorWindow, tqparent, name ) { init(regexp->text()); } @@ -47,7 +47,7 @@ void TextWidget::init( const TQString& txt ) _edit->setText( txt ); - connect( _edit, TQT_SIGNAL( parentPleaseUpdate() ), this, TQT_SLOT(slotUpdate()) ); + connect( _edit, TQT_SIGNAL( tqparentPleaseUpdate() ), this, TQT_SLOT(slotUpdate()) ); setFocusProxy( _edit ); _edit->installEventFilter( this ); connect( _edit, TQT_SIGNAL( textChanged( const TQString & ) ), _editorWindow, TQT_SLOT( emitChange() ) ); @@ -56,19 +56,19 @@ void TextWidget::init( const TQString& txt ) void TextWidget::slotUpdate() { - // I need to force the parent to repaint, as the size change of this - // widget may not be enough for the parent to change size, and in that - // case the parent would not repaint, and the text widget would not be + // I need to force the tqparent to tqrepaint, as the size change of this + // widget may not be enough for the tqparent to change size, and in that + // case the tqparent would not tqrepaint, and the text widget would not be // resized. - TQWidget *p = static_cast<TQWidget*>(parent()); + TQWidget *p = TQT_TQWIDGET(tqparent()); if (p) - p->repaint(); + p->tqrepaint(); _editorWindow->updateContent( this ); } -TQSize TextWidget::sizeHint() const +TQSize TextWidget::tqsizeHint() const { - return _edit->sizeHint(); + return _edit->tqsizeHint(); } void TextWidget::paintEvent( TQPaintEvent *e) @@ -81,9 +81,9 @@ void TextWidget::selectWidget( bool sel ) _edit->setSelected( sel ); } -bool TextWidget::updateSelection(bool parentSelected) +bool TextWidget::updateSelection(bool tqparentSelected) { - bool changed = RegExpWidget::updateSelection( parentSelected ); + bool changed = RegExpWidget::updateSelection( tqparentSelected ); // I need to call this function all the time, else the rubber band will // not be correctly deleted in the line edit. @@ -114,7 +114,7 @@ bool TextWidget::eventFilter( TQObject*, TQEvent* event) if ( event->type() == TQEvent::MouseButtonRelease ) { if ( _editorWindow->isInserting() ) { if ( acceptWidgetInsert( _editorWindow->insertType() ) ) { - mouseReleaseEvent( static_cast<TQMouseEvent*>(event) ); + mouseReleaseEvent( TQT_TQMOUSEEVENT(event) ); } return true; } @@ -124,7 +124,7 @@ bool TextWidget::eventFilter( TQObject*, TQEvent* event) return true; } else if ( isSelected() ) { - TQMouseEvent* e = static_cast<TQMouseEvent*>( event ); + TQMouseEvent* e = TQT_TQMOUSEEVENT( event ); TQMouseEvent ev( event->type(), mapTo(_editorWindow, e->pos()), e->button(), e->state()); TQApplication::sendEvent( _editorWindow, &ev ); diff --git a/kregexpeditor/textwidget.h b/kregexpeditor/textwidget.h index 054dbd8..973369c 100644 --- a/kregexpeditor/textwidget.h +++ b/kregexpeditor/textwidget.h @@ -30,13 +30,14 @@ class TextRegExp; class TextWidget : public RegExpWidget { Q_OBJECT + TQ_OBJECT public: - TextWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + TextWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); TextWidget( TextRegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent, const char* name = 0); - virtual TQSize sizeHint() const; + TQWidget* tqparent, const char* name = 0); + virtual TQSize tqsizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return TEXT; } virtual void updateAll(); @@ -45,7 +46,7 @@ public: protected: void init( const TQString& text ); virtual void paintEvent( TQPaintEvent *e ); - virtual bool updateSelection( bool parentSelected ); + virtual bool updateSelection( bool tqparentSelected ); virtual void clearSelection(); virtual bool eventFilter( TQObject*, TQEvent* ); diff --git a/kregexpeditor/userdefinedregexps.cpp b/kregexpeditor/userdefinedregexps.cpp index 10c97b0..b251295 100644 --- a/kregexpeditor/userdefinedregexps.cpp +++ b/kregexpeditor/userdefinedregexps.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klineeditdlg.h> @@ -35,8 +35,8 @@ #include <tqlayout.h> #include <tqlabel.h> -UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name ) - : TQDockWindow( TQDockWindow::InDock, parent, name) +UserDefinedRegExps::UserDefinedRegExps( TQWidget *tqparent, const char *name ) + : TQDockWindow( TQDockWindow::InDock, tqparent, name) { TQWidget* top = new TQWidget( this ); TQVBoxLayout* lay = new TQVBoxLayout( top, 6 ); @@ -48,7 +48,7 @@ UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name ) label->setMinimumSize(1,0); _userDefined = new TQListView( top, "UserDefinedRegExps::_userDefined" ); - _userDefined->addColumn( TQString::null ); + _userDefined->addColumn( TQString() ); _userDefined->header()->hide(); // _userDefined->setRootIsDecorated( true ); setWidget( top ); @@ -66,15 +66,15 @@ void UserDefinedRegExps::slotPopulateUserRegexps() createItems( i18n("User Defined"), WidgetWinItem::path(), true ); -#ifdef QT_ONLY +#ifdef TQT_ONLY TQStringList dirs; - dirs << TQString::fromLatin1( "predefined" ); + dirs << TQString::tqfromLatin1( "predefined" ); #else TQStringList dirs = KGlobal::dirs()->findDirs( "data", TQString::fromLocal8Bit("kregexpeditor/predefined/") ); #endif for ( TQStringList::iterator it1 = dirs.begin(); it1 != dirs.end(); ++it1 ) { - TQDir dir( *it1, TQString::null, TQDir::Name, TQDir::Dirs ); + TQDir dir( *it1, TQString(), TQDir::Name, TQDir::Dirs ); TQStringList subdirs = dir.entryList(); for ( TQStringList::iterator it2 = subdirs.begin(); it2 != subdirs.end(); ++it2 ) { if ( *it2 == TQString::fromLocal8Bit(".") || *it2 == TQString::fromLocal8Bit("..") ) @@ -88,7 +88,7 @@ void UserDefinedRegExps::slotPopulateUserRegexps() void UserDefinedRegExps::createItems( const TQString& _title, const TQString& dir, bool usersRegExp ) { TQString title = _title; - if (_title == TQString::fromLatin1("general")) + if (_title == TQString::tqfromLatin1("general")) title = i18n("General"); TQListViewItem* lvItem = new TQListViewItem( _userDefined, title ); @@ -101,7 +101,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di TQFile file( fileName ); if ( ! file.open(IO_ReadOnly) ) { - KMessageBox::sorry( this, i18n("Could not open file for reading: %1").arg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for reading: %1").tqarg(fileName) ); continue; } @@ -111,7 +111,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di RegExp* regexp = WidgetFactory::createRegExp( data ); if ( ! regexp ) { - KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").arg( fileName ) ); + KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").tqarg( fileName ) ); continue; } @@ -187,8 +187,8 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos ) TQString oldName = winItem->name(); TQString txt; -#ifdef QT_ONLY - txt = QInputDialog::getText( tr("Rename Regular Expression"), tr("New name:") ); +#ifdef TQT_ONLY + txt = TQInputDialog::getText( tr("Rename Regular Expression"), tr("New name:") ); #else KLineEditDlg dlg(i18n("New name:"), oldName, this); dlg.setCaption(i18n("Rename Item")); @@ -200,7 +200,7 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos ) TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQFileInfo finfo( fileName ); if ( finfo.exists() ) { - int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").arg(txt), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ); + int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").tqarg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") ); if ( answer != KMessageBox::Yes ) return; @@ -223,10 +223,10 @@ void UserDefinedRegExps::slotSelectNewAction() slotUnSelect(); } -WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* parent ) - :TQListViewItem( parent ), _regexp( regexp ), _usersRegExp ( usersRegExp ) +WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* tqparent ) + :TQListViewItem( tqparent ), _regexp( regexp ), _usersRegExp ( usersRegExp ) { - int index = fileName.findRev(TQString::fromLocal8Bit(".regexp")); + int index = fileName.tqfindRev(TQString::fromLocal8Bit(".regexp")); _name = fileName.left(index); setText( 0, _name ); @@ -255,8 +255,8 @@ void WidgetWinItem::setName( const TQString& nm ) TQString WidgetWinItem::path() { -#ifdef QT_ONLY - return TQString::fromLatin1( "predefined" ); +#ifdef TQT_ONLY + return TQString::tqfromLatin1( "predefined" ); #else return locateLocal("data", TQString::fromLocal8Bit("KRegExpEditor/")); #endif diff --git a/kregexpeditor/userdefinedregexps.h b/kregexpeditor/userdefinedregexps.h index 30fe777..e6062ca 100644 --- a/kregexpeditor/userdefinedregexps.h +++ b/kregexpeditor/userdefinedregexps.h @@ -25,12 +25,13 @@ class TQPoint; class RegExp; -class UserDefinedRegExps :public QDockWindow +class UserDefinedRegExps :public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - UserDefinedRegExps( TQWidget *parent, const char *name = 0 ); + UserDefinedRegExps( TQWidget *tqparent, const char *name = 0 ); const TQPtrList<CompoundRegExp> regExps() const; public slots: @@ -53,10 +54,10 @@ private: TQPtrList<CompoundRegExp> _regExps; }; -class WidgetWinItem :public QListViewItem +class WidgetWinItem :public TQListViewItem { public: - WidgetWinItem( TQString name, RegExp* regexp, bool users, TQListViewItem* parent ); + WidgetWinItem( TQString name, RegExp* regexp, bool users, TQListViewItem* tqparent ); static TQString path(); TQString fileName() const; diff --git a/kregexpeditor/util.cpp b/kregexpeditor/util.cpp index d770488..b6cf4c6 100644 --- a/kregexpeditor/util.cpp +++ b/kregexpeditor/util.cpp @@ -21,19 +21,19 @@ #include <kstandarddirs.h> TQPixmap Util::getKRegExpEditorIcon( const TQString& name ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage(name) ); return pix; #else - return KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/") +name ), + return KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/") +name ), KIcon::Toolbar ); #endif } TQPixmap Util::getSystemIcon( const TQString& name ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage( name ) ); return pix; @@ -46,7 +46,7 @@ TQPixmap Util::getSystemIcon( const TQString& name ) TQIconSet Util::getSystemIconSet( const TQString& name ) { -#ifdef QT_ONLY +#ifdef TQT_ONLY TQPixmap pix; pix.convertFromImage( qembed_findImage( name ) ); return TQIconSet( pix ); diff --git a/kregexpeditor/verifier.cpp b/kregexpeditor/verifier.cpp index 26c1a21..00b75be 100644 --- a/kregexpeditor/verifier.cpp +++ b/kregexpeditor/verifier.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -24,8 +24,8 @@ #include "verifier.h" -Verifier::Verifier( TQWidget* parent, const char* name ) : TQTextEdit( parent, name ) - /* QT_ANCHOR_DO_NOT_WORK: ,_current( 0 ) */ +Verifier::Verifier( TQWidget* tqparent, const char* name ) : TQTextEdit( tqparent, name ) + /* TQT_ANCHOR_DO_NOT_WORK: ,_current( 0 ) */ { _highlighter = 0; setMinimumSize(1,1); @@ -49,7 +49,7 @@ void Verifier::verify( const TQString& reg ) void Verifier::clearRegexp() { if ( _highlighter ) { - _highlighter->setRegExp( TQString::null ); + _highlighter->setRegExp( TQString() ); _highlighter->rehighlight(); } } @@ -73,7 +73,7 @@ void Verifier::setMinimal( bool b ) _highlighter->setMinimal( b ); } -// Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match +// TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // void Verifier::gotoFirst() // { @@ -97,7 +97,7 @@ void Verifier::setMinimal( bool b ) // // void Verifier::gotoNum( int which ) // { -// TQString anchor = TQString::fromLatin1("match%1").arg(which); +// TQString anchor = TQString::tqfromLatin1("match%1").tqarg(which); // scrollToAnchor( anchor ); // _current = which; // emit currentChanged( _current ); diff --git a/kregexpeditor/verifier.h b/kregexpeditor/verifier.h index c22c27a..4d204de 100644 --- a/kregexpeditor/verifier.h +++ b/kregexpeditor/verifier.h @@ -23,11 +23,12 @@ class TQTimer; class TQProgressDialog; class TQLabel; class SyntaxHighlighter; -class Verifier :public QTextEdit +class Verifier :public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - Verifier( TQWidget* parent, const char* name = 0 ); + Verifier( TQWidget* tqparent, const char* name = 0 ); void setHighlighter( RegexpHighlighter* ); public slots: diff --git a/kregexpeditor/verifybuttons.cpp b/kregexpeditor/verifybuttons.cpp index d7ed66a..05b0fb7 100644 --- a/kregexpeditor/verifybuttons.cpp +++ b/kregexpeditor/verifybuttons.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #include <tqfiledialog.h> #include "images.h" @@ -39,59 +39,59 @@ #include <tqpopupmenu.h> #include <tqaction.h> -VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) - :TQDockWindow( TQDockWindow::InDock, parent, name ), _configMenu( 0 ) +VerifyButtons::VerifyButtons( TQWidget* tqparent, const char* name ) + :TQDockWindow( TQDockWindow::InDock, tqparent, name ), _configMenu( 0 ) { - TQBoxLayout* layout = boxLayout(); + TQBoxLayout* tqlayout = boxLayout(); _verify = new TQToolButton(this); - TQIconSet icon = Util::getSystemIconSet( TQString::fromLatin1("spellcheck")); + TQIconSet icon = Util::getSystemIconSet( TQString::tqfromLatin1("spellcheck")); _verify->setIconSet( icon ); TQToolTip::add( _verify, i18n( "Verify regular expression" ) ); TQWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the <i>verifier window</i>." "(The window below the graphical editor window).")); - layout->addWidget( _verify ); + tqlayout->addWidget( _verify ); connect( _verify, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( verify() ) ); TQToolButton* button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("fileopen")) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("fileopen")) ); + tqlayout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadText())); TQToolTip::add( button, i18n("Load text in the verifier window") ); button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("package_settings")) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("package_settings")) ); + tqlayout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure())); TQToolTip::add( button, i18n("Settings") ); // It is currently not possible to ask for the paragraph being highlighted, thefore scrolling to next/prev match // do not work. Enable this when they work. - // _first = new TQToolButton( TQString::fromLatin1("<<"), this); - // layout->addWidget( _first ); + // _first = new TQToolButton( TQString::tqfromLatin1("<<"), this); + // tqlayout->addWidget( _first ); // connect(_first, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoFirst())); // _first->setFixedWidth( 25 ); // - // _prev = new TQToolButton(TQString::fromLatin1("<"), this); - // layout->addWidget( _prev ); + // _prev = new TQToolButton(TQString::tqfromLatin1("<"), this); + // tqlayout->addWidget( _prev ); // connect(_prev, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoPrev())); // _prev->setFixedWidth( 20 ); // - // _next = new TQToolButton(TQString::fromLatin1(">"), this); - // layout->addWidget( _next ); + // _next = new TQToolButton(TQString::tqfromLatin1(">"), this); + // tqlayout->addWidget( _next ); // connect(_next, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoNext())); // _next->setFixedWidth( 20 ); // - // _last = new TQToolButton(TQString::fromLatin1(">>"), this); - // layout->addWidget( _last ); + // _last = new TQToolButton(TQString::tqfromLatin1(">>"), this); + // tqlayout->addWidget( _last ); // connect(_last, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoLast())); // _last->setFixedWidth( 25 ); // Same as above // TQLabel* label = new TQLabel( i18n("Matches: "), this ); -// layout->addWidget( label ); +// tqlayout->addWidget( label ); // _matches = new TQLabel(i18n("-"), this ); -// layout->addWidget( _matches ); +// tqlayout->addWidget( _matches ); // TQString txt = i18n( "Shows number of times regular expression matches the text in the verifier window"); // TQToolTip::add( label, txt ); // TQToolTip::add( _matches, txt ); @@ -100,14 +100,14 @@ VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) // -------------------------------------------------- RegExp Converters - // Qt - RegExpConverter* converter = new QtRegExpConverter(); - _converters.append( qMakePair( converter, static_cast<TQAction*>( 0 ) ) ); + // TQt + RegExpConverter* converter = new TQtRegExpConverter(); + _converters.append( tqMakePair( converter, static_cast<TQAction*>( 0 ) ) ); TQString qtConverterName = converter->name(); // Emacs converter = new EmacsRegExpConverter(); - _converters.append( qMakePair( converter, static_cast<TQAction*>( 0 ) ) ); + _converters.append( tqMakePair( converter, static_cast<TQAction*>( 0 ) ) ); // -------------------------------------------------- Initialize the config menu @@ -130,7 +130,7 @@ VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) _languageId = _configMenu->insertItem( i18n("RegExp Language"), languages ); TQActionGroup* grp = new TQActionGroup( this ); - for( TQValueList< QPair<RegExpConverter*,TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { + for( TQValueList< TQPair<RegExpConverter*,TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { TQString name = (*it).first->name(); TQAction* action = new TQAction( name, 0, this ); action->setToggleAction( true ); @@ -141,7 +141,7 @@ VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) connect( grp, TQT_SIGNAL( selected( TQAction* ) ), this, TQT_SLOT( slotChangeSyntax( TQAction* ) ) ); _configMenu->setItemEnabled( _languageId, false ); - // Select the Qt converter by default + // Select the TQt converter by default setSyntax( qtConverterName ); } @@ -154,13 +154,13 @@ void VerifyButtons::updateVerifyButton( bool b ) void VerifyButtons::loadText() { - TQString fileName = KFileDialog::getOpenFileName(TQString::null, TQString::null, this); + TQString fileName = KFileDialog::getOpenFileName(TQString(), TQString(), this); if ( !fileName.isNull() ) { emit loadVerifyText( fileName ); } } -// Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match +// TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // void VerifyButtons::enableBackwardButtons( bool b ) // { @@ -176,10 +176,10 @@ void VerifyButtons::loadText() void VerifyButtons::setMatchCount( int /*count*/ ) { -// currently this is not possible due to limitation in QSyntaxHighlighter +// currently this is not possible due to limitation in TQSyntaxHighlighter /* if ( count == -1 ) - _matches->setText( TQString::fromLatin1("-") ); + _matches->setText( TQString::tqfromLatin1("-") ); else _matches->setText( TQString::number( count ) ); */ @@ -192,7 +192,7 @@ void VerifyButtons::slotChangeSyntax( TQAction* action ) RegExpConverter* VerifyButtons::setSyntax( const TQString& which) { - for( TQValueList< QPair<RegExpConverter*, TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { + for( TQValueList< TQPair<RegExpConverter*, TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { TQString name = (*it).first->name(); if ( name == which ) { (*it).second->setOn( true ); @@ -208,7 +208,7 @@ void VerifyButtons::configure() _configMenu->exec( TQCursor::pos() ); } -void VerifyButtons::setAllowNonQtSyntax( bool b ) +void VerifyButtons::setAllowNonTQtSyntax( bool b ) { _configMenu->setItemEnabled( _languageId, b ); } diff --git a/kregexpeditor/verifybuttons.h b/kregexpeditor/verifybuttons.h index abebe90..1298573 100644 --- a/kregexpeditor/verifybuttons.h +++ b/kregexpeditor/verifybuttons.h @@ -25,21 +25,22 @@ class TQLabel; class TQAction; class TQPopupMenu; -class VerifyButtons :public QDockWindow +class VerifyButtons :public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - VerifyButtons( TQWidget* parent, const char* name ); + VerifyButtons( TQWidget* tqparent, const char* name ); RegExpConverter* setSyntax( const TQString& ); - void setAllowNonQtSyntax( bool ); + void setAllowNonTQtSyntax( bool ); signals: void verify(); void autoVerify( bool ); void loadVerifyText( const TQString& ); - // Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match + // TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // void gotoFirst(); // void gotoPrev(); @@ -65,14 +66,14 @@ private: TQPopupMenu* _configMenu; int _languageId; - // Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match + // TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // TQToolButton* _first; // TQToolButton* _prev; // TQToolButton* _next; // TQToolButton* _last; - TQValueList< QPair<RegExpConverter*,TQAction*> > _converters; + TQValueList< TQPair<RegExpConverter*,TQAction*> > _converters; }; diff --git a/kregexpeditor/widgetfactory.cpp b/kregexpeditor/widgetfactory.cpp index a5a7a78..4bbc2b9 100644 --- a/kregexpeditor/widgetfactory.cpp +++ b/kregexpeditor/widgetfactory.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <kmessagebox.h> @@ -46,35 +46,35 @@ bool WidgetFactory::isContainer( RegExpType tp ) return ( tp == REPEAT || tp == ALTN || tp == COMPOUND ); } -RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, TQWidget* parent, +RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, TQWidget* tqparent, RegExpType type ) { RegExpWidget* widget = 0; switch (type) { case TEXT: - return new TextWidget( win, parent ); break; + return new TextWidget( win, tqparent ); break; case ALTN: - return new AltnWidget( win, parent ); break; + return new AltnWidget( win, tqparent ); break; case DOT: - return new AnyCharWidget( win, parent ); break; + return new AnyCharWidget( win, tqparent ); break; case BEGLINE: - return new BegLineWidget( win, parent ); break; + return new BegLineWidget( win, tqparent ); break; case ENDLINE: - return new EndLineWidget( win, parent ); break; + return new EndLineWidget( win, tqparent ); break; case WORDBOUNDARY: - return new WordBoundaryWidget( win, parent ); break; + return new WordBoundaryWidget( win, tqparent ); break; case NONWORDBOUNDARY: - return new NonWordBoundaryWidget( win, parent ); break; + return new NonWordBoundaryWidget( win, tqparent ); break; case POSLOOKAHEAD: case NEGLOOKAHEAD: - return new LookAheadWidget( win, type, parent ); break; + return new LookAheadWidget( win, type, tqparent ); break; case REPEAT: - widget = new RepeatWidget( win, parent ); break; + widget = new RepeatWidget( win, tqparent ); break; case CHARSET: - widget = new CharactersWidget( win, parent ); break; + widget = new CharactersWidget( win, tqparent ); break; case COMPOUND: - widget = new CompoundWidget( win, parent ); break; + widget = new CompoundWidget( win, tqparent ); break; default: qFatal("It should not be possible to get here!"); return 0; @@ -88,43 +88,43 @@ RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, TQWidget* pa } RegExpWidget* WidgetFactory::createWidget( RegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent ) + TQWidget* tqparent ) { if ( regexp == 0 ) { qFatal("%s:%d Regexp is 0", __FILE__, __LINE__ ); } else if ( TextRegExp* reg = dynamic_cast<TextRegExp*>( regexp ) ) - return new TextWidget( reg, editorWindow, parent ); + return new TextWidget( reg, editorWindow, tqparent ); else if ( TextRangeRegExp* reg = dynamic_cast<TextRangeRegExp*>( regexp ) ) - return new CharactersWidget( reg, editorWindow, parent ); + return new CharactersWidget( reg, editorWindow, tqparent ); else if ( RepeatRegExp* reg = dynamic_cast<RepeatRegExp*>( regexp ) ) - return new RepeatWidget( reg, editorWindow, parent ); + return new RepeatWidget( reg, editorWindow, tqparent ); else if ( LookAheadRegExp* reg = dynamic_cast<LookAheadRegExp*>( regexp ) ) { if ( reg->lookAheadType() == LookAheadRegExp::POSITIVE ) - return new LookAheadWidget( reg, editorWindow, POSLOOKAHEAD, parent ); + return new LookAheadWidget( reg, editorWindow, POSLOOKAHEAD, tqparent ); else - return new LookAheadWidget( reg, editorWindow, NEGLOOKAHEAD, parent ); + return new LookAheadWidget( reg, editorWindow, NEGLOOKAHEAD, tqparent ); } else if ( ConcRegExp* reg = dynamic_cast<ConcRegExp*>( regexp ) ) - return new ConcWidget( reg, editorWindow, parent ); + return new ConcWidget( reg, editorWindow, tqparent ); else if ( AltnRegExp* reg = dynamic_cast<AltnRegExp*>( regexp ) ) - return new AltnWidget( reg, editorWindow, parent ); + return new AltnWidget( reg, editorWindow, tqparent ); else if ( PositionRegExp* reg = dynamic_cast<PositionRegExp*>( regexp ) ) { switch ( reg->position() ) { case PositionRegExp::BEGLINE: - return new BegLineWidget( editorWindow, parent ); + return new BegLineWidget( editorWindow, tqparent ); case PositionRegExp::ENDLINE: - return new EndLineWidget( editorWindow, parent ); + return new EndLineWidget( editorWindow, tqparent ); case PositionRegExp::WORDBOUNDARY: - return new WordBoundaryWidget( editorWindow, parent ); + return new WordBoundaryWidget( editorWindow, tqparent ); case PositionRegExp::NONWORDBOUNDARY: - return new NonWordBoundaryWidget( editorWindow, parent ); + return new NonWordBoundaryWidget( editorWindow, tqparent ); } } else if ( dynamic_cast<DotRegExp*>( regexp ) ) - return new AnyCharWidget( editorWindow, parent ); + return new AnyCharWidget( editorWindow, tqparent ); else if ( CompoundRegExp* reg = dynamic_cast<CompoundRegExp*>( regexp ) ) - return new CompoundWidget( reg, editorWindow, parent ); + return new CompoundWidget( reg, editorWindow, tqparent ); else { qFatal("%s:%d Internal Error: Unknown RegExp type", __FILE__, __LINE__); } @@ -162,7 +162,7 @@ RegExp* WidgetFactory::createRegExp( TQDomElement node, const TQString& version else if ( tag == TQString::fromLocal8Bit( "Repeat" ) ) regexp = new RepeatRegExp( false ); else { - KMessageBox::sorry( 0, i18n("<p>Unknown tag while reading XML. Tag was <b>%1</b></p>").arg(tag), + KMessageBox::sorry( 0, i18n("<p>Unknown tag while reading XML. Tag was <b>%1</b></p>").tqarg(tag), i18n("Error While Loading From XML File") ) ; return 0; @@ -191,14 +191,14 @@ RegExp* WidgetFactory::createRegExp( TQString str ) // Read the RegularExpression element, and extract the version. TQDomElement top = doc.documentElement(); if (! (top.tagName() == TQString::fromLocal8Bit("RegularExpression")) ) { - KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").arg(TQString::fromLatin1("RegularExpression")), + KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").tqarg(TQString::tqfromLatin1("RegularExpression")), i18n("Error While Loading From XML File") ) ; } TQString version = top.attribute( TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version ); TQDomNode child = top.firstChild(); if ( ! child.isElement() ) { KMessageBox::sorry( 0, i18n("<p>Error while reading XML file. The element just below the tag " - "<b>%1</b> was not an element.</p>").arg(TQString::fromLatin1("RegularExpression")), + "<b>%1</b> was not an element.</p>").tqarg(TQString::tqfromLatin1("RegularExpression")), i18n("Error While Loading From XML File") ) ; } diff --git a/kregexpeditor/widgetfactory.h b/kregexpeditor/widgetfactory.h index 2ef7233..836ee12 100644 --- a/kregexpeditor/widgetfactory.h +++ b/kregexpeditor/widgetfactory.h @@ -47,10 +47,10 @@ enum RegExpType { class WidgetFactory { public: - static RegExpWidget* createWidget( RegExpEditorWindow* editorWindow, TQWidget* parent, + static RegExpWidget* createWidget( RegExpEditorWindow* editorWindow, TQWidget* tqparent, RegExpType type ); static RegExpWidget* createWidget( RegExp* regexp, RegExpEditorWindow* editorWindow, - TQWidget* parent ); + TQWidget* tqparent ); static RegExp* createRegExp( TQDomElement node, const TQString& version ); static RegExp* createRegExp( TQString str ); static bool isContainer( RegExpType ); diff --git a/kregexpeditor/zerowidgets.cpp b/kregexpeditor/zerowidgets.cpp index f9de296..ede99cb 100644 --- a/kregexpeditor/zerowidgets.cpp +++ b/kregexpeditor/zerowidgets.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klocale.h> @@ -31,18 +31,18 @@ // ZeroWidget //-------------------------------------------------------------------------------- ZeroWidget::ZeroWidget(TQString txt, RegExpEditorWindow* editorWindow, - TQWidget *parent, const char *name) - : RegExpWidget(editorWindow, parent, name ? name : "ZeroWidget" ) + TQWidget *tqparent, const char *name) + : RegExpWidget(editorWindow, tqparent, name ? name : "ZeroWidget" ) { _text = txt; } void ZeroWidget::addNewChild(DragAccepter *, RegExpWidget *) { - qFatal("No children should be added to this widget!"); + qFatal("No tqchildren should be added to this widget!"); } -TQSize ZeroWidget::sizeHint() const +TQSize ZeroWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize( metrics, _text ); @@ -54,7 +54,7 @@ TQSize ZeroWidget::sizeHint() const void ZeroWidget::paintEvent( TQPaintEvent *e) { // So what is my Size? - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize); @@ -70,9 +70,9 @@ void ZeroWidget::paintEvent( TQPaintEvent *e) //-------------------------------------------------------------------------------- // AnyCharWidget //-------------------------------------------------------------------------------- -AnyCharWidget::AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +AnyCharWidget::AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : ZeroWidget(i18n("Any\nCharacter"), editorWindow, parent, + : ZeroWidget(i18n("Any\nCharacter"), editorWindow, tqparent, name ? name : "AnyCharWidget") { } @@ -86,9 +86,9 @@ RegExp* AnyCharWidget::regExp() const //-------------------------------------------------------------------------------- // BegLineWidget //-------------------------------------------------------------------------------- -BegLineWidget::BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +BegLineWidget::BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : ZeroWidget(i18n("Line\nStart"), editorWindow, parent, + : ZeroWidget(i18n("Line\nStart"), editorWindow, tqparent, name ? name : "BegLineWidget") { } @@ -102,9 +102,9 @@ RegExp* BegLineWidget::regExp() const //-------------------------------------------------------------------------------- // EndLineWidget //-------------------------------------------------------------------------------- -EndLineWidget::EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +EndLineWidget::EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : ZeroWidget(i18n("Line\nEnd"), editorWindow, parent, name) + : ZeroWidget(i18n("Line\nEnd"), editorWindow, tqparent, name) { } @@ -116,9 +116,9 @@ RegExp* EndLineWidget::regExp() const //-------------------------------------------------------------------------------- // WordBoundaryWidget //-------------------------------------------------------------------------------- -WordBoundaryWidget::WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +WordBoundaryWidget::WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : ZeroWidget(i18n("Word\nBoundary"), editorWindow, parent, + : ZeroWidget(i18n("Word\nBoundary"), editorWindow, tqparent, name ? name : "WordBoundaryWidget" ) { } @@ -131,9 +131,9 @@ RegExp* WordBoundaryWidget::regExp() const //-------------------------------------------------------------------------------- // NonWordBoundaryWidget //-------------------------------------------------------------------------------- -NonWordBoundaryWidget::NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, +NonWordBoundaryWidget::NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name) - : ZeroWidget(i18n("Non-word\nBoundary"), editorWindow, parent, + : ZeroWidget(i18n("Non-word\nBoundary"), editorWindow, tqparent, name ? name : "NonWordBoundaryWidget" ) { } diff --git a/kregexpeditor/zerowidgets.h b/kregexpeditor/zerowidgets.h index 04dd5c7..f418988 100644 --- a/kregexpeditor/zerowidgets.h +++ b/kregexpeditor/zerowidgets.h @@ -27,10 +27,10 @@ class ZeroWidget :public RegExpWidget { public: - ZeroWidget(TQString text, RegExpEditorWindow* editorWindow, TQWidget *parent, + ZeroWidget(TQString text, RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected: virtual void paintEvent( TQPaintEvent *e ); @@ -51,7 +51,7 @@ private: class AnyCharWidget :public ZeroWidget { public: - AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *label = 0); virtual RegExp* regExp() const; @@ -68,7 +68,7 @@ public: class BegLineWidget : public ZeroWidget { public: - BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); virtual RegExp* regExp() const; virtual RegExpType type() const { return BEGLINE; } @@ -84,7 +84,7 @@ public: class EndLineWidget : public ZeroWidget { public: - EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); virtual RegExp* regExp() const; virtual RegExpType type() const { return ENDLINE; } @@ -99,7 +99,7 @@ public: class WordBoundaryWidget : public ZeroWidget { public: - WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); virtual RegExp* regExp() const; virtual RegExpType type() const { return WORDBOUNDARY; } @@ -115,7 +115,7 @@ public: class NonWordBoundaryWidget : public ZeroWidget { public: - NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, + NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent, const char *name = 0); virtual RegExp* regExp() const; virtual RegExpType type() const { return NONWORDBOUNDARY; } diff --git a/ksim/baselist.h b/ksim/baselist.h index 6ee7bcc..e56915b 100644 --- a/ksim/baselist.h +++ b/ksim/baselist.h @@ -52,7 +52,7 @@ namespace KSim return false; // Find our object and remove it from the list - if (m_baseList->findRef(object) >= 0) + if (m_baseList->tqfindRef(object) >= 0) return m_baseList->remove(); return false; @@ -67,7 +67,7 @@ namespace KSim for (; object.current(); ++object) { // Call processEvents() so our ui doesn't block if (!object.current()->isThemeConfigOnly() || themeChanged) { - qApp->processEvents(); + tqApp->processEvents(); object.current()->configureObject(true); } } diff --git a/ksim/generalprefs.cpp b/ksim/generalprefs.cpp index ef4519b..f335d0f 100644 --- a/ksim/generalprefs.cpp +++ b/ksim/generalprefs.cpp @@ -40,8 +40,8 @@ #include <ksimconfig.h> -KSim::GeneralPrefs::GeneralPrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::GeneralPrefs::GeneralPrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_mainLayout = new TQGridLayout(this); m_mainLayout->setSpacing(6); @@ -50,7 +50,7 @@ KSim::GeneralPrefs::GeneralPrefs(TQWidget *parent, const char *name) m_sizeBox->setTitle(i18n("Graph Size")); m_sizeBox->setColumnLayout(0, Qt::Horizontal); - TQGridLayout *sizeBoxLayout = new TQGridLayout(m_sizeBox->layout()); + TQGridLayout *sizeBoxLayout = new TQGridLayout(m_sizeBox->tqlayout()); sizeBoxLayout->setSpacing(6); m_sizeHLabel = new TQLabel(m_sizeBox); @@ -61,7 +61,7 @@ KSim::GeneralPrefs::GeneralPrefs(TQWidget *parent, const char *name) m_sizeHSpin->setValue(40); m_sizeHSpin->setMinValue(40); m_sizeHSpin->setMaxValue(200); - m_sizeHSpin->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + m_sizeHSpin->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); sizeBoxLayout->addWidget(m_sizeHSpin, 0, 1); @@ -77,7 +77,7 @@ KSim::GeneralPrefs::GeneralPrefs(TQWidget *parent, const char *name) m_sizeWSpin->setValue(58); m_sizeWSpin->setMinValue(58); m_sizeWSpin->setMaxValue(200); - m_sizeWSpin->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + m_sizeWSpin->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); sizeBoxLayout->addWidget(m_sizeWSpin, 1, 1); @@ -122,8 +122,8 @@ void KSim::GeneralPrefs::readConfig(KSim::Config *config) m_recolourThemes->setChecked(config->reColourThemes()); } -KSim::ClockPrefs::ClockPrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::ClockPrefs::ClockPrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_mainLayout = new TQVBoxLayout(this); m_mainLayout->setSpacing(6); @@ -157,8 +157,8 @@ void KSim::ClockPrefs::readConfig(KSim::Config *config) m_dateCheck->setChecked(config->showDate()); } -KSim::UptimePrefs::UptimePrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::UptimePrefs::UptimePrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_addIcon = SmallIconSet("filenew"); m_removeIcon = SmallIconSet("editdelete"); @@ -168,7 +168,7 @@ KSim::UptimePrefs::UptimePrefs(TQWidget *parent, const char *name) m_uptimeCombo = new KComboBox(true, this); m_uptimeCombo->setDuplicatesEnabled(false); - m_uptimeCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_uptimeCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); m_uptimeCombo->insertItem(i18n("%hh:%mm:%ss")); m_uptimeCombo->insertItem(i18n("%dd %h:%m")); @@ -211,10 +211,10 @@ KSim::UptimePrefs::UptimePrefs(TQWidget *parent, const char *name) m_uptimeBox = new TQGroupBox(this); m_uptimeBox->setTitle(i18n("Uptime Legend")); m_uptimeBox->setColumnLayout(0, Qt::Vertical); - m_uptimeBox->layout()->setSpacing(0); - m_uptimeBox->layout()->setMargin(0); - m_boxLayout = new TQVBoxLayout(m_uptimeBox->layout()); - m_boxLayout->setAlignment(Qt::AlignTop); + m_uptimeBox->tqlayout()->setSpacing(0); + m_uptimeBox->tqlayout()->setMargin(0); + m_boxLayout = new TQVBoxLayout(m_uptimeBox->tqlayout()); + m_boxLayout->tqsetAlignment(TQt::AlignTop); m_boxLayout->setSpacing(6); m_boxLayout->setMargin(11); @@ -294,8 +294,8 @@ void KSim::UptimePrefs::removeUptimeItem() m_uptimeCombo->setCurrentItem(currentItem - 1); } -KSim::MemoryPrefs::MemoryPrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::MemoryPrefs::MemoryPrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_addIcon = SmallIconSet("filenew"); m_removeIcon = SmallIconSet("editdelete"); @@ -305,7 +305,7 @@ KSim::MemoryPrefs::MemoryPrefs(TQWidget *parent, const char *name) m_memCombo = new KComboBox(true, this); m_memCombo->setDuplicatesEnabled(false); - m_memCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_memCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); //m_memCombo->insertItem(i18n("%tM - %fM free")); //m_memCombo->insertItem(i18n("%tM - %uM used")); @@ -347,10 +347,10 @@ KSim::MemoryPrefs::MemoryPrefs(TQWidget *parent, const char *name) m_memBox = new TQGroupBox(this); m_memBox->setTitle(i18n("Memory Legend")); m_memBox->setColumnLayout(0, Qt::Vertical); - m_memBox->layout()->setSpacing(0); - m_memBox->layout()->setMargin(0); - m_boxLayout = new TQVBoxLayout(m_memBox->layout()); - m_boxLayout->setAlignment(Qt::AlignTop); + m_memBox->tqlayout()->setSpacing(0); + m_memBox->tqlayout()->setMargin(0); + m_boxLayout = new TQVBoxLayout(m_memBox->tqlayout()); + m_boxLayout->tqsetAlignment(TQt::AlignTop); m_boxLayout->setSpacing(6); m_boxLayout->setMargin(11); @@ -442,8 +442,8 @@ void KSim::MemoryPrefs::removeMemoryItem() m_memCombo->setCurrentItem(currentItem - 1); } -KSim::SwapPrefs::SwapPrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::SwapPrefs::SwapPrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_addIcon = SmallIconSet("filenew"); m_removeIcon = SmallIconSet("editdelete"); @@ -458,7 +458,7 @@ KSim::SwapPrefs::SwapPrefs(TQWidget *parent, const char *name) m_swapCombo = new KComboBox(true, this); m_swapCombo->setDuplicatesEnabled(false); - m_swapCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_swapCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); //m_swapCombo->insertItem(i18n("%tM - %fM free")); //m_swapCombo->insertItem(i18n("%tM - %uM used")); @@ -496,10 +496,10 @@ KSim::SwapPrefs::SwapPrefs(TQWidget *parent, const char *name) m_swapBox = new TQGroupBox(this); m_swapBox->setTitle(i18n("Swap Legend")); m_swapBox->setColumnLayout(0, Qt::Vertical); - m_swapBox->layout()->setSpacing(0); - m_swapBox->layout()->setMargin(0); - m_boxLayout = new TQVBoxLayout(m_swapBox->layout()); - m_boxLayout->setAlignment(Qt::AlignTop); + m_swapBox->tqlayout()->setSpacing(0); + m_swapBox->tqlayout()->setMargin(0); + m_boxLayout = new TQVBoxLayout(m_swapBox->tqlayout()); + m_boxLayout->tqsetAlignment(TQt::AlignTop); m_boxLayout->setSpacing(6); m_boxLayout->setMargin(11); diff --git a/ksim/generalprefs.h b/ksim/generalprefs.h index 33ae908..ae77882 100644 --- a/ksim/generalprefs.h +++ b/ksim/generalprefs.h @@ -40,11 +40,12 @@ namespace KSim { class Config; - class GeneralPrefs : public QWidget + class GeneralPrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - GeneralPrefs(TQWidget *parent, const char *name=0); + GeneralPrefs(TQWidget *tqparent, const char *name=0); ~GeneralPrefs(); public slots: @@ -62,11 +63,12 @@ namespace KSim TQCheckBox *m_recolourThemes; }; - class ClockPrefs : public QWidget + class ClockPrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ClockPrefs(TQWidget *parent, const char *name=0); + ClockPrefs(TQWidget *tqparent, const char *name=0); ~ClockPrefs(); public slots: @@ -79,11 +81,12 @@ namespace KSim TQCheckBox *m_dateCheck; }; - class UptimePrefs : public QWidget + class UptimePrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - UptimePrefs(TQWidget *parent, const char *name=0); + UptimePrefs(TQWidget *tqparent, const char *name=0); ~UptimePrefs(); public slots: @@ -113,11 +116,12 @@ namespace KSim TQIconSet m_removeIcon; }; - class MemoryPrefs : public QWidget + class MemoryPrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - MemoryPrefs(TQWidget *parent, const char *name=0); + MemoryPrefs(TQWidget *tqparent, const char *name=0); ~MemoryPrefs(); public slots: @@ -149,11 +153,12 @@ namespace KSim TQIconSet m_removeIcon; }; - class SwapPrefs : public QWidget + class SwapPrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SwapPrefs(TQWidget *parent, const char *name=0); + SwapPrefs(TQWidget *tqparent, const char *name=0); ~SwapPrefs(); public slots: diff --git a/ksim/ksim.cpp b/ksim/ksim.cpp index 8a2b643..24e39f7 100644 --- a/ksim/ksim.cpp +++ b/ksim/ksim.cpp @@ -35,19 +35,19 @@ extern "C" { - KDE_EXPORT KPanelExtension *init(TQWidget *parent, const TQString &configFile) + KDE_EXPORT KPanelExtension *init(TQWidget *tqparent, const TQString &configFile) { KGlobal::locale()->insertCatalogue("ksim"); return new KSim::PanelExtension(configFile, KPanelExtension::Normal, KPanelExtension::About | KPanelExtension::Help | KPanelExtension::Preferences | KPanelExtension::ReportBug, - parent, "ksim"); + tqparent, "ksim"); } } KSim::PanelExtension::PanelExtension(const TQString &configFile, - Type type, int actions, TQWidget *parent, const char *name) - : KPanelExtension(configFile, type, actions, parent, name) + Type type, int actions, TQWidget *tqparent, const char *name) + : KPanelExtension(configFile, type, actions, tqparent, name) { m_dcopClient = new DCOPClient; m_view = new KSim::MainView(config(), true, this, "m_view"); @@ -75,9 +75,9 @@ KSim::PanelExtension::~PanelExtension() delete m_dcopClient; } -TQSize KSim::PanelExtension::sizeHint(Position p, TQSize maxSize) const +TQSize KSim::PanelExtension::tqsizeHint(Position p, TQSize maxSize) const { - return m_view->sizeHint(p, maxSize); + return m_view->tqsizeHint(p, maxSize); } void KSim::PanelExtension::resizeEvent(TQResizeEvent *) diff --git a/ksim/ksim.h b/ksim/ksim.h index 81ff480..e74e068 100644 --- a/ksim/ksim.h +++ b/ksim/ksim.h @@ -35,13 +35,14 @@ namespace KSim class PanelExtension : public KPanelExtension { Q_OBJECT + TQ_OBJECT public: PanelExtension( const TQString & configFile, Type type, - int actions, TQWidget * parent, const char * name); + int actions, TQWidget * tqparent, const char * name); ~PanelExtension(); - TQSize sizeHint( Position, TQSize maxSize ) const; + TQSize tqsizeHint( Position, TQSize maxSize ) const; void resizeEvent(TQResizeEvent *); Position preferedPosition() const; diff --git a/ksim/ksimframe.cpp b/ksim/ksimframe.cpp index a76eddf..b62c0ca 100644 --- a/ksim/ksimframe.cpp +++ b/ksim/ksimframe.cpp @@ -23,8 +23,8 @@ #include "ksim.h" #include "themetypes.h" -KSim::Frame::Frame(int type, TQWidget *parent, const char *name) - : TQWidget (parent, name) +KSim::Frame::Frame(int type, TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name) { setType(type); @@ -36,7 +36,7 @@ KSim::Frame::~Frame() { } -void KSim::Frame::configureObject(bool repaintWidget) +void KSim::Frame::configureObject(bool tqrepaintWidget) { m_image.load(themeLoader().current().framePixmap(type())); @@ -58,7 +58,7 @@ void KSim::Frame::configureObject(bool repaintWidget) themeLoader().reColourImage(m_image); m_background.convertFromImage(m_image.smoothScale(size())); - if (repaintWidget) + if (tqrepaintWidget) update(); } diff --git a/ksim/ksimframe.h b/ksim/ksimframe.h index 5b8db0e..aee425f 100644 --- a/ksim/ksimframe.h +++ b/ksim/ksimframe.h @@ -34,12 +34,13 @@ namespace KSim class Frame : public TQWidget, public KSim::Base { Q_OBJECT + TQ_OBJECT public: - Frame(int type, TQWidget *parent, const char *name = 0); + Frame(int type, TQWidget *tqparent, const char *name = 0); ~Frame(); const TQPixmap *const background() const { return &m_background; } - virtual void configureObject(bool repaintWidget=true); + virtual void configureObject(bool tqrepaintWidget=true); protected: virtual void paintEvent(TQPaintEvent *); diff --git a/ksim/ksimpref.cpp b/ksim/ksimpref.cpp index c4ff4dc..6d426c7 100644 --- a/ksim/ksimpref.cpp +++ b/ksim/ksimpref.cpp @@ -37,9 +37,9 @@ #include <tqframe.h> KSim::ConfigDialog::ConfigDialog(KSim::Config *config, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : KDialogBase(TreeList, i18n("Configure"), - Help | Ok | Apply | Close, Ok, parent, name, true, true) + Help | Ok | Apply | Close, Ok, tqparent, name, true, true) { resize(466, 363); setShowIconsInTreeList(true); @@ -93,7 +93,7 @@ KSim::ConfigDialog::ConfigDialog(KSim::Config *config, connect(this, TQT_SIGNAL(applyClicked()), TQT_SLOT(savePrefs())); connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(closePrefs())); connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(loadPluginConfig())); - connect(parent, TQT_SIGNAL(reload()), TQT_SLOT(reload())); + connect(tqparent, TQT_SIGNAL(reload()), TQT_SLOT(reload())); KSim::PluginList::ConstIterator it; const KSim::PluginList &pluginList = KSim::PluginLoader::self().pluginList(); @@ -119,15 +119,15 @@ void KSim::ConfigDialog::reload() void KSim::ConfigDialog::removePage(const TQCString &name) { - const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name); + const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name); if (plugin.isNull() || !plugin.configPage()) { KMessageBox::sorry(0, i18n("Failed to remove %1's config page due to the " - "plugin not being loaded or the config page has not been created").arg(name)); + "plugin not being loaded or the config page has not been created").tqarg(name.data())); return; } - TQWidget *frame = plugin.configPage()->parentWidget(); - // reparent the widget if the parent is not null + TQWidget *frame = plugin.configPage()->tqparentWidget(); + // reparent the widget if the tqparent is not null if (frame) { plugin.configPage()->hide(); plugin.configPage()->reparent(0, TQPoint(0, 0), false); @@ -139,7 +139,7 @@ void KSim::ConfigDialog::removePage(const TQCString &name) void KSim::ConfigDialog::createPage(const TQCString &name) { - const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name); + const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name); createPage(plugin); } @@ -148,7 +148,7 @@ void KSim::ConfigDialog::createPage(const KSim::Plugin &plugin) if (plugin.isNull() || !plugin.configPage()) { KMessageBox::sorry(0, i18n("Failed to add %1's config page due to the plugin" " not being loaded or the config page has not been created") - .arg(plugin.libName())); + .tqarg(plugin.libName().data())); return; } @@ -156,7 +156,7 @@ void KSim::ConfigDialog::createPage(const KSim::Plugin &plugin) TQStringList list; list << ' ' + i18n("Plugins") << ' ' + plugin.name(); - TQFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").arg(plugin.name()), + TQFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").tqarg(plugin.name()), plugin.icon()); plugin.configPage()->reparent(pluginFrame, TQPoint(0, 0), true); @@ -193,7 +193,7 @@ void KSim::ConfigDialog::saveConfig(bool reload) info.libName(true), item->text(0), info.location(), findPlugin(item->text(0)).isEnabled())); - KSim::PluginLoader::self().find(info).setEnabled(item->isOn()); + KSim::PluginLoader::self().tqfind(info).setEnabled(item->isOn()); } m_currentPlugins = changedPlugins; diff --git a/ksim/ksimpref.h b/ksim/ksimpref.h index ef3f9a3..4175ca5 100644 --- a/ksim/ksimpref.h +++ b/ksim/ksimpref.h @@ -73,8 +73,9 @@ namespace KSim class KDE_EXPORT ConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ConfigDialog(KSim::Config *config, TQWidget *parent, const char *name = 0); + ConfigDialog(KSim::Config *config, TQWidget *tqparent, const char *name = 0); ~ConfigDialog(); public slots: diff --git a/ksim/ksimsysinfo.cpp b/ksim/ksimsysinfo.cpp index 7140e3a..cda1d58 100644 --- a/ksim/ksimsysinfo.cpp +++ b/ksim/ksimsysinfo.cpp @@ -41,8 +41,8 @@ #include <string.h> KSim::Sysinfo::Sysinfo(KSim::Config *config, - TQWidget *parent, const char *name, WFlags fl) - : DCOPObject("sysinfo"), TQWidget(parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : DCOPObject("sysinfo"), TQWidget(tqparent, name, fl) { m_config = config; m_layout = new TQVBoxLayout(this); @@ -86,7 +86,7 @@ void KSim::Sysinfo::clockUptimeUpdate() // only update the date when necessary if (m_dateLabel) { if (updateDate) { - m_dateLabel->setText(KGlobal::locale()->formatDate(TQDate::currentDate())); + m_dateLabel->setText(KGlobal::locale()->formatDate(TQDate::tqcurrentDate())); updateDate = false; } } @@ -110,7 +110,7 @@ void KSim::Sysinfo::clockUptimeUpdate() TQString seconds; // found days so we have to modify hours - if (uptime.find(TQRegExp("%d" ), 0) >= 0) + if (uptime.tqfind(TQRegExp("%d" ), 0) >= 0) uptimeHours -= (uptimeDays * 24); days.sprintf("%02li", uptimeDays); @@ -118,10 +118,10 @@ void KSim::Sysinfo::clockUptimeUpdate() minutes.sprintf("%02li", uptimeMins); seconds.sprintf("%02li", uptimeSecs); - uptime.replace(TQRegExp("%d"), days); - uptime.replace(TQRegExp("%h"), hours); - uptime.replace(TQRegExp("%m"), minutes); - uptime.replace(TQRegExp("%s"), seconds); + uptime.tqreplace(TQRegExp("%d"), days); + uptime.tqreplace(TQRegExp("%h"), hours); + uptime.tqreplace(TQRegExp("%m"), minutes); + uptime.tqreplace(TQRegExp("%s"), seconds); m_uptimeLabel->setText(uptime); } } @@ -140,15 +140,15 @@ void KSim::Sysinfo::sysUpdate() unsigned long cache = system.cacheRam(); unsigned long used = system.usedRam(); unsigned long allFree = free + buffer + cache; - bool all = memory.find( "%F" ) != -1; - - memory.replace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); - memory.replace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); - memory.replace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); - memory.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); - memory.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - memory.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); - memory.replace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); + bool all = memory.tqfind( "%F" ) != -1; + + memory.tqreplace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); + memory.tqreplace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); + memory.tqreplace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); + memory.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); + memory.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + memory.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + memory.tqreplace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); kdDebug(2003) << memory << endl; m_memLabel->setText("Memory"); TQToolTip::add(m_memLabel, memory ); @@ -164,16 +164,16 @@ void KSim::Sysinfo::sysUpdate() unsigned long total = system.totalSwap(); unsigned long free = system.freeSwap(); unsigned long swapUsed = system.usedSwap(); - swap.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); - swap.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - swap.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + swap.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); + swap.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + swap.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); m_swapLabel->setText("Swap"); TQToolTip::add(m_swapLabel, swap); m_swapLabel->setValue(System::bytesToMegs(total) - System::bytesToMegs(free)); } // if (m_config->showProcs()) { -// m_procsLabel->setText(i18n("Procs: %1").arg(sysInfo.procs)); +// m_procsLabel->setText(i18n("Procs: %1").tqarg(sysInfo.procs)); // } } @@ -274,7 +274,7 @@ void KSim::Sysinfo::createView() m_procsLabel = 0L; }*/ -// m_layout->invalidate(); +// m_layout->tqinvalidate(); updateGeometry(); adjustSize(); diff --git a/ksim/ksimsysinfo.h b/ksim/ksimsysinfo.h index b4f8609..2844a00 100644 --- a/ksim/ksimsysinfo.h +++ b/ksim/ksimsysinfo.h @@ -34,9 +34,10 @@ namespace KSim class Sysinfo : public TQWidget, virtual public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP public: - Sysinfo(KSim::Config *config, TQWidget *parent=0, + Sysinfo(KSim::Config *config, TQWidget *tqparent=0, const char *name=0, WFlags fl=0); ~Sysinfo(); diff --git a/ksim/ksimview.cpp b/ksim/ksimview.cpp index 64f4462..b0b35b6 100644 --- a/ksim/ksimview.cpp +++ b/ksim/ksimview.cpp @@ -119,7 +119,7 @@ KSim::MainView::MainView(KConfig *config, m_hostLabel->setText(i18n("Unknown")); else { TQCString host(hostName); - int dotLocation = host.find("."); + int dotLocation = host.tqfind("."); if (!m_config->displayFqdn() && dotLocation != -1) host.truncate(dotLocation); @@ -150,7 +150,7 @@ KSim::MainView::MainView(KConfig *config, addPlugins(); } - connect(&m_maskTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMaskMainView())); + connect(&m_tqmaskTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMaskMainView())); } KSim::MainView::~MainView() @@ -160,7 +160,7 @@ KSim::MainView::~MainView() void KSim::MainView::show() { - maskMainView(); + tqmaskMainView(); TQWidget::show(); } @@ -183,8 +183,8 @@ KSim::Config *KSim::MainView::config() const void KSim::MainView::makeDirs() { TQString homeDir = locateLocal("data", "ksim"); - TQString themeDir = homeDir + TQString::fromLatin1("/themes"); - TQString monitorDir = homeDir + TQString::fromLatin1("/monitors"); + TQString themeDir = homeDir + TQString::tqfromLatin1("/themes"); + TQString monitorDir = homeDir + TQString::tqfromLatin1("/monitors"); // return true if the dirs already exist if (TQFile::exists(themeDir) && TQFile::exists(monitorDir)) @@ -207,35 +207,35 @@ const TQString &KSim::MainView::hostname() const void KSim::MainView::slotMaskMainView() { - maskMainView(); + tqmaskMainView(); } -void KSim::MainView::maskMainView() +void KSim::MainView::tqmaskMainView() { - if (!m_topFrame->background()->mask() || - !m_leftFrame->background()->mask() || - !m_rightFrame->background()->mask() || - !m_bottomFrame->background()->mask()) + if (!m_topFrame->background()->tqmask() || + !m_leftFrame->background()->tqmask() || + !m_rightFrame->background()->tqmask() || + !m_bottomFrame->background()->tqmask()) { - topLevelWidget()->clearMask(); + tqtopLevelWidget()->clearMask(); return; } - TQBitmap topPixmap(*m_topFrame->background()->mask()); - TQBitmap leftPixmap(*m_leftFrame->background()->mask()); - TQBitmap rightPixmap(*m_rightFrame->background()->mask()); - TQBitmap bottomPixmap(*m_bottomFrame->background()->mask()); + TQBitmap topPixmap(*m_topFrame->background()->tqmask()); + TQBitmap leftPixmap(*m_leftFrame->background()->tqmask()); + TQBitmap rightPixmap(*m_rightFrame->background()->tqmask()); + TQBitmap bottomPixmap(*m_bottomFrame->background()->tqmask()); - TQSize insideSize(m_pluginLayout->geometry().size()); + TQSize insideSize(m_pluginLayout->tqgeometry().size()); - // make a cleared bigrect where we can put our pixmap masks on - TQBitmap bigBitmap(topLevelWidget()->size(), true); + // make a cleared bigrect where we can put our pixmap tqmasks on + TQBitmap bigBitmap(tqtopLevelWidget()->size(), true); // better return if our bitmap is null so we can avoid crashes if (bigBitmap.isNull()) return; - TQPoint ofs = mapTo(topLevelWidget(), TQPoint(0,0)); + TQPoint ofs = mapTo(tqtopLevelWidget(), TQPoint(0,0)); int ofsX = ofs.x(); int ofsY = ofs.y(); @@ -243,7 +243,7 @@ void KSim::MainView::maskMainView() painter.begin(&bigBitmap); painter.setBrush(color1); painter.setPen(color1); - TQRect rect = m_pluginLayout->geometry(); + TQRect rect = m_pluginLayout->tqgeometry(); rect.moveBy(ofsX, ofsY); painter.drawRect(rect); painter.drawPixmap(ofsX, ofsY, topPixmap); @@ -254,7 +254,7 @@ void KSim::MainView::maskMainView() bottomPixmap); painter.end(); - topLevelWidget()->setMask(bigBitmap); + tqtopLevelWidget()->setMask(bigBitmap); } void KSim::MainView::reparseConfig(bool emitReload, @@ -318,7 +318,7 @@ void KSim::MainView::reparseConfig(bool emitReload, KSim::ThemeLoader::self().themeColours(this); m_sysinfo->createView(); - maskMainView(); + tqmaskMainView(); m_topLevel->reparse(); @@ -404,7 +404,7 @@ void KSim::MainView::preferences() void KSim::MainView::resizeEvent(TQResizeEvent *re) { TQWidget::resizeEvent(re); - m_maskTimer.start(0, true); + m_tqmaskTimer.start(0, true); } void KSim::MainView::paletteChange(const TQPalette &) @@ -430,7 +430,7 @@ void KSim::MainView::destroyPref() } } -TQSize KSim::MainView::sizeHint(KPanelExtension::Position p, TQSize) const +TQSize KSim::MainView::tqsizeHint(KPanelExtension::Position p, TQSize) const { int width = 0; int height = 0; @@ -439,16 +439,16 @@ TQSize KSim::MainView::sizeHint(KPanelExtension::Position p, TQSize) const for( TQLayoutIterator it = m_pluginLayout->iterator(); (child = it.current()) != 0; ++it) { - TQSize sz = child->minimumSize(); + TQSize sz = child->tqminimumSize(); if ((p == KPanelExtension::Right) || (p == KPanelExtension::Left)) { - width = QMAX(width, sz.width()); + width = TQMAX(width, sz.width()); height += sz.height(); } else { width += sz.width(); - height = QMAX(height, sz.height()); + height = TQMAX(height, sz.height()); } } @@ -458,9 +458,9 @@ TQSize KSim::MainView::sizeHint(KPanelExtension::Position p, TQSize) const return TQSize(width, height); } -void KSim::MainView::positionChange(KPanelExtension::Orientation o) +void KSim::MainView::positionChange(Qt::Orientation o) { - if (o == KPanelExtension::Vertical) + if (o == Qt::Vertical) m_pluginLayout->setDirection(TQBoxLayout::TopToBottom); else m_pluginLayout->setDirection(TQBoxLayout::LeftToRight); diff --git a/ksim/ksimview.h b/ksim/ksimview.h index c8f0a95..c6c158e 100644 --- a/ksim/ksimview.h +++ b/ksim/ksimview.h @@ -49,6 +49,7 @@ namespace KSim class KDE_EXPORT MainView : public TQWidget, virtual public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP public: MainView(KConfig *config, bool loadPlugins, @@ -62,12 +63,12 @@ namespace KSim KSim::Config *config() const; void makeDirs(); - TQSize sizeHint(KPanelExtension::Position, TQSize maxSize) const; - void positionChange(KPanelExtension::Orientation); + TQSize tqsizeHint(KPanelExtension::Position, TQSize maxSize) const; + void positionChange(Qt::Orientation); k_dcop: const TQString &hostname() const; - virtual void maskMainView(); + virtual void tqmaskMainView(); signals: void reload(); @@ -106,7 +107,7 @@ namespace KSim TQBoxLayout *m_pluginLayout; TQPoint m_mousePoint; int m_oldLocation; - TQTimer m_maskTimer; + TQTimer m_tqmaskTimer; }; } #endif // KSIMVIEW_H diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp index 12ff945..b78327b 100644 --- a/ksim/library/chart.cpp +++ b/ksim/library/chart.cpp @@ -80,7 +80,7 @@ TQTimer *KSim::Chart::Timer::m_timer = 0; class KSim::Chart::Private { public: - typedef QPair<int, int> ValuePair; + typedef TQPair<int, int> ValuePair; TQSize size; int type; @@ -107,15 +107,15 @@ class KSim::Chart::Private }; KSim::Chart::Chart(bool showKrell, int maxValue, - const TQString &title, TQWidget *parent, const char *name, - WFlags fl) : TQWidget(parent, name, fl) + const TQString &title, TQWidget *tqparent, const char *name, + WFlags fl) : TQWidget(tqparent, name, fl) { init(showKrell, maxValue, title); } KSim::Chart::Chart(bool showKrell, int maxValue, - TQWidget *parent, const char *name, WFlags fl) - : TQWidget(parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : TQWidget(tqparent, name, fl) { init(showKrell, maxValue, i18n("None")); } @@ -232,7 +232,7 @@ void KSim::Chart::buildPixmaps() } else { kdDebug(2003) << className() << ": Using chartInColor() = " - << d->dataInColour.name() << endl; + << TQString(d->dataInColour.name()) << endl; } image.reset(); @@ -245,13 +245,13 @@ void KSim::Chart::buildPixmaps() } else { kdDebug(2003) << className() << ": Using chartOutColor() = " - << d->dataOutColour.name() << endl; + << TQString(d->dataOutColour.name()) << endl; } } -void KSim::Chart::configureObject(bool repaintWidget) +void KSim::Chart::configureObject(bool tqrepaintWidget) { - TQSize oldSize = sizeHint(); + TQSize oldSize = tqsizeHint(); KSim::Config::config()->setGroup("Misc"); d->size = KSim::Config::config()->readSizeEntry("GraphSize"); @@ -263,11 +263,11 @@ void KSim::Chart::configureObject(bool repaintWidget) d->krell->show(); } - // Update our geometry if we need to let any - // layout know about our sizeHint() change - if (oldSize != sizeHint()) { + // Update our tqgeometry if we need to let any + // tqlayout know about our tqsizeHint() change + if (oldSize != tqsizeHint()) { // Using resize() here seems to be needed - resize(sizeHint()); + resize(tqsizeHint()); updateGeometry(); } @@ -275,18 +275,18 @@ void KSim::Chart::configureObject(bool repaintWidget) setConfigValues(); - if (repaintWidget) + if (tqrepaintWidget) update(); } -TQSize KSim::Chart::sizeHint() const +TQSize KSim::Chart::tqsizeHint() const { return d->size; } -TQSize KSim::Chart::minimumSizeHint() const +TQSize KSim::Chart::tqminimumSizeHint() const { - return sizeHint(); + return tqsizeHint(); } void KSim::Chart::resizeEvent(TQResizeEvent *re) @@ -333,19 +333,19 @@ void KSim::Chart::setDisplayMeter(bool value) void KSim::Chart::setText(const TQString &in, const TQString &out) { - bool repaint = false; + bool tqrepaint = false; if (d->inText != in) { - repaint = true; + tqrepaint = true; d->inText = in; } if (d->outText != out) { - repaint = true; + tqrepaint = true; d->outText = out; } - if (repaint) + if (tqrepaint) update(); } @@ -373,7 +373,7 @@ void KSim::Chart::setMaxValue(int maxValue) void KSim::Chart::setValue(int valueIn, int valueOut) { - d->values.prepend(qMakePair(range(valueIn), range(valueOut))); + d->values.prepend(tqMakePair(range(valueIn), range(valueOut))); if (d->variableGraphs) { d->maxValues.prepend(valueIn > valueOut ? valueIn : valueOut); @@ -407,13 +407,13 @@ void KSim::Chart::setValue(int valueIn, int valueOut) void KSim::Chart::setConfigValues() { TQFont newFont = font(); - bool repaint = themeLoader().current().fontColours(this, + bool tqrepaint = themeLoader().current().fontColours(this, newFont, d->mColour, d->sColour, d->showShadow); if (font() != newFont) setFont(newFont); - if (repaint) + if (tqrepaint) update(); } @@ -446,7 +446,7 @@ void KSim::Chart::paintEvent(TQPaintEvent *) const TQSize &size = chartSize(); TQPixmap pixmap(size); TQPainter painter; - painter.begin(&pixmap, this); + painter.tqbegin(&pixmap, this); int location = size.height() / 5; painter.drawPixmap(0, 0, d->chartPixmap); @@ -521,7 +521,7 @@ void KSim::Chart::drawChart() TQPainter painter; d->graphData.setMask(drawMask(&painter)); - painter.begin(&d->graphData, this); + painter.tqbegin(&d->graphData, this); int position = width() - 1; TQValueList<Private::ValuePair>::ConstIterator it; @@ -553,7 +553,7 @@ TQSize KSim::Chart::chartSize() const TQBitmap KSim::Chart::drawMask(TQPainter *painter) { TQBitmap bitmap(chartSize(), true); - painter->begin(&bitmap, this); + painter->tqbegin(&bitmap, this); painter->setPen(color1); int position = width() - 1; @@ -608,7 +608,7 @@ void KSim::Chart::init(bool krell, int maxValue, const TQString &title) { setConfigString("StyleChart"); setThemeConfigOnly(false); - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); d = new Private; KSim::Config::config()->setGroup("Misc"); diff --git a/ksim/library/chart.h b/ksim/library/chart.h index b51ab83..1eb5a93 100644 --- a/ksim/library/chart.h +++ b/ksim/library/chart.h @@ -36,6 +36,7 @@ namespace KSim class KDE_EXPORT Chart : public TQWidget, public KSim::Base { Q_OBJECT + TQ_OBJECT public: enum DataType { DataIn = 0, DataOut }; enum LabelType { Label = 0, Progress, Led }; @@ -46,10 +47,10 @@ namespace KSim * @param minValue is the minimum value to show * @param maxValue is the maximum value to show * @param title is the title off the krell bar (if enabled) - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ Chart(bool displayMeter, int maxValue, - const TQString &title, TQWidget *parent, + const TQString &title, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * Constructs a KSim::Chart. @@ -57,10 +58,10 @@ namespace KSim * @param showKrell is if the krellbar should be shown * @param minValue is the minimum value to show * @param maxValue is the maximum value to show - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ Chart(bool displayMeter, int maxValue, - TQWidget *parent, const char *name = 0, + TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * destructs KSim::Chart @@ -103,16 +104,16 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual void configureObject(bool repaintWidget = true); + virtual void configureObject(bool tqrepaintWidget = true); /** * reimplemented for internal reasons */ - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * reimplemented for internal reasons */ - TQSize minimumSizeHint() const; + TQSize tqminimumSizeHint() const; void disableAutomaticUpdates(); @@ -133,7 +134,7 @@ namespace KSim /** * sets the current text that apears in the top left hand corner */ - void setText(const TQString &in, const TQString &out = TQString::null); + void setText(const TQString &in, const TQString &out = TQString()); /** * Sets the minimum value the graph will display */ diff --git a/ksim/library/common.h b/ksim/library/common.h index 9fc01c0..e19310e 100644 --- a/ksim/library/common.h +++ b/ksim/library/common.h @@ -58,12 +58,12 @@ namespace KSim * class Test : public TQWidget, virtual public KSim::Base * { * public: - * Test(TQWidget *parent, const char *name) : TQWidget(parent, name) + * Test(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name) * { * } * ~Test() {} * - * void configureObject(bool repaintWidget) + * void configureObject(bool tqrepaintWidget) * { * // Re-Create view code here * } diff --git a/ksim/library/label.cpp b/ksim/library/label.cpp index 400b1c5..06f525e 100644 --- a/ksim/library/label.cpp +++ b/ksim/library/label.cpp @@ -50,20 +50,20 @@ class KSim::Label::Private bool showShadow; }; -KSim::Label::Label(TQWidget *parent, const char *name, WFlags fl) - : TQWidget(parent, name, fl) +KSim::Label::Label(TQWidget *tqparent, const char *name, WFlags fl) + : TQWidget(tqparent, name, fl) { initWidget(KSim::Types::None); } -KSim::Label::Label(int type, TQWidget *parent, const char *name, - WFlags fl) : TQWidget(parent, name, fl) +KSim::Label::Label(int type, TQWidget *tqparent, const char *name, + WFlags fl) : TQWidget(tqparent, name, fl) { initWidget(type); } -KSim::Label::Label(int type, const TQString &text, TQWidget *parent, - const char *name, WFlags fl) : TQWidget(parent, name, fl) +KSim::Label::Label(int type, const TQString &text, TQWidget *tqparent, + const char *name, WFlags fl) : TQWidget(tqparent, name, fl) { initWidget(type); setText(text); @@ -79,7 +79,7 @@ const TQString &KSim::Label::text() const return d->text; } -void KSim::Label::configureObject(bool repaintWidget) +void KSim::Label::configureObject(bool tqrepaintWidget) { TQString image = themeLoader().current().meterPixmap(type(), false); if (image.isEmpty()) @@ -88,10 +88,10 @@ void KSim::Label::configureObject(bool repaintWidget) d->meterImage.load(image); KSim::ThemeLoader::self().reColourImage(d->meterImage); d->background = d->meterImage.smoothScale(size()); - TQSize oldSize = sizeHint(); + TQSize oldSize = tqsizeHint(); setConfigValues(); - relayoutLabel(oldSize, repaintWidget); + retqlayoutLabel(oldSize, tqrepaintWidget); } void KSim::Label::setPixmap(const TQPixmap &pixmap) @@ -99,10 +99,10 @@ void KSim::Label::setPixmap(const TQPixmap &pixmap) if (pixmap.serialNumber() == d->sidePixmap.serialNumber()) return; - TQSize oldSize = sizeHint(); + TQSize oldSize = tqsizeHint(); d->sidePixmap = pixmap; - relayoutLabel(oldSize); + retqlayoutLabel(oldSize); } const TQPixmap &KSim::Label::pixmap() const @@ -110,7 +110,7 @@ const TQPixmap &KSim::Label::pixmap() const return d->sidePixmap; } -TQSize KSim::Label::sizeHint() const +TQSize KSim::Label::tqsizeHint() const { int width = fontMetrics().size(SingleLine, text()).width(); if (!pixmap().isNull()) @@ -123,25 +123,25 @@ TQSize KSim::Label::sizeHint() const return TQSize(width, height); } -TQSize KSim::Label::minimumSizeHint() const +TQSize KSim::Label::tqminimumSizeHint() const { - return sizeHint(); + return tqsizeHint(); } void KSim::Label::clear() { - setText(TQString::null); + setText(TQString()); } void KSim::Label::setText(const TQString &text) { if (text == d->text) - return; // If the text is the same, no need to repaint etc + return; // If the text is the same, no need to tqrepaint etc - TQSize oldSize = sizeHint(); - // set the text of our widget and repaint + TQSize oldSize = tqsizeHint(); + // set the text of our widget and tqrepaint d->text = text; - relayoutLabel(oldSize); + retqlayoutLabel(oldSize); } void KSim::Label::extraTypeCall() @@ -183,13 +183,13 @@ const TQColor &KSim::Label::shadowColour() const void KSim::Label::setConfigValues() { TQFont newFont = font(); - bool repaint = themeLoader().current().fontColours(this, + bool tqrepaint = themeLoader().current().fontColours(this, newFont, d->mColour, d->sColour, d->showShadow); if (font() != newFont) setFont(newFont); - if (repaint) + if (tqrepaint) update(); } @@ -232,7 +232,7 @@ void KSim::Label::drawText(TQPainter *painter, const TQRect &rect, if (!pixmap().isNull()) location.setX(pixmap().width() + 5); - style().drawItem(painter, location, AlignCenter, colorGroup(), true, + tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true, 0, text, -1, &color); } @@ -242,8 +242,8 @@ void KSim::Label::drawPixmap(TQPainter *painter, const TQRect &rect, TQRect location(rect); location.setWidth(pixmap.width()); - style().drawItem(painter, location, AlignCenter, colorGroup(), true, - pixmap.isNull() ? 0 : &pixmap, TQString::null); + tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true, + pixmap.isNull() ? 0 : &pixmap, TQString()); } void KSim::Label::setTextLocation(const TQRect &rect) @@ -268,21 +268,21 @@ const TQRect &KSim::Label::shadowLocation() const void KSim::Label::setThemePixmap(const TQString &image) { - TQSize oldSize = sizeHint(); + TQSize oldSize = tqsizeHint(); d->meterImage.reset(); d->meterImage.load(image); KSim::ThemeLoader::self().reColourImage(d->meterImage); d->background = d->meterImage.smoothScale(size()); - relayoutLabel(oldSize); + retqlayoutLabel(oldSize); } -void KSim::Label::relayoutLabel(const TQSize &old, bool repaint) +void KSim::Label::retqlayoutLabel(const TQSize &old, bool tqrepaint) { - if (sizeHint() != old) { + if (tqsizeHint() != old) { updateGeometry(); } - if (repaint) + if (tqrepaint) update(); } @@ -294,7 +294,7 @@ void KSim::Label::initWidget(int type) // try to reduce flicker as much as possible setBackgroundMode(NoBackground); - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); configureObject(); diff --git a/ksim/library/label.h b/ksim/library/label.h index 7d77aa6..78136d4 100644 --- a/ksim/library/label.h +++ b/ksim/library/label.h @@ -37,11 +37,12 @@ namespace KSim class KDE_EXPORT Label : public TQWidget, public KSim::Base { Q_OBJECT + TQ_OBJECT public: /** * Constructs a KSim::Label. * - * @param parent is the parent widget + * @param tqparent is the tqparent widget * * Example usage: * <pre> @@ -50,12 +51,12 @@ namespace KSim * To create a KSim::Label with the normal theme look * @see KSim::ThemeLoader */ - Label(TQWidget *parent, const char *name = 0, WFlags fl = 0); + Label(TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * Constructs a KSimLabel. * * @param type is the theme type - * @param parent is the parent widget + * @param tqparent is the tqparent widget * * Example usage: * <pre> @@ -65,13 +66,13 @@ namespace KSim * NOTE: this is the same as the KSim::Label(TQWidget *, const char *, WFlags) ctor * @see KSim::ThemeLoader */ - Label(int type, TQWidget *parent, const char *name = 0, WFlags fl = 0); + Label(int type, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * Constructs a KSim::Label. * * @param type is the theme type * @param text is the default text to display - * @param parent is the parent widget + * @param tqparent is the tqparent widget * * Example usage: * <pre> @@ -81,7 +82,7 @@ namespace KSim * @see KSim::ThemeLoader */ Label(int type, const TQString &text, - TQWidget *parent, const char *name = 0, WFlags fl = 0); + TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * destructs KSim::Label. */ @@ -95,7 +96,7 @@ namespace KSim /** * recreates the labels look & feel */ - virtual void configureObject(bool repaintWidget = true); + virtual void configureObject(bool tqrepaintWidget = true); /** * sets a pixmap for the label */ @@ -107,11 +108,11 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * reimplemented for internal reasons */ - virtual TQSize minimumSizeHint() const; + virtual TQSize tqminimumSizeHint() const; public slots: /** @@ -195,7 +196,7 @@ namespace KSim * sets the background image to be painted */ void setThemePixmap(const TQString &image); - void relayoutLabel(const TQSize &old, bool repaint = true); + void retqlayoutLabel(const TQSize &old, bool tqrepaint = true); private: /** diff --git a/ksim/library/led.cpp b/ksim/library/led.cpp index a3d9e1c..6977304 100644 --- a/ksim/library/led.cpp +++ b/ksim/library/led.cpp @@ -77,14 +77,14 @@ void KSim::Led::setOn(bool force) TQRect rect = d->splitter.coordinates(d->type == First ? 1 : 3); if (d->pixmap.isNull() || rect.isEmpty()) { resize(12, 8); - fill(Qt::white); + fill(TQt::white); return; } - if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) { - TQBitmap mask(rect.size()); - bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP); - setMask(mask); + if (d->pixmap.tqmask() && !d->pixmap.tqmask()->isNull()) { + TQBitmap tqmask(rect.size()); + bitBlt(&tqmask, TQPoint(0, 0), d->pixmap.tqmask(), rect, CopyROP); + setMask(tqmask); } bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP); @@ -100,14 +100,14 @@ void KSim::Led::setOff(bool force) TQRect rect = d->splitter.coordinates(d->type == First ? 0 : 2); if (d->pixmap.isNull() || rect.isEmpty()) { resize(12, 8); - fill(Qt::white); + fill(TQt::white); return; } - if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) { - TQBitmap mask(rect.size()); - bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP); - setMask(mask); + if (d->pixmap.tqmask() && !d->pixmap.tqmask()->isNull()) { + TQBitmap tqmask(rect.size()); + bitBlt(&tqmask, TQPoint(0, 0), d->pixmap.tqmask(), rect, CopyROP); + setMask(tqmask); } bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP); @@ -184,24 +184,24 @@ class KSim::LedLabel::Private }; KSim::LedLabel::LedLabel(int max, int type, const TQString &label, - TQWidget *parent, const char *name, WFlags fl) - : KSim::Progress(max, type, Panel, parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : KSim::Progress(max, type, Panel, tqparent, name, fl) { init(); setText(label); } KSim::LedLabel::LedLabel(int max, int type, - TQWidget *parent, const char *name, WFlags fl) - : KSim::Progress(max, type, Panel, parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : KSim::Progress(max, type, Panel, tqparent, name, fl) { init(); } KSim::LedLabel::LedLabel(int max, - TQWidget *parent, const char *name, WFlags fl) + TQWidget *tqparent, const char *name, WFlags fl) : KSim::Progress(max, KSim::Types::None, - Panel, parent, name, fl) + Panel, tqparent, name, fl) { init(); } @@ -228,15 +228,15 @@ void KSim::LedLabel::configureObject(bool reapaintWidget) d->sendLed.update(); setConfigValues(); - layoutLeds(); + tqlayoutLeds(); if (reapaintWidget) update(); } -TQSize KSim::LedLabel::sizeHint() const +TQSize KSim::LedLabel::tqsizeHint() const { - TQSize hint(Progress::sizeHint()); + TQSize hint(Progress::tqsizeHint()); if (d->sendLed.height() > hint.height()) hint.setHeight(d->sendLed.height()); @@ -313,10 +313,10 @@ void KSim::LedLabel::paintEvent(TQPaintEvent *ev) void KSim::LedLabel::resizeEvent(TQResizeEvent *ev) { KSim::Progress::resizeEvent(ev); - layoutLeds(); + tqlayoutLeds(); } -void KSim::LedLabel::layoutLeds() +void KSim::LedLabel::tqlayoutLeds() { int ledHeight = height() / 2; diff --git a/ksim/library/led.h b/ksim/library/led.h index a3ef85e..1d0cb4f 100644 --- a/ksim/library/led.h +++ b/ksim/library/led.h @@ -34,7 +34,7 @@ namespace KSim * @short led using gkrellm themes * @author Robbie Ward <linuxphreak@gmx.co.uk> */ - class KDE_EXPORT Led : public QPixmap + class KDE_EXPORT Led : public TQPixmap { public: enum Type { First = 0, Second }; @@ -46,7 +46,7 @@ namespace KSim * @param ImageName is the image to display * the image's height is divided by 4 and each item is used for send in, * send out, receive in and receive out - * @param parent is the parent widget + * @param tqparent is the tqparent widget * @param name is the object instance name */ Led(Type type, const TQString &imageName); @@ -88,7 +88,7 @@ namespace KSim */ Type type() const; /** - * Force the Led to repaint its state + * Force the Led to tqrepaint its state */ void update(); @@ -107,35 +107,36 @@ namespace KSim class KDE_EXPORT LedLabel : public KSim::Progress { Q_OBJECT + TQ_OBJECT public: /** * Constructs a KSim::LedLabel. * * @param type is the theme type * @param label is the default text to display - * @param parent is the parent widget + * @param tqparent is the tqparent widget * @see KSim::ThemeLoader */ LedLabel(int max, int type, const TQString &label, - TQWidget *parent, const char *name = 0, WFlags fl = 0); + TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * Constructs a KSim::LedLabel. * * @param type is the theme type * @param label is the default text to display - * @param parent is the parent widget + * @param tqparent is the tqparent widget * @see KSim::ThemeLoader */ - LedLabel(int max, int type, TQWidget *parent, + LedLabel(int max, int type, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * Constructs a KSim::LedLabel. * * @param label is the default text to display - * @param parent is the parent widget + * @param tqparent is the tqparent widget * @see KSim::ThemeLoader */ - LedLabel(int max, TQWidget *parent, + LedLabel(int max, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * destructor for KSim::LedLabel. @@ -149,7 +150,7 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: /** @@ -183,7 +184,7 @@ namespace KSim virtual void resizeEvent(TQResizeEvent *); private: - void layoutLeds(); + void tqlayoutLeds(); void init(); class Private; diff --git a/ksim/library/pluginglobal.cpp b/ksim/library/pluginglobal.cpp index 3cbae68..34a38c3 100644 --- a/ksim/library/pluginglobal.cpp +++ b/ksim/library/pluginglobal.cpp @@ -157,7 +157,7 @@ bool KSim::Plugin::isNull() const const TQString &KSim::Plugin::name() const { - return d ? d->name : TQString::null; + return d ? d->name : TQString(); } TQPixmap KSim::Plugin::icon() const @@ -172,7 +172,7 @@ TQCString KSim::Plugin::libName() const const TQString &KSim::Plugin::fileName() const { - return d ? d->filename : TQString::null; + return d ? d->filename : TQString(); } KSim::PluginObject *KSim::Plugin::plugin() const diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp index 1a8bbd8..4fcf761 100644 --- a/ksim/library/pluginloader.cpp +++ b/ksim/library/pluginloader.cpp @@ -92,13 +92,13 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file) case KSim::PluginLoader::EmptyLibName: KMessageBox::error(0, i18n("KSim was unable to load the plugin %1" " due to the X-KSIM-LIBRARY property being empty in the" - " plugins desktop file").arg(file.readName())); + " plugins desktop file").tqarg(file.readName())); return false; break; case KSim::PluginLoader::LibNotFound: KMessageBox::error(0, i18n("KSim was unable to load the plugin %1" " due to not being able to find the plugin, check that the plugin" - " is installed and is in your $KDEDIR/lib path").arg(file.readName())); + " is installed and is in your $KDEDIR/lib path").tqarg(file.readName())); return false; break; case KSim::PluginLoader::UnSymbols: @@ -108,8 +108,8 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file) " macro</li>\n<li>The plugin has been damaged or has" " some unresolved symbols</li>\n</ul> \nLast" " error message that occurred: \n%3</qt>") - .arg(d->lib.prepend("ksim_")).arg("KSIM_INIT_PLUGIN") - .arg(d->error)); + .tqarg(d->lib.prepend("ksim_")).tqarg("KSIM_INIT_PLUGIN") + .tqarg(d->error)); return false; break; default: @@ -125,7 +125,7 @@ bool KSim::PluginLoader::unloadPlugin(const TQCString &name) return false; // see if our plugin is loaded - KSim::Plugin plugin = find(name); + KSim::Plugin plugin = tqfind(name); if (plugin.isNull()) return false; @@ -161,7 +161,7 @@ bool KSim::PluginLoader::isLoaded(const TQCString &library) const if (library.isEmpty()) return false; - return !find(library).isNull(); + return !tqfind(library).isNull(); } KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name, @@ -211,13 +211,13 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name, return info; } -KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) +KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) { if (libName.isEmpty()) return KSim::Plugin::null; TQCString library(libName); - if (libName.find(Private::ksimString) == -1) + if (libName.tqfind(Private::ksimString) == -1) library.prepend(Private::ksimString); KSim::PluginList::Iterator it; @@ -229,13 +229,13 @@ KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) return KSim::Plugin::null; } -const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const +const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const { if (libName.isEmpty()) return KSim::Plugin::null; TQCString library(libName); - if (libName.find(Private::ksimString) == -1) + if (libName.tqfind(Private::ksimString) == -1) library.prepend(Private::ksimString); KSim::PluginList::ConstIterator it; @@ -247,14 +247,14 @@ const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const return KSim::Plugin::null; } -KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) +KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) { - return find(info.libName()); + return tqfind(info.libName()); } -const KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) const +const KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) const { - return find(info.libName()); + return tqfind(info.libName()); } const KSim::PluginList &KSim::PluginLoader::pluginList() const @@ -294,7 +294,7 @@ void KSim::PluginLoader::cleanup() KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFile &file) { - d->error = TQString::null; + d->error = TQString(); TQCString pluginName(file.readEntry("X-KSIM-LIBRARY").local8Bit()); if (pluginName.isEmpty()) return EmptyLibName; @@ -307,7 +307,7 @@ KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFil TQCString symbol("init_plugin"); if (Private::PluginPtr *create = (Private::PluginPtr *)(library->symbol(symbol))) { d->pluginList.append(KSim::Plugin(create(pluginName), file)); - d->lib = TQString::null; + d->lib = TQString(); d->lastLoaded = true; } else { diff --git a/ksim/library/pluginloader.h b/ksim/library/pluginloader.h index 385df44..b1806fa 100644 --- a/ksim/library/pluginloader.h +++ b/ksim/library/pluginloader.h @@ -61,9 +61,10 @@ namespace KSim * Provides a loader for the plugins * @author Robbie Ward <linuxphreak@gmx.co.uk> */ - class KDE_EXPORT PluginLoader : public QObject + class KDE_EXPORT PluginLoader : public TQObject { Q_OBJECT + TQ_OBJECT friend class MainView; public: enum SearchType { Name = 0, DesktopFile, LibName }; @@ -122,19 +123,19 @@ namespace KSim * @return a KSim::Plugin object * @see KSim::Plugin */ - KSim::Plugin &find(const TQCString &libName); + KSim::Plugin &tqfind(const TQCString &libName); /** * convenience function, see the above function for details. */ - const KSim::Plugin &find(const TQCString &libName) const; + const KSim::Plugin &tqfind(const TQCString &libName) const; /** - * equivalent to find(info.libName()); + * equivalent to tqfind(info.libName()); */ - KSim::Plugin &find(const KSim::PluginInfo &info); + KSim::Plugin &tqfind(const KSim::PluginInfo &info); /** * convenience function, see the above function for details. */ - const KSim::Plugin &find(const KSim::PluginInfo &info) const; + const KSim::Plugin &tqfind(const KSim::PluginInfo &info) const; /** * provides plugin(), view(), config page and plugin information * @see KSim::Plugin KSim::PluginList diff --git a/ksim/library/pluginmodule.cpp b/ksim/library/pluginmodule.cpp index b5cbd37..7dff303 100644 --- a/ksim/library/pluginmodule.cpp +++ b/ksim/library/pluginmodule.cpp @@ -64,7 +64,7 @@ void KSim::PluginObject::setConfigFileName(const TQString &name) return; d->configName = name; - if (name.find("ksim") == -1) + if (name.tqfind("ksim") == -1) d->configName.prepend("ksim_"); } @@ -77,19 +77,19 @@ class KSim::PluginPage::Private { public: KConfig *config; - KSim::PluginObject *parent; + KSim::PluginObject *tqparent; }; -KSim::PluginPage::PluginPage(KSim::PluginObject *parent, const char *name) +KSim::PluginPage::PluginPage(KSim::PluginObject *tqparent, const char *name) : TQWidget(0, name) { d = new PluginPage::Private; - d->parent = parent; - if (parent && !parent->configFileName().isEmpty()) - d->config = new KConfig(parent->configFileName() + "rc"); + d->tqparent = tqparent; + if (tqparent && !tqparent->configFileName().isEmpty()) + d->config = new KConfig(tqparent->configFileName() + "rc"); else { kdWarning() << className() << ": Can not create the config() " - "pointer due to the parent being null" << endl; + "pointer due to the tqparent being null" << endl; d->config = 0; } } @@ -111,25 +111,25 @@ KConfig *KSim::PluginPage::config() const class KSim::PluginView::Private { public: - PluginObject *parent; + PluginObject *tqparent; TQPopupMenu *popupMenu; KConfig *config; }; -KSim::PluginView::PluginView(KSim::PluginObject *parent, const char *name) +KSim::PluginView::PluginView(KSim::PluginObject *tqparent, const char *name) : TQWidget(0, name) { d = new PluginView::Private; - d->parent = parent; + d->tqparent = tqparent; d->popupMenu = new TQPopupMenu(this); d->popupMenu->insertItem(i18n("About"), this, TQT_SLOT(showAbout()), 0, -1, 0); - if (parent && !parent->configFileName().isEmpty()) - d->config = new KConfig(parent->configFileName() + "rc"); + if (tqparent && !tqparent->configFileName().isEmpty()) + d->config = new KConfig(tqparent->configFileName() + "rc"); else { kdWarning() << className() << ": Can not create the config() " - "pointer due to the parent being null" << endl; + "pointer due to the tqparent being null" << endl; d->config = 0; } } @@ -159,16 +159,16 @@ void KSim::PluginView::doCommand() void KSim::PluginView::mousePressEvent(TQMouseEvent *ev) { - if (ev->button() == TQMouseEvent::LeftButton) + if (ev->button() == Qt::LeftButton) doCommand(); } -KSim::PluginObject *KSim::PluginView::parentPlugin() const +KSim::PluginObject *KSim::PluginView::tqparentPlugin() const { - return d->parent; + return d->tqparent; } void KSim::PluginView::showAbout() { - parentPlugin()->showAbout(); + tqparentPlugin()->showAbout(); } diff --git a/ksim/library/pluginmodule.h b/ksim/library/pluginmodule.h index 801f10c..39baef4 100644 --- a/ksim/library/pluginmodule.h +++ b/ksim/library/pluginmodule.h @@ -111,14 +111,15 @@ namespace KSim * the config() to gain access to your config file * @author Robbie Ward <linuxphreak@gmx.co.uk> */ - class KDE_EXPORT PluginPage : public QWidget + class KDE_EXPORT PluginPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * constructor for PluginPage */ - PluginPage(KSim::PluginObject *parent, const char *name); + PluginPage(KSim::PluginObject *tqparent, const char *name); /** * destructor for PluginPage */ @@ -144,7 +145,7 @@ namespace KSim void pageChanged(); protected: - PluginObject *parentPlugin() const; + PluginObject *tqparentPlugin() const; private: class Private; @@ -159,14 +160,15 @@ namespace KSim * when apply or ok gets clicked in the config dialog * @author Robbie Ward <linuxphreak@gmx.co.uk> */ - class KDE_EXPORT PluginView : public QWidget + class KDE_EXPORT PluginView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * constructor for PluginView */ - PluginView(KSim::PluginObject *parent, const char *name); + PluginView(KSim::PluginObject *tqparent, const char *name); /** * destructor for PluginView */ @@ -192,7 +194,7 @@ namespace KSim protected: virtual void mousePressEvent(TQMouseEvent *); - PluginObject *parentPlugin() const; + PluginObject *tqparentPlugin() const; private slots: void showAbout(); diff --git a/ksim/library/progress.cpp b/ksim/library/progress.cpp index 82ae16e..6a8d2ba 100644 --- a/ksim/library/progress.cpp +++ b/ksim/library/progress.cpp @@ -40,17 +40,17 @@ class KSim::Progress::Private }; KSim::Progress::Progress(int maxValue, - TQWidget *parent, const char *name, - WFlags fl) : KSim::Label(parent, name, fl) + TQWidget *tqparent, const char *name, + WFlags fl) : KSim::Label(tqparent, name, fl) { init(maxValue); configureObject(); } KSim::Progress::Progress(int maxValue, - int type, const TQString &label, TQWidget *parent, + int type, const TQString &label, TQWidget *tqparent, const char *name, WFlags fl) - : KSim::Label(type, label, parent, name, fl) + : KSim::Label(type, label, tqparent, name, fl) { init(maxValue); configureObject(); @@ -58,17 +58,17 @@ KSim::Progress::Progress(int maxValue, KSim::Progress::Progress(int maxValue, int type, const TQString &label, int value, - TQWidget *parent, const char *name, WFlags fl) - : KSim::Label(type, label, parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : KSim::Label(type, label, tqparent, name, fl) { init(maxValue, value); configureObject(); } KSim::Progress::Progress(int maxValue, - int type, TQWidget *parent, + int type, TQWidget *tqparent, const char *name, WFlags fl) - : KSim::Label(type, parent, name, fl) + : KSim::Label(type, tqparent, name, fl) { init(maxValue); configureObject(); @@ -76,8 +76,8 @@ KSim::Progress::Progress(int maxValue, KSim::Progress::Progress(int maxValue, int type, ProgressType progressType, - TQWidget *parent, const char *name, WFlags fl) - : KSim::Label(type, parent, name, fl) + TQWidget *tqparent, const char *name, WFlags fl) + : KSim::Label(type, tqparent, name, fl) { init(maxValue, 0, progressType); configureObject(); @@ -108,7 +108,7 @@ const TQRect &KSim::Progress::rectOrigin() const return d->rectOrigin; } -void KSim::Progress::configureObject(bool repaintWidget) +void KSim::Progress::configureObject(bool tqrepaintWidget) { KSim::Label::configureObject(false); @@ -120,13 +120,13 @@ void KSim::Progress::configureObject(bool repaintWidget) setMeterPixmap(themeLoader().current().splitPixmap(KSim::Theme::KrellMeter)); } - if (repaintWidget) + if (tqrepaintWidget) update(); } -TQSize KSim::Progress::sizeHint() const +TQSize KSim::Progress::tqsizeHint() const { - TQSize hint(Label::sizeHint()); + TQSize hint(Label::tqsizeHint()); if (d->meterPixmap.height() > hint.height()) hint.setHeight(d->meterPixmap.height()); @@ -186,9 +186,9 @@ void KSim::Progress::setOrigin(const TQRect &origin) void KSim::Progress::setMeterPixmap(const TQPixmap &pixmap) { - TQSize oldSize = sizeHint(); + TQSize oldSize = tqsizeHint(); d->meterPixmap = pixmap; - relayoutLabel(oldSize); + retqlayoutLabel(oldSize); } int KSim::Progress::xLocation() const diff --git a/ksim/library/progress.h b/ksim/library/progress.h index 7f0f68a..40eca5c 100644 --- a/ksim/library/progress.h +++ b/ksim/library/progress.h @@ -33,6 +33,7 @@ namespace KSim class KDE_EXPORT Progress : public KSim::Label { Q_OBJECT + TQ_OBJECT public: enum ProgressType { Panel, Meter }; /** @@ -41,9 +42,9 @@ namespace KSim * @param maxValue is the maximum value * that the progress bar will show * @param label is the text that will be displayed - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ - Progress(int maxValue, TQWidget *parent, + Progress(int maxValue, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * constructs a KSim::Progress @@ -52,10 +53,10 @@ namespace KSim * that the progress bar will show * @param type is the theme type * @param label is the text that will be displayed - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ Progress(int maxValue, int type, const TQString &label, - TQWidget *parent, const char *name = 0, WFlags fl = 0); + TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * constructs a KSim::Progress * @@ -64,10 +65,10 @@ namespace KSim * @param type is the theme type * @param label is the text that will be displayed * @param value is the initial value to be displayed - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ Progress(int maxValue, int type, const TQString &label, - int value, TQWidget *parent, const char *name = 0, + int value, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * constructs a KSim::Progress @@ -75,9 +76,9 @@ namespace KSim * @param maxValue is the maximum value * that the progress bar will show * @param type is the theme type - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ - Progress(int maxValue, int type, TQWidget *parent, + Progress(int maxValue, int type, TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * constructs a KSim::Progress @@ -86,11 +87,11 @@ namespace KSim * that the progress bar will show * @param type is the theme type * @param progressType is onr of Progress::ProgressType - * @param parent is the parent widget + * @param tqparent is the tqparent widget */ Progress(int maxValue, int type, ProgressType progressType, - TQWidget *parent, const char *name = 0, + TQWidget *tqparent, const char *name = 0, WFlags fl = 0); /** * destructs KSim::Chart @@ -117,11 +118,11 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual void configureObject(bool repaintWidget = true); + virtual void configureObject(bool tqrepaintWidget = true); /** * reimplemented for internal reasons */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: /** diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp index f960ef7..b532ab9 100644 --- a/ksim/library/themeloader.cpp +++ b/ksim/library/themeloader.cpp @@ -58,12 +58,12 @@ class KSim::Theme::Private TQString readOption(const TQString &entry, bool useGlobal = true, - const TQString &defValue = TQString::null) + const TQString &defValue = TQString()) { TQString text; TQStringList::ConstIterator it; for (it = file.begin(); it != file.end(); ++it) { - if ((*it).find(entry) != -1) { + if ((*it).tqfind(entry) != -1) { text = TQStringList::split("=", (*it))[1].stripWhiteSpace(); } } @@ -73,7 +73,7 @@ class KSim::Theme::Private TQStringList::ConstIterator it2; for (it2 = dFile.begin(); it2 != dFile.end(); ++it) { - if ((*it2).find(entry) != -1) { + if ((*it2).tqfind(entry) != -1) { text = TQStringList::split("=", (*it2))[1].stripWhiteSpace(); } } @@ -135,13 +135,13 @@ TQString KSim::Theme::name() const if (name.endsWith("/")) name.remove(name.length() - 1, 1); - return name.remove(0, name.findRev("/") + 1); + return name.remove(0, name.tqfindRev("/") + 1); } TQString KSim::Theme::author() const { TQString author(d->readOption("author", false)); - return author.replace(TQRegExp("\""), TQString::null); + return author.tqreplace(TQRegExp("\""), TQString()); } int KSim::Theme::fontItem() const @@ -217,7 +217,7 @@ TQRect KSim::Theme::frameRightBorder(const TQRect &defValue) const TQColor KSim::Theme::chartInColour(const TQColor &defValue) const { if (d->recolour) - return TQApplication::palette().active().background(); + return TQApplication::tqpalette().active().background(); return internalColourEntry("chart_in_color", defValue); } @@ -230,7 +230,7 @@ TQColor KSim::Theme::chartInColourGrid(const TQColor &defValue) const TQColor KSim::Theme::chartOutColour(const TQColor &defValue) const { if (d->recolour) - return TQApplication::palette().active().background(); + return TQApplication::tqpalette().active().background(); return internalColourEntry("chart_out_color", defValue); } @@ -312,37 +312,37 @@ TQRect KSim::Theme::buttonMeterBorder(const TQRect &defValue) const TQFont KSim::Theme::largeFont() const { - TQString font(internalStringEntry("large_font", TQString::null)); + TQString font(internalStringEntry("large_font", TQString())); if (font.isEmpty()) return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null)); + themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); return themeFont; } TQFont KSim::Theme::normalFont() const { - TQString font(internalStringEntry("normal_font", TQString::null)); + TQString font(internalStringEntry("normal_font", TQString())); if (font.isEmpty()) return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null)); + themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); return themeFont; } TQFont KSim::Theme::smallFont() const { - TQString font(internalStringEntry("small_font", TQString::null)); + TQString font(internalStringEntry("small_font", TQString())); if (font.isEmpty()) return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null)); + themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); return themeFont; } @@ -548,7 +548,7 @@ TQString KSim::Theme::mailPixmap(bool useDefault) const if (text.isNull() && useDefault) return KSim::ThemeLoader::defaultUrl() - + createType(KSim::Types::Mail, TQString::null) + file + ".png"; + + createType(KSim::Types::Mail, TQString()) + file + ".png"; return text; } @@ -607,11 +607,11 @@ TQValueList<TQPixmap> KSim::Theme::pixmapToList(PixmapType type, for (int i = 0; i < (depth + 1); ++i) { newPixmap.fill(); - if (pixmap.mask()) { - TQBitmap mask(newPixmap.size()); - bitBlt(&mask, 0, 0, pixmap.mask(), xOffset, yOffset, + if (pixmap.tqmask()) { + TQBitmap tqmask(newPixmap.size()); + bitBlt(&tqmask, 0, 0, pixmap.tqmask(), xOffset, yOffset, image.width() - xOffset, size); - newPixmap.setMask(mask); + newPixmap.setMask(tqmask); } bitBlt(&newPixmap, 0, 0, &pixmap, xOffset, yOffset, @@ -644,7 +644,7 @@ bool KSim::Theme::textShadow(const TQString &itemType, return false; TQString shadow = readEntry(itemType, entry); - if (shadow.isEmpty() || shadow.findRev("none") != -1) + if (shadow.isEmpty() || shadow.tqfindRev("none") != -1) return false; return true; @@ -683,7 +683,7 @@ TQString KSim::Theme::readEntry(const TQString &itemType, const TQString &entry) const { TQString entryName = itemType + " " + entry; - return internalStringEntry(entryName, TQString::null); + return internalStringEntry(entryName, TQString()); } TQString KSim::Theme::readColourEntry(const TQString &itemType, @@ -691,7 +691,7 @@ TQString KSim::Theme::readColourEntry(const TQString &itemType, { TQString color = readEntry(itemType, entry); if (color.isEmpty()) - color = TQString::fromLatin1("#ffffff #ffffff"); + color = TQString::tqfromLatin1("#ffffff #ffffff"); return TQStringList::split(' ', color)[row]; } @@ -718,14 +718,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font, TQColor &text, TQColor &shadow, bool &showShadow) const { TQString key = KSim::Types::typeToString(type, false); - bool repaint = false; + bool tqrepaint = false; // set colours from the string 'key' if (!readEntry(string, key + ".textcolor").isEmpty()) { text= textColour(string, key + ".textcolor"); shadow = shadowColour(string, key + ".textcolor"); showShadow = textShadow(string, key + ".textcolor"); - repaint = true; + tqrepaint = true; } else { text= textColour(string, "*.textcolor"); @@ -737,14 +737,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font, if (!readEntry(string, key + ".font").isEmpty()) { if (KSim::ThemeLoader::currentFontItem() != 3) { font = readFontEntry(string, key + ".font"); - repaint = true; + tqrepaint = true; } } else { font = currentFont(); } - return repaint; + return tqrepaint; } bool KSim::Theme::fontColours(const KSim::Base *const base, TQFont &font, @@ -927,7 +927,7 @@ void KSim::ThemeLoader::reload() if (m_theme.d) m_theme.d->globalReader = d->globalReader; - TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString(); + TQString fileName = TQString::tqfromLatin1("gkrellmrc") + alternativeAsString(); m_theme.reparse(currentUrl(), fileName, currentAlternative()); } @@ -948,31 +948,31 @@ void KSim::ThemeLoader::reColourImage(TQImage &image) if (!d->recolour || image.isNull()) return; - TQColor color = TQApplication::palette().active().background(); + TQColor color = TQApplication::tqpalette().active().background(); TQImage output(image.width(), image.height(), 32); output.setAlphaBuffer(image.hasAlphaBuffer()); - Q_UINT32 r = color.red(); - Q_UINT32 g = color.green(); - Q_UINT32 b = color.blue(); - Q_UINT32 *write = reinterpret_cast<Q_UINT32 *>(output.bits()); - Q_UINT32 *read = reinterpret_cast<Q_UINT32 *>(image.bits()); + TQ_UINT32 r = color.red(); + TQ_UINT32 g = color.green(); + TQ_UINT32 b = color.blue(); + TQ_UINT32 *write = reinterpret_cast<TQ_UINT32 *>(output.bits()); + TQ_UINT32 *read = reinterpret_cast<TQ_UINT32 *>(image.bits()); int size = image.width() * image.height(); for (int pos = 0; pos < size; pos++) { - QRgb basePix = static_cast<QRgb>(*read); + TQRgb basePix = static_cast<TQRgb>(*read); // Here, we assume that source is really gray, so R=G=B=I // Use blue since it's very easy to extract. - Q_UINT32 i = qBlue(basePix); + TQ_UINT32 i = tqBlue(basePix); - Q_UINT32 cr = (r * i + 128) >> 8; // Fixed point.. - Q_UINT32 cg = (g * i + 128) >> 8; - Q_UINT32 cb = (b * i + 128) >> 8; + TQ_UINT32 cr = (r * i + 128) >> 8; // Fixed point.. + TQ_UINT32 cg = (g * i + 128) >> 8; + TQ_UINT32 cb = (b * i + 128) >> 8; - Q_UINT32 alpha = qAlpha(basePix); - *write = qRgba(cr, cg, cb, alpha); + TQ_UINT32 alpha = tqAlpha(basePix); + *write = tqRgba(cr, cg, cb, alpha); write++; read++; } @@ -986,7 +986,7 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url, TQFile origFile(url + fileName); if (!origFile.open(IO_ReadOnly)) - return TQString::null; + return TQString(); TQTextStream origStream(&origFile); TQString text; @@ -997,26 +997,26 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url, while (!origStream.atEnd()) { TQString line(origStream.readLine().simplifyWhiteSpace()); - if (line.find(reg) == 0) // find the location of the * comments + if (line.tqfind(reg) == 0) // find the location of the * comments // replace all * comments with # comments so KConfig doesn't complain - line.replace(reg, "#"); + line.tqreplace(reg, "#"); - if (line.find("#") == -1) { // find the location of the string 'gkrellmms' - if (line.findRev("=") == -1) { // if found we check for the string '=' - int numLoc = line.findRev(numbers); + if (line.tqfind("#") == -1) { // find the location of the string 'gkrellmms' + if (line.tqfindRev("=") == -1) { // if found we check for the string '=' + int numLoc = line.tqfindRev(numbers); if (numLoc != -1) // if '=' doesn't exist we add one so KConfig doesn't complain line.insert(numLoc, " = "); - numLoc = line.findRev(number); + numLoc = line.tqfindRev(number); if (numLoc != -1) // if '=' doesn't exist we add one so KConfig doesn't complain line.insert(numLoc, " = "); - numLoc = line.findRev(minus); + numLoc = line.tqfindRev(minus); if (numLoc != -1) // replace the '-' with an '=' so KConfig doesn't get confused - line.replace(TQRegExp("-"), "="); + line.tqreplace(TQRegExp("-"), "="); } } @@ -1036,9 +1036,9 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) { TQString homePath = TQDir::current().path(); homePath = locateLocal( "data", "ksim" ) - + TQString::fromLatin1( "/themes" ) + + TQString::tqfromLatin1( "/themes" ) + homePath.right( homePath.length() - - homePath.findRev( TQRegExp( "\\/" ), + - homePath.tqfindRev( TQRegExp( "\\/" ), homePath.length() ) ); if ( !TQFile::exists( homePath ) ) @@ -1065,14 +1065,14 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) for (int i = 0; i < alternatives; ++i) { TQString altString = KSim::ThemeLoader::alternativeAsString(i); if (alternatives == 1 || i == 0) - altString = TQString::null; + altString = TQString(); TQStringList::ConstIterator format; for (format = formats.begin(); format != formats.end(); ++format) { // go through the meters array and move the files to the correct dir/filename TQStringList::Iterator meter; for (meter = meters.begin(); meter != meters.end(); ++meter) { - TQString bgMeter = TQString::fromLatin1("bg_meter_"); + TQString bgMeter = TQString::tqfromLatin1("bg_meter_"); if (TQFile::exists(bgMeter + (*meter) + altString + "." + (*format))) { if (KStandardDirs::makeDir(url + (*meter))) directory.rename(bgMeter + (*meter) + altString + "." + (*format), @@ -1083,7 +1083,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) // go through the panels array and move the files to the correct dir/filename TQStringList::ConstIterator panel; for (panel = panels.begin(); panel != panels.end(); ++panel) { - TQString bgPanel = TQString::fromLatin1("bg_panel_"); + TQString bgPanel = TQString::tqfromLatin1("bg_panel_"); if (TQFile::exists(bgPanel + (*panel) + altString + "." + (*format))) { if (KStandardDirs::makeDir(url + (*panel))) directory.rename(bgPanel + (*panel) + altString + "." + (*format), @@ -1092,13 +1092,13 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) } // fix stupid themes that have a bg_panel image in the host dir - TQString tempFile = TQString::fromLatin1("host/bg_panel"); + TQString tempFile = TQString::tqfromLatin1("host/bg_panel"); if (TQFile::exists(tempFile + altString + "." + (*format))) directory.rename(tempFile + altString + "." + (*format), "host/bg_meter" + altString + "." + (*format)); // move decal_net_leds* to the net folder to be more consistant - tempFile = TQString::fromLatin1("decal_net_leds"); + tempFile = TQString::tqfromLatin1("decal_net_leds"); if (TQFile::exists(tempFile + altString + "." + (*format))) { if (KStandardDirs::makeDir(url + "net")) directory.rename(tempFile + altString + "." + (*format), @@ -1159,7 +1159,7 @@ int KSim::ThemeLoader::currentAlternative() TQString KSim::ThemeLoader::alternativeAsString(int alt) { int alternative = (alt == -1 ? currentAlternative() : alt); - return (alternative == 0 ? TQString::null : TQString::fromLatin1("_") + return (alternative == 0 ? TQString() : TQString::tqfromLatin1("_") + TQString::number(alternative)); } @@ -1225,7 +1225,7 @@ KSim::ThemeLoader::ThemeLoader() m_theme.create(d->fileNames, d->imageTypes, d->globalReader); - TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString(); + TQString fileName = TQString::tqfromLatin1("gkrellmrc") + alternativeAsString(); m_theme.init(currentUrl(), fileName, currentAlternative()); reColourItems(); diff --git a/ksim/library/themetypes.h b/ksim/library/themetypes.h index 0f34fbf..82b7aa3 100644 --- a/ksim/library/themetypes.h +++ b/ksim/library/themetypes.h @@ -56,12 +56,12 @@ namespace KSim }; /** - * @return the ThemeType enum as a QString + * @return the ThemeType enum as a TQString */ inline TQString typeToString(int type, bool incSlash = true) { if (type == Types::None) - return TQString::null; + return TQString(); // This array MUST be in the same order // as the ThemeType enum @@ -74,7 +74,7 @@ namespace KSim TQString returnString; returnString.setLatin1(typeNames[type]); - return incSlash ? returnString + TQString::fromLatin1("/") : returnString; + return incSlash ? returnString + TQString::tqfromLatin1("/") : returnString; } } } diff --git a/ksim/monitorprefs.cpp b/ksim/monitorprefs.cpp index 0038c85..0cac472 100644 --- a/ksim/monitorprefs.cpp +++ b/ksim/monitorprefs.cpp @@ -29,8 +29,8 @@ #include <ksimconfig.h> #include <pluginloader.h> -KSim::MonitorPrefs::MonitorPrefs(TQWidget *parent, const char *name) - : KListView(parent, name) +KSim::MonitorPrefs::MonitorPrefs(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("Monitor")); addColumn(i18n("Description")); @@ -67,7 +67,7 @@ void KSim::MonitorPrefs::saveConfig(KSim::Config *config) TQStringList::ConstIterator it; for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) { KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it)); - item = static_cast<TQCheckListItem *>(findItem(info.name(), 0)); + item = static_cast<TQCheckListItem *>(tqfindItem(info.name(), 0)); config->setEnabledMonitor(info.libName(), item->isOn()); config->setMonitorCommand(info.libName(), item->text(2)); config->setMonitorLocation(info.libName(), itemIndex(item)); @@ -82,7 +82,7 @@ void KSim::MonitorPrefs::readConfig(KSim::Config *config) for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) { KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it)); location = config->monitorLocation(info.libName()); - origItem = static_cast<TQCheckListItem *>(findItem(info.name(), 0)); + origItem = static_cast<TQCheckListItem *>(tqfindItem(info.name(), 0)); origItem->setOn(config->enabledMonitor(info.libName())); origItem->setText(2, config->monitorCommand(info.libName())); if (TQListViewItem *item = itemAtIndex(location)) { diff --git a/ksim/monitorprefs.h b/ksim/monitorprefs.h index 03f3d5f..c457472 100644 --- a/ksim/monitorprefs.h +++ b/ksim/monitorprefs.h @@ -30,8 +30,9 @@ namespace KSim class MonitorPrefs : public KListView { Q_OBJECT + TQ_OBJECT public: - MonitorPrefs(TQWidget *parent, const char *name=0); + MonitorPrefs(TQWidget *tqparent, const char *name=0); ~MonitorPrefs(); public slots: diff --git a/ksim/monitors/cpu/ksimcpu.cpp b/ksim/monitors/cpu/ksimcpu.cpp index 057edd5..37c09f7 100644 --- a/ksim/monitors/cpu/ksimcpu.cpp +++ b/ksim/monitors/cpu/ksimcpu.cpp @@ -107,8 +107,8 @@ void CpuPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -CpuView::CpuView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +CpuView::CpuView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef Q_OS_LINUX m_procStream = 0L; @@ -181,15 +181,15 @@ void CpuView::updateView() // kdDebug(2003) << "idle = " << cpuData.idle << endl; if (!m_firstTime) { - if (text.find("%T") != -1) + if (text.tqfind("%T") != -1) cpuDiff = cpuData.sys + cpuData.user + cpuData.nice; - else if (text.find("%t") != -1) + else if (text.tqfind("%t") != -1) cpuDiff = cpuData.sys + cpuData.user; - else if (text.find("%s") != -1) + else if (text.tqfind("%s") != -1) cpuDiff = cpuData.sys; - else if (text.find("%u") != -1) + else if (text.tqfind("%u") != -1) cpuDiff = cpuData.user; - else if (text.find("%n") != -1) + else if (text.tqfind("%n") != -1) cpuDiff = cpuData.nice; cpuDiff *= 100; @@ -201,7 +201,7 @@ void CpuView::updateView() cpuDiff = 100; } - current.chart()->setText(i18n("%1%").arg(cpuDiff)); + current.chart()->setText(i18n("%1%").tqarg(cpuDiff)); current.chart()->setValue(cpuDiff, 0); current.label()->setValue(cpuDiff); } @@ -225,7 +225,7 @@ void CpuView::updateCpu(CpuData &cpu, int cpuNumber) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'cpuString' - if (!cpuFound && parser.find(TQRegExp(cpuString)) != -1) { + if (!cpuFound && parser.tqfind(TQRegExp(cpuString)) != -1) { output = parser; cpuFound = true; } @@ -361,8 +361,8 @@ KSim::Progress *CpuView::addLabel() return progress; } -CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +CpuConfig::CpuConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { TQVBoxLayout * mainLayout = new TQVBoxLayout( this ); mainLayout->setSpacing( 6 ); @@ -377,27 +377,27 @@ CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) mainLayout->addWidget( m_listView ); - TQHBoxLayout * layout = new TQHBoxLayout; - layout->setSpacing( 6 ); + TQHBoxLayout * tqlayout = new TQHBoxLayout; + tqlayout->setSpacing( 6 ); TQSpacerItem * spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - layout->addItem(spacer); + tqlayout->addItem(spacer); m_modify = new TQPushButton( this ); m_modify->setText( i18n( "Modify..." ) ); connect( m_modify, TQT_SIGNAL( clicked() ), TQT_SLOT( modify() ) ); - layout->addWidget( m_modify ); - mainLayout->addLayout( layout ); + tqlayout->addWidget( m_modify ); + mainLayout->addLayout( tqlayout ); m_legendBox = new TQGroupBox(this); m_legendBox->setColumnLayout(0, Qt::Vertical); m_legendBox->setTitle(i18n("Chart Legend")); - m_legendBox->layout()->setSpacing(0); - m_legendBox->layout()->setMargin(0); + m_legendBox->tqlayout()->setSpacing(0); + m_legendBox->tqlayout()->setMargin(0); - m_legendLayout = new TQVBoxLayout(m_legendBox->layout()); - m_legendLayout->setAlignment(Qt::AlignTop); + m_legendLayout = new TQVBoxLayout(m_legendBox->tqlayout()); + m_legendLayout->tqsetAlignment(TQt::AlignTop); m_legendLayout->setSpacing(6); m_legendLayout->setMargin(11); @@ -420,7 +420,7 @@ CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) for (uint i = 0; i < addCpus(); ++i) { - TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").arg(i), TQCheckListItem::CheckBox); + TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").tqarg(i), TQCheckListItem::CheckBox); item->setText(1, "%T"); } } @@ -438,7 +438,7 @@ void CpuConfig::readConfig() TQStringList::ConstIterator it; for (it = enabledCpus.begin(); it != enabledCpus.end(); ++it) { if (TQCheckListItem *item = - static_cast<TQCheckListItem *>(m_listView->findItem((*it), 0))) { + static_cast<TQCheckListItem *>(m_listView->tqfindItem((*it), 0))) { item->setOn(true); item->setText(1, config()->readEntry(CPU_NAME(cpuNum), "%T")); } diff --git a/ksim/monitors/cpu/ksimcpu.h b/ksim/monitors/cpu/ksimcpu.h index 8844225..79e561e 100644 --- a/ksim/monitors/cpu/ksimcpu.h +++ b/ksim/monitors/cpu/ksimcpu.h @@ -52,8 +52,9 @@ class CpuPlugin : public KSim::PluginObject class CpuView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - CpuView(KSim::PluginObject *parent, const char *name); + CpuView(KSim::PluginObject *tqparent, const char *name); ~CpuView(); virtual void reparseConfig(); @@ -200,8 +201,9 @@ class CpuView : public KSim::PluginView class CpuConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - CpuConfig(KSim::PluginObject *parent, const char *name); + CpuConfig(KSim::PluginObject *tqparent, const char *name); ~CpuConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/disk/ksimdisk.cpp b/ksim/monitors/disk/ksimdisk.cpp index 13f0425..cdcae83 100644 --- a/ksim/monitors/disk/ksimdisk.cpp +++ b/ksim/monitors/disk/ksimdisk.cpp @@ -103,8 +103,8 @@ void DiskPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -DiskView::DiskView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +DiskView::DiskView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef Q_OS_LINUX m_bLinux24 = true; @@ -216,13 +216,13 @@ void DiskView::updateDisplay() if (m_useSeperatly) { it.current()->first->setValue(diskData.readBlocks, diskData.writeBlocks); it.current()->first->setText(i18n("in: %1k") - .arg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)), - i18n("out: %1k").arg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1))); + .tqarg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)), + i18n("out: %1k").tqarg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1))); } else { it.current()->first->setValue(diff, 0); it.current()->first->setText(i18n("%1k") - .arg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1))); + .tqarg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1))); } it.current()->second->setMaxValue(it.current()->first->maxValue()); @@ -239,7 +239,7 @@ void DiskView::updateData(DiskList &disks) if (!m_procStream) return; - m_procStream->device()->reset(); + m_procStream->tqdevice()->reset(); fseek(m_procFile, 0L, SEEK_SET); if (m_bLinux24) @@ -248,7 +248,7 @@ void DiskView::updateData(DiskList &disks) // (3,0):(108911,48080,1713380,60831,1102644) TQRegExp regexp("\\([0-9]+,[0-9]+\\):\\([0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\)"); TQString content = m_procStream->read(); - if (content.find("disk_io") == -1) + if (content.tqfind("disk_io") == -1) { m_bLinux24 = false; @@ -267,8 +267,8 @@ void DiskView::updateData(DiskList &disks) { idx += regexp.matchedLength(); TQString diskStr = regexp.cap(0); - diskStr.replace(':', ','); - diskStr.replace(TQRegExp("\\)?\\(?"), TQString::null); + diskStr.tqreplace(':', ','); + diskStr.tqreplace(TQRegExp("\\)?\\(?"), TQString()); TQStringList list = TQStringList::split(',', diskStr); if (list.count() < 7) @@ -414,23 +414,23 @@ TQString DiskView::diskName( int major, int minor ) const switch ( major ) { case IDE0_MAJOR: - returnValue.prepend(TQString::fromLatin1("hda")); + returnValue.prepend(TQString::tqfromLatin1("hda")); break; case IDE1_MAJOR: - returnValue.prepend(TQString::fromLatin1("hdc")); + returnValue.prepend(TQString::tqfromLatin1("hdc")); break; case IDE3_MAJOR: - returnValue.prepend(TQString::fromLatin1("hde")); + returnValue.prepend(TQString::tqfromLatin1("hde")); break; case SCSI_DISK0_MAJOR: - returnValue.prepend(TQString::fromLatin1("sda")); + returnValue.prepend(TQString::tqfromLatin1("sda")); break; case SCSI_GENERIC_MAJOR: - returnValue.prepend(TQString::fromLatin1("sg0")); + returnValue.prepend(TQString::tqfromLatin1("sg0")); break; } - returnValue.at(2) = returnValue.at(2).latin1() + minor; + returnValue.tqat(2) = returnValue.tqat(2).latin1() + minor; return returnValue; #else Q_UNUSED(major); @@ -472,8 +472,8 @@ void DiskView::cleanup() m_addAll = false; } -DiskConfig::DiskConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +DiskConfig::DiskConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_layout = new TQVBoxLayout(this); m_layout->setSpacing(6); @@ -482,23 +482,23 @@ DiskConfig::DiskConfig(KSim::PluginObject *parent, const char *name) m_listview->addColumn(i18n("Disks")); m_layout->addWidget(m_listview); - TQHBoxLayout *layout = new TQHBoxLayout; - layout->setSpacing(6); + TQHBoxLayout *tqlayout = new TQHBoxLayout; + tqlayout->setSpacing(6); TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum); - layout->addItem(spacer); + tqlayout->addItem(spacer); m_add = new TQPushButton(this); m_add->setText(i18n("Add...")); connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(addItem())); - layout->addWidget(m_add); + tqlayout->addWidget(m_add); m_remove = new TQPushButton(this); m_remove->setText(i18n("Remove")); connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem())); - layout->addWidget(m_remove); - m_layout->addLayout(layout); + tqlayout->addWidget(m_remove); + m_layout->addLayout(tqlayout); m_buttonBox = new TQVButtonGroup(i18n("Disk Styles"), this); m_layout->addWidget(m_buttonBox); @@ -527,7 +527,7 @@ void DiskConfig::readConfig() TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { TQString text = ((*it) == "complete" ? i18n("All Disks") : (*it)); - if (!m_listview->findItem(text, 0)) + if (!m_listview->tqfindItem(text, 0)) new TQListViewItem(m_listview, text); } } @@ -551,7 +551,7 @@ void DiskConfig::addItem() { bool ok = false; TQString text = KInputDialog::getText(i18n("Add Disk Device"), i18n("Disk name:"), - TQString::null, &ok, this); + TQString(), &ok, this); if (text.startsWith("/dev/")) text = text.mid(5); diff --git a/ksim/monitors/disk/ksimdisk.h b/ksim/monitors/disk/ksimdisk.h index 3d3679a..f122fbf 100644 --- a/ksim/monitors/disk/ksimdisk.h +++ b/ksim/monitors/disk/ksimdisk.h @@ -55,8 +55,9 @@ class DiskPlugin : public KSim::PluginObject class DiskView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - DiskView(KSim::PluginObject *parent, const char *name); + DiskView(KSim::PluginObject *tqparent, const char *name); ~DiskView(); virtual void reparseConfig(); @@ -105,7 +106,7 @@ class DiskView : public KSim::PluginView }; typedef TQValueList<DiskData> DiskList; - typedef QPair<KSim::Chart *, KSim::Progress *> DiskPair; + typedef TQPair<KSim::Chart *, KSim::Progress *> DiskPair; void updateData(DiskList &disks); TQString diskName( int, int ) const; @@ -115,7 +116,7 @@ class DiskView : public KSim::PluginView void init(); void cleanup(); - TQValueVector<QPair<DiskData, DiskData> > m_data; + TQValueVector<TQPair<DiskData, DiskData> > m_data; TQTimer *m_timer; bool m_bLinux24; FILE *m_procFile; @@ -131,8 +132,9 @@ class DiskView : public KSim::PluginView class DiskConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - DiskConfig(KSim::PluginObject *parent, const char *name); + DiskConfig(KSim::PluginObject *tqparent, const char *name); ~DiskConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/filesystem/filesystemstats.cpp b/ksim/monitors/filesystem/filesystemstats.cpp index 1aa156d..fa215fc 100644 --- a/ksim/monitors/filesystem/filesystemstats.cpp +++ b/ksim/monitors/filesystem/filesystemstats.cpp @@ -184,7 +184,7 @@ FilesystemStats::List FilesystemStats::readEntries() #endif #ifdef USE_FAILSAFE - TQFile file( TQString::fromLatin1( _PATH_MOUNTED ) ); + TQFile file( TQString::tqfromLatin1( _PATH_MOUNTED ) ); if ( !file.open( IO_ReadOnly ) ) return list; diff --git a/ksim/monitors/filesystem/filesystemwidget.cpp b/ksim/monitors/filesystem/filesystemwidget.cpp index aca7694..5d20213 100644 --- a/ksim/monitors/filesystem/filesystemwidget.cpp +++ b/ksim/monitors/filesystem/filesystemwidget.cpp @@ -85,8 +85,8 @@ void FilesystemWidget::Filesystem::setValue(int value) m_display->setValue(value); } -FilesystemWidget::FilesystemWidget(TQWidget *parent, const char *name) - : TQWidget(parent, name) +FilesystemWidget::FilesystemWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_list.setAutoDelete(true); m_layout = new TQVBoxLayout(this); @@ -141,7 +141,7 @@ bool FilesystemWidget::eventFilter(TQObject *o, TQEvent *e) while ((filesystem = it.current()) != 0) { ++it; - if (filesystem->display() == o) { + if (TQT_BASE_OBJECT(filesystem->display()) == TQT_BASE_OBJECT(o)) { progressBar = filesystem->display(); break; } @@ -149,17 +149,17 @@ bool FilesystemWidget::eventFilter(TQObject *o, TQEvent *e) ++i; } - if (o == progressBar && e->type() == TQEvent::MouseButtonPress) + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(progressBar) && e->type() == TQEvent::MouseButtonPress) { - switch(static_cast<TQMouseEvent *>(e)->button()) { - case TQMouseEvent::RightButton: + switch(TQT_TQMOUSEEVENT(e)->button()) { + case Qt::RightButton: showMenu(i); break; default: break; - case TQMouseEvent::LeftButton: - if (parentWidget()->inherits("KSim::PluginView")) - static_cast<KSim::PluginView *>(parentWidget())->doCommand(); + case Qt::LeftButton: + if (tqparentWidget()->inherits("KSim::PluginView")) + static_cast<KSim::PluginView *>(tqparentWidget())->doCommand(); break; } @@ -188,11 +188,11 @@ void FilesystemWidget::processExited(KProcess *) TQStringList::Iterator it; for (it = errorList.begin(); it != errorList.end(); ++it) { - message += TQString::fromLatin1("<li>%1</li>") - .arg((*it).replace(TQRegExp("[u]?mount: "), TQString::null)); + message += TQString::tqfromLatin1("<li>%1</li>") + .tqarg((*it).tqreplace(TQRegExp("[u]?mount: "), TQString())); } - message += TQString::fromLatin1("</ul></qt>"); + message += TQString::tqfromLatin1("</ul></qt>"); KMessageBox::sorry(0, message); } diff --git a/ksim/monitors/filesystem/filesystemwidget.h b/ksim/monitors/filesystem/filesystemwidget.h index 16e1190..b709125 100644 --- a/ksim/monitors/filesystem/filesystemwidget.h +++ b/ksim/monitors/filesystem/filesystemwidget.h @@ -27,11 +27,12 @@ class KProcess; class TQVBoxLayout; -class FilesystemWidget : public QWidget +class FilesystemWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - FilesystemWidget(TQWidget *parent, const char *name); + FilesystemWidget(TQWidget *tqparent, const char *name); ~FilesystemWidget(); void append(int, const TQString &); diff --git a/ksim/monitors/filesystem/fsystemconfig.cpp b/ksim/monitors/filesystem/fsystemconfig.cpp index 67026d1..a91eae0 100644 --- a/ksim/monitors/filesystem/fsystemconfig.cpp +++ b/ksim/monitors/filesystem/fsystemconfig.cpp @@ -34,20 +34,20 @@ #include <tqlabel.h> #include <tqwhatsthis.h> -class FSysViewItem : public QCheckListItem +class FSysViewItem : public TQCheckListItem { public: - FSysViewItem(TQListView *parent, const TQString &text1, + FSysViewItem(TQListView *tqparent, const TQString &text1, const TQString &text2, const TQString &text3) - : TQCheckListItem(parent, text1, CheckBox) + : TQCheckListItem(tqparent, text1, CheckBox) { setText(1, text2); setText(2, text3); } }; -FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +FsystemConfig::FsystemConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_mainLayout = new TQGridLayout(this); m_mainLayout->setSpacing(6); @@ -71,7 +71,7 @@ FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) m_intervalLabel = new TQLabel(this); m_intervalLabel->setText( i18n("Update interval:")); - m_intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + m_intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_mainLayout->addMultiCellWidget(m_intervalLabel, 3, 3, 0, 0); @@ -82,7 +82,7 @@ FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) TQLabel *intervalLabel = new TQLabel(this); intervalLabel->setText(i18n("seconds")); - intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_mainLayout->addMultiCellWidget(intervalLabel, 3, 3, 2, 2); @@ -107,7 +107,7 @@ void FsystemConfig::readConfig() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0); + static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0); } } @@ -155,7 +155,7 @@ void FsystemConfig::getStats() if ( !FilesystemStats::readStats( ( *it ).dir, total, free ) ) continue; - if ( !m_availableMounts->findItem( ( *it ).dir, 0 ) ) + if ( !m_availableMounts->tqfindItem( ( *it ).dir, 0 ) ) { (void) new FSysViewItem( m_availableMounts, ( *it ).dir, ( *it ).fsname, ( *it ).type ); @@ -169,7 +169,7 @@ void FsystemConfig::getStats() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0); + static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0); } } @@ -178,7 +178,7 @@ TQString FsystemConfig::splitString(const TQString &string) const if (string == "/" || !m_splitNames->isChecked()) return string; - int location = string.findRev("/"); + int location = string.tqfindRev("/"); TQString newString(string); return newString.remove(0, location + 1); } diff --git a/ksim/monitors/filesystem/fsystemconfig.h b/ksim/monitors/filesystem/fsystemconfig.h index 283a501..96fccf1 100644 --- a/ksim/monitors/filesystem/fsystemconfig.h +++ b/ksim/monitors/filesystem/fsystemconfig.h @@ -33,8 +33,9 @@ class TQListBoxItem; class FsystemConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - FsystemConfig(KSim::PluginObject *parent, const char *name); + FsystemConfig(KSim::PluginObject *tqparent, const char *name); ~FsystemConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/filesystem/ksimfsystem.cpp b/ksim/monitors/filesystem/ksimfsystem.cpp index 039447a..f73ce3d 100644 --- a/ksim/monitors/filesystem/ksimfsystem.cpp +++ b/ksim/monitors/filesystem/ksimfsystem.cpp @@ -81,9 +81,9 @@ void PluginModule::showAbout() KAboutApplication(&aboutData).exec(); } -Fsystem::Fsystem(KSim::PluginObject *parent, const char *name) +Fsystem::Fsystem(KSim::PluginObject *tqparent, const char *name) : DCOPObject("fsystem"), - KSim::PluginView(parent, name) + KSim::PluginView(tqparent, name) { config()->setGroup("Fsystem"); TQVBoxLayout *vbLayout = new TQVBoxLayout(this); @@ -193,7 +193,7 @@ Fsystem::MountEntryList Fsystem::makeList(const TQStringList &list) const TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { splitList = TQStringList::split(":", (*it)); - newList.append(qMakePair(splitList[0], splitList[1])); + newList.append(tqMakePair(splitList[0], splitList[1])); } return newList; diff --git a/ksim/monitors/filesystem/ksimfsystem.h b/ksim/monitors/filesystem/ksimfsystem.h index d945820..cf8dc9e 100644 --- a/ksim/monitors/filesystem/ksimfsystem.h +++ b/ksim/monitors/filesystem/ksimfsystem.h @@ -48,11 +48,12 @@ class PluginModule : public KSim::PluginObject class Fsystem : public KSim::PluginView, public FsystemIface { Q_OBJECT + TQ_OBJECT public: /** * construtor of Fsystem, calls all init functions to create the plugin. */ - Fsystem(KSim::PluginObject *parent, const char *name); + Fsystem(KSim::PluginObject *tqparent, const char *name); ~Fsystem(); virtual void reparseConfig(); @@ -65,7 +66,7 @@ class Fsystem : public KSim::PluginView, public FsystemIface void updateFS(); private: - typedef TQValueList<QPair<TQString, TQString> > MountEntryList; + typedef TQValueList<TQPair<TQString, TQString> > MountEntryList; MountEntryList makeList(const TQStringList &list) const; FilesystemWidget *m_widget; diff --git a/ksim/monitors/i8k/ksimi8k.cpp b/ksim/monitors/i8k/ksimi8k.cpp index 46a96e0..2c209b4 100644 --- a/ksim/monitors/i8k/ksimi8k.cpp +++ b/ksim/monitors/i8k/ksimi8k.cpp @@ -72,8 +72,8 @@ void I8KPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -I8KView::I8KView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name), +I8KView::I8KView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name), m_timer( 0L ), m_procFile( 0L ), m_procStream( 0L ) { initGUI(); @@ -151,15 +151,15 @@ void I8KView::closeStream() void I8KView::initGUI() { - TQVBoxLayout *layout = new TQVBoxLayout( this ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); m_fan1Label = new KSim::Label( this ); m_fan2Label = new KSim::Label( this ); m_tempLabel = new KSim::Label( this ); - layout->addWidget( m_fan1Label ); - layout->addWidget( m_fan2Label ); - layout->addWidget( m_tempLabel ); + tqlayout->addWidget( m_fan1Label ); + tqlayout->addWidget( m_fan2Label ); + tqlayout->addWidget( m_tempLabel ); } void I8KView::updateView() @@ -195,21 +195,21 @@ void I8KView::updateView() } if ( rightspeed > 0 ) - m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).arg( rightspeed ) ); + m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).tqarg( rightspeed ) ); else m_fan1Label->setText( i18n( "Right fan: Off" ) ); if ( leftspeed > 0 ) - m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).arg( leftspeed ) ); + m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).tqarg( leftspeed ) ); else m_fan2Label->setText( i18n( "Left fan: Off" ) ); - m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).arg( cputemp ) - .arg( m_unit ) ); + m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).tqarg( cputemp ) + .tqarg( m_unit ) ); } -I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +I8KConfig::I8KConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_unit = new TQCheckBox( i18n( "Show temperature in Fahrenheit" ), this ); @@ -218,14 +218,14 @@ I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name) m_interval->setRange( 2, 60, 1, true ); m_interval->setSuffix( i18n( " sec" ) ); - TQGridLayout *layout = new TQGridLayout( this, 3, 2, 0, + TQGridLayout *tqlayout = new TQGridLayout( this, 3, 2, 0, KDialog::spacingHint() ); - layout->addMultiCellWidget( m_unit, 0, 0, 0, 1 ); - layout->addWidget( label, 1, 0 ); - layout->addWidget( m_interval, 1, 1 ); - layout->setColStretch( 1, 1 ); - layout->setRowStretch( 2, 1 ); + tqlayout->addMultiCellWidget( m_unit, 0, 0, 0, 1 ); + tqlayout->addWidget( label, 1, 0 ); + tqlayout->addWidget( m_interval, 1, 1 ); + tqlayout->setColStretch( 1, 1 ); + tqlayout->setRowStretch( 2, 1 ); } I8KConfig::~I8KConfig() diff --git a/ksim/monitors/i8k/ksimi8k.h b/ksim/monitors/i8k/ksimi8k.h index 4258ba6..76b8796 100644 --- a/ksim/monitors/i8k/ksimi8k.h +++ b/ksim/monitors/i8k/ksimi8k.h @@ -50,8 +50,9 @@ class I8KPlugin : public KSim::PluginObject class I8KView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - I8KView(KSim::PluginObject *parent, const char *name); + I8KView(KSim::PluginObject *tqparent, const char *name); ~I8KView(); virtual void reparseConfig(); @@ -81,8 +82,9 @@ class I8KView : public KSim::PluginView class I8KConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - I8KConfig(KSim::PluginObject *parent, const char *name); + I8KConfig(KSim::PluginObject *tqparent, const char *name); ~I8KConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/lm_sensors/NVCtrl.c b/ksim/monitors/lm_sensors/NVCtrl.c index 6c61b8a..dd5f500 100644 --- a/ksim/monitors/lm_sensors/NVCtrl.c +++ b/ksim/monitors/lm_sensors/NVCtrl.c @@ -143,7 +143,7 @@ Bool XNVCTRLIsNvScreen ( void XNVCTRLSetAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int value ){ @@ -157,7 +157,7 @@ void XNVCTRLSetAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlSetAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; req->value = value; UnlockDisplay (dpy); @@ -168,7 +168,7 @@ void XNVCTRLSetAttribute ( Bool XNVCTRLQueryAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int *value ){ @@ -187,7 +187,7 @@ Bool XNVCTRLQueryAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); @@ -205,7 +205,7 @@ Bool XNVCTRLQueryAttribute ( Bool XNVCTRLQueryStringAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, char **ptr ){ @@ -227,7 +227,7 @@ Bool XNVCTRLQueryStringAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryStringAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, False)) { UnlockDisplay (dpy); @@ -256,7 +256,7 @@ Bool XNVCTRLQueryStringAttribute ( Bool XNVCTRLQueryValidAttributeValues ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values ){ @@ -277,7 +277,7 @@ Bool XNVCTRLQueryValidAttributeValues ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryValidAttributeValues; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); @@ -343,8 +343,8 @@ static Bool wire_to_event (Display *dpy, XEvent *host, xEvent *wire) re->attribute_changed.display = dpy; re->attribute_changed.time = event->u.attribute_changed.time; re->attribute_changed.screen = event->u.attribute_changed.screen; - re->attribute_changed.display_mask = - event->u.attribute_changed.display_mask; + re->attribute_changed.display_tqmask = + event->u.attribute_changed.display_tqmask; re->attribute_changed.attribute = event->u.attribute_changed.attribute; re->attribute_changed.value = event->u.attribute_changed.value; break; diff --git a/ksim/monitors/lm_sensors/NVCtrl.h b/ksim/monitors/lm_sensors/NVCtrl.h index 81c9432..5e78e27 100644 --- a/ksim/monitors/lm_sensors/NVCtrl.h +++ b/ksim/monitors/lm_sensors/NVCtrl.h @@ -26,7 +26,7 @@ /* * Integer attributes; these are settable/gettable via * XNVCTRLSetAttribute() and XNVCTRLQueryAttribute, respectively. - * Some attributes may only be read; some may require a display_mask + * Some attributes may only be read; some may require a display_tqmask * argument. This information is encoded in the "permission" comment * after each attribute #define, and can be queried at run time with * XNVCTRLQueryValidAttributeValues(). @@ -40,14 +40,14 @@ * various reasons: they represent static system information, they * can only be changed by changing an XF86Config option, etc). * - * D: The attribute requires the display mask argument. The + * D: The attribute requires the display tqmask argument. The * attributes NV_CTRL_CONNECTED_DISPLAYS and NV_CTRL_ENABLED_DISPLAYS - * will be a bitmask of what display devices are connected and what + * will be a bittqmask of what display devices are connected and what * display devices are enabled for use in X, respectively. Each bit - * in the bitmask represents a display device; it is these bits which - * should be used as the display_mask when dealing with attributes + * in the bittqmask represents a display device; it is these bits which + * should be used as the display_tqmask when dealing with attributes * designated with "D" below. For attributes that do not require the - * display mask, the argument is ignored. + * display tqmask, the argument is ignored. */ @@ -249,7 +249,7 @@ /* - * NV_CTRL_CONNECTED_DISPLAYS - returns a display mask indicating what + * NV_CTRL_CONNECTED_DISPLAYS - returns a display tqmask indicating what * display devices are connected to the GPU driving the specified X * screen. */ @@ -258,7 +258,7 @@ /* - * NV_CTRL_ENABLED_DISPLAYS - returns a display mask indicating what + * NV_CTRL_ENABLED_DISPLAYS - returns a display tqmask indicating what * display devices are enabled for use on the specified X screen. */ @@ -717,7 +717,7 @@ /* * NV_CTRL_STRING_DISPLAY_DEVICE_NAME - name of the display device - * specified in the display_mask argument. + * specified in the display_tqmask argument. */ #define NV_CTRL_STRING_DISPLAY_DEVICE_NAME 4 /* R-D */ @@ -746,7 +746,7 @@ * is no fixed range of valid values. * * ATTRIBUTE_TYPE_BITMASK : the attribute is an integer value, - * interpretted as a bitmask. + * interpretted as a bittqmask. * * ATTRIBUTE_TYPE_BOOL : the attribute is a boolean, valid values are * either 1 (on/true) or 0 (off/false). @@ -763,7 +763,7 @@ * which can only have certain values, depending on GPU. * * - * The permissions field of NVCTRLAttributeValidValuesRec is a bitmask + * The permissions field of NVCTRLAttributeValidValuesRec is a bittqmask * that may contain: * * ATTRIBUTE_TYPE_READ diff --git a/ksim/monitors/lm_sensors/NVCtrlLib.h b/ksim/monitors/lm_sensors/NVCtrlLib.h index 8d9cec4..704071c 100644 --- a/ksim/monitors/lm_sensors/NVCtrlLib.h +++ b/ksim/monitors/lm_sensors/NVCtrlLib.h @@ -55,7 +55,7 @@ Bool XNVCTRLIsNvScreen ( * Sets the attribute to the given value. The attributes and their * possible values are listed in NVCtrl.h. * - * Not all attributes require the display_mask parameter; see + * Not all attributes require the display_tqmask parameter; see * NVCtrl.h for details. * * Possible errors: @@ -66,7 +66,7 @@ Bool XNVCTRLIsNvScreen ( void XNVCTRLSetAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int value ); @@ -78,7 +78,7 @@ void XNVCTRLSetAttribute ( * If XNVCTRLQueryAttribute returns True, value will contain the * value of the specified attribute. * - * Not all attributes require the display_mask parameter; see + * Not all attributes require the display_tqmask parameter; see * NVCtrl.h for details. * * Possible errors: @@ -90,7 +90,7 @@ void XNVCTRLSetAttribute ( Bool XNVCTRLQueryAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int *value ); @@ -112,7 +112,7 @@ Bool XNVCTRLQueryAttribute ( Bool XNVCTRLQueryStringAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, char **ptr ); @@ -129,7 +129,7 @@ Bool XNVCTRLQueryStringAttribute ( Bool XNVCTRLQueryValidAttributeValues ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values ); @@ -166,7 +166,7 @@ typedef struct { Display *display; Time time; int screen; - unsigned int display_mask; + unsigned int display_tqmask; unsigned int attribute; int value; } XNVCtrlAttributeChangedEvent; diff --git a/ksim/monitors/lm_sensors/ksimsensors.cpp b/ksim/monitors/lm_sensors/ksimsensors.cpp index eb2614f..76bc4c3 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.cpp +++ b/ksim/monitors/lm_sensors/ksimsensors.cpp @@ -71,8 +71,8 @@ void PluginModule::showAbout() KAboutApplication(&aboutData).exec(); } -SensorsView::SensorsView(KSim::PluginObject *parent, const char *name) - : DCOPObject("sensors"), KSim::PluginView(parent, name) +SensorsView::SensorsView(KSim::PluginObject *tqparent, const char *name) + : DCOPObject("sensors"), KSim::PluginView(tqparent, name) { config()->setGroup("Sensors"); (new TQVBoxLayout(this))->setAutoAdd(true); diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h index a8a0482..195899e 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.h +++ b/ksim/monitors/lm_sensors/ksimsensors.h @@ -48,8 +48,9 @@ class PluginModule : public KSim::PluginObject class SensorsView : public KSim::PluginView, public KSimSensorsIface { Q_OBJECT + TQ_OBJECT public: - SensorsView(KSim::PluginObject *parent, const char *name); + SensorsView(KSim::PluginObject *tqparent, const char *name); ~SensorsView(); virtual void reparseConfig(); diff --git a/ksim/monitors/lm_sensors/nv_control.h b/ksim/monitors/lm_sensors/nv_control.h index d94ee95..9900a00 100644 --- a/ksim/monitors/lm_sensors/nv_control.h +++ b/ksim/monitors/lm_sensors/nv_control.h @@ -87,7 +87,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryAttributeReq; #define sz_xnvCtrlQueryAttributeReq 16 @@ -111,7 +111,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; INT32 value B32; } xnvCtrlSetAttributeReq; @@ -122,7 +122,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryStringAttributeReq; #define sz_xnvCtrlQueryStringAttributeReq 16 @@ -150,7 +150,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryValidAttributeValuesReq; #define sz_xnvCtrlQueryValidAttributeValuesReq 16 @@ -192,7 +192,7 @@ typedef struct { CARD16 sequenceNumber B16; Time time B32; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; CARD32 value B32; CARD32 pad0 B32; diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp index a0b82c5..de94a1b 100644 --- a/ksim/monitors/lm_sensors/sensorbase.cpp +++ b/ksim/monitors/lm_sensors/sensorbase.cpp @@ -126,7 +126,7 @@ void SensorBase::update() m_sensorList.append(SensorInfo(currentSensor++, label, TQString::fromUtf8(name), TQString::fromUtf8(chip->prefix), - chipset, sensorType(TQString::fromLatin1(name)))); + chipset, sensorType(TQString::tqfromLatin1(name)))); } } } @@ -134,15 +134,15 @@ void SensorBase::update() if (m_hasNVControl) { int temp = 0; if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_GPU_CORE_TEMPERATURE, &temp)) { - TQString name = TQString::fromLatin1("GPU Temp"); + TQString name = TQString::tqfromLatin1("GPU Temp"); m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), - name, TQString::null, TQString::null, sensorType(name))); + name, TQString(), TQString(), sensorType(name))); } if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_AMBIENT_TEMPERATURE, &temp)) { - TQString name = TQString::fromLatin1("GPU Ambient Temp"); + TQString name = TQString::tqfromLatin1("GPU Ambient Temp"); m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), - name, TQString::null, TQString::null, sensorType(name))); + name, TQString(), TQString(), sensorType(name))); } } @@ -212,19 +212,19 @@ bool SensorBase::init() TQString SensorBase::sensorType(const TQString &name) { - if (name.findRev("fan", -1, false) != -1) + if (name.tqfindRev("fan", -1, false) != -1) return i18n("Rounds per minute", " RPM"); - if (name.findRev("temp", -1, false) != -1) + if (name.tqfindRev("temp", -1, false) != -1) if (SensorBase::fahrenheit()) - return TQString::fromLatin1("°F"); + return TQString::tqfromLatin1("°F"); else - return TQString::fromLatin1("°C"); + return TQString::tqfromLatin1("°C"); - if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) + if (name.tqfindRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) return i18n("Volt", "V"); - return TQString::null; + return TQString(); } TQString SensorBase::chipsetString(const ChipName *c) @@ -239,7 +239,7 @@ TQString SensorBase::chipsetString(const ChipName *c) float SensorBase::formatValue(const TQString &label, float value) { - if (label.findRev("temp", -1, false) != -1) + if (label.tqfindRev("temp", -1, false) != -1) return toFahrenheit(value); return value; @@ -247,7 +247,7 @@ float SensorBase::formatValue(const TQString &label, float value) TQString SensorBase::formatString(const TQString &label, float value) { - if (label.findRev("fan", -1, false) != -1) + if (label.tqfindRev("fan", -1, false) != -1) return TQString::number(value); return TQString::number(value,'f',2); diff --git a/ksim/monitors/lm_sensors/sensorbase.h b/ksim/monitors/lm_sensors/sensorbase.h index 1c2d99c..7a39462 100644 --- a/ksim/monitors/lm_sensors/sensorbase.h +++ b/ksim/monitors/lm_sensors/sensorbase.h @@ -88,9 +88,10 @@ class SensorList : public TQValueList<SensorInfo> SensorList(const SensorInfo &sensor) { append(sensor); } }; -class SensorBase : public QObject +class SensorBase : public TQObject { Q_OBJECT + TQ_OBJECT public: static SensorBase *self(); diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp index 2ab1235..e5f3b6a 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.cpp +++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp @@ -37,13 +37,13 @@ #include <tqpopupmenu.h> #include <tqpushbutton.h> -class SensorViewItem : public QCheckListItem +class SensorViewItem : public TQCheckListItem { public: - SensorViewItem(TQListView *parent, const TQString &text1, + SensorViewItem(TQListView *tqparent, const TQString &text1, const TQString &text2, const TQString &text3, const TQString &text4) - : TQCheckListItem(parent, text1, CheckBox) + : TQCheckListItem(tqparent, text1, CheckBox) { setText(1, text2); setText(2, text3); @@ -51,8 +51,8 @@ class SensorViewItem : public QCheckListItem } }; -SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +SensorsConfig::SensorsConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_layout = new TQGridLayout(this); m_layout->setSpacing(6); @@ -86,7 +86,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) m_updateLabel = new TQLabel(this); m_updateLabel->setText(i18n("Update interval:")); - m_updateLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + m_updateLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(m_updateLabel, 4, 4, 0, 0); @@ -95,7 +95,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) TQLabel *intervalLabel = new TQLabel(this); intervalLabel->setText(i18n("seconds")); - intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(intervalLabel, 4, 4, 2, 2); } @@ -233,7 +233,7 @@ void SensorsConfig::showEvent(TQShowEvent *) const SensorList &list = SensorBase::self()->sensorsList(); SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1); + TQListViewItem *item = m_sensorView->tqfindItem((*it).sensorName(), 1); if (item) item->setText(3, (*it).sensorValue() + (*it).sensorUnit()); } diff --git a/ksim/monitors/lm_sensors/sensorsconfig.h b/ksim/monitors/lm_sensors/sensorsconfig.h index 80ed701..f37c599 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.h +++ b/ksim/monitors/lm_sensors/sensorsconfig.h @@ -36,8 +36,9 @@ class TQTimer; class SensorsConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - SensorsConfig(KSim::PluginObject *parent, const char *name); + SensorsConfig(KSim::PluginObject *tqparent, const char *name); ~SensorsConfig(); void saveConfig(); diff --git a/ksim/monitors/mail/ksimmail.cpp b/ksim/monitors/mail/ksimmail.cpp index fdda6bd..260ad8e 100644 --- a/ksim/monitors/mail/ksimmail.cpp +++ b/ksim/monitors/mail/ksimmail.cpp @@ -66,13 +66,13 @@ void MailPlugin::showAbout() KAboutApplication( &about ).exec(); } -MailView::MailView( KSim::PluginObject* parent, const char* name ) - : KSim::PluginView( parent, name ) +MailView::MailView( KSim::PluginObject* tqparent, const char* name ) + : KSim::PluginView( tqparent, name ) { - TQVBoxLayout* layout = new TQVBoxLayout( this ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); MailLabel* label = new MailLabel( this ); - layout->addWidget( label, 0, AlignHCenter ); + tqlayout->addWidget( label, 0, AlignHCenter ); } MailView::~MailView() @@ -87,8 +87,8 @@ void MailView::updateDisplay() { } -MailLabel::MailLabel( TQWidget* parent ) - : KSim::Label( KSim::Types::Mail, parent ) +MailLabel::MailLabel( TQWidget* tqparent ) + : KSim::Label( KSim::Types::Mail, tqparent ) { // label->setPixmap( KSim::ThemeLoader::self().current().krellMail() ); configureObject( false ); @@ -101,7 +101,7 @@ MailLabel::~MailLabel() { } -void MailLabel::configureObject( bool repaint ) +void MailLabel::configureObject( bool tqrepaint ) { m_envelope.load( themeLoader().current().mailPixmap() ); m_frames = themeLoader().current().mailFrames(); @@ -112,7 +112,7 @@ void MailLabel::configureObject( bool repaint ) setPixmap( frame( m_envelope, 1 ) ); - KSim::Label::configureObject( repaint ); + KSim::Label::configureObject( tqrepaint ); } void MailLabel::paintEvent( TQPaintEvent* e ) @@ -131,17 +131,17 @@ TQPixmap MailLabel::frame( const TQPixmap& source, int number ) const { TQPixmap result( source.width(), source.height() / m_frames ); bitBlt( &result, 0, 0, &source, 0, number * source.height() / m_frames ); - if ( source.mask() ) + if ( source.tqmask() ) { - TQBitmap mask( result.size() ); - bitBlt( &mask, 0, 0, source.mask(), 0, number * source.height() / m_frames ); - result.setMask( mask ); + TQBitmap tqmask( result.size() ); + bitBlt( &tqmask, 0, 0, source.tqmask(), 0, number * source.height() / m_frames ); + result.setMask( tqmask ); } return result; } -MailConfig::MailConfig( KSim::PluginObject* parent, const char* name ) - : KSim::PluginPage( parent, name ) +MailConfig::MailConfig( KSim::PluginObject* tqparent, const char* name ) + : KSim::PluginPage( tqparent, name ) { } diff --git a/ksim/monitors/mail/ksimmail.h b/ksim/monitors/mail/ksimmail.h index f5a42d7..776d574 100644 --- a/ksim/monitors/mail/ksimmail.h +++ b/ksim/monitors/mail/ksimmail.h @@ -39,8 +39,9 @@ public: class MailView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - MailView( KSim::PluginObject* parent, const char* name ); + MailView( KSim::PluginObject* tqparent, const char* name ); ~MailView(); virtual void reparseConfig(); @@ -52,8 +53,9 @@ private slots: class MailLabel : public KSim::Label { Q_OBJECT + TQ_OBJECT public: - MailLabel( TQWidget* parent ); + MailLabel( TQWidget* tqparent ); virtual ~MailLabel(); virtual void configureObject( bool ); @@ -77,8 +79,9 @@ private: class MailConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - MailConfig( KSim::PluginObject* parent, const char* name ); + MailConfig( KSim::PluginObject* tqparent, const char* name ); ~MailConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/net/ksimnet.cpp b/ksim/monitors/net/ksimnet.cpp index 1bbfeb2..0c16f2d 100644 --- a/ksim/monitors/net/ksimnet.cpp +++ b/ksim/monitors/net/ksimnet.cpp @@ -99,8 +99,8 @@ void NetPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -NetView::NetView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +NetView::NetView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef __linux__ m_procStream = 0L; @@ -356,7 +356,7 @@ void NetView::updateGraph() if ( ( *it ).label() ) { timeDisplay = ( *it ).format(); - newPid = pid.arg( ( *it ).name() ); + newPid = pid.tqarg( ( *it ).name() ); if ( TQFile::exists( newPid ) && stat( TQFile::encodeName( newPid ).data(), &st ) == 0 ) { @@ -371,8 +371,8 @@ void NetView::updateGraph() } // Keep backwards compat for now - if ( timeDisplay.contains( '%' ) > 0 ) - timeDisplay.replace( '%', "" ); + if ( timeDisplay.tqcontains( '%' ) > 0 ) + timeDisplay.tqreplace( '%', "" ); ( *it ).label()->setText( netTime.toString( timeDisplay ) ); } @@ -394,16 +394,16 @@ void NetView::updateGraph() TQString receiveString = KGlobal::locale()->formatNumber( ( float ) receiveDiff / 1024.0, 1 ); TQString sendString = KGlobal::locale()->formatNumber( ( float ) sendDiff / 1024.0, 1 ); - ( *it ).chart()->setText( i18n( "in: %1k" ).arg( receiveString ), - i18n( "out: %1k" ).arg( sendString ) ); + ( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( receiveString ), + i18n( "out: %1k" ).tqarg( sendString ) ); } else { ( *it ).setData( NetData() ); ( *it ).chart()->setValue( 0, 0 ); - ( *it ).chart()->setText( i18n( "in: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ), - i18n( "out: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) ); + ( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ), + i18n( "out: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) ); if ( ( *it ).label() ) ( *it ).label()->setText( i18n( "offline" ) ); @@ -468,7 +468,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'device' - if (parser.find(device) != -1) + if (parser.tqfind(device) != -1) output = parser; } @@ -480,7 +480,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) // make sure our output doesn't contain "eth0:11210107" so we dont // end up with netList[1] actually being netList[2] - output.replace(TQRegExp(":"), " "); + output.tqreplace(TQRegExp(":"), " "); TQStringList netList = TQStringList::split(' ', output); data.in = netList[1].toULong(); @@ -559,7 +559,7 @@ bool NetView::isOnline(const TQString &device) if (!file.open(IO_ReadOnly)) return -1; - return (TQTextStream(&file).read().find(device) != -1 ? true : false); + return (TQTextStream(&file).read().tqfind(device) != -1 ? true : false); #endif #ifdef __FreeBSD__ @@ -632,7 +632,7 @@ bool NetView::eventFilter( TQObject * o, TQEvent * e ) Network::List::Iterator it; for ( it = m_networkList.begin(); it != m_networkList.end(); ++it ) { - if ( o == ( *it ).chart() || o == ( *it ).label() || o == ( *it ).led() ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).chart()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).label()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).led()) ) { break; } @@ -642,7 +642,7 @@ bool NetView::eventFilter( TQObject * o, TQEvent * e ) if ( e->type() == TQEvent::MouseButtonPress ) { - if ( static_cast<TQMouseEvent *>( e )->button() == TQMouseEvent::RightButton ) + if ( TQT_TQMOUSEEVENT( e )->button() == Qt::RightButton ) { showMenu(i); } diff --git a/ksim/monitors/net/ksimnet.h b/ksim/monitors/net/ksimnet.h index e8a0fbc..3bd8cb1 100644 --- a/ksim/monitors/net/ksimnet.h +++ b/ksim/monitors/net/ksimnet.h @@ -43,8 +43,9 @@ class NetPlugin : public KSim::PluginObject class NetView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - NetView(KSim::PluginObject *parent, const char *name); + NetView(KSim::PluginObject *tqparent, const char *name); ~NetView(); virtual void reparseConfig(); diff --git a/ksim/monitors/net/netconfig.cpp b/ksim/monitors/net/netconfig.cpp index cd86824..9a19047 100644 --- a/ksim/monitors/net/netconfig.cpp +++ b/ksim/monitors/net/netconfig.cpp @@ -34,8 +34,8 @@ #include "netconfig.moc" #include "netdialog.h" -NetConfig::NetConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +NetConfig::NetConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_yes = i18n("yes"); m_no = i18n("no"); @@ -56,29 +56,29 @@ NetConfig::NetConfig(KSim::PluginObject *parent, const char *name) TQT_SLOT(modifyItem(TQListViewItem *))); mainLayout->addWidget(usingBox); - layout = new TQHBoxLayout; - layout->setSpacing(6); + tqlayout = new TQHBoxLayout; + tqlayout->setSpacing(6); TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum); - layout->addItem(spacer); + tqlayout->addItem(spacer); insertButton = new TQPushButton(this); insertButton->setText(i18n("Add...")); connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(showNetDialog())); - layout->addWidget(insertButton); + tqlayout->addWidget(insertButton); modifyButton = new TQPushButton(this); modifyButton->setText(i18n("Modify...")); connect(modifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(modifyCurrent())); - layout->addWidget(modifyButton); + tqlayout->addWidget(modifyButton); removeButton = new TQPushButton(this); removeButton->setText(i18n("Remove")); connect(removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeCurrent())); - layout->addWidget(removeButton); + tqlayout->addWidget(removeButton); - mainLayout->addLayout(layout); + mainLayout->addLayout(tqlayout); } NetConfig::~NetConfig() @@ -144,8 +144,8 @@ void NetConfig::menu(KListView *, TQListViewItem *item, const TQPoint &) if (item) { aboutMenu->insertItem(i18n("&Add Net Device"), 3); - aboutMenu->insertItem(i18n("&Modify '%1'").arg(item->text(0)), 2); - aboutMenu->insertItem(i18n("&Remove '%1'").arg(item->text(0)), 1); + aboutMenu->insertItem(i18n("&Modify '%1'").tqarg(item->text(0)), 2); + aboutMenu->insertItem(i18n("&Remove '%1'").tqarg(item->text(0)), 1); } else { aboutMenu->insertItem(i18n("&Add Net Device"), 3); @@ -217,7 +217,7 @@ void NetConfig::removeItem(TQListViewItem *item) return; int result = KMessageBox::warningContinueCancel(0, i18n("Are you sure you " - "want to remove the net interface '%1'?").arg(item->text(0)), TQString::null, KStdGuiItem::del()); + "want to remove the net interface '%1'?").tqarg(item->text(0)), TQString(), KStdGuiItem::del()); if (result == KMessageBox::Cancel) return; diff --git a/ksim/monitors/net/netconfig.h b/ksim/monitors/net/netconfig.h index d83c20f..2d07176 100644 --- a/ksim/monitors/net/netconfig.h +++ b/ksim/monitors/net/netconfig.h @@ -33,8 +33,9 @@ class TQListViewItem; class NetConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - NetConfig(KSim::PluginObject *parent, const char *name); + NetConfig(KSim::PluginObject *tqparent, const char *name); virtual ~NetConfig(); virtual void saveConfig(); @@ -53,7 +54,7 @@ class NetConfig : public KSim::PluginPage // Couldnt think of a better name for this :) const TQString &boolToString(bool) const; - TQHBoxLayout *layout; + TQHBoxLayout *tqlayout; TQPushButton *insertButton; TQPushButton *removeButton; TQPushButton *modifyButton; diff --git a/ksim/monitors/net/netdialog.cpp b/ksim/monitors/net/netdialog.cpp index 60a5d20..3513bf4 100644 --- a/ksim/monitors/net/netdialog.cpp +++ b/ksim/monitors/net/netdialog.cpp @@ -49,8 +49,8 @@ #include <string.h> -NetDialog::NetDialog(TQWidget *parent, const char *name) - : TQTabDialog(parent, name, true) +NetDialog::NetDialog(TQWidget *tqparent, const char *name) + : TQTabDialog(tqparent, name, true) { m_clicked = false; setCaption(kapp->makeStdCaption(i18n("Network Interface"))); @@ -65,7 +65,7 @@ NetDialog::NetDialog(TQWidget *parent, const char *name) m_generalLayout->addMultiCellWidget(m_deviceLabel, 0, 0, 0, 0); m_deviceCombo = new KComboBox(true, m_generalTab); - m_deviceCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + m_deviceCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); m_deviceCombo->setFocus(); m_deviceCombo->setDuplicatesEnabled(false); @@ -86,10 +86,10 @@ NetDialog::NetDialog(TQWidget *parent, const char *name) m_timerBox = new TQGroupBox(m_generalTab); m_timerBox->setTitle(i18n("Timer")); m_timerBox->setColumnLayout(0, Qt::Vertical); - m_timerBox->layout()->setSpacing(0); - m_timerBox->layout()->setMargin(0); - m_timerBoxLayout = new TQVBoxLayout(m_timerBox->layout()); - m_timerBoxLayout->setAlignment(Qt::AlignTop); + m_timerBox->tqlayout()->setSpacing(0); + m_timerBox->tqlayout()->setMargin(0); + m_timerBoxLayout = new TQVBoxLayout(m_timerBox->tqlayout()); + m_timerBoxLayout->tqsetAlignment(TQt::AlignTop); m_timerBoxLayout->setSpacing(6); m_timerBoxLayout->setMargin(11); @@ -256,7 +256,7 @@ TQStringList NetDialog::createList() const for (it = output.begin(); it != output.end(); ++it) { list = TQStringList::split(' ', (*it)); (*it) = list[0].stripWhiteSpace(); - (*it).truncate((*it).find(':')); + (*it).truncate((*it).tqfind(':')); } return output; diff --git a/ksim/monitors/net/netdialog.h b/ksim/monitors/net/netdialog.h index 3f57b69..094e40a 100644 --- a/ksim/monitors/net/netdialog.h +++ b/ksim/monitors/net/netdialog.h @@ -32,11 +32,12 @@ class KComboBox; class KLineEdit; class KURLRequester; -class NetDialog : public QTabDialog +class NetDialog : public TQTabDialog { Q_OBJECT + TQ_OBJECT public: - NetDialog(TQWidget *parent, const char *name = 0); + NetDialog(TQWidget *tqparent, const char *name = 0); ~NetDialog(); const TQString deviceName() const; diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp index 3085eca..3b571ef 100644 --- a/ksim/monitors/snmp/browsedialog.cpp +++ b/ksim/monitors/snmp/browsedialog.cpp @@ -29,8 +29,8 @@ using namespace KSim::Snmp; -BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *parent, const char *name ) - : BrowseDialogBase( parent, name ), m_host( hostConfig ) +BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *tqparent, const char *name ) + : BrowseDialogBase( tqparent, name ), m_host( hostConfig ) { stop->setGuiItem( KGuiItem( i18n( "&Stop" ), "stop" ) ); @@ -95,7 +95,7 @@ void BrowseDialog::startWalk( const Identifier &startOid ) { stopWalker(); - m_walker = new Walker( m_host, startOid, this ); + m_walker = new Walker( m_host, startOid, TQT_TQOBJECT(this) ); connect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ), this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) ); connect( m_walker, TQT_SIGNAL( finished() ), @@ -134,7 +134,7 @@ void BrowseDialog::applyFilter( TQListViewItem *item ) return; } - if ( item->text( 0 ).find( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { + if ( item->text( 0 ).tqfind( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { item->setVisible( false ); return; } diff --git a/ksim/monitors/snmp/browsedialog.h b/ksim/monitors/snmp/browsedialog.h index a694881..7dfb4f7 100644 --- a/ksim/monitors/snmp/browsedialog.h +++ b/ksim/monitors/snmp/browsedialog.h @@ -39,8 +39,9 @@ namespace Snmp class BrowseDialog : public BrowseDialogBase { Q_OBJECT + TQ_OBJECT public: - BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *parent, const char *name = 0 ); + BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *tqparent, const char *name = 0 ); TQString selectedObjectIdentifier() const; diff --git a/ksim/monitors/snmp/browsedialogbase.ui b/ksim/monitors/snmp/browsedialogbase.ui index 17459f8..c3efab1 100644 --- a/ksim/monitors/snmp/browsedialogbase.ui +++ b/ksim/monitors/snmp/browsedialogbase.ui @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,7 +38,7 @@ <string>Filter:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>filter</cstring> </property> @@ -97,7 +97,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -121,14 +121,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -142,7 +142,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -155,15 +155,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>blah</cstring> </property> @@ -179,7 +179,7 @@ <string>Selected object:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>selectedObject</cstring> </property> @@ -205,7 +205,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -243,17 +243,17 @@ </connection> <connection> <sender>browserContents</sender> - <signal>executed(QListViewItem*)</signal> + <signal>executed(TQListViewItem*)</signal> <receiver>MyDialog</receiver> - <slot>objectSelected(QListViewItem*)</slot> + <slot>objectSelected(TQListViewItem*)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">stopAllWalks()</slot> <slot access="protected">applyFilter()</slot> - <slot access="protected">objectSelected(QListViewItem *)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> + <slot access="protected">objectSelected(TQListViewItem *)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp index a5cfc6e..4682c3b 100644 --- a/ksim/monitors/snmp/chartmonitor.cpp +++ b/ksim/monitors/snmp/chartmonitor.cpp @@ -22,8 +22,8 @@ using namespace KSim::Snmp; -ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name ) - : KSim::Chart( true /* displayMeter */, 0, TQString::null, parent, name ), +ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name ) + : KSim::Chart( true /* displayMeter */, 0, TQString(), tqparent, name ), m_lastValue( 0 ), m_config( config ), m_firstSampleReceived( false ) { setTitle( m_config.name ); @@ -32,7 +32,7 @@ ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const void ChartMonitor::setData( const Value &data ) { - Q_UINT64 currentValue = convertToInt( data ); + TQ_UINT64 currentValue = convertToInt( data ); if ( data.isCounterType() ) { int diff = currentValue - m_lastValue; @@ -50,12 +50,12 @@ void ChartMonitor::setData( const Value &data ) updateDisplay(); setValue( currentValue ); if ( m_config.displayCurrentValueInline ) { - Q_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 ); + TQ_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 ); setText( KIO::convertSize( bytesPerSec ), 0 ); } } -Q_UINT64 ChartMonitor::convertToInt( const Value &data ) +TQ_UINT64 ChartMonitor::convertToInt( const Value &data ) { switch ( data.type() ) { case Value::TimeTicks: diff --git a/ksim/monitors/snmp/chartmonitor.h b/ksim/monitors/snmp/chartmonitor.h index 3b064f8..6713238 100644 --- a/ksim/monitors/snmp/chartmonitor.h +++ b/ksim/monitors/snmp/chartmonitor.h @@ -31,18 +31,19 @@ namespace Snmp class ChartMonitor : public KSim::Chart { Q_OBJECT + TQ_OBJECT public: - ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 ); + ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name = 0 ); public slots: void setData( const Value &data ); private: - Q_UINT64 m_lastValue; + TQ_UINT64 m_lastValue; MonitorConfig m_config; bool m_firstSampleReceived; - static Q_UINT64 convertToInt( const Value &data ); + static TQ_UINT64 convertToInt( const Value &data ); }; } diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp index ee50054..ede7a52 100644 --- a/ksim/monitors/snmp/configpage.cpp +++ b/ksim/monitors/snmp/configpage.cpp @@ -43,8 +43,8 @@ static bool listViewHasSelection( TQListView *lv ) return false; } -ConfigPage::ConfigPage( Plugin *parent, const char *name ) - : KSim::PluginPage( parent, name ) +ConfigPage::ConfigPage( Plugin *tqparent, const char *name ) + : KSim::PluginPage( tqparent, name ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); @@ -123,7 +123,7 @@ void ConfigPage::modifyHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -147,7 +147,7 @@ void ConfigPage::removeHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -191,7 +191,7 @@ void ConfigPage::modifyMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; @@ -215,7 +215,7 @@ void ConfigPage::removeMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; diff --git a/ksim/monitors/snmp/configpage.h b/ksim/monitors/snmp/configpage.h index 66c941c..f8b811c 100644 --- a/ksim/monitors/snmp/configpage.h +++ b/ksim/monitors/snmp/configpage.h @@ -32,17 +32,17 @@ namespace KSim namespace Snmp { -class HostItem : public QListViewItem +class HostItem : public TQListViewItem { public: - HostItem( TQListView *parent, const KSim::Snmp::HostConfig &src ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + HostItem( TQListView *tqparent, const KSim::Snmp::HostConfig &src ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) { setFromHostConfig( src ); } - HostItem( TQListView *parent ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + HostItem( TQListView *tqparent ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) {} void setFromHostConfig( const KSim::Snmp::HostConfig &src ) @@ -53,17 +53,17 @@ public: } }; -class MonitorItem : public QListViewItem +class MonitorItem : public TQListViewItem { public: - MonitorItem( TQListView *parent, const KSim::Snmp::MonitorConfig &monitor ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + MonitorItem( TQListView *tqparent, const KSim::Snmp::MonitorConfig &monitor ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) { setFromMonitor( monitor ); } - MonitorItem( TQListView *parent ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + MonitorItem( TQListView *tqparent ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) {} void setFromMonitor( const KSim::Snmp::MonitorConfig &monitor ) @@ -79,8 +79,9 @@ class Plugin; class ConfigPage : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - ConfigPage( Plugin *parent, const char *name ); + ConfigPage( Plugin *tqparent, const char *name ); ~ConfigPage(); virtual void saveConfig(); diff --git a/ksim/monitors/snmp/configwidget.ui b/ksim/monitors/snmp/configwidget.ui index c121184..2d6134f 100644 --- a/ksim/monitors/snmp/configwidget.ui +++ b/ksim/monitors/snmp/configwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KSim::Snmp::ConfigWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigWidget</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>hostGroup</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>removeHost</cstring> </property> @@ -35,7 +35,7 @@ <string>Remove</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>modifyHost</cstring> </property> @@ -43,7 +43,7 @@ <string>Modify...</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>addHost</cstring> </property> @@ -102,7 +102,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>141</width> <height>20</height> @@ -111,7 +111,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>monitorGroup</cstring> </property> @@ -122,7 +122,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>addMonitor</cstring> </property> @@ -130,7 +130,7 @@ <string>Add...</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>modifyMonitor</cstring> </property> @@ -138,7 +138,7 @@ <string>Modify...</string> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>removeMonitor</cstring> </property> @@ -156,7 +156,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>20</height> @@ -207,7 +207,7 @@ <tabstop>modifyMonitor</tabstop> <tabstop>removeMonitor</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klistview.h</includehint> diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp index 7d66a75..b237bfe 100644 --- a/ksim/monitors/snmp/hostdialog.cpp +++ b/ksim/monitors/snmp/hostdialog.cpp @@ -35,15 +35,15 @@ using namespace KSim::Snmp; -HostDialog::HostDialog( TQWidget *parent, const char *name ) - : HostDialogBase( parent, name ) +HostDialog::HostDialog( TQWidget *tqparent, const char *name ) + : HostDialogBase( tqparent, name ) { init(); port->setValue( 161 ); } -HostDialog::HostDialog( const HostConfig &src, TQWidget *parent, const char *name ) - : HostDialogBase( parent, name ) +HostDialog::HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name ) + : HostDialogBase( tqparent, name ) { init( src ); } @@ -141,7 +141,7 @@ void HostDialog::init( const HostConfig &src ) { // hide these, there's nothing to choose right now. might be that // net-snmp will support different privacy types in the future, but - // apparently not now. + // aptqparently not now. privacyTypeLabel->hide(); privacyType->hide(); @@ -163,7 +163,7 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) hostName->setText( src.name ); port->setValue( src.port ); - snmpVersion->setCurrentItem( allSnmpVersions().findIndex( snmpVersionToString( src.version ) ) ); + snmpVersion->setCurrentItem( allSnmpVersions().tqfindIndex( snmpVersionToString( src.version ) ) ); if ( src.version != SnmpVersion3 ) { communityString->setText( src.community ); @@ -172,18 +172,18 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) securityName->setText( src.securityName ); - securityLevel->setCurrentItem( allSecurityLevels().findIndex( securityLevelToString( src.securityLevel ) ) ); + securityLevel->setCurrentItem( allSecurityLevels().tqfindIndex( securityLevelToString( src.securityLevel ) ) ); if ( src.securityLevel == NoAuthPriv ) return; - authenticationType->setCurrentItem( allAuthenticationProtocols().findIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); + authenticationType->setCurrentItem( allAuthenticationProtocols().tqfindIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); authenticationPassphrase->setText( src.authentication.key ); if ( src.securityLevel == AuthNoPriv ) return; - privacyType->setCurrentItem( allPrivacyProtocols().findIndex( privacyProtocolToString( src.privacy.protocol ) ) ); + privacyType->setCurrentItem( allPrivacyProtocols().tqfindIndex( privacyProtocolToString( src.privacy.protocol ) ) ); privacyPassphrase->setText( src.privacy.key ); } diff --git a/ksim/monitors/snmp/hostdialog.h b/ksim/monitors/snmp/hostdialog.h index 68ddfe1..d384881 100644 --- a/ksim/monitors/snmp/hostdialog.h +++ b/ksim/monitors/snmp/hostdialog.h @@ -33,9 +33,10 @@ namespace Snmp class HostDialog : public HostDialogBase { Q_OBJECT + TQ_OBJECT public: - HostDialog( TQWidget *parent, const char *name = 0 ); - HostDialog( const HostConfig &src, TQWidget *parent, const char *name = 0 ); + HostDialog( TQWidget *tqparent, const char *name = 0 ); + HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name = 0 ); HostConfig settings() const; diff --git a/ksim/monitors/snmp/hostdialogbase.ui b/ksim/monitors/snmp/hostdialogbase.ui index 1ee9ee4..935d013 100644 --- a/ksim/monitors/snmp/hostdialogbase.ui +++ b/ksim/monitors/snmp/hostdialogbase.ui @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -46,7 +46,7 @@ <cstring>hostName</cstring> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -57,7 +57,7 @@ <cstring>port</cstring> </property> </widget> - <widget class="QSpinBox" row="0" column="3"> + <widget class="TQSpinBox" row="0" column="3"> <property name="name"> <cstring>port</cstring> </property> @@ -78,14 +78,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="5"> + <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -96,11 +96,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQWidgetStack" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>authenticationDetails</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>snmpV1Page</cstring> </property> @@ -111,7 +111,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>160</width> <height>20</height> @@ -166,7 +166,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>snmpV3Page</cstring> </property> @@ -177,7 +177,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -188,7 +188,7 @@ <cstring>securityName</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -199,7 +199,7 @@ <cstring>securityLevel</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>authenticationTypeLabel</cstring> </property> @@ -210,7 +210,7 @@ <cstring>authenticationType</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>privacyTypeLabel</cstring> </property> @@ -221,7 +221,7 @@ <cstring>privacyType</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>privacyPassphraseLabel</cstring> </property> @@ -232,7 +232,7 @@ <cstring>privacyPassphrase</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>authenticationPassphraseLabel</cstring> </property> @@ -253,7 +253,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -265,7 +265,7 @@ <cstring>securityName</cstring> </property> </widget> - <widget class="QComboBox" row="4" column="1"> + <widget class="TQComboBox" row="4" column="1"> <property name="name"> <cstring>privacyType</cstring> </property> @@ -281,12 +281,12 @@ <enum>Password</enum> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>securityLevel</cstring> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <property name="name"> <cstring>authenticationType</cstring> </property> @@ -309,7 +309,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -333,7 +333,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -344,7 +344,7 @@ <cstring>snmpVersion</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>snmpVersion</cstring> </property> @@ -359,7 +359,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>351</width> <height>20</height> @@ -382,15 +382,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="5"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="5"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>testHostButton</cstring> </property> @@ -408,14 +408,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>220</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -429,7 +429,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -508,13 +508,13 @@ <tabstop>buttonCancel</tabstop> <tabstop>communityString</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="private">showSnmpAuthenticationDetailsForVersion(const QString &)</slot> <slot>enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel(const QString &)</slot> <slot>checkValidity()</slot> <slot access="protected">testHost()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>klineedit.h</includehint> diff --git a/ksim/monitors/snmp/identifier.cpp b/ksim/monitors/snmp/identifier.cpp index 32d6d8b..355f019 100644 --- a/ksim/monitors/snmp/identifier.cpp +++ b/ksim/monitors/snmp/identifier.cpp @@ -87,7 +87,7 @@ TQString Identifier::toString( PrintFlags flags ) const u_char *buf = ( u_char* )calloc( buflen, 1 ); if ( !buf ) - return TQString::null; + return TQString(); int oldOutpuFormat = SnmpLib::self()->netsnmp_ds_get_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT ); SnmpLib::self()->netsnmp_ds_set_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, @@ -100,7 +100,7 @@ TQString Identifier::toString( PrintFlags flags ) const if ( overflow ) { free( buf ); - return TQString::null; + return TQString(); } TQString result = TQString::fromAscii( ( char* )buf ); diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp index 2245a09..e8ae261 100644 --- a/ksim/monitors/snmp/labelmonitor.cpp +++ b/ksim/monitors/snmp/labelmonitor.cpp @@ -21,8 +21,8 @@ using namespace KSim::Snmp; -LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name ) - : KSim::Label( parent, name ), m_config( config ) +LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name ) + : KSim::Label( tqparent, name ), m_config( config ) { } @@ -32,8 +32,8 @@ void LabelMonitor::setData( const Value &data ) if ( m_config.useCustomFormatString ) { TQString text = m_config.customFormatString; - text.replace( "%n", m_config.name ); - text.replace( "%s", dataString ); + text.tqreplace( "%n", m_config.name ); + text.tqreplace( "%s", dataString ); setText( text ); } else setText( m_config.name + ": " + dataString ); diff --git a/ksim/monitors/snmp/labelmonitor.h b/ksim/monitors/snmp/labelmonitor.h index 606165b..6ff8404 100644 --- a/ksim/monitors/snmp/labelmonitor.h +++ b/ksim/monitors/snmp/labelmonitor.h @@ -33,8 +33,9 @@ namespace Snmp class LabelMonitor : public KSim::Label { Q_OBJECT + TQ_OBJECT public: - LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 ); + LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name = 0 ); public slots: void setData( const Value &data ); diff --git a/ksim/monitors/snmp/monitor.cpp b/ksim/monitors/snmp/monitor.cpp index 052d2c0..414f4d9 100644 --- a/ksim/monitors/snmp/monitor.cpp +++ b/ksim/monitors/snmp/monitor.cpp @@ -24,8 +24,8 @@ using namespace KSim::Snmp; -Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent, const char *name ) - : TQObject( parent, name ), m_oid( oid ), m_session( host ) +Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_oid( oid ), m_session( host ) { if ( refresh > 0 ) m_timerId = startTimer( refresh ); diff --git a/ksim/monitors/snmp/monitor.h b/ksim/monitors/snmp/monitor.h index 083e97f..5b88b46 100644 --- a/ksim/monitors/snmp/monitor.h +++ b/ksim/monitors/snmp/monitor.h @@ -31,11 +31,12 @@ namespace KSim namespace Snmp { -class Monitor : public TQObject, public QThread +class Monitor : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent = 0, const char *name = 0 ); + Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent = 0, const char *name = 0 ); virtual ~Monitor(); signals: diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp index 4b4b024..6a77813 100644 --- a/ksim/monitors/snmp/monitorconfig.cpp +++ b/ksim/monitors/snmp/monitorconfig.cpp @@ -39,7 +39,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts ) if ( hostName.isEmpty() ) return false; - HostConfigMap::ConstIterator hostIt = hosts.find( hostName ); + HostConfigMap::ConstIterator hostIt = hosts.tqfind( hostName ); if ( hostIt == hosts.end() ) return false; @@ -93,7 +93,7 @@ void MonitorConfig::save( KConfigBase &config ) const config.writeEntry( "DisplayCurrentValueInline", displayCurrentValueInline ); } -TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name ) +TQWidget *MonitorConfig::createMonitorWidget( TQWidget *tqparent, const char *name ) { TQWidget *w; @@ -103,11 +103,11 @@ TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name return 0; if ( display == Label ) - w = new LabelMonitor( *this, parent, name ); + w = new LabelMonitor( *this, tqparent, name ); else - w = new ChartMonitor( *this, parent, name ); + w = new ChartMonitor( *this, tqparent, name ); - Monitor *monitor = new Monitor( host, id, refresh, w ); + Monitor *monitor = new Monitor( host, id, refresh, TQT_TQOBJECT(w) ); TQObject::connect( monitor, TQT_SIGNAL( newData( const Value & ) ), w, TQT_SLOT( setData( const Value & ) ) ); return w; @@ -117,11 +117,11 @@ TQString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type { switch ( type ) { - case MonitorConfig::Label: return TQString::fromLatin1( "Label" ); - case MonitorConfig::Chart: return TQString::fromLatin1( "Chart" ); + case MonitorConfig::Label: return TQString::tqfromLatin1( "Label" ); + case MonitorConfig::Chart: return TQString::tqfromLatin1( "Chart" ); default: assert( false ); }; - return TQString::null; + return TQString(); } MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( TQString string, bool *ok ) diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h index cf2d525..00554d7 100644 --- a/ksim/monitors/snmp/monitorconfig.h +++ b/ksim/monitors/snmp/monitorconfig.h @@ -41,7 +41,7 @@ struct MonitorConfig bool isNull() const { return name.isEmpty() || host.isNull(); } - TQWidget *createMonitorWidget( TQWidget *parent, const char *name = 0 ); + TQWidget *createMonitorWidget( TQWidget *tqparent, const char *name = 0 ); HostConfig host; TQString name; diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp index 1bda0aa..297a818 100644 --- a/ksim/monitors/snmp/monitordialog.cpp +++ b/ksim/monitors/snmp/monitordialog.cpp @@ -37,14 +37,14 @@ using namespace KSim::Snmp; -MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name ) - : MonitorDialogBase( parent, name ), m_hosts( hosts ) +MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name ) + : MonitorDialogBase( tqparent, name ), m_hosts( hosts ) { init(); } -MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name ) - : MonitorDialogBase( parent, name ), m_hosts( hosts ) +MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name ) + : MonitorDialogBase( tqparent, name ), m_hosts( hosts ) { init( monitor ); } @@ -144,14 +144,14 @@ void MonitorDialog::init( const MonitorConfig &monitor ) assert( allHosts.findIndex( monitor.host.name ) != -1 ); - host->setCurrentItem( allHosts.findIndex( monitor.host.name ) ); + host->setCurrentItem( allHosts.tqfindIndex( monitor.host.name ) ); oid->setText( monitor.oid ); updateIntervalMinutes->setValue( monitor.refreshInterval.minutes ); updateIntervalSeconds->setValue( monitor.refreshInterval.seconds ); - displayType->setCurrentItem( allDisplayTypes().findIndex( monitorDisplayTypeToString( monitor.display ) ) ); + displayType->setCurrentItem( allDisplayTypes().tqfindIndex( monitorDisplayTypeToString( monitor.display ) ) ); customFormatStringCheckBox->setChecked( monitor.useCustomFormatString ); customFormatString->setEnabled( monitor.useCustomFormatString ); @@ -166,7 +166,7 @@ void MonitorDialog::init( const MonitorConfig &monitor ) HostConfig MonitorDialog::currentHost() const { - HostConfigMap::ConstIterator hostIt = m_hosts.find( host->currentText() ); + HostConfigMap::ConstIterator hostIt = m_hosts.tqfind( host->currentText() ); if ( hostIt == m_hosts.end() ) return HostConfig(); diff --git a/ksim/monitors/snmp/monitordialog.h b/ksim/monitors/snmp/monitordialog.h index b6d0b40..62ab5e2 100644 --- a/ksim/monitors/snmp/monitordialog.h +++ b/ksim/monitors/snmp/monitordialog.h @@ -32,9 +32,10 @@ namespace Snmp class MonitorDialog : public MonitorDialogBase { Q_OBJECT + TQ_OBJECT public: - MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 ); - MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 ); + MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 ); + MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 ); MonitorConfig monitorConfig() const; diff --git a/ksim/monitors/snmp/monitordialogbase.ui b/ksim/monitors/snmp/monitordialogbase.ui index 13d6b06..bb6a059 100644 --- a/ksim/monitors/snmp/monitordialogbase.ui +++ b/ksim/monitors/snmp/monitordialogbase.ui @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -30,7 +30,7 @@ <string>Display type:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -38,7 +38,7 @@ <string>Update interval:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -46,7 +46,7 @@ <string>Object identifier:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -54,7 +54,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -62,7 +62,7 @@ <string>Host:</string> </property> </widget> - <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>labelOptions</cstring> </property> @@ -73,7 +73,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>customFormatStringCheckBox</cstring> </property> @@ -81,7 +81,7 @@ <string>Use custom format string:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>customFormatString</cstring> </property> @@ -89,7 +89,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -104,21 +104,21 @@ <property name="text"> <string>The text in the edit box is what is displayed except that any occurrence of <b>%s</b> will be replaced with the snmp object value and any occurrence of <b>%n</b> will be replaced with the name of this monitor (see Name input field) .</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>updateIntervalMinutes</cstring> </property> @@ -126,7 +126,7 @@ <number>60</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -134,7 +134,7 @@ <string>minutes</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>updateIntervalSeconds</cstring> </property> @@ -145,7 +145,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>141</width> <height>20</height> @@ -172,15 +172,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="4" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="4" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Chart</string> @@ -205,7 +205,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>271</width> <height>20</height> @@ -224,14 +224,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>244</width> <height>20</height> </size> </property> </spacer> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>monitorName</cstring> </property> @@ -246,19 +246,19 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>host</cstring> </property> </widget> - <widget class="QLayoutWidget" row="9" column="0" rowspan="1" colspan="4"> + <widget class="TQLayoutWidget" row="9" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -282,14 +282,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -303,7 +303,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -330,15 +330,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="7" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="7" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>status</cstring> </property> <property name="text"> - <string>blehStatus</string> + <string>blehtqStatus</string> </property> </widget> - <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="6" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>chartOptions</cstring> </property> @@ -349,7 +349,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>displayCurrentValueInline</cstring> </property> @@ -367,7 +367,7 @@ <string>Browse...</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>oid</cstring> </property> @@ -428,11 +428,11 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">checkValues()</slot> <slot access="protected">browse()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksim/monitors/snmp/probedialog.cpp b/ksim/monitors/snmp/probedialog.cpp index 4667fc3..8edfe69 100644 --- a/ksim/monitors/snmp/probedialog.cpp +++ b/ksim/monitors/snmp/probedialog.cpp @@ -38,8 +38,8 @@ static const char * const probeIdentifiers[] = 0 }; -ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name ) - : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), TQString::null, true /* modal */ ), +ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name ) + : KProgressDialog( tqparent, name, i18n( "SNMP Host Probe" ), TQString(), true /* modal */ ), m_host( hostConfig ), m_currentMonitor( 0 ), m_canceled( false ) { setLabel( i18n( "Probing for common object identifiers..." ) ); @@ -77,7 +77,7 @@ void ProbeDialog::probeOne() Identifier oid = m_probeOIDs.pop(); delete m_currentMonitor; - m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, this ); + m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, TQT_TQOBJECT(this) ); connect( m_currentMonitor, TQT_SIGNAL( newData( const Identifier &, const Value & ) ), this, TQT_SLOT( probeResult( const Identifier &, const Value & ) ) ); diff --git a/ksim/monitors/snmp/probedialog.h b/ksim/monitors/snmp/probedialog.h index 9e88eda..9ce949f 100644 --- a/ksim/monitors/snmp/probedialog.h +++ b/ksim/monitors/snmp/probedialog.h @@ -38,8 +38,9 @@ class Monitor; class ProbeDialog : public KProgressDialog { Q_OBJECT + TQ_OBJECT public: - ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name = 0 ); + ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name = 0 ); struct ProbeResult { diff --git a/ksim/monitors/snmp/proberesultdialog.cpp b/ksim/monitors/snmp/proberesultdialog.cpp index bed1e21..fbdd4e6 100644 --- a/ksim/monitors/snmp/proberesultdialog.cpp +++ b/ksim/monitors/snmp/proberesultdialog.cpp @@ -27,10 +27,10 @@ using namespace KSim::Snmp; ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults, - TQWidget *parent, const char *name ) - : ProbeResultDialogBase( parent, name ) + TQWidget *tqparent, const char *name ) + : ProbeResultDialogBase( tqparent, name ) { - info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) ); + info->setText( i18n( "Results of scanning host %1:" ).tqarg( hostConfig.name ) ); for ( ProbeDialog::ProbeResultList::ConstIterator it = probeResults.begin(); it != probeResults.end(); ++it ) diff --git a/ksim/monitors/snmp/proberesultdialog.h b/ksim/monitors/snmp/proberesultdialog.h index 2166a69..47e012a 100644 --- a/ksim/monitors/snmp/proberesultdialog.h +++ b/ksim/monitors/snmp/proberesultdialog.h @@ -33,9 +33,10 @@ namespace Snmp class ProbeResultDialog : public ProbeResultDialogBase { Q_OBJECT + TQ_OBJECT public: ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults, - TQWidget *parent, const char *name = 0 ); + TQWidget *tqparent, const char *name = 0 ); private: void addResultItem( const ProbeDialog::ProbeResult &result ); diff --git a/ksim/monitors/snmp/proberesultdialogbase.ui b/ksim/monitors/snmp/proberesultdialogbase.ui index 01b0c70..be32c72 100644 --- a/ksim/monitors/snmp/proberesultdialogbase.ui +++ b/ksim/monitors/snmp/proberesultdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KSim::Snmp::ProbeResultDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ProbeResultDialogBase</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>info</cstring> </property> @@ -60,7 +60,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -84,14 +84,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -117,7 +117,7 @@ <slot>accept()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp index 6d63fab..07dc77e 100644 --- a/ksim/monitors/snmp/session.cpp +++ b/ksim/monitors/snmp/session.cpp @@ -54,7 +54,7 @@ Session::Session( const HostConfig &source ) d->source = source; - // unicode madness + // tqunicode madness d->host = source.name.ascii(); d->community = source.community.ascii(); d->securityName = source.securityName.ascii(); @@ -235,7 +235,7 @@ bool Session::snmpGet( const Identifier &identifier, Value &value, ErrorInfo *er if ( !snmpGet( ids, vars, error ) ) return false; - ValueMap::ConstIterator it = vars.find( identifier ); + ValueMap::ConstIterator it = vars.tqfind( identifier ); if ( it == vars.end() ) { if ( error ) *error = ErrorInfo( ErrorInfo::ErrMissingVariables ); diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp index a050acb..d79c596 100644 --- a/ksim/monitors/snmp/snmp.cpp +++ b/ksim/monitors/snmp/snmp.cpp @@ -57,7 +57,7 @@ static TQStringList allStrings( const EnumStringMapInfo *array ) { TQStringList result; for ( uint i = 0; array[ i ].stringValue; ++i ) - result << TQString::fromLatin1( array[ i ].stringValue ); + result << TQString::tqfromLatin1( array[ i ].stringValue ); return result; } @@ -65,10 +65,10 @@ static TQString enumToString( const EnumStringMapInfo *array, int value ) { for ( uint i = 0; array[ i ].stringValue; ++i ) if ( array[ i ].enumValue == value ) - return TQString::fromLatin1( array[ i ].stringValue ); + return TQString::tqfromLatin1( array[ i ].stringValue ); assert( false ); - return TQString::null; + return TQString(); } static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *ok ) @@ -76,7 +76,7 @@ static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool * string = string.lower(); uint i; for ( i = 0; array[ i ].stringValue; ++i ) - if ( TQString::fromLatin1( array[ i ].stringValue ).lower() == string ) { + if ( TQString::tqfromLatin1( array[ i ].stringValue ).lower() == string ) { if ( ok ) *ok = true; return array[ i ].enumValue; } @@ -291,11 +291,11 @@ int KSim::Snmp::sessionErrorCode( netsnmp_session &session ) static TQString messageForErrorCode( int errorCode ) { if ( errorCode >= SNMPERR_MAX && errorCode <= SNMPERR_GENERR ) - return TQString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) ); + return TQString::tqfromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) ); if ( errorCode >= SNMP_ERR_NOERROR && errorCode <= MAX_SNMP_ERR ) - return TQString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) ); + return TQString::tqfromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) ); - return TQString::null; + return TQString(); } ErrorInfo::ErrorInfo() diff --git a/ksim/monitors/snmp/value.cpp b/ksim/monitors/snmp/value.cpp index a244c59..2803aec 100644 --- a/ksim/monitors/snmp/value.cpp +++ b/ksim/monitors/snmp/value.cpp @@ -79,7 +79,7 @@ ValueImpl::ValueImpl( variable_list *var ) } case ASN_COUNTER64: { type = Value::Counter64; - ctr64 = ( ( ( Q_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low ); + ctr64 = ( ( ( TQ_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low ); break; } case ASN_TIMETICKS: { @@ -176,7 +176,7 @@ Value::Value( const TQHostAddress &address ) d->addr = address; } -Value::Value( Q_UINT64 counter ) +Value::Value( TQ_UINT64 counter ) { d = new ValueImpl; d->type = Counter64; @@ -273,7 +273,7 @@ int Value::toTimeTicks() const return toInt(); } -Q_UINT64 Value::toCounter64() const +TQ_UINT64 Value::toCounter64() const { assert( d->type == Counter64 ); return d->ctr64; @@ -294,13 +294,13 @@ TQString Value::toString( int conversionFlags ) const case Value::TimeTicks: return formatTimeTicks( toTimeTicks(), conversionFlags ); // not using i18n here, because it may be called from within a worker thread, and I'm // not sure it makes sense to translate it anyway - case Value::NoSuchObject: return TQString::fromLatin1( "No Such Object" ); - case Value::NoSuchInstance: return TQString::fromLatin1( "No Such Instance" ); - case Value::EndOfMIBView: return TQString::fromLatin1( "End Of MIB View" ); + case Value::NoSuchObject: return TQString::tqfromLatin1( "No Such Object" ); + case Value::NoSuchInstance: return TQString::tqfromLatin1( "No Such Instance" ); + case Value::EndOfMIBView: return TQString::tqfromLatin1( "End Of MIB View" ); case Value::Invalid: - case Value::Null: return TQString::null; + case Value::Null: return TQString(); } - return TQString::null; + return TQString(); } TQString Value::formatTimeTicks( int ticks, int conversionFlags ) @@ -321,7 +321,7 @@ TQString Value::formatTimeTicks( int ticks, int conversionFlags ) if ( days > 0 ) result += TQString::number( days ) + "d:"; - result += TQString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes ); + result += TQString(TQString::fromAscii( "%1h:%2m" )).tqarg( hours ).tqarg( minutes ); if ( conversionFlags & TimeTicksWithSeconds ) result += ":" + TQString::number( seconds ) + "s"; diff --git a/ksim/monitors/snmp/value.h b/ksim/monitors/snmp/value.h index 5b2d6cd..d1461d8 100644 --- a/ksim/monitors/snmp/value.h +++ b/ksim/monitors/snmp/value.h @@ -68,7 +68,7 @@ public: Value( const TQByteArray &data ); Value( const Identifier &oid ); Value( const TQHostAddress &address ); - Value( Q_UINT64 counter ); + Value( TQ_UINT64 counter ); Value( const Value &rhs ); Value &operator=( const Value &rhs ); @@ -87,7 +87,7 @@ public: uint toCounter() const; uint toGauge() const; int toTimeTicks() const; - Q_UINT64 toCounter64() const; + TQ_UINT64 toCounter64() const; TQString toString( int conversionFlags = 0 ) const; diff --git a/ksim/monitors/snmp/value_p.h b/ksim/monitors/snmp/value_p.h index 000c32d..4ff2d8f 100644 --- a/ksim/monitors/snmp/value_p.h +++ b/ksim/monitors/snmp/value_p.h @@ -51,7 +51,7 @@ struct ValueImpl TQVariant data; Identifier oid; TQHostAddress addr; - Q_UINT64 ctr64; + TQ_UINT64 ctr64; }; } diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp index 9515645..c6482ab 100644 --- a/ksim/monitors/snmp/view.cpp +++ b/ksim/monitors/snmp/view.cpp @@ -29,8 +29,8 @@ using namespace KSim::Snmp; -View::View( Plugin *parent, const char *name ) - : KSim::PluginView( parent, name ) +View::View( Plugin *tqparent, const char *name ) + : KSim::PluginView( tqparent, name ) { m_layout = new TQVBoxLayout( this ); diff --git a/ksim/monitors/snmp/view.h b/ksim/monitors/snmp/view.h index 01e29e3..af27e23 100644 --- a/ksim/monitors/snmp/view.h +++ b/ksim/monitors/snmp/view.h @@ -35,8 +35,9 @@ class Plugin; class View : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - View( Plugin *parent, const char *name ); + View( Plugin *tqparent, const char *name ); ~View(); virtual void reparseConfig(); diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp index 0aa6c0a..70af99d 100644 --- a/ksim/monitors/snmp/walker.cpp +++ b/ksim/monitors/snmp/walker.cpp @@ -38,8 +38,8 @@ namespace static const uint walkerRefresh = 0; -Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name ) - : TQObject( parent, name ), m_stop( false ), m_oid( startOid ), m_session( host ) +Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_stop( false ), m_oid( startOid ), m_session( host ) { m_timerId = startTimer( walkerRefresh ); start(); diff --git a/ksim/monitors/snmp/walker.h b/ksim/monitors/snmp/walker.h index 3ff38b7..c9f8e52 100644 --- a/ksim/monitors/snmp/walker.h +++ b/ksim/monitors/snmp/walker.h @@ -33,11 +33,12 @@ namespace KSim namespace Snmp { -class Walker : public TQObject, public QThread +class Walker : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name = 0 ); + Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name = 0 ); virtual ~Walker(); struct Result diff --git a/ksim/themeprefs.cpp b/ksim/themeprefs.cpp index f2aa04d..4b2ee3f 100644 --- a/ksim/themeprefs.cpp +++ b/ksim/themeprefs.cpp @@ -46,8 +46,8 @@ class ThemeViewItem : public KListViewItem { public: - ThemeViewItem(TQListView *parent, const TQString &text, - const KURL &url) : KListViewItem(parent, text) + ThemeViewItem(TQListView *tqparent, const TQString &text, + const KURL &url) : KListViewItem(tqparent, text) { m_url = url; } @@ -58,8 +58,8 @@ class ThemeViewItem : public KListViewItem KURL m_url; }; -KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KSim::ThemePrefs::ThemePrefs(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_themeLayout = new TQGridLayout(this); m_themeLayout->setSpacing(6); @@ -67,31 +67,31 @@ KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) m_label = new TQLabel(this); m_label->setText(i18n("GKrellm theme support. To use" " gkrellm themes just untar the themes into the folder below")); - m_label->setAlignment(TQLabel::WordBreak | + m_label->tqsetAlignment(TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft); m_themeLayout->addMultiCellWidget(m_label, 0, 0, 0, 4); TQString themeDir(locateLocal("data", "ksim")); - themeDir += TQString::fromLatin1("/themes"); + themeDir += TQString::tqfromLatin1("/themes"); m_urlLabel = new KURLLabel(this); m_urlLabel->setText(i18n("Open Konqueror in KSim's theme folder")); - m_urlLabel->setURL(TQString::fromLatin1("file://") + themeDir); + m_urlLabel->setURL(TQString::tqfromLatin1("file://") + themeDir); connect(m_urlLabel, TQT_SIGNAL(leftClickedURL(const TQString &)), this, TQT_SLOT(openURL(const TQString &))); m_themeLayout->addMultiCellWidget(m_urlLabel, 1, 1, 0, 4); - m_line = new KSeparator(Horizontal, this); + m_line = new KSeparator(Qt::Horizontal, this); m_themeLayout->addMultiCellWidget(m_line, 2, 2, 0, 4); m_authorLabel = new TQLabel(this); - m_authorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + m_authorLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum)); m_authorLabel->setText(i18n("Author:")); m_themeLayout->addMultiCellWidget(m_authorLabel, 3, 3, 0, 0); m_authLabel = new KSqueezedTextLabel(this); - m_authLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_authLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); m_authLabel->setText(i18n("None")); m_themeLayout->addMultiCellWidget(m_authLabel, 3, 3, 1, 4); @@ -105,7 +105,7 @@ KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) m_alternateLabel = new TQLabel(this); m_alternateLabel->setText(i18n("Alternate themes:")); - m_alternateLabel->setAlignment(AlignVCenter | AlignRight); + m_alternateLabel->tqsetAlignment(AlignVCenter | AlignRight); m_themeLayout->addMultiCellWidget(m_alternateLabel, 5, 5, 0, 1); m_altTheme = new KIntSpinBox(this); @@ -113,8 +113,8 @@ KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) m_fontLabel = new TQLabel(this); m_fontLabel->setText(i18n("Font:")); - m_fontLabel->setAlignment(AlignVCenter | AlignRight); - m_fontLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, + m_fontLabel->tqsetAlignment(AlignVCenter | AlignRight); + m_fontLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); m_themeLayout->addMultiCellWidget(m_fontLabel, 5, 5, 3, 3); @@ -124,7 +124,7 @@ KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name) m_fontsCombo->insertItem(i18n("Large")); m_fontsCombo->insertItem(i18n("Custom")); m_fontsCombo->insertItem(i18n("Default")); - m_fontsCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_fontsCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); connect(m_fontsCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(showFontDialog(int))); @@ -221,7 +221,7 @@ void KSim::ThemePrefs::selectItem(TQListViewItem *item) return; ThemeViewItem *themeItem = static_cast<ThemeViewItem *>(item); - ThemeInfoList::ConstIterator it = qFind(m_themeList.begin(), + ThemeInfoList::ConstIterator it = tqFind(m_themeList.begin(), m_themeList.end(), ThemeInfo(themeItem->text(0), themeItem->url())); if (it == m_themeList.end()) diff --git a/ksim/themeprefs.h b/ksim/themeprefs.h index 9c1ff51..12278a4 100644 --- a/ksim/themeprefs.h +++ b/ksim/themeprefs.h @@ -73,11 +73,12 @@ namespace KSim typedef TQValueList<ThemeInfo> ThemeInfoList; - class ThemePrefs : public QWidget + class ThemePrefs : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ThemePrefs(TQWidget *parent, const char *name=0); + ThemePrefs(TQWidget *tqparent, const char *name=0); ~ThemePrefs(); public slots: diff --git a/ktimer/ktimer.cpp b/ktimer/ktimer.cpp index a5f3937..36cc998 100644 --- a/ktimer/ktimer.cpp +++ b/ktimer/ktimer.cpp @@ -39,15 +39,15 @@ class KTimerJobItem : public TQListViewItem { public: - KTimerJobItem( KTimerJob *job, TQListView *parent ) - : TQListViewItem( parent ) { + KTimerJobItem( KTimerJob *job, TQListView *tqparent ) + : TQListViewItem( tqparent ) { m_job = job; m_error = false; update(); }; - KTimerJobItem( KTimerJob *job, TQListView *parent, TQListViewItem *after ) - : TQListViewItem( parent, after ) { + KTimerJobItem( KTimerJob *job, TQListView *tqparent, TQListViewItem *after ) + : TQListViewItem( tqparent, after ) { m_job = job; m_error = false; update(); @@ -59,7 +59,7 @@ public: KTimerJob *job() { return m_job; }; - void setStatus( bool error ) { + void settqStatus( bool error ) { m_error = error; update(); } @@ -97,8 +97,8 @@ struct KTimerPrefPrivate TQPtrList<KTimerJob> jobs; }; -KTimerPref::KTimerPref( TQWidget *parent, const char *name ) - : PrefWidget( parent, name ) +KTimerPref::KTimerPref( TQWidget *tqparent, const char *name ) + : PrefWidget( tqparent, name ) { d = new KTimerPrefPrivate; @@ -150,7 +150,7 @@ void KTimerPref::add() job->setUser( item ); - // Qt drops currentChanged signals on first item (bug?) + // TQt drops currentChanged signals on first item (bug?) if( m_list->childCount()==1 ) currentChanged( item ); @@ -239,7 +239,7 @@ void KTimerPref::jobChanged( KTimerJob *job ) void KTimerPref::jobFinished( KTimerJob *job, bool error ) { KTimerJobItem *item = static_cast<KTimerJobItem*>(job->user()); - item->setStatus( error ); + item->settqStatus( error ); m_list->triggerUpdate(); } @@ -249,7 +249,7 @@ void KTimerPref::saveJobs( KConfig *cfg ) int num = 0; KTimerJobItem *item = static_cast<KTimerJobItem*>(m_list->firstChild()); while( item ) { - item->job()->save( cfg, TQString("Job%1").arg( num ) ); + item->job()->save( cfg, TQString("Job%1").tqarg( num ) ); item = static_cast<KTimerJobItem*>(item->nextSibling()); num++; } @@ -280,7 +280,7 @@ void KTimerPref::loadJobs( KConfig *cfg ) connect( job, TQT_SIGNAL(finished(KTimerJob*,bool)), TQT_SLOT(jobFinished(KTimerJob*,bool)) ); - job->load( cfg, TQString( "Job%1" ).arg(n) ); + job->load( cfg, TQString( "Job%1" ).tqarg(n) ); job->setUser( item ); } @@ -306,8 +306,8 @@ struct KTimerJobPrivate { }; -KTimerJob::KTimerJob( TQObject *parent, const char *name ) - : TQObject( parent, name ) +KTimerJob::KTimerJob( TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ) { d = new KTimerJobPrivate; diff --git a/ktimer/ktimer.h b/ktimer/ktimer.h index 297eec9..f1a2c69 100644 --- a/ktimer/ktimer.h +++ b/ktimer/ktimer.h @@ -29,9 +29,10 @@ class KTimerJob : public TQObject { Q_OBJECT + TQ_OBJECT public: - KTimerJob( TQObject *parent=0, const char *name=0 ); + KTimerJob( TQObject *tqparent=0, const char *name=0 ); virtual ~KTimerJob(); enum States { Stopped, Paused, Started }; @@ -90,8 +91,9 @@ class KTimerJob : public TQObject { class KTimerPref : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - KTimerPref( TQWidget *parent=0, const char *name = 0 ); + KTimerPref( TQWidget *tqparent=0, const char *name = 0 ); virtual ~KTimerPref(); protected slots: diff --git a/ktimer/prefwidget.ui b/ktimer/prefwidget.ui index 15cee2b..1c938e0 100644 --- a/ktimer/prefwidget.ui +++ b/ktimer/prefwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>PrefWidget</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>PrefWidget</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListView" row="0" column="0" rowspan="3" colspan="1"> + <widget class="TQListView" row="0" column="0" rowspan="3" colspan="1"> <column> <property name="text"> <string>Counter [s]</string> @@ -77,7 +77,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>m_add</cstring> </property> @@ -85,7 +85,7 @@ <string>&New</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>m_remove</cstring> </property> @@ -106,14 +106,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>m_settings</cstring> </property> @@ -133,7 +133,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>m_loop</cstring> </property> @@ -141,7 +141,7 @@ <string>&Loop</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -149,7 +149,7 @@ <string>Delay:</string> </property> </widget> - <widget class="QSpinBox" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQSpinBox" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_delay</cstring> </property> @@ -157,7 +157,7 @@ <number>99999</number> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>m_one</cstring> </property> @@ -165,7 +165,7 @@ <string>Start only &one instance</string> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -183,7 +183,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -195,7 +195,7 @@ <cstring>m_commandLine</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -205,7 +205,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="4" column="1"> + <widget class="TQGroupBox" row="4" column="1"> <property name="name"> <cstring>m_state</cstring> </property> @@ -225,7 +225,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QSlider" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQSlider" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_slider</cstring> </property> @@ -233,12 +233,12 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLCDNumber" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQLCDNumber" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_counter</cstring> </property> </widget> - <widget class="QToolButton" row="0" column="1"> + <widget class="TQToolButton" row="0" column="1"> <property name="name"> <cstring>m_pause</cstring> </property> @@ -246,7 +246,7 @@ <string>||</string> </property> </widget> - <widget class="QToolButton" row="0" column="2"> + <widget class="TQToolButton" row="0" column="2"> <property name="name"> <cstring>m_start</cstring> </property> @@ -254,7 +254,7 @@ <string>></string> </property> </widget> - <widget class="QToolButton" row="0" column="0"> + <widget class="TQToolButton" row="0" column="0"> <property name="name"> <cstring>m_stop</cstring> </property> @@ -269,7 +269,7 @@ <includes> <include location="global" impldecl="in declaration">kseparator.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kwallet/allyourbase.cpp b/kwallet/allyourbase.cpp index 917857c..17eecec 100644 --- a/kwallet/allyourbase.cpp +++ b/kwallet/allyourbase.cpp @@ -38,9 +38,9 @@ /**************** * KWalletFolderItem - ListView items to represent kwallet folders */ -KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, const TQString &name, int entries) -: KListViewItem(parent),_wallet(w),_name(name),_entries(entries) { - setText(0, TQString("%1 (%2)").arg(_name).arg(_entries)); +KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* tqparent, const TQString &name, int entries) +: KListViewItem(tqparent),_wallet(w),_name(name),_entries(entries) { + setText(0, TQString("%1 (%2)").tqarg(_name).tqarg(_entries)); setRenameEnabled(0, false); setDragEnabled(true); setDropEnabled(true); @@ -66,7 +66,7 @@ TQPixmap KWalletFolderItem::getFolderIcon(KIcon::Group group){ void KWalletFolderItem::refresh() { TQString saveFolder = _wallet->currentFolder(); _wallet->setFolder(_name); - setText(0, TQString("%1 (%2)").arg(_name).arg(_wallet->entryList().count())); + setText(0, TQString("%1 (%2)").tqarg(_name).tqarg(_wallet->entryList().count())); _wallet->setFolder(saveFolder); } @@ -83,7 +83,7 @@ KWalletContainerItem* KWalletFolderItem::getContainer(KWallet::Wallet::EntryType return 0; } -bool KWalletFolderItem::contains(const TQString& key) { +bool KWalletFolderItem::tqcontains(const TQString& key) { return (getItem(key) != 0); } @@ -121,8 +121,8 @@ KWalletFolderItem::~KWalletFolderItem() { * KWalletContainerItem - ListView items to represent kwallet containers, i.e. * passwords, maps, ... */ -KWalletContainerItem::KWalletContainerItem(TQListViewItem* parent, const TQString &name, KWallet::Wallet::EntryType type) -: KListViewItem(parent, name), _type(type) { +KWalletContainerItem::KWalletContainerItem(TQListViewItem* tqparent, const TQString &name, KWallet::Wallet::EntryType type) +: KListViewItem(tqparent, name), _type(type) { setRenameEnabled(0, false); setDragEnabled(true); } @@ -138,7 +138,7 @@ KWallet::Wallet::EntryType KWalletContainerItem::type() { return _type; } -bool KWalletContainerItem::contains(const TQString& key) { +bool KWalletContainerItem::tqcontains(const TQString& key) { return getItem(key) != 0; } @@ -154,8 +154,8 @@ TQListViewItem *KWalletContainerItem::getItem(const TQString& key) { /**************** * KWalletEntryItem - ListView items to represent kwallet entries */ -KWalletEntryItem::KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* parent, const TQString& ename) -: KListViewItem(parent, ename), _wallet(w), _oldName(ename) { +KWalletEntryItem::KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* tqparent, const TQString& ename) +: KListViewItem(tqparent, ename), _wallet(w), _oldName(ename) { setRenameEnabled(0, true); setDragEnabled(true); } @@ -170,8 +170,8 @@ KWalletEntryItem::~KWalletEntryItem() { /**************** * KWalletItem - IconView items to represent wallets */ -KWalletItem::KWalletItem(TQIconView *parent, const TQString& walletName) -: TQIconViewItem(parent, walletName, DesktopIcon("kwalletmanager")) { +KWalletItem::KWalletItem(TQIconView *tqparent, const TQString& walletName) +: TQIconViewItem(tqparent, walletName, DesktopIcon("kwalletmanager")) { } KWalletItem::~KWalletItem() { @@ -183,7 +183,7 @@ bool KWalletItem::acceptDrop(const TQMimeSource *mime) const { } static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) { - Q_UINT32 magic; + TQ_UINT32 magic; ds >> magic; if (magic != KWALLETENTRYMAGIC) { kdDebug() << "bad magic" << endl; @@ -194,7 +194,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) { KWallet::Wallet::EntryType et; ds >> name; if (_wallet->hasEntry(name)) { - int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").arg(name)); + int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").tqarg(name)); if (rc == KMessageBox::Cancel) { return false; } @@ -208,7 +208,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) { } static bool decodeFolder(KWallet::Wallet *_wallet, TQDataStream& ds) { - Q_UINT32 magic; + TQ_UINT32 magic; ds >> magic; if (magic != KWALLETFOLDERMAGIC) { kdDebug() << "bad magic" << endl; @@ -217,7 +217,7 @@ static bool decodeFolder(KWallet::Wallet *_wallet, TQDataStream& ds) { TQString folder; ds >> folder; if (_wallet->hasFolder(folder)) { - int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists. What would you like to do?").arg(folder), TQString::null, KStdGuiItem::cont(), i18n("Replace")); + int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists. What would you like to do?").tqarg(folder), TQString(), KStdGuiItem::cont(), i18n("Replace")); if (rc == KMessageBox::Cancel) { return false; } @@ -263,7 +263,7 @@ void KWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst TQDataStream *ds = 0L; if (e->provides("application/x-kwallet-folder")) { - TQByteArray edata = e->encodedData("application/x-kwallet-folder"); + TQByteArray edata = e->tqencodedData("application/x-kwallet-folder"); if (!edata.isEmpty()) { ds = new TQDataStream(edata, IO_ReadOnly); } @@ -299,13 +299,13 @@ void KWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst delete _wallet; //delete the folder from the source if we were moving - Qt::ButtonState state = kapp->keyboardMouseState(); - if (e->source() && e->source()->parent() && - !strcmp(e->source()->parent()->className(), "KWalletEntryList") && - !(state & Qt::ControlButton)) { + TQt::ButtonState state = kapp->keyboardMouseState(); + if (e->source() && e->source()->tqparent() && + !strcmp(e->source()->tqparent()->className(), "KWalletEntryList") && + !(state & TQt::ControlButton)) { KWalletEntryList *el = - dynamic_cast<KWalletEntryList*>(e->source()->parent()); + dynamic_cast<KWalletEntryList*>(e->source()->tqparent()); if (el) { KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem*>(el->selectedItem()); @@ -348,8 +348,8 @@ class KWalletFolderDrag : public TQStoredDrag { /**************** * KWalletEntryList - A listview to store wallet entries */ -KWalletEntryList::KWalletEntryList(TQWidget *parent, const char *name) -: KListView(parent, name) { +KWalletEntryList::KWalletEntryList(TQWidget *tqparent, const char *name) +: KListView(tqparent, name) { addColumn(i18n("Folders")); setRootIsDecorated(true); setDefaultRenameAction(Reject); @@ -389,10 +389,10 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { TQListViewItem *sel = 0L; //detect if we are dragging from kwallet itself - if (e->source() && e->source()->parent() && - !strcmp(e->source()->parent()->className(), "KWalletEntryList")) { + if (e->source() && e->source()->tqparent() && + !strcmp(e->source()->tqparent()->className(), "KWalletEntryList")) { - el = dynamic_cast<KWalletEntryList*>(e->source()->parent()); + el = dynamic_cast<KWalletEntryList*>(e->source()->tqparent()); if (!el) { KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the item")); } else @@ -401,13 +401,13 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { if (e->provides("application/x-kwallet-entry")) { //do nothing if we are in the same folder - if (sel && sel->parent()->parent() == + if (sel && sel->tqparent()->tqparent() == KWalletEntryList::getItemFolder(item)) { e->ignore(); return; } isEntry = true; - TQByteArray data = e->encodedData("application/x-kwallet-entry"); + TQByteArray data = e->tqencodedData("application/x-kwallet-entry"); if (data.isEmpty()) { e->ignore(); return; @@ -420,7 +420,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { return; } isEntry = false; - TQByteArray data = e->encodedData("application/x-kwallet-folder"); + TQByteArray data = e->tqencodedData("application/x-kwallet-folder"); if (data.isEmpty()) { e->ignore(); return; @@ -444,7 +444,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { file.open(IO_ReadOnly); ds = new TQDataStream(&file); //check magic to discover mime type - Q_UINT32 magic; + TQ_UINT32 magic; (*ds) >> magic; if (magic == KWALLETENTRYMAGIC) { isEntry = true; @@ -468,7 +468,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { e->ignore(); return; } - Qt::ButtonState state = kapp->keyboardMouseState(); + TQt::ButtonState state = kapp->keyboardMouseState(); if (isEntry) { if (!item) { e->ignore(); @@ -489,7 +489,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { delete(ds); //delete source if we were moving, i.e., we are dragging //from kwalletmanager and Control is not pressed - if (ok && el && !(state & Qt::ControlButton) && sel) { + if (ok && el && !(state & TQt::ControlButton) && sel) { el->_wallet->removeEntry(sel->text(0)); delete sel; } @@ -499,7 +499,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { delete ds; //delete source if we were moving, i.e., we are dragging //from kwalletmanager and Control is not pressed - if (ok && el && !(state & Qt::ControlButton) && sel) { + if (ok && el && !(state & TQt::ControlButton) && sel) { KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(sel); if (fi) { el->_wallet->removeFolder(fi->name()); @@ -562,9 +562,9 @@ KWalletFolderItem *KWalletEntryList::getItemFolder(TQListViewItem *item) { case KWalletFolderItemClass: return dynamic_cast<KWalletFolderItem *>(item); case KWalletContainerItemClass: - return dynamic_cast<KWalletFolderItem *>(item->parent()); + return dynamic_cast<KWalletFolderItem *>(item->tqparent()); case KWalletEntryItemClass: - return dynamic_cast<KWalletFolderItem *>(item->parent()->parent()); + return dynamic_cast<KWalletFolderItem *>(item->tqparent()->tqparent()); } return 0; } @@ -589,11 +589,11 @@ class KWalletIconDrag : public TQIconDrag { return 0L; } - TQByteArray encodedData(const char *mime) const { + TQByteArray tqencodedData(const char *mime) const { TQByteArray a; TQCString mimetype(mime); if (mimetype == "application/x-qiconlist") { - return TQIconDrag::encodedData(mime); + return TQIconDrag::tqencodedData(mime); } else if (mimetype == "text/uri-list") { TQCString s = _urls.join("\r\n").latin1(); if (_urls.count() > 0) { @@ -618,8 +618,8 @@ class KWalletIconDrag : public TQIconDrag { /**************** * * KWalletIconView - An iconview to store wallets * */ -KWalletIconView::KWalletIconView(TQWidget *parent, const char *name) -: KIconView(parent, name) { +KWalletIconView::KWalletIconView(TQWidget *tqparent, const char *name) +: KIconView(tqparent, name) { KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet"); connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), TQT_SLOT(slotDropped(TQDropEvent*, const TQValueList<TQIconDragItem>&))); } @@ -638,7 +638,7 @@ void KWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragIt return; } - TQByteArray edata = e->encodedData("text/uri-list"); + TQByteArray edata = e->tqencodedData("text/uri-list"); TQCString urls = edata.data(); TQStringList ul = TQStringList::split("\r\n", urls); @@ -668,7 +668,7 @@ void KWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragIt void KWalletIconView::contentsMousePressEvent(TQMouseEvent *e) { _mousePos = e->pos(); - if (!findItem(_mousePos)) { + if (!tqfindItem(_mousePos)) { clearSelection(); } KIconView::contentsMousePressEvent( e ); diff --git a/kwallet/allyourbase.h b/kwallet/allyourbase.h index 299a6c9..7c37c10 100644 --- a/kwallet/allyourbase.h +++ b/kwallet/allyourbase.h @@ -27,8 +27,8 @@ #include <kiconloader.h> #include <kicontheme.h> -#define KWALLETENTRYMAGIC ((Q_UINT32) 0x6B776C65) -#define KWALLETFOLDERMAGIC ((Q_UINT32) 0x6B776C66) +#define KWALLETENTRYMAGIC ((TQ_UINT32) 0x6B776C65) +#define KWALLETFOLDERMAGIC ((TQ_UINT32) 0x6B776C66) enum KWalletListItemClasses { KWalletFolderItemClass = 1000, @@ -39,7 +39,7 @@ enum KWalletListItemClasses { class KWalletEntryItem : public KListViewItem { public: - KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* parent, const TQString& ename); + KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* tqparent, const TQString& ename); virtual ~KWalletEntryItem(); const TQString& oldName() { return _oldName; } @@ -57,14 +57,14 @@ class KWalletEntryItem : public KListViewItem { class KWalletContainerItem : public KListViewItem { public: - KWalletContainerItem(TQListViewItem* parent, const TQString& name, + KWalletContainerItem(TQListViewItem* tqparent, const TQString& name, KWallet::Wallet::EntryType type); virtual ~KWalletContainerItem(); public: virtual int rtti() const; KWallet::Wallet::EntryType type(); - bool contains(const TQString& itemKey); + bool tqcontains(const TQString& itemKey); TQListViewItem* getItem(const TQString& itemKey); private: @@ -73,7 +73,7 @@ class KWalletContainerItem : public KListViewItem { class KWalletFolderItem : public KListViewItem { public: - KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, + KWalletFolderItem(KWallet::Wallet *w, TQListView* tqparent, const TQString& name, int entries); virtual ~KWalletFolderItem(); @@ -84,7 +84,7 @@ class KWalletFolderItem : public KListViewItem { void refresh(); KWalletContainerItem* getContainer(KWallet::Wallet::EntryType type); TQPixmap getFolderIcon(KIcon::Group group); - bool contains(const TQString& itemKey); + bool tqcontains(const TQString& itemKey); TQListViewItem* getItem(const TQString& itemKey); public: @@ -97,8 +97,9 @@ class KWalletFolderItem : public KListViewItem { class KWalletEntryList : public KListView { Q_OBJECT + TQ_OBJECT public: - KWalletEntryList(TQWidget *parent, const char *name = 0L); + KWalletEntryList(TQWidget *tqparent, const char *name = 0L); virtual ~KWalletEntryList(); bool existsFolder(const TQString& name); @@ -121,7 +122,7 @@ class KWalletEntryList : public KListView { class KWalletItem : public TQIconViewItem { public: - KWalletItem(TQIconView *parent, const TQString& walletName); + KWalletItem(TQIconView *tqparent, const TQString& walletName); virtual ~KWalletItem(); virtual bool acceptDrop(const TQMimeSource *mime) const; @@ -133,8 +134,9 @@ class KWalletItem : public TQIconViewItem { class KWalletIconView : public KIconView { Q_OBJECT + TQ_OBJECT public: - KWalletIconView(TQWidget *parent, const char *name = 0L); + KWalletIconView(TQWidget *tqparent, const char *name = 0L); virtual ~KWalletIconView(); protected slots: diff --git a/kwallet/kbetterthankdialogbase.ui b/kwallet/kbetterthankdialogbase.ui index 30d2d93..16d3514 100644 --- a/kwallet/kbetterthankdialogbase.ui +++ b/kwallet/kbetterthankdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KBetterThanKDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KBetterThanKDialogBase</cstring> </property> @@ -37,22 +37,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_allowOnce</cstring> </property> @@ -63,7 +63,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_allowAlways</cstring> </property> @@ -71,7 +71,7 @@ <string>Replace &All</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_deny</cstring> </property> @@ -79,7 +79,7 @@ <string>&Skip</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>_denyForever</cstring> </property> @@ -99,7 +99,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -140,14 +140,14 @@ <include location="global" impldecl="in declaration">kactivelabel.h</include> <include location="local" impldecl="in implementation">kbetterthankdialogbase.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="private">clicked()</slot> - <slot>setLabel( const QString & label )</slot> + <slot>setLabel( const TQString & label )</slot> <slot access="private">init()</slot> <slot access="protected">accept()</slot> <slot access="protected">reject()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kactivelabel.h</includehint> </includehints> diff --git a/kwallet/kbetterthankdialogbase.ui.h b/kwallet/kbetterthankdialogbase.ui.h index 4d32a14..e97ffd1 100644 --- a/kwallet/kbetterthankdialogbase.ui.h +++ b/kwallet/kbetterthankdialogbase.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/kwallet/konfigurator/konfigurator.cpp b/kwallet/konfigurator/konfigurator.cpp index 25e5239..a9ebb68 100644 --- a/kwallet/konfigurator/konfigurator.cpp +++ b/kwallet/konfigurator/konfigurator.cpp @@ -40,8 +40,8 @@ typedef KGenericFactory<KWalletConfig, TQWidget> KWalletFactory; K_EXPORT_COMPONENT_FACTORY(kcm_kwallet, KWalletFactory("kcmkwallet")) -KWalletConfig::KWalletConfig(TQWidget *parent, const char *name, const TQStringList&) -: KCModule(KWalletFactory::instance(), parent, name) { +KWalletConfig::KWalletConfig(TQWidget *tqparent, const char *name, const TQStringList&) +: KCModule(KWalletFactory::instance(), tqparent, name) { KAboutData *about = new KAboutData(I18N_NOOP("kcmkwallet"), @@ -101,11 +101,11 @@ void KWalletConfig::updateWalletLists() { _wcw->_localWallet->insertStringList(wl); _wcw->_defaultWallet->insertStringList(wl); - if (wl.contains(p1)) { + if (wl.tqcontains(p1)) { _wcw->_localWallet->setCurrentText(p1); } - if (wl.contains(p2)) { + if (wl.tqcontains(p2)) { _wcw->_defaultWallet->setCurrentText(p2); } } @@ -116,17 +116,17 @@ TQString KWalletConfig::newWallet() { TQString n = KInputDialog::getText(i18n("New Wallet"), i18n("Please choose a name for the new wallet:"), - TQString::null, + TQString(), &ok, this); if (!ok) { - return TQString::null; + return TQString(); } KWallet::Wallet *w = KWallet::Wallet::openWallet(n); if (!w) { - return TQString::null; + return TQString(); } delete w; @@ -216,10 +216,10 @@ void KWalletConfig::load(bool useDefaults) { denykeys.remove(*i); TQListViewItem *lvi = new TQListViewItem(_wcw->_accessList, *i); for (TQStringList::Iterator j = apps.begin(); j != apps.end(); ++j) { - new TQListViewItem(lvi, TQString::null, *j, i18n("Always Allow")); + new TQListViewItem(lvi, TQString(), *j, i18n("Always Allow")); } for (TQStringList::Iterator j = denyapps.begin(); j != denyapps.end(); ++j) { - new TQListViewItem(lvi, TQString::null, *j, i18n("Always Deny")); + new TQListViewItem(lvi, TQString(), *j, i18n("Always Deny")); } } _cfg->setGroup("Auto Deny"); @@ -227,7 +227,7 @@ void KWalletConfig::load(bool useDefaults) { TQStringList denyapps = _cfg->readListEntry(*i); TQListViewItem *lvi = new TQListViewItem(_wcw->_accessList, *i); for (TQStringList::Iterator j = denyapps.begin(); j != denyapps.end(); ++j) { - new TQListViewItem(lvi, TQString::null, *j, i18n("Always Deny")); + new TQListViewItem(lvi, TQString(), *j, i18n("Always Deny")); } } emit changed(useDefaults); @@ -302,9 +302,9 @@ TQString KWalletConfig::quickHelp() const { void KWalletConfig::contextMenuRequested(TQListViewItem *item, const TQPoint& pos, int col) { Q_UNUSED(col) - if (item && item->parent()) { + if (item && item->tqparent()) { KPopupMenu *m = new KPopupMenu(this); - m->insertTitle(item->parent()->text(0)); + m->insertTitle(item->tqparent()->text(0)); m->insertItem(i18n("&Delete"), this, TQT_SLOT(deleteEntry()), Key_Delete); m->popup(pos); } diff --git a/kwallet/konfigurator/konfigurator.h b/kwallet/konfigurator/konfigurator.h index 338e844..63ba608 100644 --- a/kwallet/konfigurator/konfigurator.h +++ b/kwallet/konfigurator/konfigurator.h @@ -28,8 +28,9 @@ class TQListViewItem; class KWalletConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - KWalletConfig(TQWidget *parent = 0L, const char *name = 0L, const TQStringList& = TQStringList()); + KWalletConfig(TQWidget *tqparent = 0L, const char *name = 0L, const TQStringList& = TQStringList()); virtual ~KWalletConfig(); void load(); diff --git a/kwallet/konfigurator/walletconfigwidget.ui b/kwallet/konfigurator/walletconfigwidget.ui index 797d569..0d1d1e9 100644 --- a/kwallet/konfigurator/walletconfigwidget.ui +++ b/kwallet/konfigurator/walletconfigwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>WalletConfigWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WalletConfigWidget</cstring> </property> @@ -19,11 +19,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>_enabled</cstring> </property> @@ -48,7 +48,7 @@ <string><p>The wallet subsytem allows a convenient and secure way to manage all your passwords. You can decide if you want to use this system with this option.</p></string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -62,15 +62,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>_closeIdle</cstring> </property> @@ -89,7 +89,7 @@ <string><p><b>Close wallet after a period of inactivity</b><br>When a wallet is closed the password is needed to access it again.</p></string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>_idleTime</cstring> </property> @@ -133,7 +133,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -142,7 +142,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>_screensaverLock</cstring> </property> @@ -153,7 +153,7 @@ <string><p><b>Close wallet as soon as the screensaver starts.</b><br>When a wallet is closed the password is needed to access it again.</p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>_autoclose</cstring> </property> @@ -166,7 +166,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -187,14 +187,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -202,7 +202,7 @@ <string>Select wallet to use as default:</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>_localWalletSelected</cstring> </property> @@ -210,7 +210,7 @@ <string>Different wallet for local passwords:</string> </property> </widget> - <widget class="QComboBox" row="0" column="2"> + <widget class="TQComboBox" row="0" column="2"> <property name="name"> <cstring>_defaultWallet</cstring> </property> @@ -223,7 +223,7 @@ </sizepolicy> </property> </widget> - <widget class="QComboBox" row="1" column="2"> + <widget class="TQComboBox" row="1" column="2"> <property name="name"> <cstring>_localWallet</cstring> </property> @@ -239,7 +239,7 @@ </sizepolicy> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>_newLocalWallet</cstring> </property> @@ -250,7 +250,7 @@ <string>New...</string> </property> </widget> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>_newWallet</cstring> </property> @@ -260,7 +260,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -281,14 +281,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>_launchManager</cstring> </property> @@ -299,7 +299,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>_autocloseManager</cstring> </property> @@ -319,7 +319,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>16</height> @@ -328,7 +328,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -339,7 +339,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>_openPrompt</cstring> </property> @@ -350,7 +350,7 @@ <bool>true</bool> </property> </widget> - <widget class="QListView" row="1" column="0"> + <widget class="TQListView" row="1" column="0"> <column> <property name="text"> <string>Wallet</string> @@ -397,7 +397,7 @@ </grid> </widget> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>_launch</cstring> </property> @@ -415,7 +415,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>369</width> <height>21</height> @@ -492,8 +492,8 @@ <tabstop>_accessList</tabstop> <tabstop>_launch</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>_storeTogether_toggled(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kwallet/kwalleteditor.cpp b/kwallet/kwalleteditor.cpp index adaec87..2a72870 100644 --- a/kwallet/kwalleteditor.cpp +++ b/kwallet/kwalleteditor.cpp @@ -62,11 +62,11 @@ #include <assert.h> #include <stdlib.h> -KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *parent, const char *name) -: KMainWindow(parent, name), _walletName(wallet), _nonLocal(isPath) { +KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *tqparent, const char *name) +: KMainWindow(tqparent, name), _walletName(wallet), _nonLocal(isPath) { _newWallet = false; _ww = new WalletWidget(this, "Wallet Widget"); - _copyPassAction = KStdAction::copy(this, TQT_SLOT(copyPassword()), actionCollection()); + _copyPassAction = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copyPassword()), actionCollection()); TQVBoxLayout *box = new TQVBoxLayout(_ww->_entryListFrame); box->setSpacing( KDialog::spacingHint() ); @@ -133,7 +133,7 @@ KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *pare setCaption(wallet); - TQTimer::singleShot(0, this, TQT_SLOT(layout())); + TQTimer::singleShot(0, this, TQT_SLOT(tqlayout())); } KWalletEditor::~KWalletEditor() { @@ -149,7 +149,7 @@ KWalletEditor::~KWalletEditor() { } } -void KWalletEditor::layout() { +void KWalletEditor::tqlayout() { TQValueList<int> sz = _ww->_splitter->sizes(); int sum = sz[0] + sz[1]; sz[0] = sum/2; @@ -159,48 +159,48 @@ void KWalletEditor::layout() { void KWalletEditor::createActions() { _newFolderAction = new KAction(i18n("&New Folder..."), "folder_new", - 0, this, TQT_SLOT(createFolder()), actionCollection(), + 0, TQT_TQOBJECT(this), TQT_SLOT(createFolder()), actionCollection(), "create_folder"); connect(this, TQT_SIGNAL(enableFolderActions(bool)), _newFolderAction, TQT_SLOT(setEnabled(bool))); _deleteFolderAction = new KAction(i18n("&Delete Folder"), 0, 0, - this, TQT_SLOT(deleteFolder()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(deleteFolder()), actionCollection(), "delete_folder"); connect(this, TQT_SIGNAL(enableContextFolderActions(bool)), _deleteFolderAction, TQT_SLOT(setEnabled(bool))); connect(this, TQT_SIGNAL(enableFolderActions(bool)), _deleteFolderAction, TQT_SLOT(setEnabled(bool))); - _passwordAction = new KAction(i18n("Change &Password..."), 0, 0, this, + _passwordAction = new KAction(i18n("Change &Password..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(changePassword()), actionCollection(), "change_password"); connect(this, TQT_SIGNAL(enableWalletActions(bool)), _passwordAction, TQT_SLOT(setEnabled(bool))); - _mergeAction = new KAction(i18n("&Merge Wallet..."), 0, 0, this, + _mergeAction = new KAction(i18n("&Merge Wallet..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(importWallet()), actionCollection(), "merge"); connect(this, TQT_SIGNAL(enableWalletActions(bool)), _mergeAction, TQT_SLOT(setEnabled(bool))); - _importAction = new KAction(i18n("&Import XML..."), 0, 0, this, + _importAction = new KAction(i18n("&Import XML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(importXML()), actionCollection(), "import"); connect(this, TQT_SIGNAL(enableWalletActions(bool)), _importAction, TQT_SLOT(setEnabled(bool))); - _exportAction = new KAction(i18n("&Export..."), 0, 0, this, + _exportAction = new KAction(i18n("&Export..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportXML()), actionCollection(), "export"); connect(this, TQT_SIGNAL(enableWalletActions(bool)), _exportAction, TQT_SLOT(setEnabled(bool))); - _saveAsAction = KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); + _saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection()); connect(this, TQT_SIGNAL(enableWalletActions(bool)), _saveAsAction, TQT_SLOT(setEnabled(bool))); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); emit enableWalletActions(false); @@ -230,7 +230,7 @@ void KWalletEditor::updateFolderList(bool checkEntries) { if (!fi) { continue; } - if (!fl.contains(fi->name())) { + if (!fl.tqcontains(fi->name())) { trash.push(i); } } @@ -277,7 +277,7 @@ void KWalletEditor::updateFolderList(bool checkEntries) { } //check if the current folder has been removed - if (!fl.contains(_currentFolder)) { + if (!fl.tqcontains(_currentFolder)) { _currentFolder = ""; _ww->_entryTitle->clear(); _ww->_iconTitle->clear(); @@ -293,7 +293,7 @@ void KWalletEditor::deleteFolder() { return; } - int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the folder '%1' from the wallet?").arg(fi->name()),"",KStdGuiItem::del()); + int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the folder '%1' from the wallet?").tqarg(fi->name()),"",KStdGuiItem::del()); if (rc == KMessageBox::Continue) { bool rc = _w->removeFolder(fi->name()); if (!rc) { @@ -318,7 +318,7 @@ void KWalletEditor::createFolder() { do { n = KInputDialog::getText(i18n("New Folder"), i18n("Please choose a name for the new folder:"), - TQString::null, + TQString(), &ok, this); @@ -327,11 +327,11 @@ void KWalletEditor::createFolder() { } if (_entryList->existsFolder(n)) { - int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that folder name is in use. Try again?"), TQString::null, i18n("Try Again"), i18n("Do Not Try")); + int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that folder name is in use. Try again?"), TQString(), i18n("Try Again"), i18n("Do Not Try")); if (rc == KMessageBox::Yes) { continue; } - n = TQString::null; + n = TQString(); } break; } while (true); @@ -348,8 +348,8 @@ void KWalletEditor::saveEntry() { _ww->_saveChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false); - if (item && _w && item->parent()) { - KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->parent()); + if (item && _w && item->tqparent()) { + KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->tqparent()); if (ci) { if (ci->type() == KWallet::Wallet::Password) { rc = _w->writePassword(item->text(0), _ww->_passwordValue->text()); @@ -366,7 +366,7 @@ void KWalletEditor::saveEntry() { } } - KMessageBox::sorry(this, i18n("Error saving entry. Error code: %1").arg(rc)); + KMessageBox::sorry(this, i18n("Error saving entry. Error code: %1").tqarg(rc)); } @@ -387,11 +387,11 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { switch (item->rtti()) { case KWalletEntryItemClass: - ci = dynamic_cast<KWalletContainerItem*>(item->parent()); + ci = dynamic_cast<KWalletContainerItem*>(item->tqparent()); if (!ci) { return; } - fi = dynamic_cast<KWalletFolderItem*>(ci->parent()); + fi = dynamic_cast<KWalletFolderItem*>(ci->tqparent()); if (!fi) { return; } @@ -402,7 +402,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { if (_w->readPassword(item->text(0), pass) == 0) { _ww->_entryStack->raiseWidget(int(4)); _ww->_entryName->setText(i18n("Password: %1") - .arg(item->text(0))); + .tqarg(item->text(0))); _ww->_passwordValue->setText(pass); _ww->_saveChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false); @@ -413,7 +413,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { showHideMapEditorValue(false); if (_w->readMap(item->text(0), _currentMap) == 0) { _mapEditor->reload(); - _ww->_entryName->setText(i18n("Name-Value Map: %1").arg(item->text(0))); + _ww->_entryName->setText(i18n("Name-Value Map: %1").tqarg(item->text(0))); _ww->_saveChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false); } @@ -422,7 +422,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { TQByteArray ba; if (_w->readEntry(item->text(0), ba) == 0) { _ww->_entryName->setText(i18n("Binary Data: %1") - .arg(item->text(0))); + .tqarg(item->text(0))); _ww->_saveChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false); } @@ -430,7 +430,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { break; case KWalletContainerItemClass: - fi = dynamic_cast<KWalletFolderItem*>(item->parent()); + fi = dynamic_cast<KWalletFolderItem*>(item->tqparent()); if (!fi) { return; } @@ -454,7 +454,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) { if (fi) { _currentFolder = fi->name(); - _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0))); + _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); _ww->_iconTitle->setPixmap(fi->getFolderIcon(KIcon::Toolbar)); } } @@ -478,7 +478,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { // Remove deleted entries for (TQListViewItem *i = pi->firstChild(); i; i = i->nextSibling()) { - if (!entries.contains(i->text(0))) { + if (!entries.tqcontains(i->text(0))) { if (i == _entryList->currentItem()) { entrySelectionChanged(0L); } @@ -487,7 +487,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { } for (TQListViewItem *i = mi->firstChild(); i; i = i->nextSibling()) { - if (!entries.contains(i->text(0))) { + if (!entries.tqcontains(i->text(0))) { if (i == _entryList->currentItem()) { entrySelectionChanged(0L); } @@ -496,7 +496,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { } for (TQListViewItem *i = bi->firstChild(); i; i = i->nextSibling()) { - if (!entries.contains(i->text(0))) { + if (!entries.tqcontains(i->text(0))) { if (i == _entryList->currentItem()) { entrySelectionChanged(0L); } @@ -505,7 +505,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { } for (TQListViewItem *i = ui->firstChild(); i; i = i->nextSibling()) { - if (!entries.contains(i->text(0))) { + if (!entries.tqcontains(i->text(0))) { if (i == _entryList->currentItem()) { entrySelectionChanged(0L); } @@ -518,7 +518,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { // Add new entries for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { - if (fi->contains(*i)){ + if (fi->tqcontains(*i)){ continue; } @@ -540,7 +540,7 @@ void KWalletEditor::updateEntries(const TQString& folder) { } fi->refresh(); if (fi->name() == _currentFolder) { - _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0))); + _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); } if (!_entryList->selectedItem()) { _ww->_entryName->clear(); @@ -560,7 +560,7 @@ void KWalletEditor::listContextMenuRequested(TQListViewItem *item, const TQPoint if (item) { if (item->rtti() == KWalletEntryItemClass) { - ci = dynamic_cast<KWalletContainerItem *>(item->parent()); + ci = dynamic_cast<KWalletContainerItem *>(item->tqparent()); if (!ci) { return; } @@ -617,7 +617,7 @@ void KWalletEditor::copyPassword() { if (_w && item) { TQString pass; if (_w->readPassword(item->text(0), pass) == 0) { - TQApplication::clipboard()->setText(pass); + TQApplication::tqclipboard()->setText(pass); } } } @@ -635,9 +635,9 @@ void KWalletEditor::newEntry() { if (_w && item) { p = item; if (p->rtti() == KWalletEntryItemClass) { - p = item->parent(); + p = item->tqparent(); } - fi = dynamic_cast<KWalletFolderItem *>(p->parent()); + fi = dynamic_cast<KWalletFolderItem *>(p->tqparent()); if (!fi) { return; } @@ -649,7 +649,7 @@ void KWalletEditor::newEntry() { do { n = KInputDialog::getText(i18n("New Entry"), i18n("Please choose a name for the new entry:"), - TQString::null, + TQString(), &ok, this); @@ -658,12 +658,12 @@ void KWalletEditor::newEntry() { } // FIXME: prohibits the use of the subheadings - if (fi->contains(n)) { - int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that entry already exists. Try again?"), TQString::null, i18n("Try Again"), i18n("Do Not Try")); + if (fi->tqcontains(n)) { + int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that entry already exists. Try again?"), TQString(), i18n("Try Again"), i18n("Do Not Try")); if (rc == KMessageBox::Yes) { continue; } - n = TQString::null; + n = TQString(); } break; } while (true); @@ -671,10 +671,10 @@ void KWalletEditor::newEntry() { if (_w && item && !n.isEmpty()) { TQListViewItem *p = item; if (p->rtti() == KWalletEntryItemClass) { - p = item->parent(); + p = item->tqparent(); } - KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(p->parent()); + KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(p->tqparent()); if (!fi) { KMessageBox::error(this, i18n("An unexpected error occurred trying to add the new entry")); return; @@ -691,7 +691,7 @@ void KWalletEditor::newEntry() { return; } if (ci->type() == KWallet::Wallet::Password) { - _w->writePassword(n, TQString::null); + _w->writePassword(n, TQString()); } else if (ci->type() == KWallet::Wallet::Map) { _w->writeMap(n, TQMap<TQString,TQString>()); } else if (ci->type() == KWallet::Wallet::Stream) { @@ -700,7 +700,7 @@ void KWalletEditor::newEntry() { abort(); } fi->refresh(); - _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0))); + _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); } } @@ -728,17 +728,17 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t if (_w->renameEntry(i->oldName(), t) == 0) { i->clearOldName(); - KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->parent()); + KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem*>(item->tqparent()); if (!ci) { KMessageBox::error(this, i18n("An unexpected error occurred trying to rename the entry")); return; } if (ci->type() == KWallet::Wallet::Password) { - _ww->_entryName->setText(i18n("Password: %1").arg(item->text(0))); + _ww->_entryName->setText(i18n("Password: %1").tqarg(item->text(0))); } else if (ci->type() == KWallet::Wallet::Map) { - _ww->_entryName->setText(i18n("Name-Value Map: %1").arg(item->text(0))); + _ww->_entryName->setText(i18n("Name-Value Map: %1").tqarg(item->text(0))); } else if (ci->type() == KWallet::Wallet::Stream) { - _ww->_entryName->setText(i18n("Binary Data: %1").arg(item->text(0))); + _ww->_entryName->setText(i18n("Binary Data: %1").tqarg(item->text(0))); } } else { i->setText(0, i->oldName()); @@ -750,9 +750,9 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t void KWalletEditor::deleteEntry() { TQListViewItem *item = _entryList->selectedItem(); if (_w && item) { - int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the item '%1'?").arg(item->text(0)),"",KStdGuiItem::del()); + int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the item '%1'?").tqarg(item->text(0)),"",KStdGuiItem::del()); if (rc == KMessageBox::Continue) { - KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(item->parent()->parent()); + KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(item->tqparent()->tqparent()); if (!fi) { KMessageBox::error(this, i18n("An unexpected error occurred trying to delete the entry")); return; @@ -761,7 +761,7 @@ void KWalletEditor::deleteEntry() { delete item; entrySelectionChanged(_entryList->currentItem()); fi->refresh(); - _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0))); + _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); } } } @@ -811,14 +811,14 @@ void KWalletEditor::showHideMapEditorValue(bool show) { enum MergePlan { Prompt = 0, Always = 1, Never = 2, Yes = 3, No = 4 }; void KWalletEditor::importWallet() { - KURL url = KFileDialog::getOpenURL(TQString::null, "*.kwl", this); + KURL url = KFileDialog::getOpenURL(TQString(), "*.kwl", this); if (url.isEmpty()) { return; } TQString tmpFile; if (!KIO::NetAccess::download(url, tmpFile, this)) { - KMessageBox::sorry(this, i18n("Unable to access wallet '<b>%1</b>'.").arg(url.prettyURL())); + KMessageBox::sorry(this, i18n("Unable to access wallet '<b>%1</b>'.").tqarg(url.prettyURL())); return; } @@ -847,7 +847,7 @@ void KWalletEditor::importWallet() { if (hasEntry && mp == Prompt) { KBetterThanKDialogBase *bd; bd = new KBetterThanKDialogBase(this); - bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(me.key()))); + bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(me.key()))); mp = (MergePlan)bd->exec(); delete bd; bool ok = false; @@ -877,7 +877,7 @@ void KWalletEditor::importWallet() { if (hasEntry && mp == Prompt) { KBetterThanKDialogBase *bd; bd = new KBetterThanKDialogBase(this); - bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(pe.key()))); + bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(pe.key()))); mp = (MergePlan)bd->exec(); delete bd; bool ok = false; @@ -907,7 +907,7 @@ void KWalletEditor::importWallet() { if (hasEntry && mp == Prompt) { KBetterThanKDialogBase *bd; bd = new KBetterThanKDialogBase(this); - bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(ee.key()))); + bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(ee.key()))); mp = (MergePlan)bd->exec(); delete bd; bool ok = false; @@ -939,27 +939,27 @@ void KWalletEditor::importWallet() { void KWalletEditor::importXML() { - KURL url = KFileDialog::getOpenURL(TQString::null, "*.xml", this); + KURL url = KFileDialog::getOpenURL(TQString(), "*.xml", this); if (url.isEmpty()) { return; } TQString tmpFile; if (!KIO::NetAccess::download(url, tmpFile, this)) { - KMessageBox::sorry(this, i18n("Unable to access XML file '<b>%1</b>'.").arg(url.prettyURL())); + KMessageBox::sorry(this, i18n("Unable to access XML file '<b>%1</b>'.").tqarg(url.prettyURL())); return; } TQFile qf(tmpFile); if (!qf.open(IO_ReadOnly)) { - KMessageBox::sorry(this, i18n("Error opening XML file '<b>%1</b>' for input.").arg(url.prettyURL())); + KMessageBox::sorry(this, i18n("Error opening XML file '<b>%1</b>' for input.").tqarg(url.prettyURL())); KIO::NetAccess::removeTempFile(tmpFile); return; } TQDomDocument doc(tmpFile); if (!doc.setContent(&qf)) { - KMessageBox::sorry(this, i18n("Error reading XML file '<b>%1</b>' for input.").arg(url.prettyURL())); + KMessageBox::sorry(this, i18n("Error reading XML file '<b>%1</b>' for input.").tqarg(url.prettyURL())); KIO::NetAccess::removeTempFile(tmpFile); return; } @@ -998,7 +998,7 @@ void KWalletEditor::importXML() { if (hasEntry && mp == Prompt) { KBetterThanKDialogBase *bd; bd = new KBetterThanKDialogBase(this); - bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(fname)).arg(TQStyleSheet::escape(ename))); + bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(fname)).tqarg(TQStyleSheet::escape(ename))); mp = (MergePlan)bd->exec(); delete bd; bool ok = false; @@ -1020,7 +1020,7 @@ void KWalletEditor::importXML() { if (type == "password") { _w->writePassword(ename, e.text()); } else if (type == "stream") { - _w->writeEntry(ename, KCodecs::base64Decode(e.text().latin1())); + _w->writeEntry(ename, KCodecs::base64Decode(TQCString(e.text().latin1()))); } else if (type == "map") { TQMap<TQString,TQString> map; TQDomNode mapNode = e.firstChild(); @@ -1101,12 +1101,12 @@ void KWalletEditor::exportXML() { ts << "</wallet>" << endl; tf.close(); - KURL url = KFileDialog::getSaveURL(TQString::null, "*.xml", this); + KURL url = KFileDialog::getSaveURL(TQString(), "*.xml", this); if (!url.isEmpty()) { bool ok = true; if (KIO::NetAccess::exists(url, false, this)) { - int rc = KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists. Would you like to overwrite this file?").arg(url.prettyURL()), i18n("Overwrite")); + int rc = KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists. Would you like to overwrite this file?").tqarg(url.prettyURL()), i18n("Overwrite")); if (rc == KMessageBox::Cancel) { ok = false; } @@ -1125,7 +1125,7 @@ void KWalletEditor::setNewWallet(bool x) { void KWalletEditor::saveAs() { - KURL url = KFileDialog::getSaveURL(TQString::null, "*.kwl", this); + KURL url = KFileDialog::getSaveURL(TQString(), "*.kwl", this); if (!url.isEmpty()) { // Sync() kwalletd if (_nonLocal) { diff --git a/kwallet/kwalleteditor.h b/kwallet/kwalleteditor.h index 9036bce..7d4fe86 100644 --- a/kwallet/kwalleteditor.h +++ b/kwallet/kwalleteditor.h @@ -36,9 +36,10 @@ class KWMapEditor; class KWalletEditor : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KWalletEditor(const TQString& wallet, bool isPath, TQWidget *parent = 0, const char* name = 0); + KWalletEditor(const TQString& wallet, bool isPath, TQWidget *tqparent = 0, const char* name = 0); virtual ~KWalletEditor(); bool isOpen() const { return _w != 0L; } @@ -51,7 +52,7 @@ class KWalletEditor : public KMainWindow { void deleteFolder(); private slots: - void layout(); + void tqlayout(); void updateFolderList(bool checkEntries = false); void entrySelectionChanged(TQListViewItem *item); void listItemRenamed(TQListViewItem *, int, const TQString&); diff --git a/kwallet/kwalletmanager.cpp b/kwallet/kwalletmanager.cpp index 58c98aa..7ac86d2 100644 --- a/kwallet/kwalletmanager.cpp +++ b/kwallet/kwalletmanager.cpp @@ -46,8 +46,8 @@ #include <tqtimer.h> #include <tqtooltip.h> -KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f) -: KMainWindow(parent, name, f), DCOPObject("KWalletManager") { +KWalletManager::KWalletManager(TQWidget *tqparent, const char *name, WFlags f) +: KMainWindow(tqparent, name, f), DCOPObject("KWalletManager") { KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet"); _kwalletdLaunch = false; TQAccel *accel = new TQAccel(this, "kwalletmanager"); @@ -84,8 +84,8 @@ KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f) } _iconView = new KWalletIconView(this, "kwalletmanager icon view"); - connect(_iconView, TQT_SIGNAL(executed(TQIconViewItem*)), this, TQT_SLOT(openWallet(TQIconViewItem*))); - connect(_iconView, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), this, TQT_SLOT(contextMenu(TQIconViewItem*, const TQPoint&))); + connect(_iconView, TQT_SIGNAL(executed(TQIconViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(TQIconViewItem*))); + connect(_iconView, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQIconViewItem*, const TQPoint&))); updateWalletDisplay(); setCentralWidget(_iconView); @@ -112,28 +112,28 @@ KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f) // wallet closes before we are done opening. We will then stay // open. Must check that a wallet is still open here. - new KAction(i18n("&New Wallet..."), "kwalletmanager", 0, this, + new KAction(i18n("&New Wallet..."), "kwalletmanager", 0, TQT_TQOBJECT(this), TQT_SLOT(createWallet()), actionCollection(), "wallet_create"); KAction *act = new KAction(i18n("Configure &Wallet..."), "configure", - 0, this, TQT_SLOT(setupWallet()), actionCollection(), + 0, TQT_TQOBJECT(this), TQT_SLOT(setupWallet()), actionCollection(), "wallet_settings"); if (_tray) { act->plug(_tray->contextMenu()); } - act = new KAction(i18n("Close &All Wallets"), 0, 0, this, + act = new KAction(i18n("Close &All Wallets"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(closeAllWallets()), actionCollection(), "close_all_wallets"); if (_tray) { act->plug(_tray->contextMenu()); } - KStdAction::quit(this, TQT_SLOT(shuttingDown()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(shuttingDown()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); createGUI("kwalletmanager.rc"); - accel->connectItem(accel->insertItem(Key_Return), this, TQT_SLOT(openWallet())); - accel->connectItem(accel->insertItem(Key_Delete), this, TQT_SLOT(deleteWallet())); + accel->connectItem(accel->insertItem(Key_Return), TQT_TQOBJECT(this), TQT_SLOT(openWallet())); + accel->connectItem(accel->insertItem(Key_Delete), TQT_TQOBJECT(this), TQT_SLOT(deleteWallet())); if (_tray) { _tray->show(); @@ -185,7 +185,7 @@ TQStringList wl = KWallet::Wallet::walletList(); TQPtrStack<TQIconViewItem> trash; for (TQIconViewItem *item = _iconView->firstItem(); item; item = item->nextItem()) { - if (!wl.contains(item->text())) { + if (!wl.tqcontains(item->text())) { trash.push(item); } } @@ -194,7 +194,7 @@ TQPtrStack<TQIconViewItem> trash; trash.clear(); for (TQStringList::Iterator i = wl.begin(); i != wl.end(); ++i) { - if (!_iconView->findItem(*i)) { + if (!_iconView->tqfindItem(*i)) { // FIXME: if KWallet::Wallet::isOpen(*i) then show // a different icon! new KWalletItem(_iconView, *i); @@ -208,11 +208,11 @@ TQPtrStack<TQIconViewItem> trash; void KWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) { if (item) { TQGuardedPtr<KWalletPopup> popupMenu = new KWalletPopup(item->text(), this); - connect(popupMenu, TQT_SIGNAL(walletOpened(const TQString&)), this, TQT_SLOT(openWallet(const TQString&))); - connect(popupMenu, TQT_SIGNAL(walletClosed(const TQString&)), this, TQT_SLOT(closeWallet(const TQString&))); - connect(popupMenu, TQT_SIGNAL(walletDeleted(const TQString&)), this, TQT_SLOT(deleteWallet(const TQString&))); - connect(popupMenu, TQT_SIGNAL(walletChangePassword(const TQString&)), this, TQT_SLOT(changeWalletPassword(const TQString&))); - connect(popupMenu, TQT_SIGNAL(walletCreated()), this, TQT_SLOT(createWallet())); + connect(popupMenu, TQT_SIGNAL(walletOpened(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(const TQString&))); + connect(popupMenu, TQT_SIGNAL(walletClosed(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(closeWallet(const TQString&))); + connect(popupMenu, TQT_SIGNAL(walletDeleted(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(deleteWallet(const TQString&))); + connect(popupMenu, TQT_SIGNAL(walletChangePassword(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(changeWalletPassword(const TQString&))); + connect(popupMenu, TQT_SIGNAL(walletCreated()), TQT_TQOBJECT(this), TQT_SLOT(createWallet())); popupMenu->exec(pos); delete popupMenu; } @@ -220,13 +220,13 @@ void KWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) { void KWalletManager::deleteWallet(const TQString& walletName) { - int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").arg(walletName),"",KStdGuiItem::del()); + int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").tqarg(walletName),"",KStdGuiItem::del()); if (rc != KMessageBox::Continue) { return; } rc = KWallet::Wallet::deleteWallet(walletName); if (rc != 0) { - KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").arg(rc)); + KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").tqarg(rc)); } updateWalletDisplay(); } @@ -235,11 +235,11 @@ void KWalletManager::deleteWallet(const TQString& walletName) { void KWalletManager::closeWallet(const TQString& walletName) { int rc = KWallet::Wallet::closeWallet(walletName, false); if (rc != 0) { - rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), TQString::null, i18n("Force Closure"), i18n("Do Not Force")); + rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), TQString(), i18n("Force Closure"), i18n("Do Not Force")); if (rc == KMessageBox::Yes) { rc = KWallet::Wallet::closeWallet(walletName, true); if (rc != 0) { - KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").arg(rc)); + KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").tqarg(rc)); } } } @@ -260,7 +260,7 @@ void KWalletManager::openWalletFile(const TQString& path) { this, TQT_SLOT(editorClosed(KMainWindow*))); we->show(); } else { - KMessageBox::sorry(this, i18n("Error opening wallet %1.").arg(path)); + KMessageBox::sorry(this, i18n("Error opening wallet %1.").tqarg(path)); delete we; } } @@ -302,7 +302,7 @@ void KWalletManager::openWallet(const TQString& walletName, bool newWallet) { we->show(); _windows.append(we); } else if (!newWallet) { - KMessageBox::sorry(this, i18n("Error opening wallet %1.").arg(walletName)); + KMessageBox::sorry(this, i18n("Error opening wallet %1.").tqarg(walletName)); delete we; } } @@ -357,14 +357,14 @@ void KWalletManager::createWallet() { TQString txt = i18n("Please choose a name for the new wallet:"); if (!KWallet::Wallet::isEnabled()) { - // FIXME: KMessageBox::warningYesNo(this, i1_8n("KWallet is not enabled. Do you want to enable it?"), TQString::null, i18n("Enable"), i18n("Keep Disabled")); + // FIXME: KMessageBox::warningYesNo(this, i1_8n("KWallet is not enabled. Do you want to enable it?"), TQString(), i18n("Enable"), i18n("Keep Disabled")); return; } do { n = KInputDialog::getText(i18n("New Wallet"), txt, - TQString::null, + TQString(), &ok, this); @@ -372,12 +372,12 @@ void KWalletManager::createWallet() { return; } - if (_iconView->findItem(n)) { - int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that wallet already exists. Try a new name?"), TQString::null, i18n("Try New"), i18n("Do Not Try")); + if (_iconView->tqfindItem(n)) { + int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that wallet already exists. Try a new name?"), TQString(), i18n("Try New"), i18n("Do Not Try")); if (rc == KMessageBox::Yes) { continue; } - n = TQString::null; + n = TQString(); } else if (regexp.exactMatch(n)) { break; } else { diff --git a/kwallet/kwalletmanager.h b/kwallet/kwalletmanager.h index afb083e..922da8f 100644 --- a/kwallet/kwalletmanager.h +++ b/kwallet/kwalletmanager.h @@ -32,10 +32,11 @@ class DCOPRef; class KWalletManager : public KMainWindow, public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP public: - KWalletManager(TQWidget *parent = 0, const char* name = 0, WFlags f = 0); + KWalletManager(TQWidget *tqparent = 0, const char* name = 0, WFlags f = 0); virtual ~KWalletManager(); TQPixmap loadSystemTrayIcon(const TQString &icon); diff --git a/kwallet/kwalletpopup.cpp b/kwallet/kwalletpopup.cpp index bd5e75d..592c10e 100644 --- a/kwallet/kwalletpopup.cpp +++ b/kwallet/kwalletpopup.cpp @@ -28,21 +28,21 @@ #include <kwallet.h> #include <kstdguiitem.h> -KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char *name) -: KPopupMenu(parent, name), _walletName(wallet) { +KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *tqparent, const char *name) +: KPopupMenu(tqparent, name), _walletName(wallet) { insertTitle(wallet); KActionCollection *ac = new KActionCollection(this, "kwallet context actions"); KAction *act; - act = new KAction(i18n("&New Wallet..."), 0, 0, this, + act = new KAction(i18n("&New Wallet..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(createWallet()), ac, "wallet_create"); act->plug(this); - act = new KAction(i18n("&Open..."), 0, Key_Return, this, + act = new KAction(i18n("&Open..."), 0, Key_Return, TQT_TQOBJECT(this), TQT_SLOT(openWallet()), ac, "wallet_open"); act->plug(this); - act = new KAction(i18n("Change &Password..."), 0, 0, this, + act = new KAction(i18n("Change &Password..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(changeWalletPassword()), ac, "wallet_password"); act->plug(this); @@ -60,14 +60,14 @@ KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char insertItem(i18n("Disconnec&t"), pm); } - act = KStdAction::close( this, + act = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT(closeWallet()), ac, "wallet_close"); // FIXME: let's track this inside the manager so we don't need a dcop // roundtrip here. act->setEnabled(KWallet::Wallet::isOpen(wallet)); act->plug(this); - act = new KAction(i18n("&Delete"), 0, Key_Delete, this, + act = new KAction(i18n("&Delete"), 0, Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(deleteWallet()), ac, "wallet_delete"); act->plug(this); } diff --git a/kwallet/kwalletpopup.h b/kwallet/kwalletpopup.h index 36a2d8f..3d5d83c 100644 --- a/kwallet/kwalletpopup.h +++ b/kwallet/kwalletpopup.h @@ -26,9 +26,10 @@ class KWalletPopup : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: - KWalletPopup(const TQString& wallet, TQWidget *parent = 0, const char* name = 0); + KWalletPopup(const TQString& wallet, TQWidget *tqparent = 0, const char* name = 0); virtual ~KWalletPopup(); public slots: diff --git a/kwallet/kwmapeditor.cpp b/kwallet/kwmapeditor.cpp index b6cbb50..3051e6c 100644 --- a/kwallet/kwmapeditor.cpp +++ b/kwallet/kwmapeditor.cpp @@ -31,15 +31,15 @@ #include <tqpushbutton.h> #include <tqtextedit.h> -KWMapEditor::KWMapEditor(TQMap<TQString,TQString>& map, TQWidget *parent, const char *name) -: TQTable(0, 3, parent, name), _map(map) { +KWMapEditor::KWMapEditor(TQMap<TQString,TQString>& map, TQWidget *tqparent, const char *name) +: TQTable(0, 3, tqparent, name), _map(map) { _ac = new KActionCollection(this); - _copyAct = KStdAction::copy(this, TQT_SLOT(copy()), _ac); + _copyAct = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), _ac); connect(this, TQT_SIGNAL(valueChanged(int,int)), this, TQT_SIGNAL(dirty())); connect(this, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), this, TQT_SLOT(contextMenu(int,int,const TQPoint&))); setSelectionMode(TQTable::NoSelection); - horizontalHeader()->setLabel(0, TQString::null); + horizontalHeader()->setLabel(0, TQString()); horizontalHeader()->setLabel(1, i18n("Key")); horizontalHeader()->setLabel(2, i18n("Value")); setColumnWidth(0, 20); // FIXME: this is arbitrary @@ -76,9 +76,9 @@ KWMapEditor::~KWMapEditor() { void KWMapEditor::erase() { - const TQObject *o = sender(); + const TQObject *o = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); for (int i = 0; i < numRows(); i++) { - if (cellWidget(i, 0) == o) { + if (TQT_BASE_OBJECT_CONST(cellWidget(i, 0)) == TQT_BASE_OBJECT_CONST(o)) { removeRow(i); break; } @@ -125,7 +125,7 @@ void KWMapEditor::contextMenu(int row, int col, const TQPoint& pos) { void KWMapEditor::copy() { - TQApplication::clipboard()->setText(text(_contextRow, 2)); + TQApplication::tqclipboard()->setText(text(_contextRow, 2)); } @@ -140,9 +140,9 @@ class InlineEditor : public TQTextEdit { virtual ~InlineEditor() { if (!_p) return; _p->setText(row, col, text()); _p->emitDirty(); } protected: - virtual void focusOutEvent(TQFocusEvent*) { - if (TQFocusEvent::reason() == TQFocusEvent::Popup) { - TQWidget *focusW = qApp->focusWidget(); + virtual void focusOutEvent(TQFocusEvent* fe) { + if (fe->reason() == TQFocusEvent::Popup) { + TQWidget *focusW = tqApp->tqfocusWidget(); if (focusW && focusW == popup) { return; } @@ -150,7 +150,7 @@ class InlineEditor : public TQTextEdit { close(); } virtual void keyPressEvent(TQKeyEvent *e) { - if (e->key() == Qt::Key_Escape) { + if (e->key() == TQt::Key_Escape) { e->accept(); close(); } else { @@ -168,10 +168,10 @@ class InlineEditor : public TQTextEdit { }; -TQWidget *KWMapEditor::beginEdit(int row, int col, bool replace) { +TQWidget *KWMapEditor::beginEdit(int row, int col, bool tqreplace) { //kdDebug(2300) << "EDIT COLUMN " << col << endl; if (col != 2) { - return TQTable::beginEdit(row, col, replace); + return TQTable::beginEdit(row, col, tqreplace); } TQRect geo = cellGeometry(row, col); diff --git a/kwallet/kwmapeditor.h b/kwallet/kwmapeditor.h index abd835f..7d1fe44 100644 --- a/kwallet/kwmapeditor.h +++ b/kwallet/kwmapeditor.h @@ -29,9 +29,10 @@ class KActionCollection; class KWMapEditor : public TQTable { Q_OBJECT + TQ_OBJECT public: - KWMapEditor(TQMap<TQString,TQString>& map, TQWidget *parent = 0, const char *name = 0); + KWMapEditor(TQMap<TQString,TQString>& map, TQWidget *tqparent = 0, const char *name = 0); virtual ~KWMapEditor(); public slots: @@ -46,7 +47,7 @@ class KWMapEditor : public TQTable { void copy(); protected: - virtual TQWidget *beginEdit(int row, int col, bool replace); + virtual TQWidget *beginEdit(int row, int col, bool tqreplace); signals: void dirty(); diff --git a/kwallet/walletwidget.ui b/kwallet/walletwidget.ui index 13c6f71..07bd5d0 100644 --- a/kwallet/walletwidget.ui +++ b/kwallet/walletwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WalletWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WalletWidget</cstring> </property> @@ -19,14 +19,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QSplitter" row="0" column="0"> + <widget class="TQSplitter" row="0" column="0"> <property name="name"> <cstring>_splitter</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>_entryListFrame</cstring> </property> @@ -45,9 +45,9 @@ <enum>Plain</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -82,14 +82,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>227</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton" row="3" column="1"> + <widget class="TQPushButton" row="3" column="1"> <property name="name"> <cstring>_undoChanges</cstring> </property> @@ -103,15 +103,15 @@ <iconset>"undo"</iconset> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>_iconTitle</cstring> </property> @@ -127,7 +127,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>_entryTitle</cstring> </property> @@ -150,13 +150,13 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> </hbox> </widget> - <widget class="QPushButton" row="3" column="2"> + <widget class="TQPushButton" row="3" column="2"> <property name="name"> <cstring>_saveChanges</cstring> </property> @@ -170,7 +170,7 @@ <iconset>"filesave"</iconset> </property> </widget> - <widget class="QWidgetStack" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQWidgetStack" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>_entryStack</cstring> </property> @@ -182,7 +182,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -190,7 +190,7 @@ <number>0</number> </attribute> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -204,7 +204,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTextEdit" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQTextEdit" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>_passwordValue</cstring> </property> @@ -222,14 +222,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>271</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>_hideContents</cstring> </property> @@ -239,7 +239,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -247,7 +247,7 @@ <number>2</number> </attribute> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -261,14 +261,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>This is a binary data entry. It cannot be editted as its format is unknown and application specific.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -282,7 +282,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>41</height> @@ -299,7 +299,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>41</height> @@ -316,7 +316,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>41</height> @@ -333,7 +333,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -342,7 +342,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -366,7 +366,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>236</width> <height>21</height> @@ -383,14 +383,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>358</height> </size> </property> </spacer> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>_showContents</cstring> </property> @@ -411,6 +411,6 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/superkaramba/doc/faq/faq.dat b/superkaramba/doc/faq/faq.dat index c54194d..20ee7e7 100644 --- a/superkaramba/doc/faq/faq.dat +++ b/superkaramba/doc/faq/faq.dat @@ -7,7 +7,7 @@ <a>You will need to install the python-devel package. Once that package is installed you can ./configure and make again. <c>Installation -<q>When I try to compile, I get this error: "cannot find -lselinux" +<q>When I try to compile, I get this error: "cannot tqfind -lselinux" <a>You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again. <c>Installation diff --git a/superkaramba/doc/faq/faq.html b/superkaramba/doc/faq/faq.html index 1e68240..5a2d830 100644 --- a/superkaramba/doc/faq/faq.html +++ b/superkaramba/doc/faq/faq.html @@ -17,7 +17,7 @@ SuperKaramba Frequently Asked Questions <dd><ul> <li><a href="#Installation0">1.1. Where can I find SuperKaramba RPMs?</a></li> <li><a href="#Installation1">1.2. When I try to compile, I get this error: "Python.h: No such file or directory"</a></li> -<li><a href="#Installation2">1.3. When I try to compile, I get this error: "cannot find -lselinux"</a></li> +<li><a href="#Installation2">1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"</a></li> <li><a href="#Installation3">1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found".</a></li> </ul></dd> <dt><b>2. General</b></dt> @@ -46,7 +46,7 @@ SuperKaramba Frequently Asked Questions <dd>The SuperKaramba web site (<a href="http://netdragon.sourceforge.net">http://netdragon.sourceforge.net</a>) has a list of user-submitted RPMs for several distributions. Other user-submitted RPMs have been posted to <a href="http://www.kde-look.org">kde-look.org</a> and to the SuperKaramba Help forum.<br><br></dd> <dt><b><a name="Installation1">1.2. When I try to compile, I get this error: "Python.h: No such file or directory"</a></b></dt> <dd>You will need to install the python-devel package. Once that package is installed you can ./configure and make again.<br><br></dd> -<dt><b><a name="Installation2">1.3. When I try to compile, I get this error: "cannot find -lselinux"</a></b></dt> +<dt><b><a name="Installation2">1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"</a></b></dt> <dd>You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again.<br><br></dd> <dt><b><a name="Installation3">1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found".</a></b></dt> <dd>In some distributions ./configure points to different path than you might expect. For example, in Mandrake the default ./configure prefix is /usr/local/kde and the executable is installed in /usr/local/kde/bin. There are a few things you can do to fix this. You could run ./configure --prefix=/usr to specify the prefix that you prefer and then try make and make install again. Or you could create a symbolic link in your preferred directory that links to the executable. Or you could add the install directory to your $PATH.<br><br></dd> diff --git a/superkaramba/doc/faq/faq.txt b/superkaramba/doc/faq/faq.txt index 9de445e..490696b 100644 --- a/superkaramba/doc/faq/faq.txt +++ b/superkaramba/doc/faq/faq.txt @@ -13,7 +13,7 @@ Table of Contents 1.1. Where can I find SuperKaramba RPMs? 1.2. When I try to compile, I get this error: "Python.h: No such file or directory" -1.3. When I try to compile, I get this error: "cannot find -lselinux" +1.3. When I try to compile, I get this error: "cannot tqfind -lselinux" 1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found". @@ -51,7 +51,7 @@ The SuperKaramba web site (http://netdragon.sourceforge.net) has a list of user- You will need to install the python-devel package. Once that package is installed you can ./configure and make again. -1.3. When I try to compile, I get this error: "cannot find -lselinux" +1.3. When I try to compile, I get this error: "cannot tqfind -lselinux" You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again. diff --git a/superkaramba/doc/python_api/make_api_doc.sh b/superkaramba/doc/python_api/make_api_doc.sh index 866c534..719d05e 100755 --- a/superkaramba/doc/python_api/make_api_doc.sh +++ b/superkaramba/doc/python_api/make_api_doc.sh @@ -25,7 +25,7 @@ function replaceComments() } -FOO=`find $SRCDIR -type f -name "*_python.h"` +FOO=`tqfind $SRCDIR -type f -name "*_python.h"` for FILE in $FOO do diff --git a/superkaramba/examples/api.html b/superkaramba/examples/api.html index 132544a..14c2263 100644 --- a/superkaramba/examples/api.html +++ b/superkaramba/examples/api.html @@ -165,7 +165,7 @@ Widget/createWidgetMask</a></h2> <p>[<a href="#robo_top_of_doc">top</a>]</p> <p><strong>SYNOPSIS</strong></p> -<span class="SYNOPSIS"><p> long <strong>createWidgetMask</strong>(widget, mask) +<span class="SYNOPSIS"><p> long <strong>createWidgetMask</strong>(widget, tqmask) </p> </span><p><strong>DESCRIPTION</strong></p> <span class="DESCRIPTION"><p> This function doesn't work currently due to a bug in KDE. Please use @@ -174,7 +174,7 @@ Widget/createWidgetMask</a></h2> </span><p><strong>ARGUMENTS</strong></p> <span class="ARGUMENTS"><ul><li> long widget -- karamba </li> -<li> string mask -- The name of the widget mask file. +<li> string tqmask -- The name of the widget tqmask file. </li> </ul> <p></p> @@ -2096,7 +2096,7 @@ Misc/translateAll</a></h2> </p> </span><p><strong>DESCRIPTION</strong></p> <span class="DESCRIPTION"><p> Moves all widgets within a theme in a particular direction relative from - the previous spot without moving the parent theme widget. + the previous spot without moving the tqparent theme widget. </p> </span><p><strong>ARGUMENTS</strong></p> <span class="ARGUMENTS"><ul><li> long widget -- karamba diff --git a/superkaramba/examples/globalMouse/extension/xcursor.c b/superkaramba/examples/globalMouse/extension/xcursor.c index 8dad240..3de7ae3 100644 --- a/superkaramba/examples/globalMouse/extension/xcursor.c +++ b/superkaramba/examples/globalMouse/extension/xcursor.c @@ -47,7 +47,7 @@ static PyObject* xcursor_position(self, args) char* display_name; int root_x_return, root_y_return; int win_x_return, win_y_return; - unsigned int mask_return; + unsigned int tqmask_return; if (! (display_name = getenv("DISPLAY")) ) { @@ -83,7 +83,7 @@ static PyObject* xcursor_position(self, args) XQueryPointer(display, root, &root_return, &child_return, &root_x_return, &root_y_return, &win_x_return, &win_y_return, - &mask_return); + &tqmask_return); /* return Python Object */ return Py_BuildValue("(i,i)", root_x_return, root_y_return); diff --git a/superkaramba/examples/globalMouse/eyes.py b/superkaramba/examples/globalMouse/eyes.py index b95f86d..64bc3e0 100644 --- a/superkaramba/examples/globalMouse/eyes.py +++ b/superkaramba/examples/globalMouse/eyes.py @@ -108,7 +108,7 @@ def widgetUpdated(widget): #f.close() - #karamba.createWidgetMask(widget, theme_path + "pics/mask.png") + #karamba.createWidgetMask(widget, theme_path + "pics/tqmask.png") linkePupille = karamba.createImage(widget, 15, 30, theme_path + "pics/pupille.png") rechtePupille = karamba.createImage(widget, 100, 30, theme_path + "pics/pupille.png") diff --git a/superkaramba/examples/globalMouse/eyes.theme b/superkaramba/examples/globalMouse/eyes.theme index 4f2417b..ffdff73 100644 --- a/superkaramba/examples/globalMouse/eyes.theme +++ b/superkaramba/examples/globalMouse/eyes.theme @@ -1,3 +1,3 @@ -KARAMBA X=5 Y=850 W=167 H=111 MASK="pics/mask.png" LOCKED=false INTERVAL=100 +KARAMBA X=5 Y=850 W=167 H=111 MASK="pics/tqmask.png" LOCKED=false INTERVAL=100 IMAGE X=0 Y=0 PATH="pics/eyes.png" diff --git a/superkaramba/examples/richtext/richtext.py b/superkaramba/examples/richtext/richtext.py index 518aa65..11fe9d7 100644 --- a/superkaramba/examples/richtext/richtext.py +++ b/superkaramba/examples/richtext/richtext.py @@ -1,6 +1,6 @@ #Unicode Example -#For Symbol Tables look at www.unicode.org/charts/ +#For Symbol Tables look at www.tqunicode.org/charts/ hidden = 0 @@ -35,7 +35,7 @@ is used to encode the formatting commands.</p> <li>Hyperlinks: <a href="kfmclient openURL http://netdragon.sourceforge.net"> Superkaramba Homepage</a></li> <li>Links can also <a href="#trigger">trigger</a> actions in the script</li> <li><i>Various</i> <b>different</b> <u>caracter</u> <s>styles</s></li> -<li><a href="kfmclient openURL http://www.unicode.org">Unicode</a>: \u03B6 \u03B3 \u03BB \u03A3 \u03A9 </li> +<li><a href="kfmclient openURL http://www.tqunicode.org">Unicode</a>: \u03B6 \u03B3 \u03BB \u03A3 \u03A9 </li> <li>Simple Tables: <table bgcolor="darkgray" border="1" width="80%"> <tr><th colspan="3">Header</th></tr> diff --git a/superkaramba/examples/taskBar/cleanbar/cleanbar.py b/superkaramba/examples/taskBar/cleanbar/cleanbar.py index c0da2a2..40478c0 100644 --- a/superkaramba/examples/taskBar/cleanbar/cleanbar.py +++ b/superkaramba/examples/taskBar/cleanbar/cleanbar.py @@ -43,9 +43,9 @@ i = 0 for x in output: param = x.split() if (len(param) > 1): - if param[0].find("Width:") != -1: + if param[0].tqfind("Width:") != -1: resX = int(param[1]) - if param[0].find("Height:") != -1: + if param[0].tqfind("Height:") != -1: resY = int(param[1]) diff --git a/superkaramba/examples/test_all.sh b/superkaramba/examples/test_all.sh index 5e95063..cdf192d 100755 --- a/superkaramba/examples/test_all.sh +++ b/superkaramba/examples/test_all.sh @@ -10,7 +10,7 @@ themes=( "richtext/richtext.theme" "richtext/rtext.theme" "globalMouse/eyes.theme" - "unicode/unicode.theme" + "tqunicode/tqunicode.theme" "mouseDrag/karmix/karmix.theme" "input_api/input_api.theme" "input_example/input_example.theme" diff --git a/superkaramba/examples/unicode/unicode.py b/superkaramba/examples/unicode/unicode.py index 13d1136..1a15f83 100644 --- a/superkaramba/examples/unicode/unicode.py +++ b/superkaramba/examples/unicode/unicode.py @@ -1,6 +1,6 @@ #Unicode Example -#For Symbol Tables look at www.unicode.org/charts/ +#For Symbol Tables look at www.tqunicode.org/charts/ #this import statement allows access to the karamba functions @@ -31,8 +31,8 @@ def initWidget(widget): \u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646 \u0647\u0648\u064A <p> -For a complete reference on unicode caracter codes look at: -<center><a href="kfmclient openURL http://www.unicode.org/charts/">www.unicode.org/charts/</a></center> +For a complete reference on tqunicode caracter codes look at: +<center><a href="kfmclient openURL http://www.tqunicode.org/charts/">www.tqunicode.org/charts/</a></center> </p> """ karamba.resizeWidget(widget, 400, 400) diff --git a/superkaramba/src/bar.h b/superkaramba/src/bar.h index eb4b831..78f9ff3 100644 --- a/superkaramba/src/bar.h +++ b/superkaramba/src/bar.h @@ -18,6 +18,7 @@ class Bar : public Meter { Q_OBJECT + TQ_OBJECT public: Bar(karamba* k,int ix,int iy,int iw,int ih ); ~Bar(); diff --git a/superkaramba/src/clickarea.cpp b/superkaramba/src/clickarea.cpp index c2ca63e..986ae4b 100644 --- a/superkaramba/src/clickarea.cpp +++ b/superkaramba/src/clickarea.cpp @@ -27,7 +27,7 @@ ClickArea::~ClickArea() bool ClickArea::click( TQMouseEvent *e ) { - if( rect.contains( e->x(), e->y() ) ) + if( rect.tqcontains( e->x(), e->y() ) ) { //qDebug(TQString::number(e->type())); //KShellProcess ksp; @@ -44,7 +44,7 @@ bool ClickArea::click( TQMouseEvent *e ) { TQString program; program = onClick; - program.replace( TQRegExp("%v", false), value ); + program.tqreplace( TQRegExp("%v", false), value ); if( !program.isEmpty() ) { diff --git a/superkaramba/src/clickarea.h b/superkaramba/src/clickarea.h index 6719794..3df44b8 100644 --- a/superkaramba/src/clickarea.h +++ b/superkaramba/src/clickarea.h @@ -40,6 +40,7 @@ class ClickArea : public Meter { Q_OBJECT + TQ_OBJECT public: ClickArea(karamba* k, int x, int y, int w, int h ); diff --git a/superkaramba/src/clickmap.cpp b/superkaramba/src/clickmap.cpp index 2189916..34f74e9 100644 --- a/superkaramba/src/clickmap.cpp +++ b/superkaramba/src/clickmap.cpp @@ -19,7 +19,7 @@ ClickMap::ClickMap(karamba* k, int x, int y, int w, int h ) if( h != 0 || w != 0) clip = 0; else - clip = Qt::DontClip; + clip = TQt::DontClip; */ if( h == 0 || w == 0) @@ -41,7 +41,7 @@ void ClickMap::setTextProps( TextField *t ) bool ClickMap::click( TQMouseEvent *e ) { //Don't load the web page if the click isn't for us - if (boundingBox.contains(e->x(), e->y())) { + if (boundingBox.tqcontains(e->x(), e->y())) { int index = ((e -> y() - getY()) / text.getLineHeight()) + 1; if (index >= 1 && index <= (int)displays.count()) { @@ -63,7 +63,7 @@ void ClickMap::mUpdate( TQPainter *p ) while( it != displays.end() && (row <= getHeight() || getHeight() == -1 ) ) { p->setPen( text.getColor() ); - // p->drawText(x,y+i,width,height, Qt::AlignCenter | Qt::ExpandTabs, *it); + // p->drawText(x,y+i,width,height, TQt::AlignCenter | TQt::ExpandTabs, *it); p->drawText(getX(), getY() + i + text.getLineHeight(), *it); i += text.getLineHeight(); it++; diff --git a/superkaramba/src/clickmap.h b/superkaramba/src/clickmap.h index ee802f7..fecb2a0 100644 --- a/superkaramba/src/clickmap.h +++ b/superkaramba/src/clickmap.h @@ -23,6 +23,7 @@ class ClickMap : public Meter { Q_OBJECT + TQ_OBJECT public: ClickMap(karamba* k, int x, int y, int w, int h); ~ClickMap(); diff --git a/superkaramba/src/config_python.cpp b/superkaramba/src/config_python.cpp index 1a094eb..0b9b34b 100644 --- a/superkaramba/src/config_python.cpp +++ b/superkaramba/src/config_python.cpp @@ -172,7 +172,7 @@ PyObject* py_read_config_entry(PyObject *, PyObject *args) return Py_BuildValue((char*)"l", i); } - if (type == "TQString") + if (type == TQSTRING_OBJECT_NAME_STRING) { return Py_BuildValue((char*)"s", entry.toString().ascii()); } diff --git a/superkaramba/src/cpusensor.cpp b/superkaramba/src/cpusensor.cpp index 1cf9a06..164572c 100644 --- a/superkaramba/src/cpusensor.cpp +++ b/superkaramba/src/cpusensor.cpp @@ -145,12 +145,12 @@ void CPUSensor::update() { format = "%v"; } - format.replace( TQRegExp("%load", false), TQString::number( load ) ); - format.replace( TQRegExp("%user", false), TQString::number( user ) ); - format.replace( TQRegExp("%nice", false), TQString::number( nice ) ); - format.replace( TQRegExp("%idle", false), TQString::number( idle ) ); - format.replace( TQRegExp("%system", false), TQString::number( system ) ); - format.replace( TQRegExp("%v", false), TQString::number( load ) ); + format.tqreplace( TQRegExp("%load", false), TQString::number( load ) ); + format.tqreplace( TQRegExp("%user", false), TQString::number( user ) ); + format.tqreplace( TQRegExp("%nice", false), TQString::number( nice ) ); + format.tqreplace( TQRegExp("%idle", false), TQString::number( idle ) ); + format.tqreplace( TQRegExp("%system", false), TQString::number( system ) ); + format.tqreplace( TQRegExp("%v", false), TQString::number( load ) ); meter->setValue( format ); ++it; diff --git a/superkaramba/src/cpusensor.h b/superkaramba/src/cpusensor.h index ce9840b..70e06dd 100644 --- a/superkaramba/src/cpusensor.h +++ b/superkaramba/src/cpusensor.h @@ -17,6 +17,7 @@ class CPUSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: CPUSensor( TQString cpuNbr, int interval ); ~CPUSensor(); diff --git a/superkaramba/src/datesensor.cpp b/superkaramba/src/datesensor.cpp index 6ca4e20..24e3156 100644 --- a/superkaramba/src/datesensor.cpp +++ b/superkaramba/src/datesensor.cpp @@ -20,7 +20,7 @@ DateSensor::~DateSensor() void DateSensor::update() { - TQDateTime qdt = TQDateTime::currentDateTime(); + TQDateTime qdt = TQDateTime::tqcurrentDateTime(); TQString format; SensorParams *sp; Meter *meter; @@ -48,8 +48,8 @@ void DateSensor::slotCalendarDeleted() } -DatePicker::DatePicker(TQWidget *parent) - : TQVBox( parent, 0, WType_TopLevel | WDestructiveClose | +DatePicker::DatePicker(TQWidget *tqparent) + : TQVBox( tqparent, 0, WType_TopLevel | WDestructiveClose | WStyle_Customize | WStyle_StaysOnTop | WStyle_NoBorder ) { setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); @@ -65,7 +65,7 @@ DatePicker::DatePicker(TQWidget *parent) void DatePicker::keyReleaseEvent(TQKeyEvent *e) { TQVBox::keyReleaseEvent(e); - if (e->key() == Qt::Key_Escape) + if (e->key() == TQt::Key_Escape) close(); } @@ -80,7 +80,7 @@ void DateSensor::toggleCalendar(TQMouseEvent *ev) TQString height = sp->getParam("CALHEIGHT"); TQRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt()); - if (rect.contains( ev->x(), ev->y() )) + if (rect.tqcontains( ev->x(), ev->y() )) { if (hidden) { @@ -90,8 +90,8 @@ void DateSensor::toggleCalendar(TQMouseEvent *ev) connect(cal, TQT_SIGNAL(destroyed()), TQT_SLOT(slotCalendarDeleted())); TQPoint c = (TQPoint(ev->x(), ev->y())); - int w = cal->sizeHint().width(); - int h = cal->sizeHint().height(); + int w = cal->tqsizeHint().width(); + int h = cal->tqsizeHint().height(); // make calendar fully visible TQRect deskR = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(c)); @@ -117,7 +117,7 @@ void DateSensor::mousePressEvent(TQMouseEvent *ev) { switch (ev->button()) { - case TQMouseEvent::LeftButton: + case Qt::LeftButton: toggleCalendar(ev); break; default: diff --git a/superkaramba/src/datesensor.h b/superkaramba/src/datesensor.h index a761d6b..24d74d6 100644 --- a/superkaramba/src/datesensor.h +++ b/superkaramba/src/datesensor.h @@ -15,7 +15,7 @@ #include <kdatepicker.h> #include <tqvbox.h> -class DatePicker : public QVBox +class DatePicker : public TQVBox { public: DatePicker(TQWidget*); @@ -27,6 +27,7 @@ private: class DateSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: DateSensor( int interval ); ~DateSensor(); diff --git a/superkaramba/src/disksensor.cpp b/superkaramba/src/disksensor.cpp index b53c6e3..a896ebe 100644 --- a/superkaramba/src/disksensor.cpp +++ b/superkaramba/src/disksensor.cpp @@ -114,31 +114,31 @@ void DiskSensor::processExited(KProcess *) { format = "%u"; } - format.replace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt))); - format.replace( TQRegExp("%fg",false), + format.tqreplace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt))); + format.tqreplace( TQRegExp("%fg",false), TQString::number(getFreeSpace(mntPt)/(1024*1024))); - format.replace( TQRegExp("%fkb",false), + format.tqreplace( TQRegExp("%fkb",false), TQString::number(getFreeSpace(mntPt)*8) ); - format.replace( TQRegExp("%fk",false), + format.tqreplace( TQRegExp("%fk",false), TQString::number(getFreeSpace(mntPt)) ); - format.replace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024)); + format.tqreplace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024)); - format.replace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt))); - format.replace( TQRegExp("%ug",false), + format.tqreplace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt))); + format.tqreplace( TQRegExp("%ug",false), TQString::number(getUsedSpace(mntPt)/(1024*1024))); - format.replace( TQRegExp("%ukb",false), + format.tqreplace( TQRegExp("%ukb",false), TQString::number(getUsedSpace(mntPt)*8) ); - format.replace( TQRegExp("%uk",false), + format.tqreplace( TQRegExp("%uk",false), TQString::number(getUsedSpace(mntPt)) ); - format.replace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024)); + format.tqreplace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024)); - format.replace( TQRegExp("%tg",false), + format.tqreplace( TQRegExp("%tg",false), TQString::number(getTotalSpace(mntPt)/(1024*1024))); - format.replace( TQRegExp("%tkb",false), + format.tqreplace( TQRegExp("%tkb",false), TQString::number(getTotalSpace(mntPt)*8)); - format.replace( TQRegExp("%tk",false), + format.tqreplace( TQRegExp("%tk",false), TQString::number(getTotalSpace(mntPt))); - format.replace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024)); + format.tqreplace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024)); meter->setValue(format); ++lit; } diff --git a/superkaramba/src/disksensor.h b/superkaramba/src/disksensor.h index d42c9ef..0fb2023 100644 --- a/superkaramba/src/disksensor.h +++ b/superkaramba/src/disksensor.h @@ -19,6 +19,7 @@ class DiskSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: DiskSensor(int msec ); ~DiskSensor(); diff --git a/superkaramba/src/graph.h b/superkaramba/src/graph.h index a2c164f..6e89c57 100644 --- a/superkaramba/src/graph.h +++ b/superkaramba/src/graph.h @@ -18,6 +18,7 @@ class Graph : public Meter { Q_OBJECT + TQ_OBJECT public: Graph(karamba* k, int ix, int iy, int iw, int ih, int nbrPoints); diff --git a/superkaramba/src/imagelabel.cpp b/superkaramba/src/imagelabel.cpp index ef38ec0..9c5705c 100644 --- a/superkaramba/src/imagelabel.cpp +++ b/superkaramba/src/imagelabel.cpp @@ -86,15 +86,15 @@ ChannelIntensity::ChannelIntensity(ImageLabel* img, float r, TQString c, ratio = (ratio < -1) ? -1 : ratio; channel = 0; - if (c.find("red", 0 , false)) + if (c.tqfind("red", 0 , false)) { channel = 0; } - else if (c.find("green", 0, false)) + else if (c.tqfind("green", 0, false)) { channel = 1; } - else if (c.find("blue", 0, false)) + else if (c.tqfind("blue", 0, false)) { channel = 2; } @@ -384,7 +384,7 @@ void ImageLabel::mUpdate(TQPainter* p) bool ImageLabel::click(TQMouseEvent* e) { - if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled()) + if (getBoundingBox().tqcontains(e -> x(), e -> y()) && isEnabled()) { TQString program; if (e -> button() == Qt::LeftButton) @@ -446,7 +446,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff, { TQString tmpFile; #if defined(KDE_3_2) - if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow())) + if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->tqparentWindow())) #else if(KIO::NetAccess::download(KURL(path), tmpFile)) #endif @@ -494,7 +494,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff, { TQString tmpFile; #if defined(KDE_3_2) - if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow())) + if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->tqparentWindow())) #else if(KIO::NetAccess::download(KURL(path), tmpFile)) #endif @@ -530,7 +530,7 @@ void ImageLabel::rolloverImage(TQMouseEvent *e) if (zoomed) { - if (!rect_off.contains(e->pos())) + if (!rect_off.tqcontains(e->pos())) { // rollover the image to the zoomed image //setValue(fn_roll); @@ -545,7 +545,7 @@ void ImageLabel::rolloverImage(TQMouseEvent *e) } else { - if (rect_off.contains(e->pos())) + if (rect_off.tqcontains(e->pos())) { // rollover the image to the zoomed image //setValue(fn_roll); diff --git a/superkaramba/src/imagelabel.h b/superkaramba/src/imagelabel.h index ebe417d..f27ed24 100644 --- a/superkaramba/src/imagelabel.h +++ b/superkaramba/src/imagelabel.h @@ -41,10 +41,11 @@ class ImageLabel; class KIO::CopyJob; // Abstract Effects Baseclass -class Effect : public QObject +class Effect : public TQObject { Q_OBJECT + TQ_OBJECT public: Effect(ImageLabel*, int millisec); @@ -100,6 +101,7 @@ class ImageLabel : public Meter { Q_OBJECT + TQ_OBJECT public: ImageLabel(karamba* k, int ix,int iy,int iw,int ih ); diff --git a/superkaramba/src/imagelabel_python.cpp b/superkaramba/src/imagelabel_python.cpp index 7cf6d73..9379201 100644 --- a/superkaramba/src/imagelabel_python.cpp +++ b/superkaramba/src/imagelabel_python.cpp @@ -61,7 +61,7 @@ ImageLabel* createImageLabel(karamba *theme, long x, long y, theme->meterList->append (tmp); theme->imageList->append (tmp); if(bg) - theme->kroot->repaint(true); + theme->kroot->tqrepaint(true); return tmp; } diff --git a/superkaramba/src/input.cpp b/superkaramba/src/input.cpp index eae8780..63290cc 100644 --- a/superkaramba/src/input.cpp +++ b/superkaramba/src/input.cpp @@ -35,7 +35,7 @@ Input::~Input() void Input::mUpdate(TQPainter*) { - edit->repaint(); + edit->tqrepaint(); } void Input::setValue(TQString text) @@ -131,7 +131,7 @@ void Input::setFontColor(TQColor fontColor) TQColor Input::getFontColor() const { - const TQColorGroup &color = edit->colorGroup(); + const TQColorGroup &color = edit->tqcolorGroup(); return color.text(); } @@ -144,7 +144,7 @@ void Input::setSelectionColor(TQColor selectionColor) TQColor Input::getSelectionColor() const { - const TQColorGroup &color = edit->colorGroup(); + const TQColorGroup &color = edit->tqcolorGroup(); return color.highlight(); } @@ -157,7 +157,7 @@ void Input::setSelectedTextColor(TQColor selectedTextColor) TQColor Input::getSelectedTextColor() const { - const TQColorGroup &color = edit->colorGroup(); + const TQColorGroup &color = edit->tqcolorGroup(); return color.highlightedText(); } diff --git a/superkaramba/src/input.h b/superkaramba/src/input.h index 0c9ad71..509b66d 100644 --- a/superkaramba/src/input.h +++ b/superkaramba/src/input.h @@ -36,6 +36,7 @@ class Input : public Meter { Q_OBJECT + TQ_OBJECT public: Input(karamba* k, int ix, int iy, int iw, int ih); Input(); diff --git a/superkaramba/src/input_python.cpp b/superkaramba/src/input_python.cpp index d839536..82ed00f 100644 --- a/superkaramba/src/input_python.cpp +++ b/superkaramba/src/input_python.cpp @@ -346,9 +346,9 @@ PyObject* py_getInputFocus(PyObject *, PyObject *args) // FocusWidget() returns the currently focused line edit, // but unfortunately we need an 'Input' object here. // - TQWidget *obj = ((karamba*)widget)->focusWidget(); + TQWidget *obj = ((karamba*)widget)->tqfocusWidget(); - if(obj->isA(TQLINEEDIT_OBJECT_NAME_STRING)) // SKLineEdit is no Q_Object, but TQLineEdit can only be here as a SKLineEdit + if(obj->isA(TQLINEEDIT_OBJECT_NAME_STRING)) // SKLineEdit is no TQ_Object, but TQLineEdit can only be here as a SKLineEdit return Py_BuildValue((char*)"l", ((SKLineEdit*)obj)->getInput()); return Py_BuildValue((char*)"l", 0); diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp index fb90a45..6717b85 100644 --- a/superkaramba/src/karamba.cpp +++ b/superkaramba/src/karamba.cpp @@ -51,7 +51,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, bool sub_theme): - TQWidget(0,"karamba", Qt::WGroupLeader | WStyle_Customize | + TQWidget(0,"karamba", TQt::WGroupLeader | WStyle_Customize | WRepaintNoErase| WStyle_NoBorder | WDestructiveClose ), meterList(0), imageList(0), clickList(0), kpop(0), widgetMask(0), config(0), kWinModule(0), tempUnit('C'), m_instance(instance), @@ -70,7 +70,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, KURL url; - if(fn.find('/') == -1) + if(fn.tqfind('/') == -1) url.setFileName(fn); else url = fn; @@ -85,7 +85,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, karambaApp->addKaramba(this, reloading); if(prettyName.isEmpty()) - prettyName = TQString("%1 - %2").arg(m_theme.name()).arg(m_instance); + prettyName = TQString("%1 - %2").tqarg(m_theme.name()).tqarg(m_instance); kdDebug() << "Starting theme: " << m_theme.name() << " pretty name: " << prettyName << endl; @@ -111,7 +111,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, // Creates KConfig Object TQString instanceString; if(m_instance > 1) - instanceString = TQString("-%1").arg(m_instance); + instanceString = TQString("-%1").tqarg(m_instance); TQString cfg = TQDir::home().absPath() + "/.superkaramba/" + m_theme.id() + instanceString + ".rc"; kdDebug() << cfg << endl; @@ -170,7 +170,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, toDesktopMenu = new KPopupMenu (this); toDesktopMenu -> setCheckable(true); mid = toDesktopMenu -> insertItem (i18n("&All Desktops"), - dslot = new DesktopChangeSlot(this,0), + dslot = new DesktopChangeSlot(TQT_TQOBJECT(this),0), TQT_SLOT(receive())); dslot->setMenuId(mid); @@ -181,7 +181,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, name += ('0' + ndesktop); mid = toDesktopMenu -> insertItem (name, - dslot = new DesktopChangeSlot(this, ndesktop), TQT_SLOT(receive())); + dslot = new DesktopChangeSlot(TQT_TQOBJECT(this), ndesktop), TQT_SLOT(receive())); dslot->setMenuId(mid); } @@ -196,7 +196,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, TQT_SLOT(updateSensors()), Key_F5 ); toggleLocked = new KToggleAction ( i18n("Toggle &Locked Position"), SmallIconSet("locked"), - CTRL+Key_L, this, + CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT( slotToggleLocked() ), accColl, "Locked position" ); accColl->insert(toggleLocked); @@ -205,7 +205,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, toggleLocked->plug(kpop); toggleFastTransforms = new KToggleAction(i18n("Use &Fast Image Scaling"), - CTRL+Key_F, this, + CTRL+Key_F, TQT_TQOBJECT(this), TQT_SLOT( slotToggleFastTransforms() ), accColl, "Fast transformations"); @@ -252,7 +252,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, client = kapp->dcopClient(); if (!client->isAttached()) client->attach(); - appId = client->registerAs(qApp->name()); + appId = client->registerAs(tqApp->name()); setBackgroundMode( NoBackground); @@ -314,7 +314,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance, this->setMouseTracking(true); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); } karamba::~karamba() @@ -442,7 +442,7 @@ bool karamba::parseConfig() if(lineParser.getBoolean("MANAGED")) { managed = true; - reparent(0, Qt::WType_Dialog | WStyle_Customize | WStyle_NormalBorder + reparent(0, TQt::WType_Dialog | WStyle_Customize | WStyle_NormalBorder | WRepaintNoErase | WDestructiveClose, pos()); } else @@ -622,7 +622,7 @@ bool karamba::parseConfig() TQColor("white"))); defaultTextField->setFont(lineParser.getString("FONT", "Helvetica")); defaultTextField->setFontSize(lineParser.getInt("FONTSIZE", 12)); - defaultTextField->setAlignment(lineParser.getString("ALIGN", + defaultTextField->tqsetAlignment(lineParser.getString("ALIGN", "LEFT")); defaultTextField->setFixedPitch(lineParser.getBoolean("FIXEDPITCH", false)); @@ -647,7 +647,7 @@ bool karamba::parseConfig() tmpText->setFont(lineParser.getString("FONT", defTxt.getFont())); tmpText->setFontSize(lineParser.getInt("FONTSIZE", defTxt.getFontSize())); - tmpText->setAlignment(lineParser.getString("ALIGN", + tmpText->tqsetAlignment(lineParser.getString("ALIGN", defTxt.getAlignmentAsString())); tmpText->setFixedPitch(lineParser.getInt("FIXEDPITCH", defTxt.getFixedPitch())); @@ -1240,7 +1240,7 @@ void karamba::passMenuOptionChanged(TQString key, bool value) void karamba::setIncomingData(TQString theme, TQString obj) { - KarambaApplication* app = (KarambaApplication*)qApp; + KarambaApplication* app = (KarambaApplication*)tqApp; kdDebug() << "karamba::setIncomingData " << theme << obj << endl; //TQByteArray data; @@ -1260,7 +1260,7 @@ void karamba::setIncomingData(TQString theme, TQString obj) void karamba::callTheme(TQString theme, TQString txt) { - KarambaApplication* app = (KarambaApplication*)qApp; + KarambaApplication* app = (KarambaApplication*)tqApp; kdDebug() << "karamba::callTheme " << theme << txt << endl; //qWarning("karamba::callTheme"); //TQByteArray data; @@ -1338,7 +1338,7 @@ void karamba::passClick(TQMouseEvent *e) { Meter* meter = (Meter*)(*it); // Check if meter is still in list - if (clickList->containsRef(meter) && meter->click(e)) + if (clickList->tqcontainsRef(meter) && meter->click(e)) { // callback meterClicked(e, meter); @@ -1388,7 +1388,7 @@ void karamba::passWheelClick( TQWheelEvent *e ) { Meter* meter = (Meter*)(*it); // Check if meter is still in list - if (clickList->containsRef(meter) && meter->click(&fakeEvent)) + if (clickList->tqcontainsRef(meter) && meter->click(&fakeEvent)) { if (RichTextLabel* richText = dynamic_cast<RichTextLabel*>(meter)) { @@ -1416,7 +1416,7 @@ void karamba::management_popup( void ) void karamba::mousePressEvent( TQMouseEvent *e ) { //qDebug("karamba::mousePressEvent"); - if( e->button() == RightButton && !want_right_button ) + if( e->button() == Qt::RightButton && !want_right_button ) { management_popup(); } @@ -1513,13 +1513,13 @@ void karamba::mouseMoveEvent( TQMouseEvent *e ) // This will work now, but only when you move at least // one pixel in any direction with your mouse. //if( e->button() == Qt::LeftButton ) - if( e->state() == LeftButton) + if( e->state() == Qt::LeftButton) button = 1; //else if( e->button() == Qt::MidButton ) - else if( e->state() == MidButton ) + else if( e->state() == Qt::MidButton ) button = 2; //else if( e->button() == Qt::RightButton ) - else if( e->state() == RightButton ) + else if( e->state() == Qt::RightButton ) button = 3; pythonIface->widgetMouseMoved(this, e->x(), e->y(), button); @@ -1548,7 +1548,7 @@ void karamba::paintEvent ( TQPaintEvent *e) } } TQRect rect = e->rect(); - bitBlt(this,rect.topLeft(),&pm,rect,Qt::CopyROP); + bitBlt(this,rect.topLeft(),&pm,rect,TQt::CopyROP); } void karamba::updateSensors() @@ -1579,11 +1579,11 @@ void karamba::updateBackground(KSharedPixmap* kpm) TQPixmap buffer = TQPixmap(size()); pm = TQPixmap(size()); - buffer.fill(Qt::black); + buffer.fill(TQt::black); TQObjectListIt it( *imageList ); // iterate over meters p.begin(&buffer); - bitBlt(&buffer,0,0,&background,0,Qt::CopyROP); + bitBlt(&buffer,0,0,&background,0,TQt::CopyROP); while ( it != 0 ) { @@ -1595,17 +1595,17 @@ void karamba::updateBackground(KSharedPixmap* kpm) } p.end(); - bitBlt(&pm,0,0,&buffer,0,Qt::CopyROP); + bitBlt(&pm,0,0,&buffer,0,TQt::CopyROP); background = pm; TQPixmap buffer2 = TQPixmap(size()); pm = TQPixmap(size()); - buffer2.fill(Qt::black); + buffer2.fill(TQt::black); TQObjectListIt it2( *meterList ); // iterate over meters p.begin(&buffer2); - bitBlt(&buffer2,0,0,&background,0,Qt::CopyROP); + bitBlt(&buffer2,0,0,&background,0,TQt::CopyROP); while ( it2 != 0 ) { @@ -1614,18 +1614,18 @@ void karamba::updateBackground(KSharedPixmap* kpm) } p.end(); - bitBlt(&pm,0,0,&buffer2,0,Qt::CopyROP); + bitBlt(&pm,0,0,&buffer2,0,TQt::CopyROP); if (systray != 0) { systray->updateBackgroundPixmap(buffer2); } - repaint(); + tqrepaint(); } void karamba::currentDesktopChanged( int i ) { //qDebug("karamba::currentDesktopChanged"); - kroot->repaint( true ); + kroot->tqrepaint( true ); if (pythonIface && pythonIface->isExtensionLoaded()) pythonIface->desktopChanged(this, i); } @@ -1633,7 +1633,7 @@ void karamba::currentDesktopChanged( int i ) void karamba::currentWallpaperChanged(int i ) { //qDebug("karamba::currentWallpaperChanged"); - kroot->repaint( true ); + kroot->tqrepaint( true ); if (pythonIface && pythonIface->isExtensionLoaded()) pythonIface->wallpaperChanged(this, i); } @@ -1646,11 +1646,11 @@ void karamba::externalStep() TQPixmap buffer = TQPixmap(size()); pm = TQPixmap(size()); - buffer.fill(Qt::black); + buffer.fill(TQt::black); TQObjectListIt it( *meterList ); // iterate over meters p.begin(&buffer); - bitBlt(&buffer,0,0,&background,0,Qt::CopyROP); + bitBlt(&buffer,0,0,&background,0,TQt::CopyROP); while ( it != 0 ) { @@ -1659,8 +1659,8 @@ void karamba::externalStep() } p.end(); - bitBlt(&pm,0,0,&buffer,0,Qt::CopyROP); - repaint(); + bitBlt(&pm,0,0,&buffer,0,TQt::CopyROP); + tqrepaint(); } } @@ -1671,12 +1671,12 @@ void karamba::step() { pm = TQPixmap(size()); TQPixmap buffer = TQPixmap(size()); - buffer.fill(Qt::black); + buffer.fill(TQt::black); TQObjectListIt it( *meterList ); // iterate over meters p.begin(&buffer); - bitBlt(&buffer,0,0,&background,0,Qt::CopyROP); + bitBlt(&buffer,0,0,&background,0,TQt::CopyROP); while (it != 0) { @@ -1685,7 +1685,7 @@ void karamba::step() } p.end(); - bitBlt(&pm,0,0,&buffer,0,Qt::CopyROP); + bitBlt(&pm,0,0,&buffer,0,TQt::CopyROP); update(); } @@ -1779,7 +1779,7 @@ void karamba::addMenuConfigOption(TQString key, TQString name) //qDebug("karamba::addMenuConfigOption"); kpop -> setItemEnabled(THEMECONF, true); - SignalBridge* action = new SignalBridge(this, key, menuAccColl); + SignalBridge* action = new SignalBridge(TQT_TQOBJECT(this), key, menuAccColl); KToggleAction* confItem = new KToggleAction (name, KShortcut::null(), action, TQT_SLOT(receive()), menuAccColl, key.ascii()); @@ -1992,8 +1992,8 @@ void karamba::toggleWidgetUpdate( bool b) widgetUpdate = b; } -SignalBridge::SignalBridge(TQObject* parent, TQString name, KActionCollection* ac) - : TQObject(parent, name.ascii()), collection(ac) +SignalBridge::SignalBridge(TQObject* tqparent, TQString name, KActionCollection* ac) + : TQObject(tqparent, name.ascii()), collection(ac) { setName(name.ascii()); } @@ -2004,15 +2004,15 @@ void SignalBridge::receive() isChecked()); } -DesktopChangeSlot::DesktopChangeSlot(TQObject *parent, int id) - : TQObject(parent, "") +DesktopChangeSlot::DesktopChangeSlot(TQObject *tqparent, int id) + : TQObject(tqparent, "") { desktopid = id; } void DesktopChangeSlot::receive() { - karamba *k = (karamba *)parent(); + karamba *k = (karamba *)tqparent(); // XXX - check type cast diff --git a/superkaramba/src/karamba.h b/superkaramba/src/karamba.h index d3e6e4a..cc02030 100644 --- a/superkaramba/src/karamba.h +++ b/superkaramba/src/karamba.h @@ -109,9 +109,10 @@ class KarambaPython; class LineParser; -class karamba : public QWidget +class karamba : public TQWidget { Q_OBJECT + TQ_OBJECT public: karamba(TQString fn, TQString name, bool reloading = false, @@ -141,7 +142,7 @@ public: void changeInterval(int interval); void setWidgetUpdate(bool wu) { widgetUpdate = wu; }; bool getWidgetUpdate() { return widgetUpdate; }; - bool hasMeter(Meter* meter) { return meterList->containsRef(meter) > 0; }; + bool hasMeter(Meter* meter) { return meterList->tqcontainsRef(meter) > 0; }; char getTempUnit() { return tempUnit; }; void addMenuConfigOption(TQString key, TQString name); bool setMenuConfigOption(TQString key, bool value); @@ -196,7 +197,7 @@ protected: private: bool widgetUpdate; - bool repaintInProgress; + bool tqrepaintInProgress; //bool reloading; bool want_right_button; bool want_meter_wheel_event; @@ -323,12 +324,13 @@ private slots: * Slot to receive the event of moving the karamba object * to a new desktop. Generated by karamba::toDesktopMenu items */ -class DesktopChangeSlot : public QObject +class DesktopChangeSlot : public TQObject { Q_OBJECT + TQ_OBJECT public: - DesktopChangeSlot(TQObject *parent, int desktop_id); + DesktopChangeSlot(TQObject *tqparent, int desktop_id); /* Parent should be the karamba object * desktop id of 0 indicates all desktops */ void setMenuId(int id); @@ -343,12 +345,13 @@ class DesktopChangeSlot : public QObject }; /** SignalBridge is an ungulate that lives in the forests of wild Wisconsin. */ -class SignalBridge : public QObject +class SignalBridge : public TQObject { Q_OBJECT + TQ_OBJECT public: - SignalBridge(TQObject* parent, TQString, KActionCollection*); + SignalBridge(TQObject* tqparent, TQString, KActionCollection*); signals: void enabled(TQString, bool); diff --git a/superkaramba/src/karamba_python.cpp b/superkaramba/src/karamba_python.cpp index 746c890..7f865d9 100644 --- a/superkaramba/src/karamba_python.cpp +++ b/superkaramba/src/karamba_python.cpp @@ -125,8 +125,8 @@ static PyMethodDef karamba_methods[] = { {(char*)"getTextColor", py_getTextColor, METH_VARARGS, (char*)"Get a Text Sensor's Color"}, {(char*)"changeTextSize", py_setTextFontSize, METH_VARARGS, (char*)"Change a Text Sensor's Font Size"}, {(char*)"getTextFontSize", py_getTextFontSize, METH_VARARGS, (char*)"Get a Text Sensor's Font Size"}, - {(char*)"getTextAlign", py_getTextAlign, METH_VARARGS, (char*)"Get Text alignment."}, - {(char*)"setTextAlign", py_setTextAlign, METH_VARARGS, (char*)"Set Text alignment."}, + {(char*)"getTextAlign", py_getTextAlign, METH_VARARGS, (char*)"Get Text tqalignment."}, + {(char*)"setTextAlign", py_setTextAlign, METH_VARARGS, (char*)"Set Text tqalignment."}, {(char*)"setTextScroll", py_setTextScroll, METH_VARARGS, (char*)"Set Text scroll."}, // RichTextLabel - richtextlabel_python.cpp @@ -194,7 +194,7 @@ static PyMethodDef karamba_methods[] = { // Widget - widget_python.cpp {(char*)"moveWidget", py_move_widget, METH_VARARGS, (char*)"Move Widget to x,y"}, {(char*)"resizeWidget", py_resize_widget, METH_VARARGS, (char*)"Resize Widget to width,height"}, - {(char*)"createWidgetMask", py_create_widget_mask, METH_VARARGS, (char*)"Create a clipping mask for this widget"}, + {(char*)"createWidgetMask", py_create_widget_tqmask, METH_VARARGS, (char*)"Create a clipping tqmask for this widget"}, {(char*)"redrawWidget", py_redraw_widget, METH_VARARGS, (char*)"Update Widget to reflect your changes"}, {(char*)"redrawWidgetBackground", py_redraw_widget_background, METH_VARARGS, (char*)"Update Widget to reflect background image changes"}, {(char*)"getWidgetPosition", py_get_widget_position, METH_VARARGS, (char*)"Get Widget Position"}, @@ -214,7 +214,7 @@ static PyMethodDef karamba_methods[] = { {(char*)"showSystray", py_show_systray, METH_VARARGS, (char*)"Show the Systray"}, {(char*)"moveSystray", py_move_systray, METH_VARARGS, (char*)"Move the Systray"}, {(char*)"getCurrentWindowCount", py_get_current_window_count, METH_VARARGS, (char*)"Get current Window count"}, - {(char*)"updateSystrayLayout", py_update_systray_layout, METH_VARARGS, (char*)"Update Systray layout"}, + {(char*)"updateSystrayLayout", py_update_systray_layout, METH_VARARGS, (char*)"Update Systray tqlayout"}, // Misc - misc_python.cpp {(char*)"getThemePath", py_get_theme_path, METH_VARARGS, (char*)"Get the file path of the theme"}, @@ -601,7 +601,7 @@ bool KarambaPython::commandFinished(karamba* k, int pid) bool KarambaPython::itemDropped(karamba* k, TQString text, int x, int y) { - PyObject* pArgs = Py_BuildValue((char*)"(lOii)", k, QString2PyString(text), x, y); + PyObject* pArgs = Py_BuildValue((char*)"(lOii)", k, TQString2PyString(text), x, y); return callObject("itemDropped", pArgs); } diff --git a/superkaramba/src/karambaapp.cpp b/superkaramba/src/karambaapp.cpp index 141b2e9..063ac1f 100644 --- a/superkaramba/src/karambaapp.cpp +++ b/superkaramba/src/karambaapp.cpp @@ -71,12 +71,12 @@ TQString KarambaApplication::getMainKaramba() if (dcop.isMainKaramba()) return *it; } - return TQString::null; + return TQString(); } bool KarambaApplication::themeExists(TQString pretty_name) { - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it( *list ); // iterate over the widgets TQWidget * w; while ( (w=it.current()) != 0 ) // for each widget... @@ -296,7 +296,7 @@ void KarambaApplication::addKaramba(karamba* k, bool reloading) karambaApp->dcopClient()->appId(), k->theme().file()); k->setInstance(instance); } - karambaList->append(k); + karambaList->append(TQT_TQOBJECT(k)); } void KarambaApplication::deleteKaramba(karamba* k, bool reloading) @@ -304,12 +304,12 @@ void KarambaApplication::deleteKaramba(karamba* k, bool reloading) if(!reloading && karambaApp->dcopStub()) karambaApp->dcopStub()->themeClosed( karambaApp->dcopClient()->appId(), k->theme().file(), k->instance()); - karambaList->removeRef(k); + karambaList->removeRef(TQT_TQOBJECT(k)); } bool KarambaApplication::hasKaramba(karamba* k) { - return karambaList->containsRef(k) > 0; + return karambaList->tqcontainsRef(TQT_TQOBJECT(k)) > 0; } // XXX: I guess this should be made with mutex/semaphores @@ -380,8 +380,8 @@ void KarambaApplication::quitSuperKaramba() { if(themeListWindow) themeListWindow->saveUserAddedThemes(); - qApp->closeAllWindows(); - qApp->quit(); + tqApp->closeAllWindows(); + tqApp->quit(); } void KarambaApplication::globalQuitSuperKaramba() diff --git a/superkaramba/src/karambaapp.h b/superkaramba/src/karambaapp.h index 9a22adc..9d0f1bb 100644 --- a/superkaramba/src/karambaapp.h +++ b/superkaramba/src/karambaapp.h @@ -26,7 +26,7 @@ #endif #endif -#define karambaApp ((KarambaApplication*)qApp) +#define karambaApp ((KarambaApplication*)tqApp) class karamba; class KarambaIface; @@ -39,6 +39,7 @@ class KAboutData; class KarambaApplication : public KApplication { Q_OBJECT + TQ_OBJECT friend class KarambaIface; @@ -47,7 +48,7 @@ class KarambaApplication : public KApplication KHelpMenu* m_helpMenu; void showKarambaMenuExtension(bool show = true); - void setToolTip(const TQString &tip = TQString::null); + void setToolTip(const TQString &tip = TQString()); protected: KarambaIface* iface; @@ -70,7 +71,7 @@ class KarambaApplication : public KApplication bool startThemes(TQStringList &lst); KarambaIface* dcopIface() { return iface; }; dcopIface_stub* dcopStub() { return dcopIfaceStub; }; - TQWidget* parentWindow() { return (TQWidget*)themeListWindow; }; + TQWidget* tqparentWindow() { return (TQWidget*)themeListWindow; }; void addKaramba(karamba* k, bool reloading = false); void deleteKaramba(karamba* k, bool reloading = false); diff --git a/superkaramba/src/karambainterface.cpp b/superkaramba/src/karambainterface.cpp index 5d33f68..659370a 100644 --- a/superkaramba/src/karambainterface.cpp +++ b/superkaramba/src/karambainterface.cpp @@ -24,7 +24,7 @@ KarambaIface::~KarambaIface() karamba* KarambaIface::getKaramba(TQString name) { - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it(*list); // iterate over the widgets TQWidget* w; karamba* result = 0; @@ -49,7 +49,7 @@ karamba* KarambaIface::getKaramba(TQString name) ThemesDlg* KarambaIface::getThemeWnd() { - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it( *list ); // iterate over the widgets TQWidget* w; ThemesDlg* result = 0; diff --git a/superkaramba/src/karambalistboxitem.h b/superkaramba/src/karambalistboxitem.h index 782daea..2d0bb5e 100644 --- a/superkaramba/src/karambalistboxitem.h +++ b/superkaramba/src/karambalistboxitem.h @@ -26,6 +26,6 @@ class KarambaListBoxItem : public TQListBoxText public: TQString appId; - KarambaListBoxItem( TQListBox* listbox, const TQString & text=TQString::null ); + KarambaListBoxItem( TQListBox* listbox, const TQString & text=TQString() ); }; diff --git a/superkaramba/src/karambasessionmanaged.cpp b/superkaramba/src/karambasessionmanaged.cpp index 952fb7d..74ce4ed 100644 --- a/superkaramba/src/karambasessionmanaged.cpp +++ b/superkaramba/src/karambasessionmanaged.cpp @@ -26,7 +26,7 @@ #include "karamba.h" #include "tqwidgetlist.h" -bool KarambaSessionManaged::saveState(QSessionManager&) +bool KarambaSessionManaged::saveState(TQSessionManager&) { KConfig* config = kapp->sessionConfig(); @@ -34,7 +34,7 @@ bool KarambaSessionManaged::saveState(QSessionManager&) TQString openThemes=""; - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it( *list ); // iterate over the widgets TQWidget * w; while ( (w=it.current()) != 0 ) // for each widget... @@ -57,7 +57,7 @@ bool KarambaSessionManaged::saveState(QSessionManager&) return true; } -bool KarambaSessionManaged::commitData(QSessionManager&) +bool KarambaSessionManaged::commitData(TQSessionManager&) { return true; } diff --git a/superkaramba/src/karambasessionmanaged.h b/superkaramba/src/karambasessionmanaged.h index 9024549..5e1c479 100644 --- a/superkaramba/src/karambasessionmanaged.h +++ b/superkaramba/src/karambasessionmanaged.h @@ -25,6 +25,6 @@ class KarambaSessionManaged : public KSessionManaged public: KarambaSessionManaged() {}; - virtual bool commitData( QSessionManager& ); - virtual bool saveState( QSessionManager& ); + virtual bool commitData( TQSessionManager& ); + virtual bool saveState( TQSessionManager& ); }; diff --git a/superkaramba/src/kwidgetlistbox.cpp b/superkaramba/src/kwidgetlistbox.cpp index d22d3c8..2294b93 100644 --- a/superkaramba/src/kwidgetlistbox.cpp +++ b/superkaramba/src/kwidgetlistbox.cpp @@ -21,8 +21,8 @@ #include <kdebug.h> #include <kglobalsettings.h> -KWidgetListbox::KWidgetListbox(TQWidget *parent, const char *name) - : TQTable(parent, name) +KWidgetListbox::KWidgetListbox(TQWidget *tqparent, const char *name) + : TQTable(tqparent, name) { setNumRows(0); setNumCols(1); @@ -188,7 +188,7 @@ void KWidgetListbox::showItems(show_callback func, void* data) void KWidgetListbox::showEvent(TQShowEvent*) { //kdDebug() << k_funcinfo << endl; - repaintContents(false); + tqrepaintContents(false); } void KWidgetListbox::paintCell(TQPainter*, int, int, const TQRect&, diff --git a/superkaramba/src/kwidgetlistbox.h b/superkaramba/src/kwidgetlistbox.h index ead6989..78f899e 100644 --- a/superkaramba/src/kwidgetlistbox.h +++ b/superkaramba/src/kwidgetlistbox.h @@ -28,12 +28,13 @@ typedef bool (*show_callback) (int index, TQWidget* widget, void* data); -class KWidgetListbox : public QTable +class KWidgetListbox : public TQTable { Q_OBJECT + TQ_OBJECT public: - KWidgetListbox(TQWidget *parent = 0, const char *name = 0); + KWidgetListbox(TQWidget *tqparent = 0, const char *name = 0); ~KWidgetListbox(); int insertItem(TQWidget* item, int index = -1); diff --git a/superkaramba/src/lineparser.h b/superkaramba/src/lineparser.h index b92385d..09a2a6f 100644 --- a/superkaramba/src/lineparser.h +++ b/superkaramba/src/lineparser.h @@ -33,7 +33,7 @@ class LineParser { public: - LineParser(const TQString& line = TQString::null); + LineParser(const TQString& line = TQString()); ~LineParser(); void set(const TQString& line); diff --git a/superkaramba/src/main.cpp b/superkaramba/src/main.cpp index 4b7976f..1ead4e1 100644 --- a/superkaramba/src/main.cpp +++ b/superkaramba/src/main.cpp @@ -58,7 +58,7 @@ static KCmdLineOptions options[] = #ifdef KARAMBA_LOG -void karambaMessageOutput(QtMsgType type, const char *msg) +void karambaMessageOutput(TQtMsgType type, const char *msg) { FILE* fp = fopen("/tmp/karamba.log", "a"); if(fp) @@ -87,7 +87,7 @@ void karambaMessageOutput(QtMsgType type, const char *msg) int main(int argc, char **argv) { #ifdef KARAMBA_LOG - qInstallMsgHandler(karambaMessageOutput); + tqInstallMsgHandler(karambaMessageOutput); #endif KAboutData about("superkaramba", I18N_NOOP("SuperKaramba"), version, description, @@ -128,7 +128,7 @@ int main(int argc, char **argv) KarambaApplication::unlockKaramba(); - app.connect(qApp,TQT_SIGNAL(lastWindowClosed()),qApp,TQT_SLOT(quit())); + app.connect(tqApp,TQT_SIGNAL(lastWindowClosed()),tqApp,TQT_SLOT(quit())); // Try to restore a previous session if applicable. app.checkPreviousSession(app, lst); diff --git a/superkaramba/src/memsensor.cpp b/superkaramba/src/memsensor.cpp index dda7983..842889b 100644 --- a/superkaramba/src/memsensor.cpp +++ b/superkaramba/src/memsensor.cpp @@ -318,17 +318,17 @@ void MemSensor::update() format = "%um"; } - format.replace( TQRegExp("%fmb", false), TQString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5))); - format.replace( TQRegExp("%fm", false), TQString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) )); + format.tqreplace( TQRegExp("%fmb", false), TQString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5))); + format.tqreplace( TQRegExp("%fm", false), TQString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) )); - format.replace( TQRegExp("%umb", false), TQString::number( (int)((usedMemNoBuffers)/1024.0+0.5))); - format.replace( TQRegExp("%um", false), TQString::number( (int)((usedMem)/1024.0+0.5 ))); + format.tqreplace( TQRegExp("%umb", false), TQString::number( (int)((usedMemNoBuffers)/1024.0+0.5))); + format.tqreplace( TQRegExp("%um", false), TQString::number( (int)((usedMem)/1024.0+0.5 ))); - format.replace( TQRegExp("%tm", false), TQString::number( (int)( (totalMem)/1024.0+0.5))); + format.tqreplace( TQRegExp("%tm", false), TQString::number( (int)( (totalMem)/1024.0+0.5))); - format.replace( TQRegExp("%fs", false), TQString::number( (int)((totalSwap - usedSwap)/1024.0+0.5))); - format.replace( TQRegExp("%us", false), TQString::number( (int)(usedSwap/1024.0+0.5))); - format.replace( TQRegExp("%ts", false), TQString::number( (int)(totalSwap/1024.0+0.5))); + format.tqreplace( TQRegExp("%fs", false), TQString::number( (int)((totalSwap - usedSwap)/1024.0+0.5))); + format.tqreplace( TQRegExp("%us", false), TQString::number( (int)(usedSwap/1024.0+0.5))); + format.tqreplace( TQRegExp("%ts", false), TQString::number( (int)(totalSwap/1024.0+0.5))); meter->setValue(format); ++it; diff --git a/superkaramba/src/memsensor.h b/superkaramba/src/memsensor.h index 4a1f0e0..4caa164 100644 --- a/superkaramba/src/memsensor.h +++ b/superkaramba/src/memsensor.h @@ -24,6 +24,7 @@ class MemSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: MemSensor( int interval ); diff --git a/superkaramba/src/menu_python.cpp b/superkaramba/src/menu_python.cpp index 11e5a15..e32a2bb 100644 --- a/superkaramba/src/menu_python.cpp +++ b/superkaramba/src/menu_python.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2003 Hans Karlsson <karlsson.h@home.se> * Copyright (C) 2003-2004 Adam Geitgey <adam@rootnode.org> -* Copyright (c) 2004 Petri Damstén <damu@iki.fi> +* Copyright (c) 2004 Petri Damst�n <damu@iki.fi> * * This file is part of SuperKaramba. * @@ -38,7 +38,7 @@ long createMenu(long widget) karamba* currTheme = (karamba*)widget; KPopupMenu* tmp = new KPopupMenu(currTheme); - currTheme->menuList->append (tmp ); + currTheme->menuList->append( TQT_TQOBJECT(tmp) ); currTheme->connect(tmp, TQT_SIGNAL(activated(int)), currTheme, TQT_SLOT(passMenuItemClicked(int))); @@ -86,7 +86,7 @@ long deleteMenu(long widget, long menu) karamba* currTheme = (karamba*)widget; KPopupMenu* tmp = (KPopupMenu*)menu; - currTheme->menuList->removeRef(tmp); + currTheme->menuList->removeRef(TQT_TQOBJECT(tmp)); return 1; } diff --git a/superkaramba/src/meter.cpp b/superkaramba/src/meter.cpp index e9030e6..8374bbf 100644 --- a/superkaramba/src/meter.cpp +++ b/superkaramba/src/meter.cpp @@ -105,7 +105,7 @@ bool Meter::isEnabled() bool Meter::insideActiveArea(int x, int y) { - return boundingBox.contains(x, y) && clickable; + return boundingBox.tqcontains(x, y) && clickable; } #include "meter.moc" diff --git a/superkaramba/src/meter.h b/superkaramba/src/meter.h index ecd84e6..689bdd5 100644 --- a/superkaramba/src/meter.h +++ b/superkaramba/src/meter.h @@ -20,9 +20,10 @@ class karamba; -class Meter : public QObject +class Meter : public TQObject { Q_OBJECT + TQ_OBJECT public: Meter(karamba* k, int ix,int iy,int iw,int ih); @@ -51,7 +52,7 @@ public: virtual void setValue(long) {}; virtual long getValue() { return -1; }; virtual void setValue(TQString) {}; - virtual TQString getStringValue() const { return TQString::null; }; + virtual TQString getStringValue() const { return TQString(); }; virtual void recalculateValue() {}; virtual void setColor(TQColor clr) { color = clr; }; diff --git a/superkaramba/src/meter_python.cpp b/superkaramba/src/meter_python.cpp index b8e1153..12c3a7e 100644 --- a/superkaramba/src/meter_python.cpp +++ b/superkaramba/src/meter_python.cpp @@ -78,12 +78,12 @@ bool checkKarambaAndMeter(long widget, long meter, const char* type) // This just throws awya extra bytes. // I guess there is a better way to do this... -TQString fromUcs4(Q_UINT32* ucs4) +TQString fromUcs4(TQ_UINT32* ucs4) { TQString result = ""; while(*ucs4 != 0) { - result += TQChar((Q_UINT16)*ucs4); + result += TQChar((TQ_UINT16)*ucs4); ++ucs4; } return result; @@ -102,9 +102,9 @@ TQString PyString2TQString(PyObject* text) { Py_UNICODE* t = PyUnicode_AsUnicode(text); if(sizeof(Py_UNICODE) == 4) - qtext = fromUcs4((Q_UINT32*)t); + qtext = fromUcs4((TQ_UINT32*)t); else - qtext = TQString::fromUcs2((Q_UINT16*)t); + qtext = TQString::fromUcs2((TQ_UINT16*)t); } else { @@ -114,7 +114,7 @@ TQString PyString2TQString(PyObject* text) } // Converts a TQString to a Python String with Unicode support -PyObject* QString2PyString(TQString string) +PyObject* TQString2PyString(TQString string) { PyObject *pyString; @@ -283,7 +283,7 @@ PyObject* py_getStringValue(PyObject *, PyObject *args, TQString type) if (!checkKarambaAndMeter(widget, meter, type.ascii())) return NULL; return Py_BuildValue((char*)"O", - QString2PyString(((Meter*)meter)->getStringValue())); + TQString2PyString(((Meter*)meter)->getStringValue())); } PyObject* py_setStringValue(PyObject *, PyObject *args, TQString type) diff --git a/superkaramba/src/meter_python.h b/superkaramba/src/meter_python.h index 0773ee3..c2247db 100644 --- a/superkaramba/src/meter_python.h +++ b/superkaramba/src/meter_python.h @@ -20,7 +20,7 @@ bool checkMeter(long widget, long meter, const char* type); bool checkKarambaAndMeter(long widget, long meter, const char* type); TQString PyString2TQString(PyObject* text); -PyObject* QString2PyString(TQString string); +PyObject* TQString2PyString(TQString string); PyObject* py_getThemeMeter(PyObject *self, PyObject *args, TQString type); PyObject* py_getSize(PyObject *self, PyObject *args, TQString type); diff --git a/superkaramba/src/misc_python.cpp b/superkaramba/src/misc_python.cpp index 891d53f..933147c 100644 --- a/superkaramba/src/misc_python.cpp +++ b/superkaramba/src/misc_python.cpp @@ -167,7 +167,7 @@ long attachClickArea(long widget, long meter, TQString LeftButton, TQString Midd Meter* currMeter = (Meter*) meter; // Look if currMeter has an ClickArea attached. - bool meterAlreadyClickable = currTheme->clickList->containsRef(currMeter); + bool meterAlreadyClickable = currTheme->clickList->tqcontainsRef(currMeter); // if currMeter is of type ImageLabel* if (ImageLabel* image = dynamic_cast<ImageLabel*>(currMeter)) @@ -471,7 +471,7 @@ long openNamedTheme(char* path, char *name, bool is_sub_theme) { if( file.exists() ) { TQCString prettyName(name); - KarambaApplication* app = (KarambaApplication*)qApp; + KarambaApplication* app = (KarambaApplication*)tqApp; if (!app->themeExists(prettyName)) { currTheme = new karamba( filename, prettyName, false , @@ -507,7 +507,7 @@ PyObject* py_get_incoming_data(PyObject *, PyObject *args) long widget; if (!PyArg_ParseTuple(args, (char*)"l:getIncomingData", &widget)) return NULL; - return Py_BuildValue((char*)"O", QString2PyString(getIncomingData(widget))); + return Py_BuildValue((char*)"O", TQString2PyString(getIncomingData(widget))); } PyObject* py_set_incoming_data(PyObject *, PyObject *args) @@ -778,7 +778,7 @@ PyObject* py_get_ip(PyObject *, PyObject *args) return NULL; if (!checkKaramba(widget)) return NULL; - return Py_BuildValue((char*)"O", QString2PyString(getIp(interface))); + return Py_BuildValue((char*)"O", TQString2PyString(getIp(interface))); } static void management_popup(long widget) diff --git a/superkaramba/src/misc_python.h b/superkaramba/src/misc_python.h index 46c0988..9b89f60 100644 --- a/superkaramba/src/misc_python.h +++ b/superkaramba/src/misc_python.h @@ -316,7 +316,7 @@ PyObject* py_get_number_of_desktops(PyObject *self, PyObject *args); * long translateAll(widget, relative_x, relative_y) * DESCRIPTION * Moves all widgets within a theme in a particular direction relative to -* the previous spot without moving the parent theme widget. +* the previous spot without moving the tqparent theme widget. * ARGUMENTS * * long widget -- karamba * * long translate_x -- move horizontally diff --git a/superkaramba/src/networksensor.cpp b/superkaramba/src/networksensor.cpp index 09de816..10138b4 100644 --- a/superkaramba/src/networksensor.cpp +++ b/superkaramba/src/networksensor.cpp @@ -102,11 +102,11 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const { TQTextStream t( &file ); // use a text stream line = t.readLine(); - while(line !=0 && !line.contains(device)) + while(line !=0 && !line.tqcontains(device)) { line = t.readLine(); } - if ( line.contains( device ) ) + if ( line.tqcontains( device ) ) { TQRegExp rx( "\\W+"+device+":\\D*(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false); rx.search(line); @@ -115,7 +115,7 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const } else { - qDebug("Network sensor: can not find %s", device.ascii()); + qDebug("Network sensor: can not tqfind %s", device.ascii()); in = 0; out = 0; } @@ -148,11 +148,11 @@ void NetworkSensor::update() format = "%in"; } - format.replace( TQRegExp("%inkb", false), TQString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) ); - format.replace( TQRegExp("%in", false), TQString::number( (inB - receivedBytes)/delay, 'f', decimals ) ); + format.tqreplace( TQRegExp("%inkb", false), TQString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) ); + format.tqreplace( TQRegExp("%in", false), TQString::number( (inB - receivedBytes)/delay, 'f', decimals ) ); - format.replace( TQRegExp("%outkb", false), TQString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) ); - format.replace( TQRegExp("%out", false), TQString::number( (outB - transmittedBytes)/delay, 'f', decimals ) ); + format.tqreplace( TQRegExp("%outkb", false), TQString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) ); + format.tqreplace( TQRegExp("%out", false), TQString::number( (outB - transmittedBytes)/delay, 'f', decimals ) ); meter->setValue( format ); ++it; diff --git a/superkaramba/src/networksensor.h b/superkaramba/src/networksensor.h index 90878a8..77fdf08 100644 --- a/superkaramba/src/networksensor.h +++ b/superkaramba/src/networksensor.h @@ -25,6 +25,7 @@ class NetworkSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: NetworkSensor( TQString device, int interval ); ~NetworkSensor(); diff --git a/superkaramba/src/noatunsensor.cpp b/superkaramba/src/noatunsensor.cpp index 57f25f1..d948bc9 100644 --- a/superkaramba/src/noatunsensor.cpp +++ b/superkaramba/src/noatunsensor.cpp @@ -77,17 +77,17 @@ void NoatunSensor::update() else { - format.replace( TQRegExp("%title", false), title ); - format.replace( TQRegExp("%id", false), noatunID ); + format.tqreplace( TQRegExp("%title", false), title ); + format.tqreplace( TQRegExp("%id", false), noatunID ); - format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%length", false), TQTime( 0,0,0 ). addMSecs( songLength ) .toString( "h:mm:ss" ) ); - format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%time", false), TQTime( 0,0,0 ). addMSecs( currentTime ) .toString( "h:mm:ss" ) ); - format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ). addMSecs( songLength ) .addMSecs(-currentTime ) .toString( "h:mm:ss" ) ); @@ -144,11 +144,11 @@ TQString NoatunSensor::getTitle() else { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> result; - result.replace( TQRegExp("_")," " ); - result.replace( TQRegExp(".mp3$"),"" ); + result.tqreplace( TQRegExp("_")," " ); + result.tqreplace( TQRegExp(".mp3$"),"" ); } else diff --git a/superkaramba/src/programsensor.h b/superkaramba/src/programsensor.h index d016a81..93e1c9e 100644 --- a/superkaramba/src/programsensor.h +++ b/superkaramba/src/programsensor.h @@ -19,6 +19,7 @@ class ProgramSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: ProgramSensor(const TQString &programName, int msec=1000, TQString encoding="" ); ~ProgramSensor(); diff --git a/superkaramba/src/richtextlabel.cpp b/superkaramba/src/richtextlabel.cpp index ba7ab11..5044161 100644 --- a/superkaramba/src/richtextlabel.cpp +++ b/superkaramba/src/richtextlabel.cpp @@ -17,7 +17,7 @@ RichTextLabel::RichTextLabel(karamba* k) : Meter(k, 0, 0, 100, 100), text(0), source(""), - colorGrp(k->colorGroup()), + colorGrp(k->tqcolorGroup()), underlineLinks(false) { originalSize = TQSize(0, 0); @@ -27,7 +27,7 @@ RichTextLabel::RichTextLabel(karamba* k, int x, int y, int w, int h) : Meter(k, x, y, w, h), text(0), source(""), - colorGrp(k->colorGroup()), + colorGrp(k->tqcolorGroup()), underlineLinks(false) { kdDebug() << k_funcinfo << x << ", " << y << ", " << w << ", " << h << endl; @@ -60,9 +60,9 @@ void RichTextLabel::setText(TQString t, bool linkUnderline) text = new TQSimpleRichText(t, font, m_karamba->theme().path(), 0, // default TQStyleSheet* - 0, // default QMimeSourceFactory + 0, // default TQMimeSourceFactory -1, // no pageBreak - Qt::blue, // (has no effect) link Color + TQt::blue, // (has no effect) link Color underlineLinks); // set the text to a reasonable size diff --git a/superkaramba/src/richtextlabel.h b/superkaramba/src/richtextlabel.h index 4a6eb69..5ea5a94 100644 --- a/superkaramba/src/richtextlabel.h +++ b/superkaramba/src/richtextlabel.h @@ -24,6 +24,7 @@ class RichTextLabel : public Meter { Q_OBJECT + TQ_OBJECT public: RichTextLabel(karamba*); RichTextLabel(karamba* k, int x, int y, int w, int h); diff --git a/superkaramba/src/rsssensor.cpp b/superkaramba/src/rsssensor.cpp index 5a999ec..3640636 100644 --- a/superkaramba/src/rsssensor.cpp +++ b/superkaramba/src/rsssensor.cpp @@ -48,7 +48,7 @@ void RssSensor::update() bool OK = false; #if defined(KDE_3_3) - if(KIO::NetAccess::download(KURL(source), tmpFile, karambaApp->parentWindow())) + if(KIO::NetAccess::download(KURL(source), tmpFile, karambaApp->tqparentWindow())) #else if(KIO::NetAccess::download(KURL(source), tmpFile)) #endif @@ -95,7 +95,7 @@ void RssSensor::update() { TQDomNodeList links = docElem.elementsByTagName( "link" ); TQDomNodeList displays; - if ( format.contains( "%d", false ) > 0 ) + if ( format.tqcontains( "%d", false ) > 0 ) { displays = docElem.elementsByTagName( "description" ); } diff --git a/superkaramba/src/rsssensor.h b/superkaramba/src/rsssensor.h index f567c0d..4e2322b 100644 --- a/superkaramba/src/rsssensor.h +++ b/superkaramba/src/rsssensor.h @@ -22,8 +22,9 @@ class RssSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: - RssSensor( const TQString &source, int interval, const TQString &format, const TQString &encoding=TQString::null ); + RssSensor( const TQString &source, int interval, const TQString &format, const TQString &encoding=TQString() ); ~RssSensor(); diff --git a/superkaramba/src/sensor.h b/superkaramba/src/sensor.h index ee48c98..dd9b567 100644 --- a/superkaramba/src/sensor.h +++ b/superkaramba/src/sensor.h @@ -18,9 +18,10 @@ #include "sensorparams.h" -class Sensor : public QObject +class Sensor : public TQObject { Q_OBJECT + TQ_OBJECT public: Sensor( int msec = 1000 ); diff --git a/superkaramba/src/sensorparams.h b/superkaramba/src/sensorparams.h index 1de515a..0f611b6 100644 --- a/superkaramba/src/sensorparams.h +++ b/superkaramba/src/sensorparams.h @@ -28,7 +28,7 @@ * * Hans Karlsson **/ -class SensorParams : public QObject +class SensorParams : public TQObject { public: SensorParams( Meter* ); diff --git a/superkaramba/src/sensorsensor.cpp b/superkaramba/src/sensorsensor.cpp index ed6934e..3232665 100644 --- a/superkaramba/src/sensorsensor.cpp +++ b/superkaramba/src/sensorsensor.cpp @@ -91,9 +91,9 @@ void SensorSensor::processExited(KProcess *) } #if defined __FreeBSD__ || defined(Q_OS_NETBSD) - format.replace( TQRegExp("%v", false), sensorMap[sensorMapBSD[type]]); + format.tqreplace( TQRegExp("%v", false), sensorMap[sensorMapBSD[type]]); #else - format.replace( TQRegExp("%v", false), sensorMap[type]); + format.tqreplace( TQRegExp("%v", false), sensorMap[type]); #endif meter->setValue(format); ++lit; diff --git a/superkaramba/src/sensorsensor.h b/superkaramba/src/sensorsensor.h index 6201660..217cefb 100644 --- a/superkaramba/src/sensorsensor.h +++ b/superkaramba/src/sensorsensor.h @@ -20,6 +20,7 @@ class SensorSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: SensorSensor(int interval, char tempUnit); diff --git a/superkaramba/src/showdesktop.h b/superkaramba/src/showdesktop.h index 6f46688..bcf67d9 100644 --- a/superkaramba/src/showdesktop.h +++ b/superkaramba/src/showdesktop.h @@ -27,9 +27,10 @@ class KWinModule; /** * Singleton class that handles desktop access (minimizing all windows) */ -class ShowDesktop : public QObject +class ShowDesktop : public TQObject { Q_OBJECT + TQ_OBJECT public: static ShowDesktop* the(); diff --git a/superkaramba/src/sklineedit.cpp b/superkaramba/src/sklineedit.cpp index 7047dde..f923fef 100644 --- a/superkaramba/src/sklineedit.cpp +++ b/superkaramba/src/sklineedit.cpp @@ -24,8 +24,8 @@ SKLineEdit::SKLineEdit(TQWidget *w, Input *i) : TQLineEdit(w), m_input(i) { - frameColor = Qt::gray; - setBackgroundColor(Qt::white); + frameColor = TQt::gray; + setBackgroundColor(TQt::white); } SKLineEdit::~SKLineEdit() @@ -46,13 +46,13 @@ void SKLineEdit::drawContents(TQPainter *p) void SKLineEdit::setFrameColor(TQColor c) { frameColor = c; - repaint(); + tqrepaint(); } void SKLineEdit::setBackgroundColor(TQColor c) { TQLineEdit::setBackgroundColor(c); - repaint(); + tqrepaint(); } TQColor SKLineEdit::getFrameColor() const @@ -66,7 +66,7 @@ void SKLineEdit::keyPressEvent(TQKeyEvent* e) if(!e->text().isEmpty()) { - karamba* k = static_cast<karamba*>(parent()); + karamba* k = static_cast<karamba*>(TQT_TQWIDGET(tqparent())); k->keyPressed(e->text(), m_input); } } diff --git a/superkaramba/src/sklineedit.h b/superkaramba/src/sklineedit.h index 2d56793..8314309 100644 --- a/superkaramba/src/sklineedit.h +++ b/superkaramba/src/sklineedit.h @@ -29,7 +29,7 @@ class Input; -class SKLineEdit : public QLineEdit +class SKLineEdit : public TQLineEdit { public: SKLineEdit(TQWidget *w, Input *i); diff --git a/superkaramba/src/systemtray.cpp b/superkaramba/src/systemtray.cpp index ed85ab8..17c38b6 100644 --- a/superkaramba/src/systemtray.cpp +++ b/superkaramba/src/systemtray.cpp @@ -35,8 +35,8 @@ #include <X11/Xlib.h> -Systemtray::Systemtray(TQWidget* parent) - : TQWidget(parent,0,0) +Systemtray::Systemtray(TQWidget* tqparent) + : TQWidget(tqparent,0,0) { setBackgroundOrigin(ParentOrigin); setBackgroundMode(FixedPixmap); @@ -62,7 +62,7 @@ void Systemtray::updateBackgroundPixmap ( const TQPixmap & pixmap) { //Stupid stupid stupid work around for annoying bug //QXEmbed ignores setBackgroundOrigin(AncestorOrigin).... TQPixmap bug = TQPixmap(emb->size()); - bitBlt(&bug, 0, 0, &pixmap, emb->parentWidget()->x()+emb->x(), emb->parentWidget()->y()+emb->y(), emb->width(), emb->height(),Qt::CopyROP, false); + bitBlt(TQT_TQPAINTDEVICE(&bug), 0, 0, TQT_TQPAINTDEVICE(const_cast<TQPixmap*>(&pixmap)), emb->tqparentWidget()->x()+emb->x(), emb->tqparentWidget()->y()+emb->y(), emb->width(), emb->height(),TQt::CopyROP, false); emb->setPaletteBackgroundPixmap (bug); } @@ -153,14 +153,14 @@ void Systemtray::updateTrayWindows( void ) while ((emb = m_Wins.current()) != 0L) { WId wid = emb->embeddedWinId(); - if ((wid == 0) || !kwin_module->systemTrayWindows().contains(wid) ) + if ((wid == 0) || !kwin_module->systemTrayWindows().tqcontains(wid) ) m_Wins.remove(emb); else m_Wins.next(); } - layoutSystray(); + tqlayoutSystray(); } -void Systemtray::layoutSystray() +void Systemtray::tqlayoutSystray() { int i = 0, a = 0; @@ -190,7 +190,7 @@ void Systemtray::layoutSystray() } count++; - emb->repaint(); + emb->tqrepaint(); } } @@ -213,7 +213,7 @@ void Systemtray::systemTrayWindowAdded( WId w ) emb->resize(24, 24); emb->show(); - layoutSystray(); + tqlayoutSystray(); } void Systemtray::systemTrayWindowRemoved(WId) diff --git a/superkaramba/src/systemtray.h b/superkaramba/src/systemtray.h index 51f1d56..4411355 100644 --- a/superkaramba/src/systemtray.h +++ b/superkaramba/src/systemtray.h @@ -31,11 +31,12 @@ class KWinModule; typedef long unsigned int Atom; -class Systemtray : public QWidget +class Systemtray : public TQWidget { Q_OBJECT + TQ_OBJECT public: - Systemtray(TQWidget* parent); + Systemtray(TQWidget* tqparent); ~Systemtray(); void updateBackgroundPixmap ( const TQPixmap & ); @@ -49,7 +50,7 @@ public slots: int getTraySize(); void systemTrayWindowAdded( WId w ); void systemTrayWindowRemoved( WId w ); - void layoutSystray(); + void tqlayoutSystray(); signals: void updated(); diff --git a/superkaramba/src/systray_python.cpp b/superkaramba/src/systray_python.cpp index c953fdb..1d2e53d 100644 --- a/superkaramba/src/systray_python.cpp +++ b/superkaramba/src/systray_python.cpp @@ -40,7 +40,7 @@ long moveSystray(long widget, long x, long y, long w, long h) if (currTheme->systray != 0) { currTheme->systray->move((int)x,(int)y); currTheme->systray->setMinimumSize((int)w,(int)h); - currTheme->systray->layoutSystray(); + currTheme->systray->tqlayoutSystray(); currTheme->systray->show(); } return 1; @@ -161,7 +161,7 @@ long updateSystrayLayout(long widget) if (currTheme->systray != 0) { - currTheme->systray->layoutSystray(); + currTheme->systray->tqlayoutSystray(); } return 1; } diff --git a/superkaramba/src/taskbartest.cpp b/superkaramba/src/taskbartest.cpp index 95b66a2..46d445d 100644 --- a/superkaramba/src/taskbartest.cpp +++ b/superkaramba/src/taskbartest.cpp @@ -126,7 +126,7 @@ int main(int argc, char **argv) // else // { // TQStringList fileNames; -// fileNames = KFileDialog::getOpenFileNames(TQString::null, "*.theme", 0, "Open configurations"); +// fileNames = KFileDialog::getOpenFileNames(TQString(), "*.theme", 0, "Open configurations"); // for ( TQStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it ) // { // TQFileInfo file( *it ); diff --git a/superkaramba/src/taskmanager.cpp b/superkaramba/src/taskmanager.cpp index e12fc6a..7f091ce 100644 --- a/superkaramba/src/taskmanager.cpp +++ b/superkaramba/src/taskmanager.cpp @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. template class TQPtrList<Task>; -// Hack: create a global KWinModule without a parent. We +// Hack: create a global KWinModule without a tqparent. We // can't make it a child of TaskManager because more than one // TaskManager might be created. We can't make it a class // variable without changing Task, which also uses it. @@ -48,8 +48,8 @@ template class TQPtrList<Task>; // The real problem is that KWinModule should be a singleton. KWinModule* kwin_module = 0; -TaskManager::TaskManager(TQObject *parent, const char *name) - : TQObject(parent, name), _active(0), _startup_info( NULL ) +TaskManager::TaskManager(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), _active(0), _startup_info( NULL ) { kwin_module = new KWinModule(); @@ -138,7 +138,7 @@ void TaskManager::windowAdded(WId w ) WId transient_for = (WId) transient_for_tmp; // check if it's transient for a skiptaskbar window - if (_skiptaskbar_windows.contains(transient_for)) + if (_skiptaskbar_windows.tqcontains(transient_for)) return; // lets see if this is a transient for an existing task @@ -328,8 +328,8 @@ bool TaskManager::isOnTop(const Task* task) } -Task::Task(WId win, TaskManager * parent, const char *name) : - TQObject(parent, name), +Task::Task(WId win, TaskManager * tqparent, const char *name) : + TQObject(tqparent, name), _active(false), _win(win), _lastWidth(0), _lastHeight(0), _lastResize(false), _lastIcon(), _thumbSize(0.2), _thumb(), _grab() @@ -464,9 +464,9 @@ bool Task::isModified() const { static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"); #ifdef KDE_3_2 - int modStrPos = _info.visibleName().find(modStr); + int modStrPos = _info.visibleName().tqfind(modStr); #else - int modStrPos = _info.visibleName.find(modStr); + int modStrPos = _info.visibleName.tqfind(modStr); #endif return ( modStrPos != -1 ); @@ -492,7 +492,7 @@ TQString Task::className() XFree( hint.res_class ); return nh; } - return TQString::null; + return TQString(); } TQString Task::classClass() @@ -504,7 +504,7 @@ TQString Task::classClass() XFree( hint.res_class ); return ch; } - return TQString::null; + return TQString(); } TQPixmap Task::icon( int width, int height, bool allowResize ) @@ -608,10 +608,10 @@ bool Task::idMatch( const TQString& id1, const TQString& id2 ) if ( id1.isEmpty() || id2.isEmpty() ) return false; - if ( id1.contains( id2 ) > 0 ) + if ( id1.tqcontains( id2 ) > 0 ) return true; - if ( id2.contains( id1 ) > 0 ) + if ( id2.tqcontains( id1 ) > 0 ) return true; return false; @@ -773,12 +773,8 @@ void Task::updateThumbnail() // by the thumbnail generation. This makes things much smoother // on slower machines. // - TQWidget *rootWin = qApp->desktop(); -#ifdef KDE_3_2 + TQWidget *rootWin = TQT_TQWIDGET(tqApp->desktop()); TQRect geom = _info.geometry(); -#else - TQRect geom = _info.geometry; -#endif _grab = TQPixmap::grabWindow( rootWin->winId(), geom.x(), geom.y(), geom.width(), geom.height() ); @@ -807,8 +803,8 @@ void Task::generateThumbnail() } Startup::Startup( const KStartupInfoId& id, const KStartupInfoData& data, - TQObject * parent, const char *name) - : TQObject(parent, name), _id( id ), _data( data ) + TQObject * tqparent, const char *name) + : TQObject(tqparent, name), _id( id ), _data( data ) { } diff --git a/superkaramba/src/taskmanager.h b/superkaramba/src/taskmanager.h index be05cb7..8172287 100644 --- a/superkaramba/src/taskmanager.h +++ b/superkaramba/src/taskmanager.h @@ -46,33 +46,34 @@ class TaskManager; * @see TaskManager * @see KWinModule */ -class Task: public QObject +class Task: public TQObject { Q_OBJECT - Q_PROPERTY( TQString name READ name ) - Q_PROPERTY( TQString visibleName READ visibleName ) - Q_PROPERTY( TQString visibleNameWithState READ visibleNameWithState ) - Q_PROPERTY( TQString iconName READ iconName ) - Q_PROPERTY( TQString visibleIconName READ visibleIconName ) - Q_PROPERTY( TQPixmap pixmap READ pixmap ) - Q_PROPERTY( bool maximized READ isMaximized ) - Q_PROPERTY( bool iconified READ isIconified ) - Q_PROPERTY( bool shaded READ isShaded WRITE setShaded ) - Q_PROPERTY( bool active READ isActive ) - Q_PROPERTY( bool onCurrentDesktop READ isOnCurrentDesktop ) - Q_PROPERTY( bool onAllDesktops READ isOnAllDesktops ) - Q_PROPERTY( bool alwaysOnTop READ isAlwaysOnTop WRITE setAlwaysOnTop ) - Q_PROPERTY( bool modified READ isModified ) - Q_PROPERTY( int desktop READ desktop ) - Q_PROPERTY( double thumbnailSize READ thumbnailSize WRITE setThumbnailSize ) - Q_PROPERTY( bool hasThumbnail READ hasThumbnail ) - Q_PROPERTY( TQPixmap thumbnail READ thumbnail ) + TQ_OBJECT + TQ_PROPERTY( TQString name READ name ) + TQ_PROPERTY( TQString visibleName READ visibleName ) + TQ_PROPERTY( TQString visibleNameWithState READ visibleNameWithState ) + TQ_PROPERTY( TQString iconName READ iconName ) + TQ_PROPERTY( TQString visibleIconName READ visibleIconName ) + TQ_PROPERTY( TQPixmap pixmap READ pixmap ) + TQ_PROPERTY( bool maximized READ isMaximized ) + TQ_PROPERTY( bool iconified READ isIconified ) + TQ_PROPERTY( bool shaded READ isShaded WRITE setShaded ) + TQ_PROPERTY( bool active READ isActive ) + TQ_PROPERTY( bool onCurrentDesktop READ isOnCurrentDesktop ) + TQ_PROPERTY( bool onAllDesktops READ isOnAllDesktops ) + TQ_PROPERTY( bool alwaysOnTop READ isAlwaysOnTop WRITE setAlwaysOnTop ) + TQ_PROPERTY( bool modified READ isModified ) + TQ_PROPERTY( int desktop READ desktop ) + TQ_PROPERTY( double thumbnailSize READ thumbnailSize WRITE setThumbnailSize ) + TQ_PROPERTY( bool hasThumbnail READ hasThumbnail ) + TQ_PROPERTY( TQPixmap thumbnail READ thumbnail ) public: - Task( WId win, TaskManager * parent, const char *name = 0 ); + Task( WId win, TaskManager * tqparent, const char *name = 0 ); virtual ~Task(); - TaskManager* taskManager() const { return (TaskManager*) parent(); } + TaskManager* taskManager() const { return (TaskManager*) tqparent(); } WId window() const { return _win; } #ifdef KDE_3_2 @@ -203,7 +204,7 @@ public: //* @internal void removeTransient( WId w ) { _transients.remove( w ); } //* @internal - bool hasTransient( WId w ) const { return _transients.contains( w ); } + bool hasTransient( WId w ) const { return _transients.tqcontains( w ); } //* @internal void setActive(bool a); @@ -372,15 +373,16 @@ private: * * @see TaskManager */ -class Startup: public QObject +class Startup: public TQObject { Q_OBJECT - Q_PROPERTY( TQString text READ text ) - Q_PROPERTY( TQString bin READ bin ) - Q_PROPERTY( TQString icon READ icon ) + TQ_OBJECT + TQ_PROPERTY( TQString text READ text ) + TQ_PROPERTY( TQString bin READ bin ) + TQ_PROPERTY( TQString icon READ icon ) public: - Startup( const KStartupInfoId& id, const KStartupInfoData& data, TQObject * parent, + Startup( const KStartupInfoId& id, const KStartupInfoData& data, TQObject * tqparent, const char *name = 0); virtual ~Startup(); @@ -427,14 +429,15 @@ typedef TQPtrList<Startup> StartupList; * @see KWinModule * @version $Id: taskmanager.h,v 1.2 2004/11/17 10:16:47 kodaaja Exp $ */ -class TaskManager : public QObject +class TaskManager : public TQObject { Q_OBJECT - Q_PROPERTY( int currentDesktop READ currentDesktop ) - Q_PROPERTY( int numberOfDesktops READ numberOfDesktops ) + TQ_OBJECT + TQ_PROPERTY( int currentDesktop READ currentDesktop ) + TQ_PROPERTY( int numberOfDesktops READ numberOfDesktops ) public: - TaskManager( TQObject *parent = 0, const char *name = 0 ); + TaskManager( TQObject *tqparent = 0, const char *name = 0 ); virtual ~TaskManager(); /** diff --git a/superkaramba/src/textfield.cpp b/superkaramba/src/textfield.cpp index d2d0c6b..a3be722 100644 --- a/superkaramba/src/textfield.cpp +++ b/superkaramba/src/textfield.cpp @@ -18,7 +18,7 @@ TextField::TextField( ) setColor(TQColor(192, 192, 192)); setBGColor(TQColor(0, 0, 0)); setFont("Helvetica"); - setAlignment(Qt::AlignLeft); + tqsetAlignment(TQt::AlignLeft); setFixedPitch(false); setShadow(0); } @@ -35,7 +35,7 @@ TextField::TextField( const TextField& def ) setBGColor(def.getBGColor()); setFont( def.getFont() ); - setAlignment( def.getAlignment() ); + tqsetAlignment( def.getAlignment() ); setFixedPitch( def.getFixedPitch() ); setShadow( def.getShadow() ); } @@ -51,7 +51,7 @@ TextField& TextField::operator=(const TextField& rhs) setBGColor(rhs.getBGColor()); setFont( rhs.getFont() ); - setAlignment( rhs.getAlignment() ); + tqsetAlignment( rhs.getAlignment() ); setFixedPitch( rhs.getFixedPitch() ); setShadow( rhs.getShadow() ); @@ -102,32 +102,32 @@ int TextField::getFontSize() const return font.pointSize(); } -void TextField::setAlignment( const TQString &align ) +void TextField::tqsetAlignment( const TQString &align ) { TQString a = align.upper(); if( a == "LEFT" || a.isEmpty() ) - alignment = Qt::AlignLeft; + tqalignment = TQt::AlignLeft; if( a == "RIGHT" ) - alignment = Qt::AlignRight; + tqalignment = TQt::AlignRight; if( a == "CENTER" ) - alignment = Qt::AlignHCenter; + tqalignment = TQt::AlignHCenter; } -void TextField::setAlignment( int af ) +void TextField::tqsetAlignment( int af ) { - alignment = af; + tqalignment = af; } int TextField::getAlignment() const { - return alignment; + return tqalignment; } TQString TextField::getAlignmentAsString() const { - if( alignment == Qt::AlignHCenter ) + if( tqalignment == TQt::AlignHCenter ) return "CENTER"; - else if( alignment == Qt::AlignRight ) + else if( tqalignment == TQt::AlignRight ) return "RIGHT"; else return "LEFT"; diff --git a/superkaramba/src/textfield.h b/superkaramba/src/textfield.h index 13177b7..34f17c3 100644 --- a/superkaramba/src/textfield.h +++ b/superkaramba/src/textfield.h @@ -31,8 +31,8 @@ public: void setColor(TQColor clr); void setBGColor(TQColor clr); void setFont( const TQString& ); - void setAlignment( int ); - void setAlignment( const TQString& ); + void tqsetAlignment( int ); + void tqsetAlignment( const TQString& ); void setFixedPitch( bool ); void setShadow( int ); @@ -47,7 +47,7 @@ public: int getLineHeight() const; protected: - int alignment; + int tqalignment; TQFont font; TQColor color; TQColor bgColor; diff --git a/superkaramba/src/textfilesensor.h b/superkaramba/src/textfilesensor.h index 39a464d..adf521e 100644 --- a/superkaramba/src/textfilesensor.h +++ b/superkaramba/src/textfilesensor.h @@ -37,8 +37,9 @@ class TextFileSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: - TextFileSensor( const TQString &fileName, bool rdf, int interval, const TQString &encoding=TQString::null ); + TextFileSensor( const TQString &fileName, bool rdf, int interval, const TQString &encoding=TQString() ); ~TextFileSensor(); diff --git a/superkaramba/src/textlabel.cpp b/superkaramba/src/textlabel.cpp index 509aea8..376f226 100644 --- a/superkaramba/src/textlabel.cpp +++ b/superkaramba/src/textlabel.cpp @@ -13,7 +13,7 @@ #include "textlabel.h" TextLabel::TextLabel(karamba *k, int x,int y,int w,int h): - Meter(k, x,y,w,h), alignment(Qt::AlignLeft), clip(0), bgColor(0, 0, 0), + Meter(k, x,y,w,h), tqalignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0), lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0), scrollPause(0), pauseCounter(0), scrollType(ScrollNone) { @@ -21,7 +21,7 @@ TextLabel::TextLabel(karamba *k, int x,int y,int w,int h): if( h != 0 || w != 0) clip = 0; else - clip = Qt::DontClip; + clip = TQt::DontClip; if( h == 0 || w == 0) { @@ -31,7 +31,7 @@ TextLabel::TextLabel(karamba *k, int x,int y,int w,int h): } TextLabel::TextLabel(karamba *k): - Meter(k, 0, 0, 0, 0), alignment(Qt::AlignLeft), clip(0), bgColor(0, 0, 0), + Meter(k, 0, 0, 0, 0), tqalignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0), lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0), scrollPause(0), pauseCounter(0), scrollType(ScrollNone) { @@ -60,7 +60,7 @@ void TextLabel::setTextProps( TextField* t ) text = *t; //lineHeight = t->getLineHeight(); shadow = t->getShadow(); - alignment = t->getAlignment(); + tqalignment = t->getAlignment(); setFontSize(t->getFontSize()); setFont(t->getFont()); @@ -131,22 +131,22 @@ int TextLabel::getFontSize() const return font.pixelSize(); } -void TextLabel::setAlignment( TQString align ) +void TextLabel::tqsetAlignment( TQString align ) { TQString a = align.upper(); if( a == "LEFT" || a.isEmpty() ) - alignment = Qt::AlignLeft; + tqalignment = TQt::AlignLeft; if( a == "RIGHT" ) - alignment = Qt::AlignRight; + tqalignment = TQt::AlignRight; if( a == "CENTER" ) - alignment = Qt::AlignHCenter; + tqalignment = TQt::AlignHCenter; } TQString TextLabel::getAlignment() const { - if( alignment == Qt::AlignHCenter ) + if( tqalignment == TQt::AlignHCenter ) return "CENTER"; - else if( alignment == Qt::AlignRight ) + else if( tqalignment == TQt::AlignRight ) return "RIGHT"; else return "LEFT"; @@ -228,10 +228,10 @@ int TextLabel::drawText(TQPainter *p, int x, int y, int width, int height, { p->setPen(getBGColor()); p->drawText(x + shadow, y + shadow, width, height, - alignment | clip | Qt::ExpandTabs, text); + tqalignment | clip | TQt::ExpandTabs, text); } p->setPen(getColor()); - p->drawText(x, y, width, height, alignment | clip | Qt::ExpandTabs, text); + p->drawText(x, y, width, height, tqalignment | clip | TQt::ExpandTabs, text); return 0; } @@ -339,7 +339,7 @@ void TextLabel::mUpdate(TQPainter *p) bool TextLabel::click(TQMouseEvent* e) { - if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled()) + if (getBoundingBox().tqcontains(e -> x(), e -> y()) && isEnabled()) { TQString program; if (e -> button() == Qt::LeftButton) diff --git a/superkaramba/src/textlabel.h b/superkaramba/src/textlabel.h index f3774e6..b29c44e 100644 --- a/superkaramba/src/textlabel.h +++ b/superkaramba/src/textlabel.h @@ -23,6 +23,7 @@ class TextLabel : public Meter { Q_OBJECT + TQ_OBJECT public: enum ScrollType { ScrollNone, ScrollNormal, ScrollBackAndForth, ScrollOnePass }; @@ -39,7 +40,7 @@ public: void setFontSize( int ); void setBGColor(TQColor clr); void setFont( TQString ); - void setAlignment( TQString ); + void tqsetAlignment( TQString ); void setFixedPitch( bool ); void setShadow( int ); void mUpdate( TQPainter * ); @@ -61,7 +62,7 @@ public: virtual bool click(TQMouseEvent*); private: - int alignment; + int tqalignment; int clip; TQStringList value; TQFont font; diff --git a/superkaramba/src/textlabel_python.cpp b/superkaramba/src/textlabel_python.cpp index 3cf6e3e..e7d2498 100644 --- a/superkaramba/src/textlabel_python.cpp +++ b/superkaramba/src/textlabel_python.cpp @@ -206,7 +206,7 @@ PyObject* py_setTextAlign(PyObject *, PyObject *args) return NULL; if (!checkKarambaAndMeter(widget, textSensor, "TextLabel")) return NULL; - ((TextLabel*)textSensor)->setAlignment( text ); + ((TextLabel*)textSensor)->tqsetAlignment( text ); return Py_BuildValue((char*)"l", 1); } diff --git a/superkaramba/src/themefile.cpp b/superkaramba/src/themefile.cpp index 1147357..0e420d2 100644 --- a/superkaramba/src/themefile.cpp +++ b/superkaramba/src/themefile.cpp @@ -209,11 +209,11 @@ bool ThemeFile::set(const KURL &url) { if(!url.isLocalFile() && !url.protocol().isEmpty()) { - if(KMessageBox::warningContinueCancel(kapp->activeWindow(), + if(KMessageBox::warningContinueCancel(TQT_TQWIDGET(kapp->activeWindow()), i18n("You are about to install and run %1 SuperKaramba theme. Since " "themes can contain executable code you should only install themes " "from sources that you trust. Continue?"), i18n("Executable Code Warning"), i18n("Install") - .arg(url.prettyURL())) + .tqarg(url.prettyURL())) == KMessageBox::Cancel) { return false; @@ -224,9 +224,9 @@ bool ThemeFile::set(const KURL &url) if(localFile.exists()) { - if(KMessageBox::warningContinueCancel(kapp->activeWindow(), + if(KMessageBox::warningContinueCancel(TQT_TQWIDGET(kapp->activeWindow()), i18n("%1 already exists. Do you want to overwrite it?") - .arg(localFile.filePath()),i18n("File Exists"),i18n("Overwrite")) + .tqarg(localFile.filePath()),i18n("File Exists"),i18n("Overwrite")) == KMessageBox::Cancel) { return false; diff --git a/superkaramba/src/themelocale.cpp b/superkaramba/src/themelocale.cpp index 32886f6..bc388c2 100644 --- a/superkaramba/src/themelocale.cpp +++ b/superkaramba/src/themelocale.cpp @@ -46,7 +46,7 @@ # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif -typedef Q_UINT32 nls_uint32; +typedef TQ_UINT32 nls_uint32; struct loaded_domain { @@ -137,7 +137,7 @@ void ThemeLocale::unload() TQString ThemeLocale::translate(TQString text) const { if(text == 0) - return TQString::null; + return TQString(); if(m_domain.data) { TQString result = TQString::fromUtf8(tl_nl_find_msg(&m_domain, text.ascii())); @@ -157,12 +157,12 @@ void ThemeLocale::setLanguage(const TQStringList &languages) ++it) { TQString file = - TQString("locale/%1/LC_MESSAGES/%2.mo").arg(*it).arg(m_theme->mo()); + TQString("locale/%1/LC_MESSAGES/%2.mo").tqarg(*it).tqarg(m_theme->mo()); if(m_theme->fileExists(file)) { TQBuffer buffer(m_theme->readThemeFile(file)); - tl_nl_load_domain(&buffer, buffer.size(), &m_domain); + tl_nl_load_domain(TQT_TQIODEVICE(&buffer), buffer.size(), &m_domain); m_language = *it; return; } diff --git a/superkaramba/src/themes_layout.ui b/superkaramba/src/themes_layout.ui index d7d3ba5..daec764 100644 --- a/superkaramba/src/themes_layout.ui +++ b/superkaramba/src/themes_layout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ThemesLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ThemesLayout</cstring> </property> @@ -12,7 +12,7 @@ <height>517</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -25,15 +25,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelSearch</cstring> </property> @@ -44,12 +44,12 @@ <cstring>editSearch</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>editSearch</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelShow</cstring> </property> @@ -60,7 +60,7 @@ <cstring>comboShow</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>All</string> @@ -93,9 +93,9 @@ <enum>StrongFocus</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layoutButtons</cstring> + <cstring>tqlayoutButtons</cstring> </property> <hbox> <property name="name"> @@ -111,7 +111,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -122,7 +122,7 @@ <property name="name"> <cstring>buttonAddToDesktop</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -139,7 +139,7 @@ <property name="name"> <cstring>buttonClose</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -226,13 +226,13 @@ <tabstop>buttonAddToDesktop</tabstop> <tabstop>buttonClose</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">addToDesktop()</slot> <slot access="protected">selectionChanged(int)</slot> <slot access="protected">search(const QString&)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kwidgetlistbox.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/superkaramba/src/themesdlg.cpp b/superkaramba/src/themesdlg.cpp index f483a04..1a996cd 100644 --- a/superkaramba/src/themesdlg.cpp +++ b/superkaramba/src/themesdlg.cpp @@ -51,8 +51,8 @@ #include <kio/job.h> #include <kprotocolinfo.h> -ThemesDlg::ThemesDlg(TQWidget *parent, const char *name) - : ThemesLayout(parent, name) +ThemesDlg::ThemesDlg(TQWidget *tqparent, const char *name) + : ThemesLayout(tqparent, name) { populateListbox(); #ifdef HAVE_KNEWSTUFF @@ -220,9 +220,9 @@ void ThemesDlg::getNewStuff() KConfig* config = KGlobal::config(); config->setGroup("KNewStuff"); config->writePathEntry("ProvidersUrl", - TQString::fromLatin1("http://download.kde.org/khotnewstuff/karamba-providers.xml")); + TQString::tqfromLatin1("http://download.kde.org/khotnewstuff/karamba-providers.xml")); config->sync(); - m_newStuffStatus = config->entryMap("KNewStuffStatus").keys(); + m_newStufftqStatus = config->entryMap("KNewStufftqStatus").keys(); //This check is b/c KNewStuff will download, throw an error, //and still have the entry in the config that it was successful configSanityCheck(); @@ -302,10 +302,10 @@ void ThemesDlg::writeNewStuffConfig(const TQString &file) { #ifdef HAVE_KNEWSTUFF KConfig* config = KGlobal::config(); - TQStringList keys = config->entryMap("KNewStuffStatus").keys(); + TQStringList keys = config->entryMap("KNewStufftqStatus").keys(); - for(TQStringList::Iterator it = m_newStuffStatus.begin(); - it != m_newStuffStatus.end(); ++it) + for(TQStringList::Iterator it = m_newStufftqStatus.begin(); + it != m_newStufftqStatus.end(); ++it) { keys.remove(*it); } @@ -322,7 +322,7 @@ void ThemesDlg::configSanityCheck() { #ifdef HAVE_KNEWSTUFF KConfig* config = KGlobal::config(); - TQStringList statusKeys = config->entryMap("KNewStuffStatus").keys(); + TQStringList statusKeys = config->entryMap("KNewStufftqStatus").keys(); TQStringList nameKeys = config->entryMap("KNewStuffNames").keys(); TQStringList removeList; @@ -345,7 +345,7 @@ void ThemesDlg::configSanityCheck() if( removeKey ) { kdDebug() << "sanityCheck() deleting entry " << keyName << endl; - config->setGroup("KNewStuffStatus"); + config->setGroup("KNewStufftqStatus"); config->deleteEntry( keyName ); } } @@ -416,9 +416,9 @@ bool ThemesDlg::filter(int index, TQWidget* widget, void* data) } else { - if(w->themeName->text().lower().contains(searchText)) + if(w->themeName->text().lower().tqcontains(searchText)) return true; - if(w->description->text().lower().contains(searchText)) + if(w->description->text().lower().tqcontains(searchText)) return true; } return false; @@ -477,7 +477,7 @@ void ThemesDlg::uninstall() tableThemes->removeItem( twPtr ); } #ifdef HAVE_KNEWSTUFF - // Remove theme from KNewStuffStatus + // Remove theme from KNewStufftqStatus KConfig* config = KGlobal::config(); config->setGroup("KNewStuffNames"); TQString name = config->readEntry(tempPath); @@ -486,8 +486,8 @@ void ThemesDlg::uninstall() kdDebug() << "removing " << tempPath << " under KNewStuffNames from superkarambarc" << endl; kapp->config()->deleteEntry(tempPath); - config->setGroup("KNewStuffStatus"); - kdDebug() << "removing " << name << " under KNewStuffStatus from superkarambarc" + config->setGroup("KNewStufftqStatus"); + kdDebug() << "removing " << name << " under KNewStufftqStatus from superkarambarc" << endl; kapp->config()->deleteEntry(name); kapp->config()->sync(); @@ -507,7 +507,7 @@ void ThemesDlg::uninstall() } tableThemes->removeItem(w); #ifdef HAVE_KNEWSTUFF - // Remove theme from KNewStuffStatus + // Remove theme from KNewStufftqStatus KConfig* config = KGlobal::config(); config->setGroup("KNewStuffNames"); TQString name = config->readEntry(theme.path()); @@ -515,7 +515,7 @@ void ThemesDlg::uninstall() { kdDebug() << "removing " << theme.path() << " from superkarambarc" << endl; kapp->config()->deleteEntry(theme.path()); - config->setGroup("KNewStuffStatus"); + config->setGroup("KNewStufftqStatus"); kdDebug() << "removing " << name << " from superkarambarc" << endl; kapp->config()->deleteEntry(name); kapp->config()->sync(); diff --git a/superkaramba/src/themesdlg.h b/superkaramba/src/themesdlg.h index 2c9976f..200dca2 100644 --- a/superkaramba/src/themesdlg.h +++ b/superkaramba/src/themesdlg.h @@ -40,9 +40,10 @@ class KArchiveDirectory; class ThemesDlg : public ThemesLayout { Q_OBJECT + TQ_OBJECT public: - ThemesDlg(TQWidget *parent = 0, const char *name = 0); + ThemesDlg(TQWidget *tqparent = 0, const char *name = 0); ~ThemesDlg(); int addTheme(const TQString &appId, const TQString &file); @@ -73,7 +74,7 @@ class ThemesDlg : public ThemesLayout #ifdef HAVE_KNEWSTUFF private: SKNewStuff *mNewStuff; - TQStringList m_newStuffStatus; + TQStringList m_newStufftqStatus; #endif }; diff --git a/superkaramba/src/themewidget.cpp b/superkaramba/src/themewidget.cpp index cad020c..e286bc4 100644 --- a/superkaramba/src/themewidget.cpp +++ b/superkaramba/src/themewidget.cpp @@ -25,8 +25,8 @@ #include <tqlabel.h> #include <tqlayout.h> -ThemeWidget::ThemeWidget(TQWidget *parent, const char *name) - : ThemeWidgetLayout(parent, name), m_themeFile(0) +ThemeWidget::ThemeWidget(TQWidget *tqparent, const char *name) + : ThemeWidgetLayout(tqparent, name), m_themeFile(0) { running->setText(""); setDescriptionMaxHeight(); @@ -58,7 +58,7 @@ ThemeWidget::~ThemeWidget() int ThemeWidget::addInstance() { int i = 1; - while(m_instancePool.find(i) != m_instancePool.end()) + while(m_instancePool.tqfind(i) != m_instancePool.end()) ++i; m_instancePool.append(i); updateRunning(); @@ -75,7 +75,7 @@ void ThemeWidget::updateRunning() { int i = instances(); if(i > 0) - running->setText(i18n("<p align=\"center\">%1 running</p>").arg(i)); + running->setText(i18n("<p align=\"center\">%1 running</p>").tqarg(i)); else running->setText(""); } @@ -101,12 +101,12 @@ void ThemeWidget::showButton(bool show) void ThemeWidget::setDescriptionMaxHeight() { - if(layoutText->geometry().height() <= 0) + if(tqlayoutText->tqgeometry().height() <= 0) return; - int height = layoutText->geometry().height() - themeName->height() - - layoutText->spacing(); + int height = tqlayoutText->tqgeometry().height() - themeName->height() - + tqlayoutText->spacing(); if(buttonGo->isVisible()) - height -= layoutButton->geometry().height() + layoutText->spacing(); + height -= tqlayoutButton->tqgeometry().height() + tqlayoutText->spacing(); description->setMaximumHeight(height); } diff --git a/superkaramba/src/themewidget.h b/superkaramba/src/themewidget.h index 011bbe9..10e557d 100644 --- a/superkaramba/src/themewidget.h +++ b/superkaramba/src/themewidget.h @@ -30,8 +30,9 @@ class ThemeWidget : public ThemeWidgetLayout { Q_OBJECT + TQ_OBJECT public: - ThemeWidget(TQWidget *parent = 0, const char *name = 0); + ThemeWidget(TQWidget *tqparent = 0, const char *name = 0); ThemeWidget(ThemeFile* tf); ~ThemeWidget(); diff --git a/superkaramba/src/themewidget_layout.ui b/superkaramba/src/themewidget_layout.ui index eb91f0a..5ea381d 100644 --- a/superkaramba/src/themewidget_layout.ui +++ b/superkaramba/src/themewidget_layout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ThemeWidgetLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ThemeWidgetLayout</cstring> </property> @@ -23,19 +23,19 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layoutIcon</cstring> + <cstring>tqlayoutIcon</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>icon</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>76</width> <height>0</height> @@ -47,11 +47,11 @@ <property name="pixmap"> <pixmap>image0</pixmap> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>running</cstring> </property> @@ -77,15 +77,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layoutText</cstring> + <cstring>tqlayoutText</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>themeName</cstring> </property> @@ -106,7 +106,7 @@ <string>Header</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>description</cstring> </property> @@ -121,13 +121,13 @@ <property name="text"> <string>Description</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layoutButton</cstring> + <cstring>tqlayoutButton</cstring> </property> <hbox> <property name="name"> @@ -143,7 +143,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -174,8 +174,8 @@ <data format="PNG" length="5020">89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000136349444154789ccd9b79701cd59dc73fdd3d3da76634b22559b66ccbb66c832f81011f9804dbc460ee04024b4ced5661b2542559425249259b4a422d816443b612925425454208098b03213e30068c39623026061bdf3696e54bb264dd1a5d73f774f7db3fbae7d0686449beb2bfaae77e6f34d3fdbedff7bbfaf79ee112486a2ddf32d7d32b36205efa16f30137205d8a679f4d8410c817f301fa3a569beb697028fc42f2058a0116cfe4274039e038eb6f5f26a8bdc4fed80b1cfcd1bd5401ce8b31c78b42406a2dcbf5756c53649e939cae2a662d81950f40692553cab9e5f1552c038a18420bf497099a26ef23b8429198f7d51b79e77feee76ac035d46fce552ee8cde22f335555f89522732700d58b60d61250652005d16e787b0d6dbd1c1eff2077038d4032f71e03c02f5a8d103ada872f90d289fced63bef4d0b3bc07c40171bef3bd60262036104cade5d76e95538acc9d8c9f032bbf0d353781eac49aab006f114c9a494590b9bf79885b003f395a3810fc9791a72d44a9be0af5ba7b90a1e88bd7f0d797becadd80970ba4bde7a501620341dde05b8acc23924431a53360d64d503a09d0725aca6aa60e89286c7d996858eb28ba9f65403d9048fd95a01069f00f214f5b88b5d009208e196a24ba690d4622c99e53fc60c5cff90d1001cc739efff96880be8ed542b0dfa1f0a8e42b2d66f1d7e0b3df80d26964563cbf09010e2754cdc6e7a6fcb5eff300103cfc14634566e5bf823c6d49963452808e3c760cde3bee06878bf993f8c9e647780408709e9a306a0d48ad65b92cf32b59a206d507b3ee86eacf6199b296732da001866eb5440cb66d408b6bd1ef3ecfbd4fdecfcf149979caa2af214f5b4ceeca5b57bb090d118bd0f7caeba43aba69ed65d3154ff020d007e8a3c52284183901b683fbb322733d00b35641f5cda03a86016f13207208307444d371cc831fa3a5883a247ccaa287ed958fe7b41cf024c14881ae21a2517a5e7d1badb397961e5ebffa49be0c748f9684119980d840505fc7f3b683bb9ec92b61e5f370f99740f590557133af9f3bce31012120a521a21184090e099f34e506e469d73350edb3ea0f3a08c3f221a681e45028b9e57adcd593a8f0737bed0ff9f0df1650cd39e40a432623690727048f2832c5945e05355f87e22aac954e16005e88883478fbbe674e601eda85d03484d38b88c7314e6c452a9b8e327dc160e0e9be69806137534772c80497cc43a40c8c632d33bef7395e8f697c61fd018e63a9dd88a47022b28ed5b2c42f258962bc9570f5e3503a2f0778aecae78e0b99810da8a311b1fb7dcc6818213b90a7cd46ae9c027bde23d11dc3481a38a62fc675fdbd0c527d53035d03dd320152a901fdf0e10642bb4e11d7687bb78e071fd9c87b392b34a414f401a9b52c77286c450d40cda330f9f63ca0f94d2b70cd697d2d70701b664733480ea8988c5c3915dc1e70a8b0771b0289785b1f465cc731e36a3ccbefc882279907dc26229543889e2272ac958e1d0da474221b0f71fff7b6f0778649988672828abe8e7ac51598c4ca6da0ba86216008f0b14ea8dd068d9f629a2005c7214d9c0a5ebf053cddf66f0749420848b48749764791c78cc37fd7bd482ec95afd0cd8c1c073c7d1d321da3e6a261937a3b5edfcf89e17f92d1065885c612827288eb7f228a97ea8fd15598796df8688f5a9181c7d1fb63e078d9f223c7ee4e957204dbd0c3c3e5094bce600878ae474e2995c865ae227d5d14edfba971189986df376336c5f60eab63f1838f655f898f8d909a8aaec9b5dca4f5fbc67f85c61a830e8e95bc3b6809705acdc02ded26156deee9fdc0ab5ef402a014e0f944f027fc9c015cf6f077780248124832c8324116fed2372a21da9c84ff0d6e53882fec2663084592442315a76f510ebd1a9efe67777fe95ef03fd8031120d00481e6fe5bf0138f8b3b3acbc3d6e3d006f3d01075fb3c25569254cba0c7cc5202b676fb606e050adbea2e2995c867fd624f4de305d6bb7906aefb2f3876c28cc8e8d6c84b0fbee2289aa6b8b70fb65aa027ce5ed553c0f945020ea0d458079cd77d8d21be55d5adf83aedd79a06de05db5b0fde7f0f13390e805ff18a8980a81b105547d889601ee0087dd1415f7a43282d74c47e8069debb7123d529f170a8d3c22069a85a2184cbe4ac534a1d4c31dd7543017f00d2220b596e5bd6b5801a87984685bf6f15d006aff3070e5631db0e769d8fe2474d581db076593a1b8cccaf5875bf5821a600147b1fb0e15776529a54be7220c41d7dff71139d298e7038c214831301206f53b358409af1ee38fbbdbc0c638c0ec1d0e85adc55e101b20aef1514ae74022c5c1a62edebbe63bd42d9bcb9f2ad8b79ad60fa07436d43e0f273759bf565de00b82cb6d0338cb4a0f458043cdf101f655b27c01b28c5aeaa4eca62be9da7e94cead874975575152337ef0eae78c8da4ce89ed0962bd828d753cf7f83f781de8c28aad03c2a2d4fa1c5fab08f2db827620e88f2638eaf7b010b5c8fa3015b156cde5039727c7a139cfeeec0a35c5094777679c5f067c86882c31a666d2f2ea6e12edfdf8ab4b19b77862c15068c4344e6c8b10eb31d3e05f034e61155ffac90989e93cc0f7d1937c73f14c7e8c1a84c52f40aa1dfaf643e747d0b567202baa7b2070e53c08903d70fc93b36a402e31a6a6d3b2690fd1862e8a2606a858548e221919f0f1ae048d3ba3c47a0c5ea9e3b927ce023e970019086cfe210facb8821fabee808fc54f43e95c200644a1ef309c78051ab7596aeb0b5a959e0180464980e202fc50bf63e06a6780cb0588b1aeadafeda5775f03ce6217539697a14806f1ae3827b6f6a127c588c0a709506c9bd0fef201472a4a38706555f276a56983135f19144f04e2e076c384b9106b83de26cbd63c45034257c6938fa8a920798022089fb1fd41da8738ac7eda412a4aded8817ff6248c844effd176c267e2385c50bfbd7f54e0011e7bec31943419406af31e1a2797b16f5e1577286d1f38f18d81e2f164decf275c06520ad17e12924970fb905cae8cd71e3101b2cb028f1fa20d03812ab9440c4d4cd1e513514bfc847635d0d390c4d4a13b4653733f47af9b406cf51c9caf9ea4966cf2529080fc4c50023c8fddc7c26fdec1b3c55eaaa95e093577dbe66011214eefc6dcf926020565f254a4a2c0e81c9f540414034168df52c0de076686854c43eb89d2be791fa18f8e234c102698f65598565048f77583a694419330e94dea1cbafd2d1e07924208a3502a2c019efbae63c6335f655dc0cb74262f84abef22b74a639e3a84fef17b0849419d713972a078e48e8f0056621684d0a651f90023a1d3f5fe61dadfd88b69826f6280aa9ba6e0f442b23b86d61d43e829fa1b6308dd20d2a913e93488f70984092983c88d5b58009c1142440a154404107ff91f1c753ab8eba9d5bc50dab8eb4ad0a066a9954a981af2c4a9a8cbbc24b7bd4db2b60e75da341c13270e13ff1d58bb62de6c53d4821ebf905684de3f4cfbe63de8510d57b99fca15d329aaf45a6130a5e10aa8b8bc1e482904ca65123d09e23d7a06fc893eb63f778c172ddbb3d2e2e16a824ea0fcd4d33c5355ca2d225086b2f44e2b6ed80f35439d243edc8ea9a570cd99833aa56a08d55741f6e5acbedd222f0eab01bdbb8ed1be79375a5718b5d84bf9b2cb1853332e3307eba528dbf46892964f7a68de1b251517b445a97bfe386b3637710868079a810e21447224455175fb13dc79ed4cd6992610188b7add8d1675f6c3cd5088d8ee7d18b104eeb97370cdbaac00016e9bf8205082de7286f8ee0d988933046ebe19c9ed1e940cc54eb4d2b1f91322c75a905d4ec67ee632c6dd707961e076bf635f17a7dee9241537896884d61ce7d9174fb00be804dab032c208a00b21c488aac2cdcf7053999fb72459c6d04cf097a0d65c85ecf5661e2ee231229f1c22d517c3396d0a454b97e4393e1f508c193688ef7e9764ddf6ccfd95b163295aba0ca5b40c2499544f84b60d1fd27fe014c284b14be751bef20a14074302ef3edc49fde626e23d1a118dd0fbcd6cfcd97ede024240ab4d4018eb1d5ec028cae29dcfb222e0e11d87cf8d3004c9fe24c82aee050b903deecc24443c4effbee3a4fa1338675613b87169c6f109cd49e2e03ee2bbdf29f80cc9e5c277e36d843ea8a577672da609c185f328bb7501ce31ae82a04969f41feba4e9ed7afa4ef691d489edede4dddf1ce2d586304d58eade01f4dac00b6682c34ac73316016ab008d9e9408fa64884a208d98177fe3c148f3333219188133ed141bc3d825a399ee0ddb7933cfc2989437b11c944c1fb0b13623d10ebb6de6b3cd5d594ddb214df8c0a200e2269e7fd59e0c98e3ecebc514bc7ae168409ad11eabebd83a74e873983a5ea1d408f7583a14b6267dda34f8b69c7586407389c388a9d783c2ea28dbd8477ecc333b30a576911e829244c0255018496227aba95f65fff0167c032ef4292ec8768c8c2e6089632e1ae2fe2af9949767324ed0c2540c288eb9cd97488d6bf5bf1df1b940977999ceee7e8e9300d581960bbfde361374a464400c22af408c501aaf54aada84e7c5355fa8f771239729ad4f8121c2e07aa5746910d8a27bac0300877e824bac15d62f9b6b4a4e210e9b0804b4e1fe3573d40f1c2456413aef46b8a051c49a2f9b503b4bd7d845444c33fcec1a4f92e840907374591ad72572f595b1f918c8880744665bdf9a5375f2414bf13ffe52ae1139dc49a7ab2df93241c2e19a75be00940a41b226d566931adeea918484e3f636fbc87314b6f43f6c85805dc34e82cf8aeed47695ebf93644718d5a750bdd44fd94c17007d67aca207028145c2a8768b4767028ac3deefcfb941c049c9554508c344eb89a1f52749866224fb12c47acd01696ab8ddb2716182525cc9d89b1ea268de221b7c6c10f8f0d1469ad6bc49b4a11d599599bc2448458d37edc3adc551cc4c0a7c2e32320d48e7d5e9f255aeef94ac7f24155ce3ddb82658d11e24b4de045a6f9c78479464778c4457dc224380d1d54ccb9ac7329397dd3e5c13aa10c2c03d713cb1d34df41f39893061c282122aaef0a338e50cf00c09b261cded1ccf8b8cd2041c59139032ffd8e3c15ece59eac45916a06886fd41d9e7c15489edfd1d08413c94c0489a180983586702113e4db8294adfa77556fcbfbc98098bc6e20ad8d314e9ba245902143db340e722a38c02ea201328ecdea51c6e72fe9e3c09c904deca6200bc95e965cb6e9e66fb69a0394b2b067f5fc8294b8b4602a4808c4a03b226401e7069c065d020ddcd94bfed7b14043a4a32949105b2a164f42630400386039ea71d99dabf7d702a175c2ef0416414d202bb7f290830856d02bac7ceebed3fe4fb81b4e4034f8f151514ddd6803c5b8673d3824ba901b1fa668acbc643516af0aa0fe2a1c0670e07188eb31090db1f21199782804f5b3830bf9223c6e986d9424804af5d044506280c033ccf0fa4eb7d691f7036702335894b41c0e77f4be8cb4bf8c2c34bf963d9a9facfea099d319f59825ce6c8dee1ac0ed01ecb794e1018bcaab9fd1168817c7e048cf48c9df9c71d9c9eff53563585d81c3bdd44fbe67730bb015db5de0f327b03f6fe80eab4f70ef2f60bd28e7444fb09cea1bf23bb40f342d27b490800eb7dbae3da5ff260730f6f243abb69d9f8267a4b0c34dbb3abb9c07340a43fcb0d8343821d8614c90909177abbcca98d751cf8fd3f00e84ad0c9594ae043c9b91c957500635e58c5c3d74ee65149755279d7adb8aaca61ac2befb6f9b9c278d0c260368d2cd9c95c84158afa4c880b5a3f6ee0d4e64f8987a2c474421f74b0f11747d808d4014d58a5eb6165540725f3c40114bfb88affb87a023f92542793eebe1df794f150e6cf039d7b2d07a317c4993cb085faf6d810d09f8288414f5d07475ed8453c14453789ede862d313077905eb90648bdd86dc09ca97f32100ec3dc517efe3eb73cbf94f057c13562c23387f2e549659657060a01694029d205ab20087d20243405f02fa347a8eb6736af3117a8e77a09bc4f6f7f0eeef8ef1eae9282d58d59f76ace3b20946f13a7cbe04804dc2f7af67c5bfcce1cf32f826aef81c2557d540e5f89cac31fd98127bbe6d30e0a80dd9be61424f0c7a62243a23d4addf4fe7c166004e84d9f1a713acdd15e218d97a5fbaec35e0fccf48e44210001609bec79672c31d33f98b22f095cebf92ca1b96c39469d679c0cc63025805daf6f4141840426f183afbd0fbe31c7b652f2d3beb01e84850b7e6146bde6cc9d4f5dbb0d43ec6391c924ecb852200ecedb4af5ccdc2fb67f1accf41f598d9739872eb6d30712a148fb1bfe2c5da930831007c4f2fb487d0fba2346e3f4ae30775e8718d3e8da6f58dfce5a5063ea1405d9f737f09042e2c01609370d35466fc6031eb3c0ad383d53398b6f25694993530763cd67ff969c6d25a01a12e686b034da375f749ea5efb043daee57af62d5880d3c007d4f5cf572e34016091e0bc751a33be319f178a55aef4948e63f67dff8a63ea1ca89c053441b8099a9b2012a6f34803c75edf49bc2792efe09ac896b7fb2850d73f5fb91804a4c50994afbf8d672a3cdce22dade0f2bbeec33d6536e82d106ea5a7a185faad7be83ed50ac0a7bdbcf3542d7f6b8cd2cc6007774181a7e5621200d63ef2d8f537f36cb99bdb64d54dcdaa0771b8921c7f7b2b1db5f50813cec4d8f7741dffbb2bc449b20e2e0dfc9c1ddc48e462130076d6f8fc727e52e5e3df15d58d164f204c688f51f77a331b5eaacf6c5cb66279c7281719785a2e0501609110fce5221eae29e1bfa21a5d6f34f1d2ef8fb30d0b783b590797e20239b891c8a52200acca41e0de292c5cdb808195b474d82dedd92f8a9d9f4d2e250160254c5eacd35106562c4ff24f009e1671ae9b09e721b97b5eff74114220fd3358f8ff24ff07d25c4baf04fdecaa0000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="6"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="6"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kpushbutton.h</includehint> </includehints> diff --git a/superkaramba/src/uptimesensor.cpp b/superkaramba/src/uptimesensor.cpp index 1dcc280..4025f3a 100644 --- a/superkaramba/src/uptimesensor.cpp +++ b/superkaramba/src/uptimesensor.cpp @@ -101,13 +101,13 @@ void UptimeSensor::update() { format = "%dd %h:%M"; } - format.replace( TQRegExp("%d"), TQString::number(days)); - format.replace( TQRegExp("%H"), TQString::number(hours).rightJustify(2,'0')); - format.replace( TQRegExp("%M"), TQString::number(mins).rightJustify(2,'0')); - format.replace( TQRegExp("%S"), TQString::number(secs).rightJustify(2,'0')); - format.replace( TQRegExp("%h"), TQString::number(hours)); - format.replace( TQRegExp("%m"), TQString::number(mins)); - format.replace( TQRegExp("%s"), TQString::number(secs)); + format.tqreplace( TQRegExp("%d"), TQString::number(days)); + format.tqreplace( TQRegExp("%H"), TQString::number(hours).rightJustify(2,'0')); + format.tqreplace( TQRegExp("%M"), TQString::number(mins).rightJustify(2,'0')); + format.tqreplace( TQRegExp("%S"), TQString::number(secs).rightJustify(2,'0')); + format.tqreplace( TQRegExp("%h"), TQString::number(hours)); + format.tqreplace( TQRegExp("%m"), TQString::number(mins)); + format.tqreplace( TQRegExp("%s"), TQString::number(secs)); meter->setValue(format); ++it; diff --git a/superkaramba/src/widget_python.cpp b/superkaramba/src/widget_python.cpp index 0948e39..bfc4b27 100644 --- a/superkaramba/src/widget_python.cpp +++ b/superkaramba/src/widget_python.cpp @@ -63,14 +63,14 @@ long createWidgetMask(long widget, char* path) { karamba* currTheme = (karamba*)widget; TQBitmap bm; - TQString maskpath; + TQString tqmaskpath; TQString rootPath; rootPath.setAscii(currTheme->theme().path().ascii()); currTheme->clearMask(); - maskpath.setAscii(path); - rootPath.append(maskpath.ascii()); + tqmaskpath.setAscii(path); + rootPath.append(tqmaskpath.ascii()); if(currTheme->theme().isZipTheme()) { @@ -86,7 +86,7 @@ long createWidgetMask(long widget, char* path) return (long)currTheme->widgetMask; } -PyObject* py_create_widget_mask(PyObject *, PyObject *args) +PyObject* py_create_widget_tqmask(PyObject *, PyObject *args) { long widget; char *text; @@ -101,7 +101,7 @@ PyObject* py_create_widget_mask(PyObject *, PyObject *args) long redrawWidgetBackground(long widget) { karamba* currTheme = (karamba*)widget; - currTheme->kroot->repaint(true); + currTheme->kroot->tqrepaint(true); return 1; } diff --git a/superkaramba/src/widget_python.h b/superkaramba/src/widget_python.h index 97cc263..e54c31d 100644 --- a/superkaramba/src/widget_python.h +++ b/superkaramba/src/widget_python.h @@ -42,17 +42,17 @@ PyObject* py_get_widget_position(PyObject *self, PyObject *args); /** Widget/createWidgetMask * * SYNOPSIS -* long createWidgetMask(widget, mask) +* long createWidgetMask(widget, tqmask) * DESCRIPTION * This function doesn't work currently due to a bug in KDE. Please use * MASK= in your .theme file for the time being. * ARGUMENTS * * long widget -- karamba -* * string mask -- The name of the widget mask file. +* * string tqmask -- The name of the widget tqmask file. * RETURN VALUE * 1 if successful */ -PyObject* py_create_widget_mask(PyObject *self, PyObject *args); +PyObject* py_create_widget_tqmask(PyObject *self, PyObject *args); /** Widget/redrawWidgetBackground * diff --git a/superkaramba/src/xmmssensor.cpp b/superkaramba/src/xmmssensor.cpp index 268700b..60c7455 100644 --- a/superkaramba/src/xmmssensor.cpp +++ b/superkaramba/src/xmmssensor.cpp @@ -164,9 +164,9 @@ void XMMSSensor::update() { isPlaying = xmms->isPlaying(0); pos = xmms->getPlaylistPos(0); - qDebug("unicode start"); + qDebug("tqunicode start"); title = codec->toUnicode( TQCString( xmms->getPlaylistTitle( 0, pos ) ) ); - qDebug("unicode end"); + qDebug("tqunicode end"); if( title.isEmpty() ) title = "XMMS"; @@ -210,19 +210,19 @@ void XMMSSensor::update() { - format.replace( TQRegExp("%title", false), title ); + format.tqreplace( TQRegExp("%title", false), title ); - format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%length", false), TQTime( 0,0,0 ). addMSecs( songLength ) .toString( "h:mm:ss" ) ); - format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%time", false), TQTime( 0,0,0 ). addMSecs( currentTime ) .toString( "h:mm:ss" ) ); if( isPlaying ) { - format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ). + format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ). addMSecs( songLength ) .addMSecs(-currentTime ) .toString( "h:mm:ss" ) ); @@ -230,7 +230,7 @@ void XMMSSensor::update() else { - format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).toString("h:mm:ss" ) ); + format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ).toString("h:mm:ss" ) ); } meter->setValue(format); } diff --git a/superkaramba/src/xmmssensor.h b/superkaramba/src/xmmssensor.h index bda6b88..bd254fb 100644 --- a/superkaramba/src/xmmssensor.h +++ b/superkaramba/src/xmmssensor.h @@ -23,8 +23,9 @@ class XMMSSensor : public Sensor { Q_OBJECT + TQ_OBJECT public: - XMMSSensor( int interval, const TQString &encoding=TQString::null ); + XMMSSensor( int interval, const TQString &encoding=TQString() ); ~XMMSSensor(); void update(); void setMaxValue( SensorParams *); |