summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/kopetewindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/kopetewindow.cpp')
-rw-r--r--kopete/kopete/kopetewindow.cpp304
1 files changed, 152 insertions, 152 deletions
diff --git a/kopete/kopete/kopetewindow.cpp b/kopete/kopete/kopetewindow.cpp
index f3ec502e..e013a95c 100644
--- a/kopete/kopete/kopetewindow.cpp
+++ b/kopete/kopete/kopetewindow.cpp
@@ -21,14 +21,14 @@
#include "kopetewindow.h"
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qsignalmapper.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqsignalmapper.h>
#include <kaction.h>
#include <kactionclasses.h>
@@ -82,11 +82,11 @@
#include "kopeteeditglobalidentitywidget.h"
//BEGIN GlobalStatusMessageIconLabel
-GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(QWidget *parent, const char *name)
- : QLabel(parent, name)
+GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{}
-void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event )
+void GlobalStatusMessageIconLabel::mouseReleaseEvent( TQMouseEvent *event )
{
if( event->button() == Qt::LeftButton || event->button() == Qt::RightButton )
{
@@ -120,7 +120,7 @@ void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event )
* (session) quit.
*/
-KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
+KopeteWindow::KopeteWindow( TQWidget *parent, const char *name )
: KMainWindow( parent, name, WType_TopLevel )
{
// Applications should ensure that their StatusBar exists before calling createGUI()
@@ -129,25 +129,25 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
// This fixes a "statusbar drawn over the top of the toolbar" bug
// e.g. it can happen when you switch desktops on Kopete startup
- m_statusBarWidget = new QHBox(statusBar(), "m_statusBarWidget");
+ m_statusBarWidget = new TQHBox(statusBar(), "m_statusBarWidget");
m_statusBarWidget->setMargin( 2 );
m_statusBarWidget->setSpacing( 1 );
statusBar()->addWidget(m_statusBarWidget, 0, true );
- QHBox *statusBarMessage = new QHBox(statusBar(), "m_statusBarWidget");
+ TQHBox *statusBarMessage = new TQHBox(statusBar(), "m_statusBarWidget");
m_statusBarWidget->setMargin( 2 );
m_statusBarWidget->setSpacing( 1 );
GlobalStatusMessageIconLabel *label = new GlobalStatusMessageIconLabel( statusBarMessage, "statusmsglabel" );
label->setFixedSize( 16, 16 );
label->setPixmap( SmallIcon( "kopetestatusmessage" ) );
- connect(label, SIGNAL(iconClicked( const QPoint& )),
- this, SLOT(slotGlobalStatusMessageIconClicked( const QPoint& )));
- QToolTip::add( label, i18n( "Global status message" ) );
+ connect(label, TQT_SIGNAL(iconClicked( const TQPoint& )),
+ this, TQT_SLOT(slotGlobalStatusMessageIconClicked( const TQPoint& )));
+ TQToolTip::add( label, i18n( "Global status message" ) );
m_globalStatusMessage = new KSqueezedTextLabel( statusBarMessage );
statusBar()->addWidget(statusBarMessage, 1, false );
m_pluginConfig = 0L;
- m_autoHideTimer = new QTimer( this );
+ m_autoHideTimer = new TQTimer( this );
// --------------------------------------------------------------------------------
initView();
@@ -157,22 +157,22 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
// --------------------------------------------------------------------------------
// Trap all loaded plugins, so we can add their status bar icons accordingly , also used to add XMLGUIClient
- connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
- this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
- connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ),
- this, SLOT( slotAllPluginsLoaded() ));
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
+ this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ),
+ this, TQT_SLOT( slotAllPluginsLoaded() ));
//Connect the appropriate account signals
/* Please note that I tried to put this in the slotAllPluginsLoaded() function
* but it seemed to break the account icons in the statusbar --Matt */
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)),
- this, SLOT(slotAccountRegistered(Kopete::Account*)));
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(const Kopete::Account*)),
- this, SLOT(slotAccountUnregistered(const Kopete::Account*)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)),
+ this, TQT_SLOT(slotAccountRegistered(Kopete::Account*)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(const Kopete::Account*)),
+ this, TQT_SLOT(slotAccountUnregistered(const Kopete::Account*)));
- connect( m_autoHideTimer, SIGNAL( timeout() ), this, SLOT( slotAutoHide() ) );
- connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ),
- this, SLOT( slotContactListAppearanceChanged() ) );
+ connect( m_autoHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoHide() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ),
+ this, TQT_SLOT( slotContactListAppearanceChanged() ) );
createGUI ( "kopeteui.rc", false );
@@ -186,7 +186,7 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
slotPluginLoaded( *it );
// If some account alrady loaded, build the status icon
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
slotAccountRegistered(a);
@@ -209,22 +209,22 @@ void KopeteWindow::initActions()
actionCollection(), "AddContact" );
actionAddContact->setDelayed( false );
// this signal mapper is needed to call slotAddContact with the correct arguments
- addContactMapper = new QSignalMapper( this );
- connect( addContactMapper, SIGNAL( mapped( const QString & ) ),
- this, SLOT( slotAddContactDialogInternal( const QString & ) ) );
+ addContactMapper = new TQSignalMapper( this );
+ connect( addContactMapper, TQT_SIGNAL( mapped( const TQString & ) ),
+ this, TQT_SLOT( slotAddContactDialogInternal( const TQString & ) ) );
/* ConnectAll is now obsolete. "Go online" has replaced it.
actionConnect = new KAction( i18n( "&Connect Accounts" ), "connect_creating",
- 0, Kopete::AccountManager::self(), SLOT( connectAll() ),
+ 0, Kopete::AccountManager::self(), TQT_SLOT( connectAll() ),
actionCollection(), "ConnectAll" );
*/
actionDisconnect = new KAction( i18n( "O&ffline" ), "connect_no",
- 0, this, SLOT( slotDisconnectAll() ),
+ 0, this, TQT_SLOT( slotDisconnectAll() ),
actionCollection(), "DisconnectAll" );
actionExportContacts = new KAction( i18n( "&Export Contacts..." ), "", 0, this,
- SLOT( showExportDialog() ),actionCollection(), "ExportContacts" );
+ TQT_SLOT( showExportDialog() ),actionCollection(), "ExportContacts" );
/* the connection menu has been replaced by the set status menu
actionConnectionMenu = new KActionMenu( i18n("Connection"),"connect_established",
@@ -238,28 +238,28 @@ void KopeteWindow::initActions()
actionDisconnect->setEnabled(false);
selectAway = new KAction( i18n("&Away"), SmallIcon("kopeteaway"), 0,
- this, SLOT( slotGlobalAway() ), actionCollection(),
+ this, TQT_SLOT( slotGlobalAway() ), actionCollection(),
"SetAwayAll" );
selectBusy = new KAction( i18n("&Busy"), SmallIcon("kopeteaway"), 0,
- this, SLOT( slotGlobalBusy() ), actionCollection(),
+ this, TQT_SLOT( slotGlobalBusy() ), actionCollection(),
"SetBusyAll" );
actionSetInvisible = new KAction( i18n( "&Invisible" ), "kopeteavailable", 0 ,
- this, SLOT( slotSetInvisibleAll() ), actionCollection(),
+ this, TQT_SLOT( slotSetInvisibleAll() ), actionCollection(),
"SetInvisibleAll" );
/*actionSetAvailable = new KAction( i18n( "&Online" ),
"kopeteavailable", 0 , Kopete::AccountManager::self(),
- SLOT( setAvailableAll() ), actionCollection(),
+ TQT_SLOT( setAvailableAll() ), actionCollection(),
"SetAvailableAll" );*/
actionSetAvailable = new KAction( i18n("&Online"),
SmallIcon("kopeteavailable"), 0, this,
- SLOT( slotGlobalAvailable() ), actionCollection(),
+ TQT_SLOT( slotGlobalAvailable() ), actionCollection(),
"SetAvailableAll" );
actionAwayMenu = new KActionMenu( i18n("&Set Status"), "kopeteavailable",
@@ -273,40 +273,40 @@ void KopeteWindow::initActions()
actionPrefs = KopeteStdAction::preferences( actionCollection(), "settings_prefs" );
- KStdAction::quit(this, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection());
setStandardToolBarMenuEnabled(true);
- menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection(), "settings_showmenubar" );
- statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar");
+ menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection(), "settings_showmenubar" );
+ statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar");
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection(), "settings_keys" );
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection(), "settings_keys" );
new KAction( i18n( "Configure Plugins..." ), "input_devices_settings", 0, this,
- SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" );
+ TQT_SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" );
new KAction( i18n( "Configure &Global Shortcuts..." ), "configure_shortcuts", 0, this,
- SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" );
+ TQT_SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" );
- KStdAction::configureToolbars( this, SLOT(slotConfToolbar()), actionCollection() );
- KStdAction::configureNotifications(this, SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" );
+ KStdAction::configureToolbars( this, TQT_SLOT(slotConfToolbar()), actionCollection() );
+ KStdAction::configureNotifications(this, TQT_SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" );
actionShowOffliners = new KToggleAction( i18n( "Show Offline &Users" ), "show_offliners", CTRL + Key_U,
- this, SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" );
+ this, TQT_SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" );
actionShowEmptyGroups = new KToggleAction( i18n( "Show Empty &Groups" ), "folder", CTRL + Key_G,
- this, SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" );
+ this, TQT_SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" );
actionShowOffliners->setCheckedState(i18n("Hide Offline &Users"));
actionShowEmptyGroups->setCheckedState(i18n("Hide Empty &Groups"));
// quick search bar
- QLabel *searchLabel = new QLabel( i18n("Se&arch:"), 0, "kde toolbar widget" );
- QWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" );
+ TQLabel *searchLabel = new TQLabel( i18n("Se&arch:"), 0, "kde toolbar widget" );
+ TQWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" );
searchLabel->setBuddy( searchBar );
KWidgetAction *quickSearch = new KWidgetAction( searchBar, i18n( "Quick Search Bar" ), 0, 0, 0, actionCollection(), "quicksearch_bar" );
new KWidgetAction( searchLabel, i18n( "Search:" ), 0, 0, 0, actionCollection(), "quicksearch_label" );
quickSearch->setAutoSized( true );
// quick search bar - clear button
KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ),
- QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
- 0, searchBar, SLOT( clear() ), actionCollection(), "quicksearch_reset" );
+ TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
+ 0, searchBar, TQT_SLOT( clear() ), actionCollection(), "quicksearch_reset" );
resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search\n"
"Resets the quick search so that all contacts and groups are shown again." ) );
@@ -319,22 +319,22 @@ void KopeteWindow::initActions()
// KActionMenu for selecting the global status message(kopeteonlinestatus_0)
KActionMenu * setStatusMenu = new KActionMenu( i18n( "Set Status Message" ), "kopeteeditstatusmessage", actionCollection(), "SetStatusMessage" );
setStatusMenu->setDelayed( false );
- connect( setStatusMenu->popupMenu(), SIGNAL( aboutToShow() ), SLOT(slotBuildStatusMessageMenu() ) );
- connect( setStatusMenu->popupMenu(), SIGNAL( activated( int ) ), SLOT(slotStatusMessageSelected( int ) ) );
+ connect( setStatusMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT(slotBuildStatusMessageMenu() ) );
+ connect( setStatusMenu->popupMenu(), TQT_SIGNAL( activated( int ) ), TQT_SLOT(slotStatusMessageSelected( int ) ) );
// sync actions, config and prefs-dialog
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
slotConfigChanged();
globalAccel = new KGlobalAccel( this );
- globalAccel->insert( QString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"),
- CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), SLOT(slotReadMessage()) );
+ globalAccel->insert( TQString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"),
+ CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), TQT_SLOT(slotReadMessage()) );
- globalAccel->insert( QString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"),
- CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, SLOT(slotShowHide()) );
+ globalAccel->insert( TQString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"),
+ CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, TQT_SLOT(slotShowHide()) );
- globalAccel->insert( QString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"),
- CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, SLOT(slotToggleAway()) );
+ globalAccel->insert( TQString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"),
+ CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, TQT_SLOT(slotToggleAway()) );
globalAccel->readSettings();
globalAccel->updateConnections();
@@ -371,7 +371,7 @@ void KopeteWindow::slotToggleAway()
}
else
{
- QString awayReason = mAway->getMessage( 0 );
+ TQString awayReason = mAway->getMessage( 0 );
slotGlobalAway();
}
}
@@ -391,9 +391,9 @@ void KopeteWindow::initSystray()
//actionConnectionMenu->plug ( tm, 1 );
tm->insertSeparator( 1 );
- QObject::connect( m_tray, SIGNAL( aboutToShowMenu( KPopupMenu * ) ),
- this, SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) );
- QObject::connect( m_tray, SIGNAL( quitSelected() ), this, SLOT( slotQuit() ) );
+ TQObject::connect( m_tray, TQT_SIGNAL( aboutToShowMenu( KPopupMenu * ) ),
+ this, TQT_SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) );
+ TQObject::connect( m_tray, TQT_SIGNAL( quitSelected() ), this, TQT_SLOT( slotQuit() ) );
}
KopeteWindow::~KopeteWindow()
@@ -401,7 +401,7 @@ KopeteWindow::~KopeteWindow()
delete m_pluginConfig;
}
-bool KopeteWindow::eventFilter( QObject* target, QEvent* event )
+bool KopeteWindow::eventFilter( TQObject* target, TQEvent* event )
{
KToolBar* toolBar = dynamic_cast<KToolBar*>( target );
KAction* resetAction = actionCollection()->action( "quicksearch_reset" );
@@ -409,7 +409,7 @@ bool KopeteWindow::eventFilter( QObject* target, QEvent* event )
if ( toolBar && resetAction && resetAction->isPlugged( toolBar ) )
{
- if ( event->type() == QEvent::Hide )
+ if ( event->type() == TQEvent::Hide )
{
resetAction->activate();
return true;
@@ -430,16 +430,16 @@ void KopeteWindow::loadOptions()
// FIXME: HACK: Is there a way to do that automatic ?
editGlobalIdentityWidget->setIconSize(toolBar("editGlobalIdentityBar")->iconSize());
- connect(toolBar("editGlobalIdentityBar"), SIGNAL(modechange()), editGlobalIdentityWidget, SLOT(iconSizeChanged()));
+ connect(toolBar("editGlobalIdentityBar"), TQT_SIGNAL(modechange()), editGlobalIdentityWidget, TQT_SLOT(iconSizeChanged()));
applyMainWindowSettings( config, "General Options" );
config->setGroup("General Options");
- QPoint pos = config->readPointEntry("Position");
+ TQPoint pos = config->readPointEntry("Position");
move(pos);
- QSize size = config->readSizeEntry("Geometry");
+ TQSize size = config->readSizeEntry("Geometry");
if(size.isEmpty()) // Default size
- resize( QSize(220, 350) );
+ resize( TQSize(220, 350) );
else
resize(size);
@@ -449,7 +449,7 @@ void KopeteWindow::loadOptions()
m_autoHideTimeout = p->contactListAutoHideTimeout();
- QString tmp = config->readEntry("State", "Shown");
+ TQString tmp = config->readEntry("State", "Shown");
if ( tmp == "Minimized" && p->showTray())
{
showMinimized();
@@ -518,9 +518,9 @@ void KopeteWindow::slotToggleShowOffliners()
KopetePrefs *p = KopetePrefs::prefs();
p->setShowOffline ( actionShowOffliners->isChecked() );
- disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
p->save();
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
}
void KopeteWindow::slotToggleShowEmptyGroups()
@@ -528,9 +528,9 @@ void KopeteWindow::slotToggleShowEmptyGroups()
KopetePrefs *p = KopetePrefs::prefs();
p->setShowEmptyGroups ( actionShowEmptyGroups->isChecked() );
- disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
p->save();
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
}
void KopeteWindow::slotConfigChanged()
@@ -578,8 +578,8 @@ void KopeteWindow::slotConfToolbar()
{
saveMainWindowSettings(KGlobal::config(), "General Options");
KEditToolbar *dlg = new KEditToolbar(factory());
- connect( dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotUpdateToolbar()) );
- connect( dlg, SIGNAL(finished()) , dlg, SLOT(deleteLater()));
+ connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotUpdateToolbar()) );
+ connect( dlg, TQT_SIGNAL(finished()) , dlg, TQT_SLOT(deleteLater()));
dlg->show();
}
@@ -612,7 +612,7 @@ void KopeteWindow::slotSetInvisibleAll()
void KopeteWindow::slotDisconnectAll()
{
m_globalStatusMessage->setText( "" );
- m_globalStatusMessageStored = QString();
+ m_globalStatusMessageStored = TQString();
Kopete::AccountManager::self()->disconnectAll();
}
@@ -651,7 +651,7 @@ bool KopeteWindow::queryExit()
return false;
}
-void KopeteWindow::closeEvent( QCloseEvent *e )
+void KopeteWindow::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.
@@ -704,46 +704,46 @@ void KopeteWindow::slotAccountRegistered( Kopete::Account *account )
actionDisconnect->setEnabled(true);
connect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ),
- this, SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) );
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ),
+ this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) );
-// connect( account, SIGNAL( iconAppearanceChanged() ), SLOT( slotAccountStatusIconChanged() ) );
- connect( account, SIGNAL( colorChanged(const QColor& ) ), SLOT( slotAccountStatusIconChanged() ) );
+// connect( account, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( slotAccountStatusIconChanged() ) );
+ connect( account, TQT_SIGNAL( colorChanged(const TQColor& ) ), TQT_SLOT( slotAccountStatusIconChanged() ) );
connect( account->myself(),
- SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) );
+ TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) );
KopeteAccountStatusBarIcon *sbIcon = new KopeteAccountStatusBarIcon( account, m_statusBarWidget );
- connect( sbIcon, SIGNAL( rightClicked( Kopete::Account *, const QPoint & ) ),
- SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
- const QPoint & ) ) );
- connect( sbIcon, SIGNAL( leftClicked( Kopete::Account *, const QPoint & ) ),
- SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
- const QPoint & ) ) );
+ connect( sbIcon, TQT_SIGNAL( rightClicked( Kopete::Account *, const TQPoint & ) ),
+ TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
+ const TQPoint & ) ) );
+ connect( sbIcon, TQT_SIGNAL( leftClicked( Kopete::Account *, const TQPoint & ) ),
+ TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
+ const TQPoint & ) ) );
m_accountStatusBarIcons.insert( account, sbIcon );
slotAccountStatusIconChanged( account->myself() );
// add an item for this account to the add contact actionmenu
- QString s = "actionAdd%1Contact";
+ TQString s = "actionAdd%1Contact";
s.arg( account->accountId() );
- KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, SLOT( map() ), account, s.latin1() );
- addContactMapper->setMapping( action, account->protocol()->pluginId() + QChar(0xE000) + account->accountId() );
+ KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, TQT_SLOT( map() ), account, s.latin1() );
+ addContactMapper->setMapping( action, account->protocol()->pluginId() + TQChar(0xE000) + account->accountId() );
actionAddContact->insert( action );
}
void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account)
{
// kdDebug(14000) << k_funcinfo << "Called." << endl;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
if (accounts.isEmpty())
{
// actionConnect->setEnabled(false);
actionDisconnect->setEnabled(false);
}
- // the (void*) is to remove the const. i don't know why QPtrList doesn't accept const ptr as key.
+ // the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key.
KopeteAccountStatusBarIcon *sbIcon = static_cast<KopeteAccountStatusBarIcon *>( m_accountStatusBarIcons[ (void*)account ] );
if( !sbIcon )
@@ -755,7 +755,7 @@ void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account)
makeTrayToolTip();
// update add contact actionmenu
- QString s = "actionAdd%1Contact";
+ TQString s = "actionAdd%1Contact";
s.arg( account->accountId() );
// KAction * action = actionCollection()->action( account->accountId() );
Kopete::Account * myAccount = const_cast< Kopete::Account * > ( account );
@@ -778,11 +778,11 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
{
kdDebug( 14000 ) << k_funcinfo << contact->property( Kopete::Global::Properties::self()->awayMessage() ).value() << endl;
// update the global status label if the change doesn't
-// QString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
+// TQString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
Kopete::OnlineStatus status = contact->onlineStatus();
/* if ( status.status() != Kopete::OnlineStatus::Connecting )
{
- QString globalMessage = m_globalStatusMessage->text();
+ TQString globalMessage = m_globalStatusMessage->text();
if ( newAwayMessage != globalMessage )
m_globalStatusMessage->setText( "" /* i18n("status message to show when different accounts have different status messages", "(multiple)" )*/ /*);
}*/
@@ -799,8 +799,8 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
else //If the account has not status message, it may be because the protocol doesn't support it (Bug 132609)
{ // or because the user just set an empty status to this account.
// We will check if another account has still a status message, if yes, we will use it, if not, we will clear it.
- QString statusMessageToUse;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString statusMessageToUse;
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a = accounts.first(); a; a = accounts.next())
{
Kopete::Contact *self = a->myself();
@@ -823,22 +823,22 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
// Adds tooltip for each status icon,
// useful in case you have many accounts
// over one protocol
- QToolTip::remove( i );
- QToolTip::add( i, contact->toolTip() );
+ TQToolTip::remove( i );
+ TQToolTip::add( i, contact->toolTip() );
// Because we want null pixmaps to detect the need for a loadMovie
// we can't use the SmallIcon() method directly
KIconLoader *loader = KGlobal::instance()->iconLoader();
- QMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small );
+ TQMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small );
if ( mv.isNull() )
{
// No movie found, fallback to pixmap
// Get the icon for our status
- //QPixmap pm = SmallIcon( icon );
- QPixmap pm = status.iconFor( contact->account() );
+ //TQPixmap pm = SmallIcon( icon );
+ TQPixmap pm = status.iconFor( contact->account() );
// No Pixmap found, fallback to Unknown
if( pm.isNull() )
@@ -859,10 +859,10 @@ void KopeteWindow::makeTrayToolTip()
//the tool-tip of the systemtray.
if(m_tray)
{
- QToolTip::remove(m_tray);
+ TQToolTip::remove(m_tray);
- QString tt = QString::fromLatin1("<qt>");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString tt = TQString::fromLatin1("<qt>");
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a = accounts.first(); a; a = accounts.next())
{
Kopete::Contact *self = a->myself();
@@ -871,45 +871,45 @@ void KopeteWindow::makeTrayToolTip()
.arg( a->protocol()->displayName() ).arg( a->accountLabel(), KURL::encode_string( a->protocol()->pluginId() ),
KURL::encode_string( a->accountId() ), self->onlineStatus().description() );
}
- tt += QString::fromLatin1("</qt>");
- QToolTip::add(m_tray, tt);
+ tt += TQString::fromLatin1("</qt>");
+ TQToolTip::add(m_tray, tt);
}
}
-void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const QPoint &p )
+void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const TQPoint &p )
{
KActionMenu *actionMenu = account->actionMenu();
if ( !actionMenu )
return;
- connect( actionMenu->popupMenu(), SIGNAL( aboutToHide() ), actionMenu, SLOT( deleteLater() ) );
+ connect( actionMenu->popupMenu(), TQT_SIGNAL( aboutToHide() ), actionMenu, TQT_SLOT( deleteLater() ) );
actionMenu->popupMenu()->popup( p );
}
void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * popup )
{
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
{
KActionMenu *menu = a->actionMenu();
if( menu )
menu->plug(popup, 1 );
- connect(popup , SIGNAL(aboutToHide()) , menu , SLOT(deleteLater()));
+ connect(popup , TQT_SIGNAL(aboutToHide()) , menu , TQT_SLOT(deleteLater()));
}
}
-/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p )
+/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p )
{
//kdDebug( 14000 ) << k_funcinfo << endl;
if ( Kopete::AccountManager::self()->accounts( proto ).count() > 0 )
{
KActionMenu *menu = proto->protocolActions();
- connect( menu->popupMenu(), SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) );
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) );
menu->popupMenu()->popup( p );
}
}*/
@@ -919,19 +919,19 @@ void KopeteWindow::showExportDialog()
( new KabcExportWizard( this, "export_contact_dialog" ) )->show();
}
-void KopeteWindow::leaveEvent( QEvent * )
+void KopeteWindow::leaveEvent( TQEvent * )
{
startAutoHideTimer();
}
-void KopeteWindow::showEvent( QShowEvent * )
+void KopeteWindow::showEvent( TQShowEvent * )
{
startAutoHideTimer();
}
void KopeteWindow::slotAutoHide()
{
- if ( this->geometry().contains( QCursor::pos() ) == false )
+ if ( this->geometry().contains( TQCursor::pos() ) == false )
{
/* The autohide-timer doesn't need to emit
* timeouts when the window is hidden already. */
@@ -948,10 +948,10 @@ void KopeteWindow::startAutoHideTimer()
// Iterate each connected account, updating its status message bug keeping the
// same onlinestatus. Then update Kopete::Away and the UI.
-void KopeteWindow::setStatusMessage( const QString & message )
+void KopeteWindow::setStatusMessage( const TQString & message )
{
bool changed = false;
- for ( QPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it )
{
Kopete::Contact *self = it.current()->myself();
bool isInvisible = self && self->onlineStatus().status() == Kopete::OnlineStatus::Invisible;
@@ -968,28 +968,28 @@ void KopeteWindow::setStatusMessage( const QString & message )
void KopeteWindow::slotBuildStatusMessageMenu()
{
- QObject * senderObj = const_cast<QObject *>( sender() );
+ TQObject * senderObj = const_cast<TQObject *>( sender() );
m_globalStatusMessageMenu = static_cast<KPopupMenu *>( senderObj );
m_globalStatusMessageMenu->clear();
// pop up a menu containing the away messages, and a lineedit
// see kopeteaway
//messageMenu = new KPopupMenu( this );
// messageMenu->insertTitle( i18n( "Status Message" ) );
- QHBox * newMessageBox = new QHBox( 0 );
+ TQHBox * newMessageBox = new TQHBox( 0 );
newMessageBox->setMargin( 1 );
- QLabel * newMessagePix = new QLabel( newMessageBox );
+ TQLabel * newMessagePix = new TQLabel( newMessageBox );
newMessagePix->setPixmap( SmallIcon( "edit" ) );
-/* QLabel * newMessageLabel = new QLabel( i18n( "Add " ), newMessageBox );*/
- m_newMessageEdit = new QLineEdit( newMessageBox, "newmessage" );
+/* TQLabel * newMessageLabel = new TQLabel( i18n( "Add " ), newMessageBox );*/
+ m_newMessageEdit = new TQLineEdit( newMessageBox, "newmessage" );
newMessageBox->setFocusProxy( m_newMessageEdit );
- newMessageBox->setFocusPolicy( QWidget::ClickFocus );
+ newMessageBox->setFocusPolicy( TQWidget::ClickFocus );
/* newMessageLabel->setFocusProxy( newMessageEdit );
newMessageLabel->setBuddy( newMessageEdit );
- newMessageLabel->setFocusPolicy( QWidget::ClickFocus );*/
+ newMessageLabel->setFocusPolicy( TQWidget::ClickFocus );*/
newMessagePix->setFocusProxy( m_newMessageEdit );
- newMessagePix->setFocusPolicy( QWidget::ClickFocus );
- connect( m_newMessageEdit, SIGNAL( returnPressed() ), SLOT( slotNewStatusMessageEntered() ) );
+ newMessagePix->setFocusPolicy( TQWidget::ClickFocus );
+ connect( m_newMessageEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotNewStatusMessageEntered() ) );
m_globalStatusMessageMenu->insertItem( newMessageBox );
@@ -998,13 +998,13 @@ void KopeteWindow::slotBuildStatusMessageMenu()
m_globalStatusMessageMenu->insertItem( SmallIcon( "remove" ), i18n( "No Message" ), i++ );
m_globalStatusMessageMenu->insertSeparator();
- QStringList awayMessages = Kopete::Away::getInstance()->getMessages();
- for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i )
+ TQStringList awayMessages = Kopete::Away::getInstance()->getMessages();
+ for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i )
{
m_globalStatusMessageMenu->insertItem( KStringHandler::rsqueeze( *it ), i );
}
-// connect( m_globalStatusMessageMenu, SIGNAL( activated( int ) ), SLOT( slotStatusMessageSelected( int ) ) );
-// connect( messageMenu, SIGNAL( aboutToHide() ), messageMenu, SLOT( deleteLater() ) );
+// connect( m_globalStatusMessageMenu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotStatusMessageSelected( int ) ) );
+// connect( messageMenu, TQT_SIGNAL( aboutToHide() ), messageMenu, TQT_SLOT( deleteLater() ) );
m_newMessageEdit->setFocus();
@@ -1023,27 +1023,27 @@ void KopeteWindow::slotStatusMessageSelected( int i )
void KopeteWindow::slotNewStatusMessageEntered()
{
m_globalStatusMessageMenu->close();
- QString newMessage = m_newMessageEdit->text();
+ TQString newMessage = m_newMessageEdit->text();
if ( !newMessage.isEmpty() )
Kopete::Away::getInstance()->addMessage( newMessage );
setStatusMessage( m_newMessageEdit->text() );
}
-void KopeteWindow::slotGlobalStatusMessageIconClicked( const QPoint &position )
+void KopeteWindow::slotGlobalStatusMessageIconClicked( const TQPoint &position )
{
KPopupMenu *statusMessageIconMenu = new KPopupMenu(this, "statusMessageIconMenu");
- connect(statusMessageIconMenu, SIGNAL( aboutToShow() ),
- this, SLOT(slotBuildStatusMessageMenu()));
- connect( statusMessageIconMenu, SIGNAL( activated( int ) ),
- SLOT( slotStatusMessageSelected( int ) ) );
+ connect(statusMessageIconMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT(slotBuildStatusMessageMenu()));
+ connect( statusMessageIconMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotStatusMessageSelected( int ) ) );
statusMessageIconMenu->popup(position);
}
-void KopeteWindow::slotAddContactDialogInternal( const QString & accountIdentifier )
+void KopeteWindow::slotAddContactDialogInternal( const TQString & accountIdentifier )
{
- QString protocolId = accountIdentifier.section( QChar(0xE000), 0, 0 );
- QString accountId = accountIdentifier.section( QChar(0xE000), 1, 1 );
+ TQString protocolId = accountIdentifier.section( TQChar(0xE000), 0, 0 );
+ TQString accountId = accountIdentifier.section( TQChar(0xE000), 1, 1 );
Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId, accountId );
showAddContactDialog( account );
}
@@ -1059,7 +1059,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
i18n( "Add Contact" ), KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, true );
- QVBox * mainWid = new QVBox( addDialog );
+ TQVBox * mainWid = new TQVBox( addDialog );
AddContactPage *addContactPage =
account->protocol()->createAddContactWidget( mainWid, account );
@@ -1068,10 +1068,10 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
// Populate the groups list
Kopete::GroupList groups=Kopete::ContactList::self()->groups();
- QDict<Kopete::Group> groupItems;
+ TQDict<Kopete::Group> groupItems;
for( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
- QString groupname = it->displayName();
+ TQString groupname = it->displayName();
if ( !groupname.isEmpty() )
{
groupItems.insert( groupname, it );
@@ -1087,7 +1087,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
else
{
addDialog->setMainWidget( mainWid );
- if( addDialog->exec() == QDialog::Accepted )
+ if( addDialog->exec() == TQDialog::Accepted )
{
if( addContactPage->validateData() )
{