Kstars

profilescript.h
1/*
2 SPDX-FileCopyrightText: 2022 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QWidget>
10#include <QJsonObject>
11
12class QComboBox;
13class QSpinBox;
14class QLineEdit;
15class QPushButton;
16
17class ProfileScript : public QWidget
18{
20 Q_PROPERTY(uint PreDelay MEMBER m_PreDelay)
21 Q_PROPERTY(QString PreScript MEMBER m_PreScript)
22 Q_PROPERTY(QString Driver MEMBER m_Driver)
23 Q_PROPERTY(uint PostDelay MEMBER m_PostDelay)
24 Q_PROPERTY(QString PostScript MEMBER m_PostScript)
25
26 public:
27 explicit ProfileScript(QWidget *parent = nullptr);
28 void setDriverList(const QStringList &value);
29 void syncGUI();
30 QJsonObject toJSON() const;
31
32 protected:
33 QString m_PreScript, m_PostScript, m_Driver;
34 uint m_PreDelay {0}, m_PostDelay {0};
35
36 private:
37 QComboBox *m_DriverCombo {nullptr};
38 QSpinBox *m_PreDelaySpin {nullptr}, *m_PostDelaySpin {nullptr};
39 QLineEdit *m_PreScriptEdit {nullptr}, *m_PostScriptEdit {nullptr};
40 QPushButton *m_PreScriptB {nullptr}, *m_PostScriptB {nullptr}, *m_RemoveB {nullptr};
41
42 signals:
43 void removedRequested();
44
45 protected:
46 void selectPreScript();
47 void selectPostScript();
48
49};
50
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.