/**************************************************************************************** * Copyright (c) 2009 Thomas Lübking . * ****************************************************************************************/ #ifndef LAYOUTEDITDIALOG_H #define LAYOUTEDITDIALOG_H #include #include class HintingLineEdit; class QLabel; class QRadioButton; class QSlider; class QToolButton; class TokenWithLayout; class LayoutEditDialog : public QDialog { Q_OBJECT public: explicit LayoutEditDialog( QWidget *parent = nullptr ); void setToken( TokenWithLayout *t ); public Q_SLOTS: void close(); private Q_SLOTS: void apply(); void setAutomaticWidth( bool peer ); private: QPointer m_token; HintingLineEdit *m_prefix; HintingLineEdit *m_suffix; QLabel *m_element; QSlider *m_width; /** Stores the width that the widget had before switching to automatic width. */ int m_previousWidth; QToolButton *m_bold, *m_italic, *m_underline; QToolButton *m_alignLeft, *m_alignCenter, *m_alignRight; QRadioButton *m_fixedWidth; QRadioButton *m_automaticWidth; }; #endif