/
tomilov
/
sah_kd_tree
Обзор
Документация
Войти
/
tomilov
/
sah_kd_tree
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/viewer/application.hpp
61 строка
2 KB
Anatoliy Tomilov
works
25 июл 2024, 11:26
25 июл 2024, 11:26
a2b9854
Код
Авторство
О чём код?
#pragma once #include <QtCore/QList> #include <QtCore/QString> #include <QtCore/QUrl> #include <QtCore/QVariant> #include <QtGui/QGuiApplication> #include <QtGui/QVector4D> #include <QtWidgets/QApplication> namespace viewer { class GuiApplication : public QGuiApplication { Q_OBJECT Q_PROPERTY(QStringList colorNames MEMBER colorNames CONSTANT) public: GuiApplication(int & argc, char ** argv); [[nodiscard]] static Q_INVOKABLE QString keySequenceToString(QVariant keySequence); [[nodiscard]] static Q_INVOKABLE QString getWindowIconFilepath(); [[nodiscard]] static Q_INVOKABLE QUrl getQtLogoUrl(); [[nodiscard]] Q_INVOKABLE int getIndexOfClosestNamedColor(QColor color) const; [[nodiscard]] static Q_INVOKABLE QString toLocalFile(QUrl url); public Q_SLOTS: void setClipboardImage(QVariant image) const; private: const QStringList colorNames; const QList<QVector4D> colorVectors; }; class Application : public QApplication { Q_OBJECT Q_PROPERTY(QStringList colorNames MEMBER colorNames CONSTANT) public: Application(int & argc, char ** argv); [[nodiscard]] static Q_INVOKABLE QString keySequenceToString(QVariant keySequence); [[nodiscard]] static Q_INVOKABLE QString getWindowIconFilepath(); [[nodiscard]] static Q_INVOKABLE QUrl getQtLogoUrl(); [[nodiscard]] Q_INVOKABLE int getIndexOfClosestNamedColor(QColor color) const; [[nodiscard]] static Q_INVOKABLE QString toLocalFile(QUrl url); public Q_SLOTS: void setClipboardImage(QVariant image) const; void showAboutQt(); private: const QStringList colorNames; const QList<QVector4D> colorVectors; }; } // namespace viewer