summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interfaceedit.cpp
blob: 25599ef0502c0526da265e781c7652bd781e73d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/****************************************************************************
** Form implementation generated from reading ui file 'interfaceedit.ui'
**
** Created: Mon Sep 23 12:18:55 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "interfaceedit.h"

#include <qcheckbox.h>
#include <qcombobox.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include "qwidget.h"
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a InterfaceConfiguration which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
InterfaceConfiguration::InterfaceConfiguration( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "InterfaceConfiguration" );
    resize( 177, 306 ); 
    setCaption( tr( "Interface Configuration" ) );
    InterfaceConfigurationLayout = new QGridLayout( this ); 
    InterfaceConfigurationLayout->setSpacing( 6 );
    InterfaceConfigurationLayout->setMargin( 11 );

    profile = new QComboBox( FALSE, this, "profile" );
    profile->insertItem( tr( "All" ) );

    InterfaceConfigurationLayout->addWidget( profile, 2, 1 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setText( tr( "Profile:" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel1, 2, 0 );

    Line1 = new QFrame( this, "Line1" );
    Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );

    InterfaceConfigurationLayout->addMultiCellWidget( Line1, 1, 1, 0, 1 );

    CheckBox3 = new QCheckBox( this, "CheckBox3" );
    CheckBox3->setText( tr( "Automaticly bring up" ) );

    InterfaceConfigurationLayout->addMultiCellWidget( CheckBox3, 0, 0, 0, 1 );

    dhcpCheckBox = new QCheckBox( this, "dhcpCheckBox" );
    dhcpCheckBox->setText( tr( "DHCP" ) );

    InterfaceConfigurationLayout->addMultiCellWidget( dhcpCheckBox, 3, 3, 0, 1 );

    TextLabel3_3_2 = new QLabel( this, "TextLabel3_3_2" );
    TextLabel3_3_2->setText( tr( "Lease Hours" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel3_3_2, 4, 0 );

    SpinBox1_2 = new QSpinBox( this, "SpinBox1_2" );
    SpinBox1_2->setMaxValue( 336 );
    SpinBox1_2->setMinValue( 1 );
    SpinBox1_2->setValue( 24 );

    InterfaceConfigurationLayout->addWidget( SpinBox1_2, 4, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    InterfaceConfigurationLayout->addItem( spacer, 11, 1 );

    TextLabel4 = new QLabel( this, "TextLabel4" );
    TextLabel4->setText( tr( "IP Address" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel4, 6, 0 );

    ipAddressEdit = new QLineEdit( this, "ipAddressEdit" );

    InterfaceConfigurationLayout->addWidget( ipAddressEdit, 6, 1 );

    TextLabel5 = new QLabel( this, "TextLabel5" );
    TextLabel5->setText( tr( "Subnet Mask" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel5, 7, 0 );

    firstDNSLineEdit = new QLineEdit( this, "firstDNSLineEdit" );

    InterfaceConfigurationLayout->addWidget( firstDNSLineEdit, 9, 1 );

    TextLabel3 = new QLabel( this, "TextLabel3" );
    TextLabel3->setText( tr( "Second DNS" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel3, 10, 0 );

    subnetMaskEdit = new QLineEdit( this, "subnetMaskEdit" );

    InterfaceConfigurationLayout->addWidget( subnetMaskEdit, 7, 1 );

    gatewayEdit = new QLineEdit( this, "gatewayEdit" );

    InterfaceConfigurationLayout->addWidget( gatewayEdit, 8, 1 );

    TextLabel7 = new QLabel( this, "TextLabel7" );
    TextLabel7->setText( tr( "Gateway" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel7, 8, 0 );

    TextLabel2 = new QLabel( this, "TextLabel2" );
    TextLabel2->setText( tr( "First DNS" ) );

    InterfaceConfigurationLayout->addWidget( TextLabel2, 9, 0 );

    secondDNSLineEdit = new QLineEdit( this, "secondDNSLineEdit" );

    InterfaceConfigurationLayout->addWidget( secondDNSLineEdit, 10, 1 );

    GroupBox2 = new QGroupBox( this, "GroupBox2" );
    GroupBox2->setTitle( tr( "Static Ip Configuration" ) );

    InterfaceConfigurationLayout->addMultiCellWidget( GroupBox2, 5, 5, 0, 1 );

    // signals and slots connections
    connect( dhcpCheckBox, SIGNAL( toggled(bool) ), SpinBox1_2, SLOT( setEnabled(bool) ) );
    connect( dhcpCheckBox, SIGNAL( toggled(bool) ), GroupBox2, SLOT( setDisabled(bool) ) );
}

/*  
 *  Destroys the object and frees any allocated resources
 */
InterfaceConfiguration::~InterfaceConfiguration()
{
    // no need to delete child widgets, Qt does it all for us
}