Sandboxie/SandboxiePlus/SandMan/Windows/SettingsWindow.h

72 lines
1.4 KiB
C
Raw Normal View History

2020-07-19 21:09:02 +01:00
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_SettingsWindow.h"
2021-07-05 12:37:28 +01:00
#include <QProxyStyle>
class CustomTabStyle : public QProxyStyle {
public:
CustomTabStyle(QStyle* style = 0) : QProxyStyle(style) {}
QSize sizeFromContents(ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget) const;
void drawControl(ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const;
};
2020-07-19 21:09:02 +01:00
2021-01-18 12:04:14 +00:00
class CSettingsWindow : public QDialog
2020-07-19 21:09:02 +01:00
{
Q_OBJECT
public:
CSettingsWindow(QWidget *parent = Q_NULLPTR);
~CSettingsWindow();
2021-01-18 12:04:14 +00:00
virtual void accept() {}
virtual void reject();
2020-07-19 21:09:02 +01:00
signals:
void OptionsChanged();
2021-01-18 12:04:14 +00:00
void Closed();
2020-07-19 21:09:02 +01:00
public slots:
2021-01-18 12:04:14 +00:00
void ok();
2020-07-19 21:09:02 +01:00
void apply();
2020-09-05 16:45:39 +01:00
void showCompat();
2020-07-19 21:09:02 +01:00
private slots:
void OnChange();
2020-09-05 16:45:39 +01:00
void OnTab();
2021-01-18 12:04:14 +00:00
void OnBrowse();
2020-07-19 21:09:02 +01:00
void OnSetPassword();
2020-11-28 16:20:56 +00:00
void OnWarnChanged() { m_WarnProgsChanged = true; }
2020-09-05 16:45:39 +01:00
void OnAddWarnProg();
2020-11-28 16:20:56 +00:00
void OnAddWarnFolder();
2020-09-05 16:45:39 +01:00
void OnDelWarnProg();
void OnTemplateClicked(QTreeWidgetItem* pItem, int Column);
void OnAddCompat();
void OnDelCompat();
2021-07-05 12:37:28 +01:00
void OnSupport(const QString& url);
2020-07-19 21:09:02 +01:00
protected:
void closeEvent(QCloseEvent *e);
2020-11-28 16:20:56 +00:00
void AddWarnEntry(const QString& Name, int type);
2021-07-05 12:37:28 +01:00
void LoadSettings();
void SaveSettings();
2020-09-05 16:45:39 +01:00
int m_CompatLoaded;
2020-07-19 21:09:02 +01:00
QString m_NewPassword;
2020-09-05 16:45:39 +01:00
bool m_WarnProgsChanged;
bool m_CompatChanged;
2020-07-19 21:09:02 +01:00
private:
Ui::SettingsWindow ui;
};