src: refactored UI elements and graphics file structure
* split QtIconButton into multiple files * moved graph elements from view to graphics * structured elements into sub directories
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#ifndef QT_SELF_REFRESH_ICON_BUTTON_H
|
||||
#define QT_SELF_REFRESH_ICON_BUTTON_H
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include "FilePath.h"
|
||||
#include "MessageListener.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
#include "QtThreadedFunctor.h"
|
||||
|
||||
class QtSelfRefreshIconButton
|
||||
: public QPushButton
|
||||
, public MessageListener<MessageRefreshUI>
|
||||
{
|
||||
public:
|
||||
QtSelfRefreshIconButton(
|
||||
const QString& text, const FilePath& iconPath, const std::string& buttonKey, QWidget* parent = nullptr);
|
||||
~QtSelfRefreshIconButton() = default;
|
||||
|
||||
void setIconPath(const FilePath& iconPath);
|
||||
|
||||
protected:
|
||||
void handleMessage(MessageRefreshUI* message) override;
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
private:
|
||||
QtThreadedLambdaFunctor m_onQtThread;
|
||||
|
||||
FilePath m_iconPath;
|
||||
const std::string m_buttonKey;
|
||||
};
|
||||
|
||||
#endif // QT_SELF_REFRESH_ICON_BUTTON_H
|
||||
Reference in New Issue
Block a user