11#include "core/theme.h"
12#include "core/themedelegate.h"
13#include "utils/optionseteditor.h"
35class ModelInvariantRowMapper;
40class ThemeColumnPropertiesDialog :
public QDialog
44 explicit ThemeColumnPropertiesDialog(
QWidget *
parent, Core::Theme::Column *column,
const QString &title);
47 Core::Theme::Column *
const mColumn;
49 QCheckBox *mVisibleByDefaultCheck =
nullptr;
50 QCheckBox *mIsSenderOrReceiverCheck =
nullptr;
51 QComboBox *mMessageSortingCombo =
nullptr;
54 void slotOkButtonClicked();
57class ThemePreviewDelegate :
public Core::ThemeDelegate
62 ~ThemePreviewDelegate()
override;
65 Core::GroupHeaderItem *mSampleGroupHeaderItem =
nullptr;
66 Core::FakeItem *mSampleMessageItem =
nullptr;
67 Core::ModelInvariantRowMapper *mRowMapper =
nullptr;
69 Core::Item *itemFromIndex(
const QModelIndex &index)
const override;
77 ~ThemePreviewWidget()
override;
78 void setReadOnly(
bool readOnly);
86 enum RowInsertPosition {
95 enum ItemInsertPosition {
105 ThemePreviewDelegate *mDelegate =
nullptr;
107 QRect mThemeSelectedContentItemRect;
108 Core::Theme::ContentItem *mSelectedThemeContentItem =
nullptr;
109 Core::Theme::Column *mSelectedThemeColumn =
nullptr;
111 Core::Theme *mTheme =
nullptr;
112 RowInsertPosition mRowInsertPosition;
113 ItemInsertPosition mItemInsertPosition;
114 QPoint mDropIndicatorPoint1;
115 QPoint mDropIndicatorPoint2;
120 QSize sizeHint()
const override;
121 void setTheme(Core::Theme *theme);
145 void applyThemeColumnWidths();
148 void slotHeaderContextMenuRequested(
const QPoint &
pos);
149 void slotAddColumn();
150 void slotColumnProperties();
151 void slotDeleteColumn();
152 void slotDisabledFlagsMenuTriggered(
QAction *act);
153 void slotForegroundColorMenuTriggered(
QAction *act);
154 void slotFontMenuTriggered(
QAction *act);
155 void slotSoftenActionTriggered(
bool);
156 void slotGroupHeaderBackgroundModeMenuTriggered(
QAction *act);
157 void slotGroupHeaderBackgroundStyleMenuTriggered(
QAction *act);
158 void slotMoveColumnToLeft();
159 void slotMoveColumnToRight();
162class ThemeContentItemSourceLabel :
public QLabel
167 ~ThemeContentItemSourceLabel()
override;
182class ThemeEditor :
public OptionSetEditor
187 ~ThemeEditor()
override;
195 void editTheme(Core::Theme *set);
197 Core::Theme *editedTheme()
const;
201 void themeNameChanged();
204 void fillViewHeaderPolicyCombo();
207 void slotNameEditTextEdited(
const QString &newName)
override;
208 void slotIconSizeSpinBoxValueChanged(
int val);
211 void setReadOnly(
bool readOnly);
213 Core::Theme *mCurrentTheme =
nullptr;
216 ThemePreviewWidget *mPreviewWidget =
nullptr;
219 QComboBox *mViewHeaderPolicyCombo =
nullptr;
220 QSpinBox *mIconSizeSpinBox =
nullptr;
Type
The available ContentItem types.
QObject * parent() const const