Limo
A simple mod manager
Loading...
Searching...
No Matches
tagcheckbox.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <QCheckBox>
9
10
14class TagCheckBox : public QCheckBox
15{
16 Q_OBJECT
17public:
22 TagCheckBox(const QString& tag_name, int num_mods);
23
25 // clang-format off
26 static constexpr char style_sheet[] =
27 "QCheckBox::indicator:indeterminate {"
28 "image: url(:/filter_accept.svg);"
29 "width:16px;"
30 "height:16px;"
31 "margin-left: 2;"
32 "margin-right: 2;"
33 "spacing: 5;"
34 "}"
35 "QCheckBox::indicator:checked {"
36 "image: url(:/filter_reject.svg);"
37 "width:16px;"
38 "height:16px;"
39 "margin-left: 2;"
40 "margin-right: 2;"
41 "spacing: 5;"
42 "}";
43 // clang-format on
44
45private:
47 QString tag_name_;
48
49private slots:
55 void onChecked(int state);
56
57signals:
63 void tagBoxChecked(QString tag_name, int state);
64};
static constexpr char style_sheet[]
The style sheet used for this checkbox.
Definition tagcheckbox.h:26
QString tag_name_
Name of the displayed tag.
Definition tagcheckbox.h:47
TagCheckBox(const QString &tag_name, int num_mods)
Constructor. Initializes the style sheet and sets this checkbox to a tristate box.
Definition tagcheckbox.cpp:4
void tagBoxChecked(QString tag_name, int state)
Signals check state has been chenged.
void onChecked(int state)
Connected to stateChanged. Emits tagBoxChecked with the display text and the check state as arguments...
Definition tagcheckbox.cpp:13