24 #include "ui_paletteProperties.h" 57 virtual void resizeEvent(QResizeEvent*);
60 virtual void keyPressEvent(QKeyEvent* event)
override;
82 int pressedIndex = -1;
90 bool _disableElementsApply {
false };
94 bool filterActive {
false };
97 bool _showContextMenu {
true };
99 virtual void paintEvent(QPaintEvent*)
override;
100 virtual void mousePressEvent(QMouseEvent*)
override;
101 void mouseReleaseEvent(QMouseEvent* event)
override;
102 virtual void mouseMoveEvent(QMouseEvent*)
override;
103 virtual void leaveEvent(QEvent*)
override;
104 virtual bool event(QEvent*)
override;
105 virtual void resizeEvent(QResizeEvent*)
override;
107 virtual void dragEnterEvent(QDragEnterEvent*)
override;
108 virtual void dragMoveEvent(QDragMoveEvent*)
override;
109 virtual void dropEvent(QDropEvent*)
override;
110 virtual void contextMenuEvent(QContextMenuEvent*)
override;
112 int idx2(
const QPoint&)
const;
113 QRect idxRect(
int)
const;
115 const QList<PaletteCell*>*
ccp()
const {
return filterActive ? &dragCells : &cells; }
116 QPixmap pixmap(
int cellIdx)
const;
120 void actionToggled(
bool val);
123 void boxClicked(
int);
125 void displayMore(
const QString& paletteName);
129 Palette(std::unique_ptr<PalettePanel>, QWidget* parent =
nullptr);
132 void nextPaletteElement();
133 void prevPaletteElement();
134 void applyPaletteElement();
135 static bool applyPaletteElement(
Element* element, Qt::KeyboardModifiers modifiers = 0);
139 const QString tag = QString(), qreal mag = 1.0);
142 void setGrid(
int,
int);
146 bool read(
const QString& path);
147 void write(
const QString& path);
156 void setReadOnly(
bool val);
161 void setSystemPalette(
bool val);
163 void setMag(qreal val);
164 qreal
mag()
const {
return extraMag; }
169 int size()
const {
return filterActive ? dragCells.size() : cells.size(); }
172 QString
name()
const {
return _name; }
177 void setMoreElements(
bool val);
178 bool filter(
const QString& text);
181 static qreal guiMag();
189 virtual int heightForWidth(
int)
const;
190 virtual QSize sizeHint()
const;
191 int idx(
const QPoint&)
const;
QString _name
Definition: palette.h:75
qreal yOffset() const
Definition: palette.h:166
PaletteCell * cellAt(int index) const
Definition: palette.h:170
PaletteProperties(Palette *p, QWidget *parent=0)
Definition: palette.cpp:1701
int getSelectedIdx() const
Definition: palette.h:153
bool selectable() const
Definition: palette.h:152
QList< PaletteCell * > cells
Definition: palette.h:76
int selectedIdx
Definition: palette.h:84
bool systemPalette() const
Definition: palette.h:160
void setDrawGrid(bool val)
Definition: palette.h:144
bool disableElementsApply() const
Definition: palette.h:157
int gridWidth() const
Definition: palette.h:174
void setYOffset(qreal val)
Definition: palette.h:165
int size() const
Definition: palette.h:169
int hgrid
Definition: palette.h:79
Base class of score layout elements.
Definition: element.h:158
bool _drawGrid
Definition: palette.h:88
QString name() const
Definition: palette.h:172
bool moreElements() const
Definition: palette.h:176
int gridWidthM() const
Definition: palette.h:182
QPoint dragStartPosition
Definition: palette.h:85
void setCurrentIdx(int i)
Definition: palette.h:186
bool isFilterActive()
Definition: palette.h:187
bool readOnly() const
Definition: palette.h:155
int vgrid
Definition: palette.h:80
Definition: palettemodel_list.h:31
int gridHeightM() const
Definition: palette.h:183
int getCurrentIdx()
Definition: palette.h:185
void setSelectable(bool val)
Definition: palette.h:151
void setName(const QString &s)
Definition: palette.h:173
bool _readOnly
Definition: palette.h:91
Definition: aeolus.cpp:26
qreal extraMag
Definition: palette.h:87
int gridHeight() const
Definition: palette.h:175
bool _selectable
Definition: palette.h:89
void setCellReadOnly(int c, bool v)
Definition: palette.h:171
bool _systemPalette
Definition: palette.h:92
QList< PaletteCell * > getDragCells()
Definition: palette.h:188
Definition: xmlwriter.h:26
virtual void accept()
Definition: palette.cpp:1724
void emitChanged()
Definition: palette.h:141
qreal _yOffset
Definition: palette.h:93
const QList< PaletteCell * > * ccp() const
Definition: palette.h:115
Definition: xmlreader.h:28
virtual void hideEvent(QHideEvent *)
Definition: palette.cpp:1739
void setSelected(int idx)
Definition: palette.h:154
void setShowContextMenu(bool val)
Definition: palette.h:179
int currentIdx
Definition: palette.h:81
int dragIdx
Definition: palette.h:83
bool _moreElements
Definition: palette.h:96
QList< PaletteCell * > dragCells
Definition: palette.h:77
void setDisableElementsApply(bool val)
Definition: palette.h:158
qreal mag() const
Definition: palette.h:164
Palette * palette
Definition: palette.h:42
bool drawGrid() const
Definition: palette.h:145