summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow/kopetechatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/chatwindow/kopetechatwindow.cpp')
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.cpp294
1 files changed, 147 insertions, 147 deletions
diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp
index 2af1426d..ad002edc 100644
--- a/kopete/kopete/chatwindow/kopetechatwindow.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp
@@ -19,12 +19,12 @@
*************************************************************************
*/
-#include <qtimer.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfileinfo.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kcursor.h>
@@ -63,13 +63,13 @@
#include "kopetestdaction.h"
#include "kopeteviewmanager.h"
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kactionclasses.h>
-typedef QMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
-typedef QMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
-typedef QMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
-typedef QPtrList<KopeteChatWindow> WindowList;
+typedef TQMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
+typedef TQMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
+typedef TQMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
+typedef TQPtrList<KopeteChatWindow> WindowList;
namespace
{
@@ -164,7 +164,7 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager )
return myWindow;
}
-KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
+KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name )
: KParts::MainWindow( parent, name )
{
m_activeView = 0L;
@@ -175,28 +175,28 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
initActions();
- QVBox *vBox = new QVBox( this );
+ TQVBox *vBox = new TQVBox( this );
vBox->setLineWidth( 0 );
vBox->setSpacing( 0 );
- vBox->setFrameStyle( QFrame::NoFrame );
+ vBox->setFrameStyle( TQFrame::NoFrame );
// set default window size. This could be removed by fixing the size hints of the contents
resize( 500, 500 );
setCentralWidget( vBox );
- mainArea = new QFrame( vBox );
+ mainArea = new TQFrame( vBox );
mainArea->setLineWidth( 0 );
- mainArea->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- mainLayout = new QVBoxLayout( mainArea );
+ 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->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::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()->sizeHint().height() );
- connect( m_button_send, SIGNAL( clicked() ), this, SLOT( slotSendMessage() ) );
+ connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) );
statusBar()->addWidget( m_button_send, 0, true );
}
else
@@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
windows.append( this );
windowListChanged();
- KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") );
- m_alwaysShowTabs = KGlobal::config()->readBoolEntry( QString::fromLatin1("AlwaysShowTabs"), false );
- m_showFormatToolbar = KGlobal::config()->readBoolEntry( QString::fromLatin1("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();
@@ -273,7 +273,7 @@ KopeteChatWindow::~KopeteChatWindow()
void KopeteChatWindow::windowListChanged()
{
// update all windows' Move Tab to Window action
- for ( QPtrListIterator<KopeteChatWindow> it( windows ); *it; ++it )
+ for ( TQPtrListIterator<KopeteChatWindow> it( windows ); *it; ++it )
(*it)->checkDetachEnable();
}
@@ -283,7 +283,7 @@ void KopeteChatWindow::slotNickComplete()
m_activeView->nickComplete();
}
-void KopeteChatWindow::slotTabContextMenu( QWidget *tab, const QPoint &pos )
+void KopeteChatWindow::slotTabContextMenu( TQWidget *tab, const TQPoint &pos )
{
m_popupView = static_cast<ChatView*>( tab );
@@ -313,101 +313,101 @@ void KopeteChatWindow::initActions(void)
createStandardStatusBarAction();
- chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), QKeySequence(Key_Return) ,
- this, SLOT( slotSendMessage() ), coll, "chat_send" );
+ chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) ,
+ this, TQT_SLOT( slotSendMessage() ), coll, "chat_send" );
chatSend->setEnabled( false );
- KStdAction::save ( this, SLOT(slotChatSave()), coll );
- KStdAction::print ( this, SLOT(slotChatPrint()), coll );
- KAction* quitAction = KStdAction::quit ( this, SLOT(close()), coll );
+ KStdAction::save ( this, TQT_SLOT(slotChatSave()), coll );
+ KStdAction::print ( this, TQT_SLOT(slotChatPrint()), coll );
+ KAction* quitAction = KStdAction::quit ( this, TQT_SLOT(close()), coll );
quitAction->setText( i18n("Close All Chats") );
- tabClose = KStdAction::close ( this, SLOT(slotChatClosed()), coll, "tabs_close" );
+ tabClose = KStdAction::close ( this, TQT_SLOT(slotChatClosed()), coll, "tabs_close" );
tabRight=new KAction( i18n( "&Activate Next Tab" ), 0, KStdAccel::tabNext(),
- this, SLOT( slotNextTab() ), coll, "tabs_right" );
+ this, TQT_SLOT( slotNextTab() ), coll, "tabs_right" );
tabLeft=new KAction( i18n( "&Activate Previous Tab" ), 0, KStdAccel::tabPrev(),
- this, SLOT( slotPreviousTab() ), coll, "tabs_left" );
+ this, TQT_SLOT( slotPreviousTab() ), coll, "tabs_left" );
tabLeft->setEnabled( false );
tabRight->setEnabled( false );
- nickComplete = new KAction( i18n( "Nic&k Completion" ), QString::null, 0, this, SLOT( slotNickComplete() ), coll , "nick_compete");
- nickComplete->setShortcut( QKeySequence( Key_Tab ) );
+ nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString::null, 0, this, TQT_SLOT( slotNickComplete() ), coll , "nick_compete");
+ nickComplete->setShortcut( TQKeySequence( Key_Tab ) );
- tabDetach = new KAction( i18n( "&Detach Chat" ), QString::fromLatin1( "tab_breakoff" ), 0,
- this, SLOT( slotDetachChat() ), coll, "tabs_detach" );
+ tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0,
+ this, TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" );
tabDetach->setEnabled( false );
- actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), QString::fromLatin1( "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(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareDetachMenu()) );
- connect ( actionDetachMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotDetachChat(int)) );
+ connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) );
+ connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDetachChat(int)) );
actionTabPlacementMenu = new KActionMenu( i18n( "&Tab Placement" ), coll, "tabs_placement" );
- connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPreparePlacementMenu()) );
- connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotPlaceTabs(int)) );
+ connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPreparePlacementMenu()) );
+ connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPlaceTabs(int)) );
- tabDetach->setShortcut( QKeySequence(CTRL + SHIFT + Key_B) );
+ tabDetach->setShortcut( TQKeySequence(CTRL + SHIFT + Key_B) );
- KStdAction::cut( this, SLOT(slotCut()), coll);
- KStdAction::copy( this, SLOT(slotCopy()), coll);
- KStdAction::paste( this, SLOT(slotPaste()), coll);
+ KStdAction::cut( this, TQT_SLOT(slotCut()), coll);
+ KStdAction::copy( this, TQT_SLOT(slotCopy()), coll);
+ KStdAction::paste( this, TQT_SLOT(slotPaste()), coll);
- new KAction( i18n( "Set Default &Font..." ), QString::fromLatin1( "charset" ), 0, this, SLOT( slotSetFont() ), coll, "format_font" );
- new KAction( i18n( "Set Default Text &Color..." ), QString::fromLatin1( "pencil" ), 0, this, SLOT( slotSetFgColor() ), coll, "format_fgcolor" );
- new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, this, SLOT( slotSetBgColor() ), coll, "format_bgcolor" );
+ new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, this, TQT_SLOT( slotSetFont() ), coll, "format_font" );
+ new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, this, TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" );
+ new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, this, TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" );
- historyUp = new KAction( i18n( "Previous History" ), QString::null, 0,
- this, SLOT( slotHistoryUp() ), coll, "history_up" );
- historyUp->setShortcut( QKeySequence(CTRL + Key_Up) );
+ historyUp = new KAction( i18n( "Previous History" ), TQString::null, 0,
+ this, TQT_SLOT( slotHistoryUp() ), coll, "history_up" );
+ historyUp->setShortcut( TQKeySequence(CTRL + Key_Up) );
- historyDown = new KAction( i18n( "Next History" ), QString::null, 0,
- this, SLOT( slotHistoryDown() ), coll, "history_down" );
- historyDown->setShortcut( QKeySequence(CTRL + Key_Down) );
+ historyDown = new KAction( i18n( "Next History" ), TQString::null, 0,
+ this, TQT_SLOT( slotHistoryDown() ), coll, "history_down" );
+ historyDown->setShortcut( TQKeySequence(CTRL + Key_Down) );
- KStdAction::prior( this, SLOT( slotPageUp() ), coll, "scroll_up" );
- KStdAction::next( this, SLOT( slotPageDown() ), coll, "scroll_down" );
+ KStdAction::prior( this, TQT_SLOT( slotPageUp() ), coll, "scroll_up" );
+ KStdAction::next( this, TQT_SLOT( slotPageDown() ), coll, "scroll_down" );
- KStdAction::showMenubar( this, SLOT(slotViewMenuBar()), coll );
+ KStdAction::showMenubar( this, TQT_SLOT(slotViewMenuBar()), coll );
- membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), QString::null, 0,
- this, SLOT( slotViewMembersLeft() ), coll, "options_membersleft" );
- membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), QString::null, 0,
- this, SLOT( slotViewMembersRight() ), coll, "options_membersright" );
- toggleMembers = new KToggleAction( i18n( "Show" ), QString::null, 0,
- this, SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" );
+ membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), TQString::null, 0,
+ this, TQT_SLOT( slotViewMembersLeft() ), coll, "options_membersleft" );
+ membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), TQString::null, 0,
+ this, TQT_SLOT( slotViewMembersRight() ), coll, "options_membersright" );
+ toggleMembers = new KToggleAction( i18n( "Show" ), TQString::null, 0,
+ this, TQT_SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" );
toggleMembers->setCheckedState(i18n("Hide"));
- toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), QString::null, 0,
- this, SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" );
+ toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), TQString::null, 0,
+ this, TQT_SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" );
toggleAutoSpellCheck->setChecked( true );
actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" );
actionSmileyMenu->setDelayed( false );
- connect(actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &)));
+ connect(actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &)));
actionContactMenu = new KActionMenu(i18n("Co&ntacts"), coll, "contacts_menu" );
actionContactMenu->setDelayed( false );
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareContactMenu()) );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareContactMenu()) );
// add configure key bindings menu item
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll );
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll );
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), coll);
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), coll);
KopeteStdAction::preferences( coll , "settings_prefs" );
//The Sending movie
- normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) );
- animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "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
- // QMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta
+ // TQMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta
if( !animIcon.isNull() ) //and another QT bug: it crash if we pause a null movie
animIcon.pause();
// we can't set the tool bar as parent, if we do, it will be deleted when we configure toolbars
- anim = new QLabel( QString::null, 0L ,"kde toolbar widget" );
+ anim = new TQLabel( TQString::null, 0L ,"kde toolbar widget" );
anim->setMargin(5);
anim->setPixmap( normalIcon );
@@ -418,20 +418,20 @@ void KopeteChatWindow::initActions(void)
//toolBar()->alignItemRight( 99 );
setStandardToolBarMenuEnabled( true );
- setXMLFile( QString::fromLatin1( "kopetechatwindow.rc" ) );
+ setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) );
createGUI( 0L );
// Special handling for remembering whether the format toolbar is visible or not
- connect ( toolBar("formatToolBar"), SIGNAL(visibilityChanged(bool)), this, SLOT(slotToggleFormatToolbar(bool)) );
+ connect ( toolBar("formatToolBar"), TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotToggleFormatToolbar(bool)) );
}
-const QString KopeteChatWindow::fileContents( const QString &path ) const
+const TQString KopeteChatWindow::fileContents( const TQString &path ) const
{
- QString contents;
- QFile file( path );
+ TQString contents;
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
contents = stream.read();
file.close();
}
@@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor()
m_activeView->setBgColor();
}
-void KopeteChatWindow::setStatus(const QString &text)
+void KopeteChatWindow::setStatus(const TQString &text)
{
m_status_text->setText(text);
}
@@ -590,28 +590,28 @@ void KopeteChatWindow::createTabBar()
{
if( !m_tabBar )
{
- KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") );
+ KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
m_tabBar = new KTabWidget( mainArea );
- m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( QString::fromLatin1("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);
#endif
- connect( m_tabBar, SIGNAL( closeRequest( QWidget* )), this, SLOT( slotCloseChat( QWidget* ) ) );
+ connect( m_tabBar, TQT_SIGNAL( closeRequest( TQWidget* )), this, TQT_SLOT( slotCloseChat( TQWidget* ) ) );
- QToolButton* m_rightWidget = new QToolButton( m_tabBar );
- connect( m_rightWidget, SIGNAL( clicked() ), this, SLOT( slotChatClosed() ) );
+ TQToolButton* m_rightWidget = new TQToolButton( m_tabBar );
+ connect( m_rightWidget, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChatClosed() ) );
m_rightWidget->setIconSet( SmallIcon( "tab_remove" ) );
m_rightWidget->adjustSize();
- QToolTip::add( m_rightWidget, i18n("Close the current tab"));
- m_tabBar->setCornerWidget( m_rightWidget, QWidget::TopRight );
+ TQToolTip::add( m_rightWidget, i18n("Close the current tab"));
+ m_tabBar->setCornerWidget( m_rightWidget, TQWidget::TopRight );
mainLayout->addWidget( m_tabBar );
m_tabBar->show();
- connect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) );
- connect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) );
+ connect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) );
+ connect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) );
for( ChatView *view = chatViewList.first(); view; view = chatViewList.next() )
addTab( view );
@@ -621,35 +621,35 @@ void KopeteChatWindow::createTabBar()
else
setActiveView( chatViewList.first() );
- int tabPosition = KGlobal::config()->readNumEntry( QString::fromLatin1("Tab Placement") , 0 );
+ int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 );
slotPlaceTabs( tabPosition );
}
}
-void KopeteChatWindow::slotCloseChat( QWidget *chatView )
+void KopeteChatWindow::slotCloseChat( TQWidget *chatView )
{
static_cast<ChatView*>( chatView )->closeView();
}
void KopeteChatWindow::addTab( ChatView *view )
{
- QPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
Kopete::Contact *c=0L;
for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() )
{
if(!c || c->onlineStatus() < contact->onlineStatus())
c=contact;
}
- QPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() );
+ TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() );
- view->reparent( m_tabBar, 0, QPoint(), true );
+ view->reparent( m_tabBar, 0, TQPoint(), true );
m_tabBar->addTab( view, pluginIcon, view->caption() );
if( view == m_activeView )
view->show();
else
view->hide();
- connect( view, SIGNAL( captionChanged( bool ) ), this, SLOT( updateChatLabel() ) );
- connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
+ connect( view, TQT_SIGNAL( captionChanged( bool ) ), this, TQT_SLOT( updateChatLabel() ) );
+ connect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
view->setCaption( view->caption(), false );
}
@@ -657,8 +657,8 @@ void KopeteChatWindow::setPrimaryChatView( ChatView *view )
{
//TODO figure out what else we have to save here besides the font
//reparent clears a lot of stuff out
- QFont savedFont = view->font();
- view->reparent( mainArea, 0, QPoint(), true );
+ TQFont savedFont = view->font();
+ view->reparent( mainArea, 0, TQPoint(), true );
view->setFont( savedFont );
view->show();
@@ -670,8 +670,8 @@ void KopeteChatWindow::deleteTabBar()
{
if( m_tabBar )
{
- disconnect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) );
- disconnect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) );
+ disconnect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) );
+ disconnect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) );
if( !chatViewList.isEmpty() )
setPrimaryChatView( chatViewList.first() );
@@ -700,17 +700,17 @@ void KopeteChatWindow::attachChatView( ChatView* newView )
newView->editWidget()->installEventFilter( this );
KCursor::setAutoHideCursor( newView->editWidget(), true, true );
- connect( newView, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) );
- connect( newView, SIGNAL(messageSuccess( ChatView* )), this, SLOT(slotStopAnimation( ChatView* )) );
- connect( newView, SIGNAL(rtfEnabled( ChatView*, bool ) ), this, SLOT( slotRTFEnabled( ChatView*, bool ) ) );
- connect( newView, SIGNAL(updateStatusIcon( ChatView* ) ), this, SLOT(slotUpdateCaptionIcons( ChatView* ) ) );
- connect( newView, SIGNAL(updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) );
+ connect( newView, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) );
+ connect( newView, TQT_SIGNAL(messageSuccess( ChatView* )), this, TQT_SLOT(slotStopAnimation( ChatView* )) );
+ connect( newView, TQT_SIGNAL(rtfEnabled( ChatView*, bool ) ), this, TQT_SLOT( slotRTFEnabled( ChatView*, bool ) ) );
+ connect( newView, TQT_SIGNAL(updateStatusIcon( ChatView* ) ), this, TQT_SLOT(slotUpdateCaptionIcons( ChatView* ) ) );
+ connect( newView, TQT_SIGNAL(updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) );
updateSpellCheckAction();
checkDetachEnable();
newView->loadChatSettings();
- connect( newView, SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ),
- this, SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) );
+ connect( newView, TQT_SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ),
+ this, TQT_SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) );
}
void KopeteChatWindow::checkDetachEnable()
@@ -730,15 +730,15 @@ void KopeteChatWindow::detachChatView( ChatView *view )
if( !chatViewList.removeRef( view ) )
return;
- disconnect( view, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) );
- disconnect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
- disconnect( view, SIGNAL( updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) );
+ disconnect( view, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) );
+ disconnect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
+ disconnect( view, TQT_SIGNAL( updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) );
view->editWidget()->removeEventFilter( this );
if( m_tabBar )
{
int curPage = m_tabBar->currentPageIndex();
- QWidget *page = m_tabBar->page( curPage );
+ TQWidget *page = m_tabBar->page( curPage );
// if the current view is to be detached, switch to a different one
if( page == view )
@@ -818,7 +818,7 @@ void KopeteChatWindow::slotSetCaption( bool active )
}
}
-void KopeteChatWindow::updateBackground( const QPixmap &pm )
+void KopeteChatWindow::updateBackground( const TQPixmap &pm )
{
if( updateBg )
{
@@ -829,13 +829,13 @@ void KopeteChatWindow::updateBackground( const QPixmap &pm )
backgroundFile->unlink();
}
- backgroundFile = new KTempFile( QString::null, QString::fromLatin1( ".bmp" ) );
+ backgroundFile = new KTempFile( TQString::null, TQString::fromLatin1( ".bmp" ) );
pm.save( backgroundFile->name(), "BMP" );
- QTimer::singleShot( 100, this, SLOT( slotEnableUpdateBg() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) );
}
}
-void KopeteChatWindow::setActiveView( QWidget *widget )
+void KopeteChatWindow::setActiveView( TQWidget *widget )
{
ChatView *view = static_cast<ChatView*>(widget);
@@ -844,7 +844,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget )
if(m_activeView)
{
- disconnect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) );
+ disconnect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) );
guiFactory()->removeClient(m_activeView->msgManager());
m_activeView->saveChatSettings();
}
@@ -860,7 +860,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget )
if( !chatViewList.contains( view ) )
attachChatView( view );
- connect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) );
+ connect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) );
//Tell it it is active
m_activeView->setActive( true );
@@ -905,7 +905,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view )
if ( !view )
return; //(pas de charité)
- QPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
Kopete::Contact *c=0L;
for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() )
{
@@ -915,9 +915,9 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view )
if ( view == m_activeView )
{
- QPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) :
+ TQPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) :
SmallIcon( view->msgManager()->protocol()->pluginIcon() );
- QPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) :
+ TQPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) :
SmallIcon( view->msgManager()->protocol()->pluginIcon() );
KWin::setIcons( winId(), icon32, icon16 );
}
@@ -937,7 +937,7 @@ void KopeteChatWindow::slotChatClosed()
void KopeteChatWindow::slotPrepareDetachMenu(void)
{
- QPopupMenu *detachMenu = actionDetachMenu->popupMenu();
+ TQPopupMenu *detachMenu = actionDetachMenu->popupMenu();
detachMenu->clear();
for ( unsigned id=0; id < windows.count(); id++ )
@@ -963,7 +963,7 @@ void KopeteChatWindow::slotSendMessage()
void KopeteChatWindow::slotPrepareContactMenu(void)
{
- QPopupMenu *contactsMenu = actionContactMenu->popupMenu();
+ TQPopupMenu *contactsMenu = actionContactMenu->popupMenu();
contactsMenu->clear();
Kopete::Contact *contact;
@@ -982,8 +982,8 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
for ( contact = m_them.first(); contact; contact = m_them.next() )
{
KPopupMenu *p = contact->popupMenu();
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()),
- p, SLOT(deleteLater() ) );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()),
+ p, TQT_SLOT(deleteLater() ) );
if( contact->metaContact() )
contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p );
@@ -994,9 +994,9 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
if( ++contactCount == 15 && contact != m_them.getLast() )
{
KActionMenu *moreMenu = new KActionMenu( i18n("More..."),
- QString::fromLatin1("folder_open"), contactsMenu );
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()),
- moreMenu, SLOT(deleteLater() ) );
+ TQString::fromLatin1("folder_open"), contactsMenu );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()),
+ moreMenu, TQT_SLOT(deleteLater() ) );
moreMenu->plug( contactsMenu );
contactsMenu = moreMenu->popupMenu();
contactCount = 0;
@@ -1006,7 +1006,7 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
void KopeteChatWindow::slotPreparePlacementMenu()
{
- QPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu();
+ TQPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu();
placementMenu->clear();
placementMenu->insertItem( i18n("Top"), 0 );
@@ -1019,9 +1019,9 @@ void KopeteChatWindow::slotPlaceTabs( int placement )
{
if( placement == 0 )
- m_tabBar->setTabPosition( QTabWidget::Top );
+ m_tabBar->setTabPosition( TQTabWidget::Top );
else
- m_tabBar->setTabPosition( QTabWidget::Bottom );
+ m_tabBar->setTabPosition( TQTabWidget::Bottom );
saveOptions();
}
@@ -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, QString::fromLatin1( "KopeteChatWindow" ) );
- config->setGroup( QString::fromLatin1("ChatWindowSettings") );
- m_showFormatToolbar = config->readBoolEntry( QString::fromLatin1("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, QString::fromLatin1( "KopeteChatWindow" ) );
- config->setGroup( QString::fromLatin1("ChatWindowSettings") );
+ saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) );
+ config->setGroup( TQString::fromLatin1("ChatWindowSettings") );
if( m_tabBar )
- config->writeEntry ( QString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() );
+ config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() );
- config->writeEntry( QString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar );
+ config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar );
config->sync();
}
@@ -1094,7 +1094,7 @@ void KopeteChatWindow::slotViewMenuBar()
menuBar()->show();
}
-void KopeteChatWindow::slotSmileyActivated(const QString &sm)
+void KopeteChatWindow::slotSmileyActivated(const TQString &sm)
{
if ( !sm.isNull() )
m_activeView->addText( " " + sm + " " );
@@ -1130,10 +1130,10 @@ bool KopeteChatWindow::queryClose()
bool canClose = true;
// kdDebug( 14010 ) << " Windows left open:" << endl;
-// for( QPtrListIterator<ChatView> it( chatViewList ); it; ++it)
+// for( TQPtrListIterator<ChatView> it( chatViewList ); it; ++it)
// kdDebug( 14010 ) << " " << *it << " (" << (*it)->caption() << ")" << endl;
- for( QPtrListIterator<ChatView> it( chatViewList ); it; )
+ for( TQPtrListIterator<ChatView> it( chatViewList ); it; )
{
ChatView *view = *it;
// move out of the way before view is removed
@@ -1169,7 +1169,7 @@ bool KopeteChatWindow::queryExit()
return false;
}
-void KopeteChatWindow::closeEvent( QCloseEvent * e )
+void KopeteChatWindow::closeEvent( TQCloseEvent * e )
{
// if there's a system tray applet and we are not shutting down then just do what needs to be done if a
// window is closed.
@@ -1197,7 +1197,7 @@ void KopeteChatWindow::slotConfKeys()
if( m_activeView )
{
dlg.insert(m_activeView->msgManager()->actionCollection() , i18n("Plugin Actions") );
- QPtrListIterator<KXMLGUIClient> it( *m_activeView->msgManager()->childClients() );
+ TQPtrListIterator<KXMLGUIClient> it( *m_activeView->msgManager()->childClients() );
KXMLGUIClient *c = 0;
while( (c = it.current()) != 0 )
{
@@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys()
void KopeteChatWindow::slotConfToolbar()
{
- saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "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(), QString::fromLatin1( "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, QString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
+ m_tabBar->setTabToolTip( cv, TQString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
}
void KopeteChatWindow::updateChatLabel()
@@ -1269,7 +1269,7 @@ void KopeteChatWindow::updateChatLabel()
if ( m_tabBar )
{
m_tabBar->setTabLabel( chat, chat->caption() );
- if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast<const QWidget *>(cv) )
+ if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast<const TQWidget *>(cv) )
setCaption( chat->caption() );
}
}