drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
networksettingsdialog.h
Go to the documentation of this file.
1/*
2 Virtual Piano test using the MIDI Sequencer C++ library
3 Copyright (C) 2006-2023, 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#include <QSettings>
25
31namespace drumstick {
32namespace widgets {
33
34 namespace Ui {
35 class NetworkSettingsDialog;
36 }
37
38 class NetworkSettingsDialog : public QDialog
39 {
40 Q_OBJECT
41
42 public:
43 explicit NetworkSettingsDialog(const bool forInput, QWidget *parent = nullptr);
44 ~NetworkSettingsDialog();
45 void readSettings();
46 void writeSettings();
47 void chkInitialization(QSettings* settings);
48
49 static const QString QSTR_ADDRESS_IPV4;
50 static const QString QSTR_ADDRESS_IPV6;
51
52 public Q_SLOTS:
53 void accept() override;
54 void showEvent(QShowEvent *event) override;
55 void restoreDefaults();
56 void toggledIPv6(bool checked);
57
58 private:
59 Ui::NetworkSettingsDialog *ui;
60 QObject *m_driver;
61 bool m_input;
62 };
63
64}} // namespace drumstick::widgets
65
66#endif // NETWORKSETTINGSDIALOG_H
The QObject class is the base class of all Qt objects.
The QSettings class provides persistent platform-independent application settings.
Drumstick common.
Definition: alsaclient.cpp:68