drumstick  2.0.0
networksettingsdialog.h
Go to the documentation of this file.
1 /*
2  Virtual Piano test using the MIDI Sequencer C++ library
3  Copyright (C) 2006-2020, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef NETWORKSETTINGSDIALOG_H
20 #define NETWORKSETTINGSDIALOG_H
21 
22 #include <QDialog>
23 #include <QShowEvent>
24 
30 namespace drumstick { namespace widgets {
31 
32  namespace Ui {
33  class NetworkSettingsDialog;
34  }
35 
36  class NetworkSettingsDialog : public QDialog
37  {
38  Q_OBJECT
39 
40  public:
41  explicit NetworkSettingsDialog(QWidget *parent = nullptr);
42  ~NetworkSettingsDialog();
43  void readSettings();
44  void writeSettings();
45 
46  static const QString QSTR_ADDRESS_IPV4;
47  static const QString QSTR_ADDRESS_IPV6;
48 
49  public slots:
50  void accept() override;
51  void showEvent(QShowEvent *event) override;
52  void restoreDefaults();
53  void toggledIPv6(bool checked);
54 
55  private:
56  Ui::NetworkSettingsDialog *ui;
57  };
58 
59 }} // namespace drumstick::widgets
60 
61 #endif // NETWORKSETTINGSDIALOG_H
Drumstick common.
Definition: alsaclient.cpp:68