/*
* newnetworkdialog.h
* bkupsim
*
* Created by Andrew White on 6/23/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#ifndef NEWNETWORKDIALOG_H
#define NEWNETWORKDIALOG_H
#include<QDialog>
class QFormLayout;
class NewNetworkDialog
: public QDialog { Q_OBJECT
public:
NewNetworkDialog
(QWidget* parent
= 0);
signals:
private slots:
void accept();
void reject();
private:
QFormLayout* formLayout;
};
#endif
/*
* newnetworkdialog.cpp
* bkupsim
*
* Created by Andrew White on 6/23/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#include "newnetworkdialog.h"
#include<QtGui>
NewNetworkDialog
::NewNetworkDialog(QWidget* parent
) :
formLayout = new QFormLayout;
formLayout->addRow(tr("Name:"), nameLineEdit);
formLayout->addRow(tr("IP Address:"), ipLineEdit);
formLayout->addRow(tr("Netmask:"), netmaskLineEdit);
formLayout->addRow(tr("Thruput Type:"), thruputComboBox);
thruputComboBox->addItem(tr("10-B-T"), 1000);
thruputComboBox->addItem(tr("100-B-T"), 10000);
thruputComboBox->addItem(tr("1000-B-T"), 100000);
formLayout->addRow(okCancelButtonBox);
setLayout(formLayout);
connect(okCancelButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(okCancelButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
void NewNetworkDialog::accept() {
}
void NewNetworkDialog::reject() {
}
/*
* newnetworkdialog.h
* bkupsim
*
* Created by Andrew White on 6/23/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#ifndef NEWNETWORKDIALOG_H
#define NEWNETWORKDIALOG_H
#include<QDialog>
class QFormLayout;
class QLineEdit;
class QComboBox;
class QDialogButtonBox;
class NewNetworkDialog : public QDialog {
Q_OBJECT
public:
NewNetworkDialog(QWidget* parent = 0);
signals:
private slots:
void accept();
void reject();
private:
QLineEdit* nameLineEdit;
QLineEdit* ipLineEdit;
QLineEdit* netmaskLineEdit;
QComboBox* thruputComboBox;
QFormLayout* formLayout;
QDialogButtonBox* okCancelButtonBox;
};
#endif
/*
* newnetworkdialog.cpp
* bkupsim
*
* Created by Andrew White on 6/23/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#include "newnetworkdialog.h"
#include<QtGui>
NewNetworkDialog::NewNetworkDialog(QWidget* parent) :
QDialog(parent) {
nameLineEdit = new QLineEdit;
ipLineEdit = new QLineEdit;
netmaskLineEdit = new QLineEdit;
thruputComboBox = new QComboBox;
formLayout = new QFormLayout;
formLayout->addRow(tr("Name:"), nameLineEdit);
formLayout->addRow(tr("IP Address:"), ipLineEdit);
formLayout->addRow(tr("Netmask:"), netmaskLineEdit);
formLayout->addRow(tr("Thruput Type:"), thruputComboBox);
thruputComboBox->addItem(tr("10-B-T"), 1000);
thruputComboBox->addItem(tr("100-B-T"), 10000);
thruputComboBox->addItem(tr("1000-B-T"), 100000);
okCancelButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
formLayout->addRow(okCancelButtonBox);
setLayout(formLayout);
connect(okCancelButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(okCancelButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
void NewNetworkDialog::accept() {
QDialog::accept();
}
void NewNetworkDialog::reject() {
QDialog::reject();
}
To copy to clipboard, switch view to plain text mode
Bookmarks