/* Copyright 2020-2021 Brad Parker Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef __COREOPTIONSDIALOG_H_ #define __COREOPTIONSDIALOG_H_ #include #include class QCloseEvent; class QResizeEvent; class QVBoxLayout; class QFormLayout; class QLayout; class QScrollArea; class Core; class CoreOptionsDialog : public QDialog { Q_OBJECT public: CoreOptionsDialog(QWidget *parent, Core *core); ~CoreOptionsDialog(); signals: void closed(); void resized(QSize size); public slots: void reload(); private slots: void clearLayout(); void buildLayout(); void onCoreOptionComboBoxCurrentIndexChanged(int index); void onCoreOptionResetClicked(); void onCoreOptionResetAllClicked(); private: QPointer m_layout; QPointer m_scrollArea; Core *m_core; protected: void closeEvent(QCloseEvent *event); void resizeEvent(QResizeEvent *event); void paintEvent(QPaintEvent *event); }; #endif // __COREOPTIONSDIALOG_H_