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 /ksirc/puke | |
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 'ksirc/puke')
-rw-r--r-- | ksirc/puke/HOWTO-PUKE.pod | 10 | ||||
-rw-r--r-- | ksirc/puke/commands.h | 36 | ||||
-rw-r--r-- | ksirc/puke/controller.cpp | 6 | ||||
-rw-r--r-- | ksirc/puke/controller.h | 4 | ||||
-rw-r--r-- | ksirc/puke/dcc_status.pm | 12 | ||||
-rw-r--r-- | ksirc/puke/load_all.pm | 2 | ||||
-rw-r--r-- | ksirc/puke/palistbox.cpp | 4 | ||||
-rw-r--r-- | ksirc/puke/pboxlayout.pm | 28 | ||||
-rw-r--r-- | ksirc/puke/pframe.pm | 4 | ||||
-rw-r--r-- | ksirc/puke/plabel.cpp | 2 | ||||
-rw-r--r-- | ksirc/puke/plabel.pm | 2 | ||||
-rw-r--r-- | ksirc/puke/playout.cpp | 14 | ||||
-rw-r--r-- | ksirc/puke/playout.h | 4 | ||||
-rw-r--r-- | ksirc/puke/pobject.cpp | 2 | ||||
-rw-r--r-- | ksirc/puke/pwidget.cpp | 12 | ||||
-rw-r--r-- | ksirc/puke/pwidget.pm | 2 | ||||
-rw-r--r-- | ksirc/puke/small.pl | 2 | ||||
-rw-r--r-- | ksirc/puke/test.pl | 2 | ||||
-rw-r--r-- | ksirc/puke/user_monitor.ks | 2 |
19 files changed, 75 insertions, 75 deletions
diff --git a/ksirc/puke/HOWTO-PUKE.pod b/ksirc/puke/HOWTO-PUKE.pod index 600f2111..c6bf8136 100644 --- a/ksirc/puke/HOWTO-PUKE.pod +++ b/ksirc/puke/HOWTO-PUKE.pod @@ -11,7 +11,7 @@ under Linux. Puke's a generic protocol allowing dsirc to communicate with ksirc. Communications works over a unix domain socket between multiple client dsirc process's to a single ksirc process. All communications -is done via a variable length message with the following tqlayout: +is done via a variable length message with the following layout: =begin text @@ -68,17 +68,17 @@ supporting perl5-oop object. The C++ code must be able to hand all required settings and messages for the widget. Each new widget iherites it's parent and so forth -allowing for a nice oop tqlayout. The widget structure the author is +allowing for a nice oop layout. The widget structure the author is following is the same as Qt's. Their seems to work well, why re-invent the wheel? =item 2.1.1 General Layout, etc Figure where your new widget goes in the heirachy. If it's a simple -Qt widget, I recommend using their existing tqlayout. Man pages list +Qt widget, I recommend using their existing layout. Man pages list what widgets inherit what. -The general idea behind the widget tqlayout should be to be to provide +The general idea behind the widget layout should be to be to provide all the functionality of the widget to dsirc perl script. Incoming messages are handled via the messageHandler and ALL messages should return an ACK with current state info. @@ -106,7 +106,7 @@ These set and return your widget. If you care about inheritance, which you should, all these functions should be virtual. (Since we are using pointers to PWidget's -everywhere, it's a good bet you want your tqchildren's overriden +everywhere, it's a good bet you want your children's overriden functions called, not yours) The structure internally will have to hold a local copy of the widget, diff --git a/ksirc/puke/commands.h b/ksirc/puke/commands.h index 2baa316e..ead9fb07 100644 --- a/ksirc/puke/commands.h +++ b/ksirc/puke/commands.h @@ -130,38 +130,38 @@ // cArg: not define #define PUKE_WIDGET_HIDE_ACK -1003 -// Desc: tqrepaint widget -// iWinId: widget to tqrepaint +// Desc: repaint widget +// iWinId: widget to repaint // iArg: erase, 0 for false, 1 for true // cArg: no defines #define PUKE_WIDGET_REPAINT 1005 -// Desc: tqrepaint widget ack -// iWinId: widget to tqrepaint +// Desc: repaint widget ack +// iWinId: widget to repaint // iArg: not defined // cArg: not defined #define PUKE_WIDGET_REPAINT_ACK -1005 // Desc: update widget on next event loop -// iWinId: widget to tqrepaint +// iWinId: widget to repaint // iArg: erase, 0 for false, 1 for true // cArg: no defines #define PUKE_WIDGET_UPDATE 1010 -// Desc: tqrepaint widget ack -// iWinId: widget to tqrepaint +// Desc: repaint widget ack +// iWinId: widget to repaint // iArg: not defined // cArg: not defined #define PUKE_WIDGET_UPDATE_ACK -1010 // Desc: resize the widget -// iWinId: widget to tqrepaint +// iWinId: widget to repaint // iArg: width in the low 16 bit, height in next 16 bits // cArg: not defined #define PUKE_WIDGET_RESIZE 1015 -// Desc: tqrepaint widget ack -// iWinId: widget to tqrepaint +// Desc: repaint widget ack +// iWinId: widget to repaint // iArg: new widget in lower 16 bit, new height in lower 16 bits // cArg: not defined #define PUKE_WIDGET_RESIZE_ACK -1015 @@ -766,13 +766,13 @@ // Desc: Set label's allignment // iWinId: window id -// iArg: tqalignment +// iArg: alignment // cArg: not defined #define PUKE_LABEL_SETALIGNMENT 1715 // Desc: Set label's allignment, ACK // iWinId: window id -// iArg: tqalignment +// iArg: alignment // cArg: not defined #define PUKE_LABEL_SETALIGNMENT_ACK -1715 @@ -993,14 +993,14 @@ #define PWIDGET_OBJFINDER 18 -// Group tqlayout commands exist between 10000 and 11000 +// Group layout commands exist between 10000 and 11000 -// Desc: create new box tqlayout +// Desc: create new box layout // iWinId: PWidget parent // iArg: 2 shorts, short[0] direction, short[1] border // cArg: random character string #define PUKE_LAYOUT_NEW 11000 -// Desc: ack for box tqlayout +// Desc: ack for box layout // iWinId: Layout ID. // iArg: not define // cArg: same random m character string as PUKE_LAYOUT_NEW @@ -1009,10 +1009,10 @@ #define PUKE_LAYOUT_ADDLAYOUT 11005 #define PUKE_LAYOUT_ADDLAYOUT_ACK -11005 -// Desc: add widget into tqlayout manager +// Desc: add widget into layout manager // iWinId: Layout Manager to add widget too // iArg: Widget Id to be added -// cArg: 2 characters, char[0] strech, char[1] tqalignment +// cArg: 2 characters, char[0] strech, char[1] alignment #define PUKE_LAYOUT_ADDWIDGET 11010 // Desc: ack for add widget // iWinId: Layout manager @@ -1032,7 +1032,7 @@ // cArg: not define #define PUKE_LAYOUT_ADDSTRUT_ACK -11015 -// Desc: activates tqlayout management, like show() for widget +// Desc: activates layout management, like show() for widget // iWinId: Layout Manager to activate // iArg: undef // cArg: undef diff --git a/ksirc/puke/controller.cpp b/ksirc/puke/controller.cpp index 20c020c7..a790436d 100644 --- a/ksirc/puke/controller.cpp +++ b/ksirc/puke/controller.cpp @@ -32,7 +32,7 @@ using namespace std; // iostream.h include cstring which puts strlen into #include "pframe.h" #include "pkfiledialog.h" #include "plabel.h" -#include "ptqlayout.h" +#include "playout.h" #include "plined.h" #include "plistbox.h" #include "pmenudta.h" @@ -173,7 +173,7 @@ void PukeController::NewConnect(int) fcntl(cfd, F_SETFL, O_NONBLOCK); // Set it non-block so that // cfd() never blocks. - fdtqStatus *fds = new fdtqStatus(); + fdStatus *fds = new fdStatus(); fds->sr = new TQSocketNotifier(cfd, TQSocketNotifier::Read, this); fds->sw = new TQSocketNotifier(cfd, TQSocketNotifier::Write, this); connect(fds->sr, TQT_SIGNAL(activated(int)), @@ -868,7 +868,7 @@ void PukeController::messageHandler(int fd, PukeMessage *pm) { return; } - TQString libName = "ksirc/lib"+TQString::tqfromLatin1(pm->cArg); + TQString libName = "ksirc/lib"+TQString::fromLatin1(pm->cArg); if (libName.right(3) == ".so") libName = libName.left(libName.length()-2)+"la"; diff --git a/ksirc/puke/controller.h b/ksirc/puke/controller.h index 92c8be98..c2a086f7 100644 --- a/ksirc/puke/controller.h +++ b/ksirc/puke/controller.h @@ -27,7 +27,7 @@ typedef struct { TQString server; bool writeable; TQSocketNotifier *sr,*sw; -} fdtqStatus; +} fdStatus; struct commandStruct { @@ -137,7 +137,7 @@ private: int iListenFd; bool bClosing; // Set true if we are closing, we don't try and close twice at the same time. TQSocketNotifier *qsnListen; - TQIntDict<fdtqStatus> qidConnectFd; + TQIntDict<fdStatus> qidConnectFd; /** * Controller ID is defined as 1 diff --git a/ksirc/puke/dcc_status.pm b/ksirc/puke/dcc_status.pm index 799c8cf5..65bc1b07 100644 --- a/ksirc/puke/dcc_status.pm +++ b/ksirc/puke/dcc_status.pm @@ -6,7 +6,7 @@ &docommand("/load ptablevw.pm"); &docommand("/load plistbox.pm"); &docommand("/load pbutton.pm");; -&docommand("/load pboxtqlayout.pm"); +&docommand("/load pboxlayout.pm"); &docommand("/load plabel.pm"); &docommand("/load pbutton.pm"); &docommand("/load ppushbt.pm"); @@ -123,7 +123,7 @@ sub sendClicked { use vars qw(@ISA $KSIRC_DCC %KSIRC_DCC); -package DCCtqStatus; +package DCCStatus; use vars qw(@ISA); @ISA = qw(PFrame); @@ -330,7 +330,7 @@ sub hook_ksirc_dcc_request { my($size) = shift; my($mwho) = $who; if($KSIRC_DCCSTATUS == undef){ - $KSIRC_DCCSTATUS = new DCCtqStatus; + $KSIRC_DCCSTATUS = new DCCStatus; $KSIRC_DCCSTATUS->resize(400, 275); } @@ -473,13 +473,13 @@ addhook("dcc_disconnect", "ksirc_dcc_disconnect"); &print("*I* Done DCC Status"); -#$::test = new DCCtqStatus; +#$::test = new DCCStatus; #$::test->resize(400, 275); #$::test->show(); sub popup_dccstatus{ if($KSIRC_DCCSTATUS == undef){ - $KSIRC_DCCSTATUS = new DCCtqStatus; + $KSIRC_DCCSTATUS = new DCCStatus; $KSIRC_DCCSTATUS->resize(400, 275); } $KSIRC_DCCSTATUS->show(); @@ -487,7 +487,7 @@ sub popup_dccstatus{ sub popup_dccsend{ if($KSIRC_DCCSTATUS == undef){ - $KSIRC_DCCSTATUS = new DCCtqStatus; + $KSIRC_DCCSTATUS = new DCCStatus; $KSIRC_DCCSTATUS->resize(400, 275); } $KSIRC_DCCSTATUS->sendClicked(); diff --git a/ksirc/puke/load_all.pm b/ksirc/puke/load_all.pm index 048eb9eb..26594c0f 100644 --- a/ksirc/puke/load_all.pm +++ b/ksirc/puke/load_all.pm @@ -1,7 +1,7 @@ &docommand("/load pbase.pm"); &docommand("/load pwidget.pm"); &docommand("/load pframe.pm"); -&docommand("/load pboxtqlayout.pm"); +&docommand("/load pboxlayout.pm"); &docommand("/load plined.pm"); &docommand("/load pbutton.pm"); &docommand("/load ppushbt.pm"); diff --git a/ksirc/puke/palistbox.cpp b/ksirc/puke/palistbox.cpp index 05124441..9f43b124 100644 --- a/ksirc/puke/palistbox.cpp +++ b/ksirc/puke/palistbox.cpp @@ -88,7 +88,7 @@ void PAListBox::messageHandler(int fd, PukeMessage *pm) widget()->removeItem(index); item->setVoice(pm->iArg); widget()->inSort(item); - widget()->tqrepaint(TRUE); + widget()->repaint(TRUE); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -108,7 +108,7 @@ void PAListBox::messageHandler(int fd, PukeMessage *pm) widget()->removeItem(index); item->setOp(pm->iArg); widget()->inSort(item); - widget()->tqrepaint(TRUE); + widget()->repaint(TRUE); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; diff --git a/ksirc/puke/pboxlayout.pm b/ksirc/puke/pboxlayout.pm index 9896fd1c..505ddc0d 100644 --- a/ksirc/puke/pboxlayout.pm +++ b/ksirc/puke/pboxlayout.pm @@ -40,7 +40,7 @@ sub new { #} # else{ if(ref($widget) ne ''){ - # print "*\cbI\cb* Generic Non-topleve tqlayout type\n"; + # print "*\cbI\cb* Generic Non-topleve layout type\n"; $self->{Parent} = $widget; $self->{ParentType} = 'Widget'; $self->{Direction} = shift; @@ -99,7 +99,7 @@ sub addWidget { my $align = shift; if($self->{Added} == 0){ - print "*E* Burp: Can't add widget without first being added to parent tqlayout\n"; + print "*E* Burp: Can't add widget without first being added to parent layout\n"; return; } @@ -128,41 +128,41 @@ sub addLayout { my $self = shift; if($self->{Added} == 0){ - print "*E* Burp: Can't add tqlayout without first being added to parent tqlayout\n"; + print "*E* Burp: Can't add layout without first being added to parent layout\n"; } - my $tqlayout = shift; - if(ref($tqlayout) ne 'PBoxLayout'){ - print "*E* Passed non tqlayout type to addLayout\n"; + my $layout = shift; + if(ref($layout) ne 'PBoxLayout'){ + print "*E* Passed non layout type to addLayout\n"; return 1; } - if($tqlayout->{iWinId} <= 0){ - print "*E* Trying to add invalid tqlayout " . ref($tqlayout) . "\n"; + if($layout->{iWinId} <= 0){ + print "*E* Trying to add invalid layout " . ref($layout) . "\n"; return; } # make sure we can run, and the widget we want to add can run. - # my @ARG = ($tqlayout); + # my @ARG = ($layout); #$self->canRun($self, \&PBoxLayout::addLayout, \@ARG) || return; - #$tqlayout->canRun($self, \&PBoxLayout::addLayout, \@ARG) || return; + #$layout->canRun($self, \&PBoxLayout::addLayout, \@ARG) || return; my %REPLY = $self->sendMessage('iCommand' => $::PUKE_LAYOUT_ADDLAYOUT, 'iWinId' => $self->{iWinId}, - 'iArg' => $tqlayout->{iWinId}, + 'iArg' => $layout->{iWinId}, 'cArg' => pack("C", 0), 'CallBack' => sub { }, 'WaitFor' => 1); - # print "*I* Adding tqlayout\n"; + # print "*I* Adding layout\n"; if($REPLY{'iArg'} != 0){ print "*E* AddLayout call failed\n"; } else{ - # print "*I* Added new Layout for " . $tqlayout->{iWinId} . "\n"; - $tqlayout->{Added} = 1; + # print "*I* Added new Layout for " . $layout->{iWinId} . "\n"; + $layout->{Added} = 1; } } diff --git a/ksirc/puke/pframe.pm b/ksirc/puke/pframe.pm index 2ef36ebc..f851cdb8 100644 --- a/ksirc/puke/pframe.pm +++ b/ksirc/puke/pframe.pm @@ -44,13 +44,13 @@ sub setFrameStyle { my $self = shift; my $frame = shift; - my $tqrepaint = shift; + my $repaint = shift; $self->sendMessage('iCommand' => $::PUKE_QFRAME_SET_FRAME, 'iArg' => $frame, 'CallBack' => sub {}); - $self->tqrepaint(1) if($tqrepaint == 1); + $self->repaint(1) if($repaint == 1); } diff --git a/ksirc/puke/plabel.cpp b/ksirc/puke/plabel.cpp index 41a68636..7567ac08 100644 --- a/ksirc/puke/plabel.cpp +++ b/ksirc/puke/plabel.cpp @@ -83,7 +83,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->tqsetAlignment(pm->iArg); + widget()->setAlignment(pm->iArg); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; diff --git a/ksirc/puke/plabel.pm b/ksirc/puke/plabel.pm index efdcf490..bc557b5e 100644 --- a/ksirc/puke/plabel.pm +++ b/ksirc/puke/plabel.pm @@ -83,7 +83,7 @@ sub text { -sub tqsetAlignment { +sub setAlignment { my $self = shift; my $align = shift; diff --git a/ksirc/puke/playout.cpp b/ksirc/puke/playout.cpp index 3dbe5c87..9bcdfa2a 100644 --- a/ksirc/puke/playout.cpp +++ b/ksirc/puke/playout.cpp @@ -1,7 +1,7 @@ #include <stdio.h> -#include "ptqlayout.h" +#include "playout.h" #include "commands.h" PLayout::PLayout(TQObject *pobject) @@ -16,7 +16,7 @@ PLayout::~PLayout() // kdDebug(5008) << "PObject: in destructor" << endl; /* delete widget(); - tqlayout = 0; + layout = 0; setWidget(); */ } @@ -34,12 +34,12 @@ PObject *PLayout::createWidget(CreateArgs &ca) if((ca.parent != 0) && (ca.parent->widget()->isWidgetType() == TRUE)){ qbl = new TQBoxLayout((TQWidget *) ca.parent->widget(), (TQBoxLayout::Direction) direction, border); - // kdDebug(5008) << "Creating tqlayout with parent: " << parent.iWinId << endl; + // kdDebug(5008) << "Creating layout with parent: " << parent.iWinId << endl; } else{ qbl = new TQBoxLayout((TQBoxLayout::Direction) direction, border); - // kdDebug(5008) << "Creating tqlayout NO PARENT" << endl; + // kdDebug(5008) << "Creating layout NO PARENT" << endl; } pw->setWidget(qbl); pw->setWidgetId(ca.pwI); @@ -142,16 +142,16 @@ void PLayout::setWidget(TQObject *_layout) return; } - tqlayout = (TQBoxLayout *) _layout; + layout = (TQBoxLayout *) _layout; PObject::setWidget(_layout); } TQBoxLayout *PLayout::widget() { - return tqlayout; + return layout; } -#include "ptqlayout.moc" +#include "playout.moc" diff --git a/ksirc/puke/playout.h b/ksirc/puke/playout.h index 4124cb14..439a87a2 100644 --- a/ksirc/puke/playout.h +++ b/ksirc/puke/playout.h @@ -4,7 +4,7 @@ class PLayout; #include <tqobject.h> -#include <tqlayout.h> +#include <layout.h> #include "pmessage.h" #include "pobject.h" @@ -36,7 +36,7 @@ public: private: - TQBoxLayout *tqlayout; + TQBoxLayout *layout; }; diff --git a/ksirc/puke/pobject.cpp b/ksirc/puke/pobject.cpp index ab729315..9e46e042 100644 --- a/ksirc/puke/pobject.cpp +++ b/ksirc/puke/pobject.cpp @@ -131,7 +131,7 @@ void PObject::manTerm() { void PObject::errorInvalidSet(TQObject *_w) { - m_error = TQString("Tried setting a %1 to %2").tqarg(_w->className()).tqarg(className()); + m_error = TQString("Tried setting a %1 to %2").arg(_w->className()).arg(className()); m_hasError = true; } #include "pobject.moc" diff --git a/ksirc/puke/pwidget.cpp b/ksirc/puke/pwidget.cpp index cf3ac667..b62f64c1 100644 --- a/ksirc/puke/pwidget.cpp +++ b/ksirc/puke/pwidget.cpp @@ -90,7 +90,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_WIDGET_REPAINT: - widget()->tqrepaint(pm->iArg); + widget()->repaint(pm->iArg); pmRet.iCommand = PUKE_WIDGET_REPAINT_ACK; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -209,12 +209,12 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) int *pos; pos = (int *) pm->cArg; TQColor bg(pos[0], pos[1], pos[2]); - TQColorGroup cg = TQColorGroup(widget()->tqcolorGroup().foreground(), + TQColorGroup cg = TQColorGroup(widget()->colorGroup().foreground(), bg, - widget()->tqcolorGroup().light(), - widget()->tqcolorGroup().dark(), - widget()->tqcolorGroup().mid(), - widget()->tqcolorGroup().text(), + widget()->colorGroup().light(), + widget()->colorGroup().dark(), + widget()->colorGroup().mid(), + widget()->colorGroup().text(), bg); widget()->setPalette(TQPalette(cg,cg,cg)); diff --git a/ksirc/puke/pwidget.pm b/ksirc/puke/pwidget.pm index 56381db6..5a73d393 100644 --- a/ksirc/puke/pwidget.pm +++ b/ksirc/puke/pwidget.pm @@ -61,7 +61,7 @@ sub hide { $self->sendMessage('iCommand' => $::PUKE_WIDGET_HIDE); } -sub tqrepaint { +sub repaint { my $self = shift; my $erase = shift; # 1 for erase and reapint diff --git a/ksirc/puke/small.pl b/ksirc/puke/small.pl index fdeae902..7e7b251d 100644 --- a/ksirc/puke/small.pl +++ b/ksirc/puke/small.pl @@ -1,7 +1,7 @@ &docommand("/load pbase.pm"); &docommand("/load pwidget.pm"); &docommand("/load pframe.pm"); -&docommand("/load pboxtqlayout.pm"); +&docommand("/load pboxlayout.pm"); &docommand("/load plined.pm"); &docommand("/load pbutton.pm"); &docommand("/load ppushbt.pm"); diff --git a/ksirc/puke/test.pl b/ksirc/puke/test.pl index 369a2dc9..4b4c3169 100644 --- a/ksirc/puke/test.pl +++ b/ksirc/puke/test.pl @@ -1,7 +1,7 @@ &docommand("/load pbase.pm"); &docommand("/load pwidget.pm"); &docommand("/load pframe.pm"); -&docommand("/load pboxtqlayout.pm"); +&docommand("/load pboxlayout.pm"); &docommand("/load plined.pm"); &docommand("/load pbutton.pm"); &docommand("/load ppushbt.pm"); diff --git a/ksirc/puke/user_monitor.ks b/ksirc/puke/user_monitor.ks index d73fa513..a0b2a56a 100644 --- a/ksirc/puke/user_monitor.ks +++ b/ksirc/puke/user_monitor.ks @@ -3,7 +3,7 @@ &docommand("/load pframe.pm"); &docommand("/load ptablevw.pm"); &docommand("/load plistbox.pm"); -&docommand("/load pboxtqlayout.pm"); +&docommand("/load pboxlayout.pm"); &docommand("/load plabel.pm"); &docommand("/load pmenudta.pm"); &docommand("/load ppopmenu.pm"); |