Debian Codegraph @

src/playlist/layouts/LayoutEditDialog.h

raw
1 /****************************************************************************************
2 * Copyright (c) 2009 Thomas Lübking <[email protected] *
3 * *
4 * This program is free software; you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free Software *
6 * Foundation; either version 2 of the License, or (at your option) any later *
7 * version. *
8 * *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
11 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
12 * *
13 * You should have received a copy of the GNU General Public License along with *
14 * this program. If not, see <http://www.gnu.org/licenses/>. *
15 ****************************************************************************************/
16
17 #ifndef LAYOUTEDITDIALOG_H
18 #define LAYOUTEDITDIALOG_H
19
20 #include <QDialog>
21 #include <QPointer>
22
23 class HintingLineEdit;
24 class QLabel;
25 class QRadioButton;
26 class QSlider;
27 class QToolButton;
28 class TokenWithLayout;
29
30 class LayoutEditDialog : public QDialog
31 {
32 Q_OBJECT
33 public:
34 explicit LayoutEditDialog( QWidget *parent = nullptr );
35 void setToken( TokenWithLayout *t );
36 public Q_SLOTS:
37 void close();
38 private Q_SLOTS:
39 void apply();
40 void setAutomaticWidth( bool peer );
41 private:
42 QPointer<TokenWithLayout> m_token;
43 HintingLineEdit *m_prefix;
44 HintingLineEdit *m_suffix;
45 QLabel *m_element;
46 QSlider *m_width;
47
48 /** Stores the width that the widget had before switching to automatic width. */
49 int m_previousWidth;
50
51 QToolButton *m_bold, *m_italic, *m_underline;
52 QToolButton *m_alignLeft, *m_alignCenter, *m_alignRight;
53 QRadioButton *m_fixedWidth;
54 QRadioButton *m_automaticWidth;
55 };
56
57 #endif