aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpinfowindow.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 00:58:40 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-12 00:58:40 +0800
commita7407edaf81c685d4a389785a405a53a5de4b148 (patch)
treee6e4f2d85f2172c94ac83a6e8f01e1e90a78ede9 /qmidiplayer-desktop/qmpinfowindow.hpp
parent437b7b16c322a8e53ac55a5f831098494d9a7073 (diff)
downloadQMidiPlayer-a7407edaf81c685d4a389785a405a53a5de4b148.tar.xz
Format EVERYTHING.
Hopefully this will make the source code less horrendous and actually readable. The command used was: ``` astyle --suffix=none --style=allman --attach-extern-c --attach-closing-while --indent-switches --indent-after-parens --pad-oper --pad-header --unpad-paren --align-pointer=name --recursive './*.cpp,*.hpp' ```
Diffstat (limited to 'qmidiplayer-desktop/qmpinfowindow.hpp')
-rw-r--r--qmidiplayer-desktop/qmpinfowindow.hpp65
1 files changed, 33 insertions, 32 deletions
diff --git a/qmidiplayer-desktop/qmpinfowindow.hpp b/qmidiplayer-desktop/qmpinfowindow.hpp
index 6a179af..7e09b8a 100644
--- a/qmidiplayer-desktop/qmpinfowindow.hpp
+++ b/qmidiplayer-desktop/qmpinfowindow.hpp
@@ -10,50 +10,51 @@
#include <QHideEvent>
#include "../include/qmpcorepublic.hpp"
-namespace Ui {
- class qmpInfoWindow;
+namespace Ui
+{
+class qmpInfoWindow;
}
class QClickableLabel : public QLabel
{
- Q_OBJECT
- public:
- explicit QClickableLabel(QWidget *parent=0):QLabel(parent){}
- protected:
- void mousePressEvent(QMouseEvent *e)
- {
- QLabel::mousePressEvent(e);
- if(e->buttons()&Qt::LeftButton)
- QApplication::clipboard()->setText(text());
- }
+ Q_OBJECT
+public:
+ explicit QClickableLabel(QWidget *parent = nullptr) : QLabel(parent) {}
+protected:
+ void mousePressEvent(QMouseEvent *e)
+ {
+ QLabel::mousePressEvent(e);
+ if (e->buttons() & Qt::LeftButton)
+ QApplication::clipboard()->setText(text());
+ }
};
class qmpInfoWindow;
-class qmpInfoFunc:public qmpFuncBaseIntf
+class qmpInfoFunc : public qmpFuncBaseIntf
{
- private:
- qmpInfoWindow *p;
- public:
- qmpInfoFunc(qmpInfoWindow *par);
- void show();
- void close();
+private:
+ qmpInfoWindow *p;
+public:
+ qmpInfoFunc(qmpInfoWindow *par);
+ void show();
+ void close();
};
class qmpInfoWindow : public QDialog
{
- Q_OBJECT
-
- public:
- explicit qmpInfoWindow(QWidget *parent = 0);
- ~qmpInfoWindow();
- void closeEvent(QCloseEvent *e);
- void hideEvent(QHideEvent *e);
- public slots:
- void updateInfo();
-
- private:
- Ui::qmpInfoWindow *ui;
- qmpInfoFunc *infof;
+ Q_OBJECT
+
+public:
+ explicit qmpInfoWindow(QWidget *parent = nullptr);
+ ~qmpInfoWindow();
+ void closeEvent(QCloseEvent *e);
+ void hideEvent(QHideEvent *e);
+public slots:
+ void updateInfo();
+
+private:
+ Ui::qmpInfoWindow *ui;
+ qmpInfoFunc *infof;
};
#endif // QMPINFOWINDOW_HPP