1 |
torben |
328 |
#include <klocale.h> |
2 |
|
|
/**************************************************************************** |
3 |
|
|
** Form implementation generated from reading ui file './serverspybase.ui' |
4 |
|
|
** |
5 |
|
|
** Created: Thu Jul 19 18:57:19 2007 |
6 |
|
|
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.6 edited Aug 31 2005 $) |
7 |
|
|
** |
8 |
|
|
** WARNING! All changes made in this file will be lost! |
9 |
|
|
****************************************************************************/ |
10 |
|
|
|
11 |
|
|
#include "serverspybase.h" |
12 |
|
|
|
13 |
|
|
#include <qvariant.h> |
14 |
|
|
#include <qpushbutton.h> |
15 |
|
|
#include <qlabel.h> |
16 |
|
|
#include <qlineedit.h> |
17 |
|
|
#include <qlayout.h> |
18 |
|
|
#include <qtooltip.h> |
19 |
|
|
#include <qwhatsthis.h> |
20 |
|
|
|
21 |
|
|
/* |
22 |
|
|
* Constructs a ServerspyBase as a child of 'parent', with the |
23 |
|
|
* name 'name' and widget flags set to 'f'. |
24 |
|
|
*/ |
25 |
|
|
ServerspyBase::ServerspyBase( QWidget* parent, const char* name, WFlags fl ) |
26 |
|
|
: QWidget( parent, name, fl ) |
27 |
|
|
{ |
28 |
|
|
if ( !name ) |
29 |
|
|
setName( "ServerspyBase" ); |
30 |
|
|
ServerspyBaseLayout = new QVBoxLayout( this, 11, 6, "ServerspyBaseLayout"); |
31 |
|
|
|
32 |
|
|
layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); |
33 |
|
|
|
34 |
|
|
textLabel1 = new QLabel( this, "textLabel1" ); |
35 |
|
|
layout2->addWidget( textLabel1 ); |
36 |
|
|
|
37 |
|
|
m_address = new QLineEdit( this, "m_address" ); |
38 |
|
|
layout2->addWidget( m_address ); |
39 |
|
|
ServerspyBaseLayout->addLayout( layout2 ); |
40 |
|
|
|
41 |
|
|
m_output = new QLabel( this, "m_output" ); |
42 |
|
|
ServerspyBaseLayout->addWidget( m_output ); |
43 |
|
|
|
44 |
|
|
m_ip = new QLabel( this, "m_ip" ); |
45 |
|
|
ServerspyBaseLayout->addWidget( m_ip ); |
46 |
|
|
|
47 |
|
|
m_hostname = new QLabel( this, "m_hostname" ); |
48 |
|
|
ServerspyBaseLayout->addWidget( m_hostname ); |
49 |
|
|
|
50 |
|
|
layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); |
51 |
|
|
spacer1 = new QSpacerItem( 111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
52 |
|
|
layout1->addItem( spacer1 ); |
53 |
|
|
|
54 |
|
|
m_find = new QPushButton( this, "m_find" ); |
55 |
|
|
layout1->addWidget( m_find ); |
56 |
|
|
|
57 |
|
|
m_quit = new QPushButton( this, "m_quit" ); |
58 |
|
|
layout1->addWidget( m_quit ); |
59 |
|
|
ServerspyBaseLayout->addLayout( layout1 ); |
60 |
|
|
languageChange(); |
61 |
|
|
resize( QSize(310, 144).expandedTo(minimumSizeHint()) ); |
62 |
|
|
clearWState( WState_Polished ); |
63 |
|
|
|
64 |
|
|
// signals and slots connections |
65 |
|
|
connect( m_find, SIGNAL( clicked() ), this, SLOT( findServer() ) ); |
66 |
|
|
connect( m_quit, SIGNAL( clicked() ), this, SLOT( close() ) ); |
67 |
|
|
connect( m_address, SIGNAL( returnPressed() ), this, SLOT( findServer() ) ); |
68 |
|
|
} |
69 |
|
|
|
70 |
|
|
/* |
71 |
|
|
* Destroys the object and frees any allocated resources |
72 |
|
|
*/ |
73 |
|
|
ServerspyBase::~ServerspyBase() |
74 |
|
|
{ |
75 |
|
|
// no need to delete child widgets, Qt does it all for us |
76 |
|
|
} |
77 |
|
|
|
78 |
|
|
/* |
79 |
|
|
* Sets the strings of the subwidgets using the current |
80 |
|
|
* language. |
81 |
|
|
*/ |
82 |
|
|
void ServerspyBase::languageChange() |
83 |
|
|
{ |
84 |
|
|
setCaption( tr2i18n( "ServerSpy" ) ); |
85 |
|
|
textLabel1->setText( tr2i18n( "Server address:" ) ); |
86 |
|
|
m_output->setText( tr2i18n( "Response:" ) ); |
87 |
|
|
m_ip->setText( tr2i18n( "IP-address:" ) ); |
88 |
|
|
m_hostname->setText( tr2i18n( "Orig. hostname" ) ); |
89 |
|
|
m_find->setText( tr2i18n( "Find" ) ); |
90 |
|
|
m_quit->setText( tr2i18n( "Quit" ) ); |
91 |
|
|
} |
92 |
|
|
|
93 |
|
|
void ServerspyBase::findServer() |
94 |
|
|
{ |
95 |
|
|
qWarning( "ServerspyBase::findServer(): Not implemented yet" ); |
96 |
|
|
} |
97 |
|
|
|
98 |
|
|
#include "serverspybase.moc" |