Loading...
Searching...
No Matches
HelperPanelDelegate.hpp
1#pragma once
2#include <score/plugins/panel/PanelDelegate.hpp>
3
4#include <QLabel>
5#include <QVBoxLayout>
6
7namespace score
8{
9
11{
12public:
13 struct FasterLabel : QLabel
14 {
15 QSize sizeHint() const override { return {180, 200}; }
16 QSize minimumSizeHint() const override { return {180, 100}; }
17 int heightForWidth(int) const override { return 200; }
18 };
19
21 : PanelDelegate{ctx}
22 {
23 widg = status = new FasterLabel;
24 widg->setContentsMargins(3, 5, 3, 2);
25 widg->setMinimumHeight(100);
26 widg->setMaximumHeight(200);
27 widg->setMinimumWidth(180);
28
29 status->setAlignment(Qt::AlignTop);
30 status->setTextFormat(Qt::RichText);
31 status->setText("<i>Do the words need changing?</i>");
32 status->setWordWrap(true);
33 }
34
35 QWidget* widget() override { return widg; }
36
37 const PanelStatus& defaultPanelStatus() const override
38 {
39 static const PanelStatus stat{true, true, Qt::RightDockWidgetArea, -100000,
40 "Info", "info", QKeySequence::HelpContents};
41 return stat;
42 }
43 QWidget* widg{};
44 QLabel* status{};
45};
46}
Definition HelperPanelDelegate.hpp:11
QWidget * widget() override
widget The widget of the panel.
Definition HelperPanelDelegate.hpp:35
const PanelStatus & defaultPanelStatus() const override
defaultPanelStatus Metadata of the panel.
Definition HelperPanelDelegate.hpp:37
The PanelDelegate class.
Definition PanelDelegate.hpp:50
Base toolkit upon which the software is built.
Definition Application.cpp:90
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15
Definition HelperPanelDelegate.hpp:14
The PanelStatus struct.
Definition PanelDelegate.hpp:24