Class CanvasControlWidget

Inheritance Relationships

Base Type

  • public QWidget

Class Documentation

class CanvasControlWidget : public QWidget

Public Functions

CanvasControlWidget(QWidget *parent = nullptr)
~CanvasControlWidget()
uint8_t get_selected_color_index() const

Returns the index of the selected Canvas Palette color.

Return

Canvas Palette color index.

bool get_painting_enabled() const

Returns whether the Canvas paint tool button is currently active.

Return

True if the brushToolButton is active.

bool get_replace_enabled() const

Returns whether the Canvas replace tool button is active.

Return

True if the replaceToolButton is active.

void initialize()
void refresh()

Updates the UI.

void refresh_palettes()

Updates the Palettes visible in the Palette drop-down.

void set_canvas_origin(Point &coordinates)

Sets the Canvas’ origin to the specified coordinates.

Parameters
  • coordinates: New coordinates.

Public Slots

void on_drawButton_clicked()

Handles drawing onto the current Canvas frame.

Protected Functions

bool eventFilter(QObject *watched, QEvent *event)

Handle keypress events.

Return

True on success.

Parameters
  • watched: Object that the keypress occurred in.

  • event: Keypress event.