| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef KSNIP_APPLICATIONSETTINGS_H |
| 21 |
#define KSNIP_APPLICATIONSETTINGS_H |
| 22 |
|
| 23 |
#include <QGroupBox> |
| 24 |
#include <QCheckBox> |
| 25 |
#include <QLineEdit> |
| 26 |
#include <QComboBox> |
| 27 |
#include <QLabel> |
| 28 |
#include <QPushButton> |
| 29 |
#include <QGridLayout> |
| 30 |
#include <QStyleFactory> |
| 31 |
#include <QFileDialog> |
| 32 |
|
| 33 |
#include "src/backend/config/IConfig.h" |
| 34 |
#include "src/common/helper/EnumTranslator.h" |
| 35 |
#include "src/widgets/CustomSpinBox.h" |
| 36 |
#include "src/common/adapter/fileDialog/IFileDialogService.h" |
| 37 |
|
| 38 |
class ApplicationSettings : public QGroupBox |
| 39 |
{ |
| 40 |
Q_OBJECT |
| 41 |
public: |
| 42 |
explicit ApplicationSettings(const QSharedPointer<IConfig> &config, const QSharedPointer<IFileDialogService> &fileDialogService); |
| 43 |
~ApplicationSettings() override = default; |
| 44 |
void saveSettings(); |
| 45 |
|
| 46 |
private: |
| 47 |
QCheckBox *mAutoCopyToClipboardNewCapturesCheckbox; |
| 48 |
QCheckBox *mRememberPositionCheckbox; |
| 49 |
QCheckBox *mCaptureOnStartupCheckbox; |
| 50 |
QCheckBox *mUseTabsCheckbox; |
| 51 |
QCheckBox *mAutoHideTabsCheckbox; |
| 52 |
QCheckBox *mUseSingleInstanceCheckBox; |
| 53 |
QCheckBox *mAutoHideDocksCheckBox; |
| 54 |
QCheckBox *mAutoResizeToContentCheckBox; |
| 55 |
QCheckBox *mEnableDebugging; |
| 56 |
QLabel *mApplicationStyleLabel; |
| 57 |
QLabel *mResizeToContentDelayLabel; |
| 58 |
QLabel *mTempDirectoryLabel; |
| 59 |
QLineEdit *mTempDirectoryLineEdit; |
| 60 |
QPushButton *mBrowseButton; |
| 61 |
QComboBox *mApplicationStyleCombobox; |
| 62 |
CustomSpinBox *mResizeToContentDelaySpinBox; |
| 63 |
QGridLayout *mLayout; |
| 64 |
QSharedPointer<IConfig> mConfig; |
| 65 |
QSharedPointer<IFileDialogService> mFileDialogService; |
| 66 |
|
| 67 |
void initGui(); |
| 68 |
void loadConfig(); |
| 69 |
|
| 70 |
private slots: |
| 71 |
void useTabsChanged(); |
| 72 |
void chooseTempDirectory(); |
| 73 |
}; |
| 74 |
|
| 75 |
#endif |