diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:49:40 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:49:40 -0600 |
commit | 808e453c56036211f57482ed847d54aca01bba68 (patch) | |
tree | 75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /kopete/kopete/chatwindow/kopetechatwindow.cpp | |
parent | cd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff) | |
download | tdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kopete/kopete/chatwindow/kopetechatwindow.cpp')
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindow.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp index f8cf09b2..59ee5671 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp @@ -22,7 +22,7 @@ #include <tqtimer.h> #include <tqhbox.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqfileinfo.h> @@ -185,17 +185,17 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) mainArea = new TQFrame( vBox ); mainArea->setLineWidth( 0 ); - mainArea->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + mainArea->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); mainLayout = new TQVBoxLayout( mainArea ); if ( KopetePrefs::prefs()->chatWShowSend() ) { //Send Button m_button_send = new KPushButton( i18n("Send"), statusBar() ); - m_button_send->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + m_button_send->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); m_button_send->setEnabled( false ); m_button_send->setFont( statusBar()->font() ); - m_button_send->setFixedHeight( statusBar()->tqsizeHint().height() ); + m_button_send->setFixedHeight( statusBar()->sizeHint().height() ); connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) ); statusBar()->addWidget( m_button_send, 0, true ); } @@ -203,9 +203,9 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) m_button_send = 0L; m_status_text = new KSqueezedTextLabel( i18n("Ready."), statusBar(), "m_status_text" ); - m_status_text->tqsetAlignment( AlignLeft | AlignVCenter ); + m_status_text->setAlignment( AlignLeft | AlignVCenter ); m_status_text->setFont( statusBar()->font() ); - m_status_text->setFixedHeight( statusBar()->tqsizeHint().height() ); + m_status_text->setFixedHeight( statusBar()->sizeHint().height() ); statusBar()->addWidget( m_status_text, 1 ); readOptions(); @@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) windows.append( this ); windowListChanged(); - KGlobal::config()->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); - m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("AlwaysShowTabs"), false ); - m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("Show Format Toolbar"), true ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false ); + m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); adjustingFormatToolbar = false; // kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl; kapp->ref(); @@ -313,7 +313,7 @@ void KopeteChatWindow::initActions(void) createStandardStatusBarAction(); - chatSend = new KAction( i18n( "&Send Message" ), TQString::tqfromLatin1( "mail_send" ), TQKeySequence(Key_Return) , + chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) , TQT_TQOBJECT(this), TQT_SLOT( slotSendMessage() ), coll, "chat_send" ); chatSend->setEnabled( false ); @@ -334,11 +334,11 @@ void KopeteChatWindow::initActions(void) nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNickComplete() ), coll , "nick_compete"); nickComplete->setShortcut( TQKeySequence( Key_Tab ) ); - tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::tqfromLatin1( "tab_breakoff" ), 0, + tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" ); tabDetach->setEnabled( false ); - actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::tqfromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); + actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); actionDetachMenu->setDelayed( false ); connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) ); @@ -354,9 +354,9 @@ void KopeteChatWindow::initActions(void) KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), coll); KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), coll); - new KAction( i18n( "Set Default &Font..." ), TQString::tqfromLatin1( "charset" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFont() ), coll, "format_font" ); - new KAction( i18n( "Set Default Text &Color..." ), TQString::tqfromLatin1( "pencil" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); - new KAction( i18n( "Set &Background Color..." ), TQString::tqfromLatin1( "fill" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFont() ), coll, "format_font" ); + new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); historyUp = new KAction( i18n( "Previous History" ), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT( slotHistoryUp() ), coll, "history_up" ); @@ -397,8 +397,8 @@ void KopeteChatWindow::initActions(void) KopeteStdAction::preferences( coll , "settings_prefs" ); //The Sending movie - normalIcon = TQPixmap( BarIcon( TQString::tqfromLatin1( "kopete" ) ) ); - animIcon = KGlobal::iconLoader()->loadMovie( TQString::tqfromLatin1( "newmessage" ), KIcon::Toolbar); + normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); // Pause the animation because otherwise it's running even when we're not // showing it. This eats resources, and also triggers a pixmap leak in @@ -418,7 +418,7 @@ void KopeteChatWindow::initActions(void) //toolBar()->alignItemRight( 99 ); setStandardToolBarMenuEnabled( true ); - setXMLFile( TQString::tqfromLatin1( "kopetechatwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) ); createGUI( 0L ); // Special handling for remembering whether the format toolbar is visible or not @@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor() m_activeView->setBgColor(); } -void KopeteChatWindow::settqStatus(const TQString &text) +void KopeteChatWindow::setStatus(const TQString &text) { m_status_text->setText(text); } @@ -590,11 +590,11 @@ void KopeteChatWindow::createTabBar() { if( !m_tabBar ) { - KGlobal::config()->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); m_tabBar = new KTabWidget( mainArea ); - m_tabBar->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::tqfromLatin1("HoverClose"), false )); + m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false )); m_tabBar->setTabReorderingEnabled(true); #if KDE_IS_VERSION(3,4,0) m_tabBar->setAutomaticResizeTabs(true); @@ -621,7 +621,7 @@ void KopeteChatWindow::createTabBar() else setActiveView( chatViewList.first() ); - int tabPosition = KGlobal::config()->readNumEntry( TQString::tqfromLatin1("Tab Placement") , 0 ); + int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 ); slotPlaceTabs( tabPosition ); } } @@ -637,7 +637,7 @@ void KopeteChatWindow::addTab( ChatView *view ) Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { - if(!c || c->onlinetqStatus() < contact->onlinetqStatus()) + if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); @@ -829,7 +829,7 @@ void KopeteChatWindow::updateBackground( const TQPixmap &pm ) backgroundFile->unlink(); } - backgroundFile = new KTempFile( TQString(), TQString::tqfromLatin1( ".bmp" ) ); + backgroundFile = new KTempFile( TQString(), TQString::fromLatin1( ".bmp" ) ); pm.save( backgroundFile->name(), "BMP" ); TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) ); } @@ -892,7 +892,7 @@ void KopeteChatWindow::setActiveView( TQWidget *widget ) } setCaption( m_activeView->caption() ); - settqStatus( m_activeView->statusText() ); + setStatus( m_activeView->statusText() ); m_activeView->setFocus(); updateSpellCheckAction(); slotUpdateSendEnabled(); @@ -909,7 +909,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { - if(!c || c->onlinetqStatus() < contact->onlinetqStatus()) + if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } @@ -986,15 +986,15 @@ void KopeteChatWindow::slotPrepareContactMenu(void) p, TQT_SLOT(deleteLater() ) ); if( contact->metaContact() ) - contactsMenu->insertItem( contact->onlinetqStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); + contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); else - contactsMenu->insertItem( contact->onlinetqStatus().iconFor( contact ) , contact->contactId(), p ); + contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->contactId(), p ); //FIXME: This number should be a config option if( ++contactCount == 15 && contact != m_them.getLast() ) { KActionMenu *moreMenu = new KActionMenu( i18n("More..."), - TQString::tqfromLatin1("folder_open"), TQT_TQOBJECT(contactsMenu) ); + TQString::fromLatin1("folder_open"), TQT_TQOBJECT(contactsMenu) ); connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), moreMenu, TQT_SLOT(deleteLater() ) ); moreMenu->plug( contactsMenu ); @@ -1032,9 +1032,9 @@ void KopeteChatWindow::readOptions() // load and apply config file settings affecting the appearance of the UI // kdDebug(14010) << k_funcinfo << endl; KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, TQString::tqfromLatin1( "KopeteChatWindow" ) ); - config->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); - m_showFormatToolbar = config->readBoolEntry( TQString::tqfromLatin1("Show Format Toolbar"), true ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); } void KopeteChatWindow::saveOptions() @@ -1044,12 +1044,12 @@ void KopeteChatWindow::saveOptions() KConfig *config = KGlobal::config(); // saves menubar,toolbar and statusbar setting - saveMainWindowSettings( config, TQString::tqfromLatin1( "KopeteChatWindow" ) ); - config->setGroup( TQString::tqfromLatin1("ChatWindowSettings") ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); if( m_tabBar ) - config->writeEntry ( TQString::tqfromLatin1("Tab Placement"), m_tabBar->tabPosition() ); + config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); - config->writeEntry( TQString::tqfromLatin1("Show Format Toolbar"), m_showFormatToolbar ); + config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); config->sync(); } @@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys() void KopeteChatWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteChatWindow" )); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); KEditToolbar *dlg = new KEditToolbar(factory(), this ); if (dlg->exec()) { @@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar() createGUI( m_activeView->editPart() ); else createGUI( 0L ); - applyMainWindowSettings(KGlobal::config(), TQString::tqfromLatin1( "KopeteChatWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); } delete dlg; } @@ -1256,7 +1256,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState ) void KopeteChatWindow::updateChatTooltip( ChatView* cv ) { if ( m_tabBar ) - m_tabBar->setTabToolTip( cv, TQString::tqfromLatin1("<qt>%1</qt>").tqarg( cv->caption() ) ); + m_tabBar->setTabToolTip( cv, TQString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) ); } void KopeteChatWindow::updateChatLabel() |