Implemented menu action for sketch viewer
This commit is contained in:
Submodule plugins/sketchplugin/QtSketch updated: 6a0122cf26...534892b633
BIN
plugins/sketchplugin/images/sketch.png
Normal file
BIN
plugins/sketchplugin/images/sketch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@@ -4,6 +4,10 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
SketchPlugin::SketchPlugin(QObject *parent) :
|
SketchPlugin::SketchPlugin(QObject *parent) :
|
||||||
ZeiterfassungPlugin(parent)
|
ZeiterfassungPlugin(parent)
|
||||||
@@ -24,3 +28,8 @@ SketchPlugin::SketchPlugin(QObject *parent) :
|
|||||||
qWarning() << "could not load translation sketchplugin";
|
qWarning() << "could not load translation sketchplugin";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SketchPlugin::attachTo(MainWindow &mainWindow)
|
||||||
|
{
|
||||||
|
mainWindow.menuTools()->addAction(QIcon(QStringLiteral(":/zeiterfassung/plugins/sketchplugin/images/sketch.png")), tr("Open Sketch viewer"));
|
||||||
|
}
|
||||||
|
@@ -16,6 +16,9 @@ class Q_DECL_EXPORT SketchPlugin : public ZeiterfassungPlugin
|
|||||||
public:
|
public:
|
||||||
explicit SketchPlugin(QObject *parent = Q_NULLPTR);
|
explicit SketchPlugin(QObject *parent = Q_NULLPTR);
|
||||||
|
|
||||||
|
// ZeiterfassungPlugin interface
|
||||||
|
void attachTo(MainWindow &mainWindow) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTranslator m_translator;
|
QTranslator m_translator;
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/zeiterfassung/plugins/sketchplugin">
|
<qresource prefix="/zeiterfassung/plugins/sketchplugin">
|
||||||
|
<file>images/sketch.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Reference in New Issue
Block a user