9 #include "ocurvesconfig.h"
22 class QTableWidgetItem;
57 inline const QVector<QRgb> &
colours()
const {
return _colours; }
108 void edited(QTableWidgetItem *item);
122 virtual void showEvent(QShowEvent *event);
128 Ui::ColoursView *_ui;
129 QVector<QRgb> _colours;
130 QMenu *_resetSelectionMenu;
134 #endif // COLOURSVIEW_H
void addItem()
Adds a new colour entry to the colour list, opening a colour selection dialog.
void edited(QTableWidgetItem *item)
Handles editing of entries in the colour table (hexadecimal column only).
void resetActionTriggered()
Handler for actions on the reset context menu.
Definition: coloursview.h:16
void cellDoubleClick(int row, int column)
Respond to cell double clicks on colours by showing the colour dialog.
ColoursView(QWidget *parent=nullptr)
Constructor.
void removeItem()
Removes the currently selected colour from the list.
Columns
Column index definitions.
Definition: coloursview.h:38
void cellSelectionChange()
Remaps selection of ColColour to the corresponding ColHex.
Dialog used to edit the colours used to display plots.
Definition: coloursview.h:32
~ColoursView()
Destructor.
void setColours(const QVector< QRgb > &colours)
Sets the list of colours to edit.
Definition: coloursview.h:53
void populateColourTable()
Populate the colours UI control from _colours.
virtual void showEvent(QShowEvent *event)
Handles the dialog show event by populating the colours table.
void editColour(int colourIndex)
Opens a colour dialog to edit the colour at the given index.
const QVector< QRgb > & colours() const
Retrieves the list of colours.
Definition: coloursview.h:57
void resetColours()
Reset to the default colour set.