Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/QtDialog/WarningMessagesDialog.h
4998 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "QCMake.h"
6
#include <QDialog>
7
#include <QWidget>
8
9
#include "ui_WarningMessagesDialog.h"
10
11
/**
12
* Dialog window for setting the warning message related options.
13
*/
14
class WarningMessagesDialog
15
: public QDialog
16
, public Ui_MessagesDialog
17
{
18
Q_OBJECT
19
20
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
21
using CheckState = Qt::CheckState;
22
#else
23
using CheckState = int;
24
#endif
25
26
public:
27
WarningMessagesDialog(QWidget* prnt, QCMake* instance);
28
29
private slots:
30
/**
31
* Handler for the accept event of the ok/cancel button box.
32
*/
33
void doAccept();
34
35
/**
36
* Handler for checked state changed event of the suppress developer warnings
37
* checkbox.
38
*/
39
void doSuppressDeveloperWarningsChanged(CheckState state);
40
/**
41
* Handler for checked state changed event of the suppress deprecated
42
* warnings checkbox.
43
*/
44
void doSuppressDeprecatedWarningsChanged(CheckState state);
45
46
/**
47
* Handler for checked state changed event of the developer warnings as
48
* errors checkbox.
49
*/
50
void doDeveloperWarningsAsErrorsChanged(CheckState state);
51
/**
52
* Handler for checked state changed event of the deprecated warnings as
53
* errors checkbox.
54
*/
55
void doDeprecatedWarningsAsErrorsChanged(CheckState state);
56
57
private:
58
QCMake* cmakeInstance;
59
60
/**
61
* Set the initial values of the widgets on this dialog window, using the
62
* current state of the cache.
63
*/
64
void setInitialValues();
65
66
/**
67
* Setup the signals for the widgets on this dialog window.
68
*/
69
void setupSignals();
70
};
71
72