summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opierdesktop/qtwin.cpp21
-rw-r--r--noncore/net/opierdesktop/qtwin.h6
2 files changed, 5 insertions, 22 deletions
diff --git a/noncore/net/opierdesktop/qtwin.cpp b/noncore/net/opierdesktop/qtwin.cpp
index 181d275..54a5a03 100644
--- a/noncore/net/opierdesktop/qtwin.cpp
+++ b/noncore/net/opierdesktop/qtwin.cpp
@@ -181,15 +181,4 @@ QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true)
FullScreenCheckBox->move(10, 230);
// ok button
- OKButton = new QPushButton(this);
- OKButton->setText("OK");
- OKButton->move(100, 240);
- OKButton->resize(50, 20);
- connect(OKButton, SIGNAL(clicked()), this, SLOT(OKClicked()));
- // cancel button
- CancelButton = new QPushButton(this);
- CancelButton->setText("Cancel");
- CancelButton->move(160, 240);
- CancelButton->resize(50, 20);
- connect(CancelButton, SIGNAL(clicked()), this, SLOT(CancelClicked()));
for (i = 0; i < 10; i++)
@@ -278,5 +267,5 @@ void QMyDialog::ComboChanged(int index)
//*****************************************************************************
-void QMyDialog::OKClicked()
+void QMyDialog::accept()
{
ServerName = ServerNameEdit->text();
@@ -286,13 +275,9 @@ void QMyDialog::OKClicked()
ServerIP = IPEdit->text();
FullScreen = FullScreenCheckBox->isChecked();
- done(1);
-}
-//*****************************************************************************
-void QMyDialog::CancelClicked()
-{
- done(0);
+ QDialog::accept();
}
+
//*****************************************************************************
void QMyDialog::AddClicked()
diff --git a/noncore/net/opierdesktop/qtwin.h b/noncore/net/opierdesktop/qtwin.h
index 38ad190..7a2110b 100644
--- a/noncore/net/opierdesktop/qtwin.h
+++ b/noncore/net/opierdesktop/qtwin.h
@@ -29,6 +29,4 @@ class QMyDialog: public QDialog
public:
QListBox* ListBox;
- QPushButton* OKButton;
- QPushButton* CancelButton;
QLabel* Label1;
QLineEdit* ServerNameEdit;
@@ -47,6 +45,4 @@ class QMyDialog: public QDialog
public slots:
void ComboChanged(int);
- void OKClicked();
- void CancelClicked();
void AddClicked();
void EditClicked();
@@ -63,4 +59,6 @@ class QMyDialog: public QDialog
int FullScreen;
QMyConnectionItem* ConnectionList[10];
+ protected slots:
+ void accept();
};