summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kchooser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kdm/kfrontend/kchooser.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm/kfrontend/kchooser.cpp')
-rw-r--r--kdm/kfrontend/kchooser.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kdm/kfrontend/kchooser.cpp b/kdm/kfrontend/kchooser.cpp
index 6d0b20350..df602efea 100644
--- a/kdm/kfrontend/kchooser.cpp
+++ b/kdm/kfrontend/kchooser.cpp
@@ -32,20 +32,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qsocketnotifier.h>
-#include <qlistview.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqsocketnotifier.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include <stdlib.h> // for free()
-class ChooserListViewItem : public QListViewItem {
+class ChooserListViewItem : public TQListViewItem {
public:
- ChooserListViewItem( QListView* parent, int _id, const QString& nam, const QString& sts )
- : QListViewItem( parent, nam, sts ) { id = _id; };
+ ChooserListViewItem( TQListView* parent, int _id, const TQString& nam, const TQString& sts )
+ : TQListViewItem( parent, nam, sts ) { id = _id; };
int id;
};
@@ -56,49 +56,49 @@ ChooserDlg::ChooserDlg()
{
completeMenu( LOGIN_REMOTE_ONLY, ex_greet, i18n("&Local Login"), ALT+Key_L );
- QBoxLayout *vbox = new QVBoxLayout( this, 10, 10 );
+ TQBoxLayout *vbox = new TQVBoxLayout( this, 10, 10 );
- QLabel *title = new QLabel( i18n("XDMCP Host Menu"), this );
+ TQLabel *title = new TQLabel( i18n("XDMCP Host Menu"), this );
title->setAlignment( AlignCenter );
vbox->addWidget( title );
- host_view = new QListView( this, "hosts" );
+ host_view = new TQListView( this, "hosts" );
host_view->addColumn( i18n("Hostname") );
host_view->setColumnWidth( 0, fontMetrics().width( "login.crap.net" ) );
host_view->addColumn( i18n("Status") );
host_view->setMinimumWidth( fontMetrics().width( "login.crap.com Display not authorized to connect this server" ) );
- host_view->setResizeMode( QListView::LastColumn );
+ host_view->setResizeMode( TQListView::LastColumn );
host_view->setAllColumnsShowFocus( true );
vbox->addWidget( host_view );
- iline = new QLineEdit( this );
+ iline = new TQLineEdit( this );
iline->setEnabled( TRUE );
- QLabel *itxt = new QLabel( iline, i18n("Hos&t:"), this );
- QPushButton *addButton = new QPushButton( i18n("A&dd"), this );
- connect( addButton, SIGNAL(clicked()), SLOT(addHostname()) );
- QBoxLayout *hibox = new QHBoxLayout( vbox, 10 );
+ TQLabel *itxt = new TQLabel( iline, i18n("Hos&t:"), this );
+ TQPushButton *addButton = new TQPushButton( i18n("A&dd"), this );
+ connect( addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addHostname()) );
+ TQBoxLayout *hibox = new TQHBoxLayout( vbox, 10 );
hibox->addWidget( itxt );
hibox->addWidget( iline );
hibox->addWidget( addButton );
// Buttons
- QPushButton *acceptButton = new QPushButton( i18n("&Accept"), this );
+ TQPushButton *acceptButton = new TQPushButton( i18n("&Accept"), this );
acceptButton->setDefault( true );
- QPushButton *pingButton = new QPushButton( i18n("&Refresh"), this );
+ TQPushButton *pingButton = new TQPushButton( i18n("&Refresh"), this );
- QBoxLayout *hbox = new QHBoxLayout( vbox, 20 );
+ TQBoxLayout *hbox = new TQHBoxLayout( vbox, 20 );
hbox->addWidget( acceptButton );
hbox->addWidget( pingButton );
hbox->addStretch( 1 );
if (optMenu) {
- QPushButton *menuButton = new QPushButton( i18n("&Menu"), this );
+ TQPushButton *menuButton = new TQPushButton( i18n("&Menu"), this );
menuButton->setPopup( optMenu );
hbox->addWidget( menuButton );
hbox->addStretch( 1 );
}
-// QPushButton *helpButton = new QPushButton( i18n("&Help"), this );
+// TQPushButton *helpButton = new TQPushButton( i18n("&Help"), this );
// hbox->addWidget( helpButton );
#ifdef WITH_KDM_XCONSOLE
@@ -106,13 +106,13 @@ ChooserDlg::ChooserDlg()
vbox->addWidget( consoleView );
#endif
- sn = new QSocketNotifier( rfd, QSocketNotifier::Read, this );
- connect( sn, SIGNAL(activated( int )), SLOT(slotReadPipe()) );
+ sn = new TQSocketNotifier( rfd, TQSocketNotifier::Read, this );
+ connect( sn, TQT_SIGNAL(activated( int )), TQT_SLOT(slotReadPipe()) );
- connect( pingButton, SIGNAL(clicked()), SLOT(pingHosts()) );
- connect( acceptButton, SIGNAL(clicked()), SLOT(accept()) );
-// connect( helpButton, SIGNAL(clicked()), SLOT(slotHelp()) );
- connect( host_view, SIGNAL(doubleClicked(QListViewItem *)), SLOT(accept()) );
+ connect( pingButton, TQT_SIGNAL(clicked()), TQT_SLOT(pingHosts()) );
+ connect( acceptButton, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );
+// connect( helpButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()) );
+ connect( host_view, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(accept()) );
adjustGeometry();
}
@@ -153,7 +153,7 @@ void ChooserDlg::accept()
}
return;
} else /*if (focusWidget() == host_view)*/ {
- QListViewItem *item = host_view->currentItem();
+ TQListViewItem *item = host_view->currentItem();
if (item) {
GSendInt( G_Ready );
GSendInt( ((ChooserListViewItem *)item)->id );
@@ -166,21 +166,21 @@ void ChooserDlg::reject()
{
}
-QString ChooserDlg::recvStr()
+TQString ChooserDlg::recvStr()
{
char *arr = GRecvStr();
if (arr) {
- QString str = QString::fromLatin1( arr );
+ TQString str = TQString::fromLatin1( arr );
free( arr );
return str;
} else
return i18n("<unknown>");
}
-QListViewItem *ChooserDlg::findItem( int id )
+TQListViewItem *ChooserDlg::findItem( int id )
{
- QListViewItem *itm;
- for (QListViewItemIterator it( host_view ); (itm = it.current()); ++it)
+ TQListViewItem *itm;
+ for (TQListViewItemIterator it( host_view ); (itm = it.current()); ++it)
if (((ChooserListViewItem *)itm)->id == id)
return itm;
return 0;
@@ -189,7 +189,7 @@ QListViewItem *ChooserDlg::findItem( int id )
void ChooserDlg::slotReadPipe()
{
int id;
- QString nam, sts;
+ TQString nam, sts;
int cmd = GRecvInt();
switch (cmd) {
@@ -203,7 +203,7 @@ void ChooserDlg::slotReadPipe()
host_view->insertItem(
new ChooserListViewItem( host_view, id, nam, sts ) );
else {
- QListViewItem *itm = findItem( id );
+ TQListViewItem *itm = findItem( id );
itm->setText( 0, nam );
itm->setText( 1, sts );
}
@@ -212,7 +212,7 @@ void ChooserDlg::slotReadPipe()
delete findItem( GRecvInt() );
break;
case G_Ch_BadHost:
- KFMsgBox::box( this, QMessageBox::Warning, i18n("Unknown host %1").arg( recvStr() ) );
+ KFMsgBox::box( this, TQMessageBox::Warning, i18n("Unknown host %1").arg( recvStr() ) );
break;
case G_Ch_Exit:
done( ex_exit );