2021-06-24 16:05:19 +08:00
|
|
|
#ifndef ICONSMANAGER_H
|
|
|
|
#define ICONSMANAGER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
using PIcon = std::shared_ptr<QPixmap>;
|
|
|
|
class IconsManager : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit IconsManager(QObject *parent = nullptr);
|
|
|
|
|
2021-12-20 12:53:35 +08:00
|
|
|
void updateEditorGuttorIcons(int size);
|
2021-12-20 09:36:18 +08:00
|
|
|
|
2021-10-23 23:10:34 +08:00
|
|
|
const PIcon &syntaxError() const;
|
2021-06-24 16:05:19 +08:00
|
|
|
|
2021-10-23 23:10:34 +08:00
|
|
|
const PIcon &syntaxWarning() const;
|
2021-06-24 16:05:19 +08:00
|
|
|
|
2021-10-23 23:10:34 +08:00
|
|
|
const PIcon &breakpoint() const;
|
2021-06-24 16:05:19 +08:00
|
|
|
|
2021-10-23 23:10:34 +08:00
|
|
|
const PIcon &activeBreakpoint() const;
|
2021-06-24 16:05:19 +08:00
|
|
|
|
2021-10-21 17:31:25 +08:00
|
|
|
const PIcon &bookmark() const;
|
|
|
|
|
2021-10-23 23:10:34 +08:00
|
|
|
const PIcon &folder() const;
|
2021-12-20 12:53:35 +08:00
|
|
|
|
|
|
|
PIcon createSVGIcon(const QString& filename, int width, int height);
|
2021-06-24 16:05:19 +08:00
|
|
|
private:
|
|
|
|
PIcon mSyntaxError;
|
|
|
|
PIcon mSyntaxWarning;
|
|
|
|
PIcon mBreakpoint;
|
2021-07-26 00:22:08 +08:00
|
|
|
PIcon mActiveBreakpoint;
|
2021-10-21 17:31:25 +08:00
|
|
|
PIcon mBookmark;
|
2021-10-23 23:10:34 +08:00
|
|
|
PIcon mFolder;
|
2021-06-24 16:05:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern IconsManager* pIconsManager;
|
|
|
|
#endif // ICONSMANAGER_H
|