summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -182,13 +182,2 @@ QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true)
// 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()));
@@ -279,3 +268,3 @@ void QMyDialog::ComboChanged(int index)
//*****************************************************************************
-void QMyDialog::OKClicked()
+void QMyDialog::accept()
{
@@ -287,11 +276,7 @@ void QMyDialog::OKClicked()
FullScreen = FullScreenCheckBox->isChecked();
- done(1);
-}
-//*****************************************************************************
-void QMyDialog::CancelClicked()
-{
- done(0);
+ QDialog::accept();
}
+
//*****************************************************************************
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
@@ -30,4 +30,2 @@ class QMyDialog: public QDialog
QListBox* ListBox;
- QPushButton* OKButton;
- QPushButton* CancelButton;
QLabel* Label1;
@@ -48,4 +46,2 @@ class QMyDialog: public QDialog
void ComboChanged(int);
- void OKClicked();
- void CancelClicked();
void AddClicked();
@@ -64,2 +60,4 @@ class QMyDialog: public QDialog
QMyConnectionItem* ConnectionList[10];
+ protected slots:
+ void accept();
};