Files
OmaPhoto/src/UI/BrushControls.h
T
雷电芽衣andClaude c864304695
Release / deb (push) Canceled after 0s
Release / rpm (push) Canceled after 0s
Release / arch (push) Canceled after 0s
Release / publish (push) Canceled after 0s
OmaPhoto 1.0.0: the Linux port of Compositor
A layered image editor for Linux and Omarchy, ported from Compositor
(github.com/robbietilton/Compositor), whose Swift source is its
specification. It reads and writes Compositor's .comp projects.

Packages for Ubuntu, Fedora and Arch come from the release workflow;
scripts/install/ holds one install script per distribution family,
and flake.nix serves NixOS.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-26 00:44:52 -04:00

55 lines
1.8 KiB
C++

#pragma once
#include "UI/ToolHeaderStyle.h"
#include <functional>
class EditorSession;
class QButtonGroup;
class QCheckBox;
class QComboBox;
class QLabel;
class QSlider;
class QToolButton;
class SelectionAmountField;
class SwatchButton;
// Swift's BrushControls: mode, type or source; tip, opacity, mask.
class BrushControls : public ToolHeaderBar {
Q_OBJECT
public:
explicit BrushControls(EditorSession &session, QWidget *parent = nullptr);
private:
// A segment of Swift's segmented picker: one checkable button.
QToolButton *choice(QButtonGroup *group, const QString &name, const QString &text, const QString &tip, const std::function<void()> &pick);
QSlider *slider(const QString &name, int low, int high, const std::function<void(int)> &change);
void synchronize();
EditorSession &m_session;
QButtonGroup *const m_modes;
QToolButton *const m_paint;
QToolButton *const m_erase;
// The Smear's mode, Swift's second segmented picker.
QButtonGroup *const m_blurModes;
// Spot Healing's type, Swift's `spotHealingType` picker.
QButtonGroup *const m_healingTypes;
// Clone Stamp's options: Aligned, and what it samples.
QCheckBox *const m_aligned;
QButtonGroup *const m_samples;
QToolButton *const m_thisLayer;
QToolButton *const m_allLayers;
SelectionAmountField *const m_size;
// Sliders step in thousandths, fields show whole percents.
QSlider *const m_hardnessSlider;
SelectionAmountField *const m_hardness;
QLabel *const m_opacityLabel;
QSlider *const m_opacitySlider;
SelectionAmountField *const m_opacity;
QLabel *const m_paintLabel;
QComboBox *const m_maskPaint;
// The foreground colour, the rail swatch's own picker.
QLabel *const m_colourLabel;
SwatchButton *const m_colour;
QLabel *const m_cloneNote;
QLabel *const m_mask;
};