summaryrefslogtreecommitdiffstats
path: root/ksirc/servercontroller.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /ksirc/servercontroller.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/servercontroller.cpp')
-rw-r--r--ksirc/servercontroller.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/ksirc/servercontroller.cpp b/ksirc/servercontroller.cpp
index 0e7892b9..7fc945db 100644
--- a/ksirc/servercontroller.cpp
+++ b/ksirc/servercontroller.cpp
@@ -20,23 +20,23 @@
Creates a new sirc process and window !default connected to the
server. Does nothing if a server connection already exists.
- add_toplevel(TQString parent, TQString child):
+ add_toplevel(TQString tqparent, TQString child):
Args:
- parent: the server name that the new channel is being joined on
+ tqparent: the server name that the new channel is being joined on
child: the new channel name
Action:
Adds "child" to the list of joined channles in the main
window. Always call this on new window creation!
- delete_toplevel(TQString parent, TQString child):
+ delete_toplevel(TQString tqparent, TQString child):
Args:
- parent: the server name of which channel is closing
- child: the channle that is closing. IFF Emtpy, parent is
+ tqparent: the server name of which channel is closing
+ child: the channle that is closing. IFF Emtpy, tqparent is
deleted.
Action:
Deletes the "child" window from the list of connections. If
the child is Empty the whole tree is removed since it is assumed
- the parent has disconnected and is closing.
+ the tqparent has disconnected and is closing.
new_channel: Creates popup asking for new channel name
@@ -48,9 +48,9 @@
list and join the requested channel. Does nothing if nothing
is selected in the tree list.
- recvChangeChanel(TQString parent, TQString old, TQString new):
+ recvChangeChanel(TQString tqparent, TQString old, TQString new):
Args:
- parent: parent server connection
+ tqparent: tqparent server connection
old: the old name for the window
new: the new name for the window
Action:
@@ -151,7 +151,7 @@ servercontroller::servercontroller( TQWidget*, const char* name )
setFrameBorderWidth(5);
TQPopupMenu *file = new TQPopupMenu(this, TQCString(name) + "_menu_file");
- KStdAction::quit(this, TQT_SLOT(endksirc()), actionCollection())->plug(file);
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(endksirc()), actionCollection())->plug(file);
#ifndef NDEBUG
file->insertItem(i18n("Dump Object Tree"), this, TQT_SLOT(dump_obj()));
file->insertItem(i18n("Server Debug Window"), this, TQT_SLOT(server_debug()));
@@ -173,21 +173,21 @@ servercontroller::servercontroller( TQWidget*, const char* name )
options->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."),
this, TQT_SLOT(filter_rule_editor()));
options->insertSeparator();
- KStdAction::configureNotifications(this, TQT_SLOT(notification_prefs()), actionCollection())->plug(options);
+ KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(notification_prefs()), actionCollection())->plug(options);
- KStdAction::preferences(this, TQT_SLOT(general_prefs()), actionCollection())->plug(options);
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(general_prefs()), actionCollection())->plug(options);
MenuBar->insertItem(i18n("&Settings"), options);
KHelpMenu *help = new KHelpMenu( this, kapp->aboutData() );
MenuBar->insertItem( KStdGuiItem::help().text(), help->menu() );
- m_kga = new KGlobalAccel(this, "globalAccess");
+ m_kga = new KGlobalAccel(TQT_TQOBJECT(this), "globalAccess");
m_kga->insert("New Server", i18n("New Server"),
i18n("This action allows you to open a new server more easily "
"when in docked mode, since you don't need to click on the "
"dock icon."),
- ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, this,
+ ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, TQT_TQOBJECT(this),
TQT_SLOT(new_connection()));
open_toplevels = 0;
@@ -253,7 +253,7 @@ void servercontroller::new_ksircprocess(KSircServer &kss)
return;
server_id = kss.server();
while(proc_list[server_id]){ // if it already exists, quit
- server_id = TQString("%1 %2").arg(kss.server()).arg(id++);
+ server_id = TQString("%1 %2").tqarg(kss.server()).tqarg(id++);
}
// Insert new base
@@ -292,10 +292,10 @@ void servercontroller::new_channel()
if(proc_list[citem->text(0)]){ // If it's a match with a server, ok
server = citem->text(0);
}
- // Otherwise, check the parent to see it's perhaps a server.
- else if ( citem->parent() ) {
- if(proc_list[citem->parent()->text(0)]){
- server = citem->parent()->text(0);
+ // Otherwise, check the tqparent to see it's perhaps a server.
+ else if ( citem->tqparent() ) {
+ if(proc_list[citem->tqparent()->text(0)]){
+ server = citem->tqparent()->text(0);
}
}
}
@@ -303,7 +303,7 @@ void servercontroller::new_channel()
if(server.isEmpty())
return;
- KSircChannel ci(server, TQString::null);
+ KSircChannel ci(server, TQString());
NewWindowDialog w(ci);
connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)),
this, TQT_SLOT(new_toplevel(const KSircChannel &)));
@@ -355,9 +355,9 @@ void servercontroller::server_debug()
if(proc_list[citem->text(0)]){ // If it's a match with a server, ok
server = citem->text(0);
}
- else if ( citem->parent() ) {
- if(proc_list[citem->parent()->text(0)]){
- server = citem->parent()->text(0);
+ else if ( citem->tqparent() ) {
+ if(proc_list[citem->tqparent()->text(0)]){
+ server = citem->tqparent()->text(0);
}
}
@@ -386,7 +386,7 @@ void servercontroller::font_update(const TQFont &font)
KConfig *kConfig = kapp->config();
kConfig->setGroup("GlobalOptions");
kConfig->sync();
- TQApplication::setFont( font, true, "KSirc::TextView" );
+ TQApplication::tqsetFont( font, true, "KSirc::TextView" );
}
void servercontroller::configChange()
@@ -406,7 +406,7 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
TQListViewItem *serverItem = 0L;
TQListViewItem *item = ConnectionTree->firstChild();
while ( item ) {
- if ( !item->parent() && item->text(0) == server ) {
+ if ( !item->tqparent() && item->text(0) == server ) {
serverItem = item;
break;
}
@@ -435,7 +435,7 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
if(online_item->childCount() == 0)
delete online_item;
if(ksopts->runDocked && ksopts->dockPopups)
- KPassivePopup::message(i18n("%1 just went offline on %2").arg(args).arg(server), dockWidget);
+ KPassivePopup::message(i18n("%1 just went offline on %2").tqarg(args).tqarg(server), dockWidget);
}
dockWidget->nickOffline(server, args);
break;
@@ -457,19 +457,19 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
item = new TQListViewItem(online_item, args);
item->setPixmap( 0, pic_run );
if(ksopts->runDocked && ksopts->dockPopups)
- KPassivePopup::message(i18n("%1 just came online on %2").arg(args).arg(server), dockWidget);
+ KPassivePopup::message(i18n("%1 just came online on %2").tqarg(args).tqarg(server), dockWidget);
dockWidget->nickOnline(server, args);
break;
}
/*
- // Add new channel, first add the parent to the path
+ // Add new channel, first add the tqparent to the path
path.push(&server);
path.push(&online);
path.push(&args);
// Remove old one if it's there
ConnectionTree->removeItem(&path); // Remove the item
path.pop();
- // add a new child item with parent as its parent
+ // add a new child item with tqparent as its tqparent
ConnectionTree->addChildItem(args, pic_run, &path);
if (kSircConfig->BeepNotify) {
KNotifyClient::beep();
@@ -479,7 +479,7 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
/**
* Args:
- * parent: the server name that the new channel is being joined on
+ * tqparent: the server name that the new channel is being joined on
* child: the new channel name
* Action:
* Adds "child" to the list of joined channles in the main
@@ -489,7 +489,7 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
// Add new channel
if(args[0] == '!')
args.remove(0, 1); // If the first char is !, it's control, remove it
- // add a new child item with parent as it's parent
+ // add a new child item with tqparent as it's tqparent
item = new TQListViewItem( serverItem, args );
item->setPixmap( 0, pic_ppl );
@@ -497,13 +497,13 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
break;
/**
* Args:
- * parent: the server name of which channel is closing
- * child: the channle that is closing. IFF Emtpy, parent is
+ * tqparent: the server name of which channel is closing
+ * child: the channle that is closing. IFF Emtpy, tqparent is
* deleted.
* Action:
* Deletes the "child" window from the list of connections. If
* the child is Empty the whole tree is removed since it is assumed
- * the parent has disconnected and is closing.
+ * the tqparent has disconnected and is closing.
*/
case ProcCommand::deleteTopLevel:
// If the child is emtpy, delete the whole tree, otherwise just the child
@@ -520,7 +520,7 @@ void servercontroller::ProcMessage(TQString server, int command, TQString args)
/**
* Args:
- * parent: parent server connection
+ * tqparent: tqparent server connection
* old: the old name for the window
* new: the new name for the window
* Action:
@@ -615,7 +615,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc)
ksc->setGroup("ServerController");
// ksc->writeEntry("Docked", !isVisible());
- ksc->writeEntry("Size", geometry());
+ ksc->writeEntry("Size", tqgeometry());
ksc->setGroup(group);
}
@@ -661,7 +661,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc)
int desktop = ( *desktopNumberIt ).toInt();
if ( desktop == -1 )
continue;
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
NETWinInfo winInfo( qt_xdisplay(), topLevel->winId(), qt_xrootwin(), NET::WMDesktop );
winInfo.setDesktop( desktop );
#endif
@@ -700,7 +700,7 @@ void servercontroller::saveSessionConfig()
sessionInfo.port = ksp.current()->serverPort();
KSircTopLevel *topLev = dynamic_cast<KSircTopLevel *>( ksm.current() );
if ( topLev && topLev->isTopLevel() ) {
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
NETWinInfo winInfo( qt_xdisplay(), topLev->winId(), qt_xrootwin(), NET::WMDesktop );
sessionInfo.desktop = winInfo.desktop();
#endif
@@ -718,7 +718,7 @@ void servercontroller::showEvent( TQShowEvent *e )
{
TQWidget::showEvent( e );
if ( !e->spontaneous() )
- saveDockingStatus();
+ saveDockingtqStatus();
}
void servercontroller::hideEvent( TQHideEvent * )
@@ -726,7 +726,7 @@ void servercontroller::hideEvent( TQHideEvent * )
/*
TQWidget::hideEvent( e );
if ( !e->spontaneous() )
- saveDockingStatus();
+ saveDockingtqStatus();
if(TQWidget::isMinimized()){
hide();
KWin::setState(winId(), NET::SkipTaskbar);
@@ -734,7 +734,7 @@ void servercontroller::hideEvent( TQHideEvent * )
*/
}
-void servercontroller::saveDockingStatus()
+void servercontroller::saveDockingtqStatus()
{
if ( we_are_exiting ) // we are hidden by closeEvent
return;
@@ -762,15 +762,15 @@ void servercontroller::WindowSelected(TQListViewItem *item)
if ( !item )
return;
- TQListViewItem *parent_server = item->parent();
- if(!parent_server)
+ TQListViewItem *tqparent_server = item->tqparent();
+ if(!tqparent_server)
return;
- TQString txt = TQString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel";
- TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
+ TQString txt = TQString(tqparent_server->text(0)) + "_" + item->text(0) + "_toplevel";
+ TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt.utf8(), "KSircTopLevel"));
if(obj == 0x0){
- txt =TQString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel";
- obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
+ txt =TQString(tqparent_server->text(0)) + "_!" + item->text(0) + "_toplevel";
+ obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt.utf8(), "KSircTopLevel"));
}
if(obj != 0x0){
@@ -782,14 +782,14 @@ void servercontroller::WindowSelected(TQListViewItem *item)
}
-TQListViewItem * servercontroller::findChild( TQListViewItem *parent,
+TQListViewItem * servercontroller::findChild( TQListViewItem *tqparent,
const TQString& text )
{
- if ( !parent || parent->childCount() == 0 ) {
+ if ( !tqparent || tqparent->childCount() == 0 ) {
return 0L;
}
- TQListViewItem *item = parent->firstChild();
+ TQListViewItem *item = tqparent->firstChild();
while ( item ) {
if ( item->text(0) == text ) {
return item;
@@ -821,7 +821,7 @@ void servercontroller::decreaseNotificationCount(TQString reason)
void servercontroller::resetNotification()
{
m_notificationCount = 0;
- dockWidget->stopBlink(TQString::null, true);
+ dockWidget->stopBlink(TQString(), true);
TQDictIterator<KSircProcess> it( proc_list );
while(it.current()){
it.current()->filters_update();
@@ -852,7 +852,7 @@ void servercontroller::do_autoconnect()
TQString server = *ser;
TQString port = "6667";
bool usessl = false;
- TQString pass = TQString::null;
+ TQString pass = TQString();
TQRegExp rx("(.+) \\(SSL\\)(.*)");
if(rx.search(server) >= 0){
@@ -888,7 +888,7 @@ void servercontroller::do_autoconnect()
if(loop++ == ctime){
ctime++;
TQString channel = *chan;
- TQString key = TQString::null;
+ TQString key = TQString();
TQRegExp crx("(.+) \\(key: (\\S+)\\)");
if(crx.search(channel) >= 0){
channel = crx.cap(1);
@@ -944,9 +944,9 @@ void servercontroller::start_autoconnect_check() {
}
-scInside::scInside ( TQWidget * parent, const char * name, WFlags
+scInside::scInside ( TQWidget * tqparent, const char * name, WFlags
f )
- : TQFrame(parent, name, f)
+ : TQFrame(tqparent, name, f)
{
ASConn = new TQLabel(i18n("Active server connections:"), this, "servercontroller_label");
TQFont asfont = ASConn->font();
@@ -954,7 +954,7 @@ scInside::scInside ( TQWidget * parent, const char * name, WFlags
ASConn->setFont(asfont);
ConnectionTree = new KListView(this, "connectiontree");
- ConnectionTree->addColumn(TQString::null);
+ ConnectionTree->addColumn(TQString());
ConnectionTree->setRootIsDecorated( true );
ConnectionTree->setSorting( 0 );
ConnectionTree->header()->hide();