43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#include "presenceplugin.h"
|
|
|
|
#include <QDebug>
|
|
#include <QDir>
|
|
#include <QCoreApplication>
|
|
#include <QLocale>
|
|
#include <QStatusBar>
|
|
|
|
#include "utils/fileutils.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
#include "presencewidget.h"
|
|
#include "presencesettingswidget.h"
|
|
|
|
PresencePlugin::PresencePlugin(QObject *parent) :
|
|
ZeiterfassungPlugin(parent)
|
|
{
|
|
qDebug() << "called";
|
|
|
|
if(m_translator.load(QLocale(), QStringLiteral("presenceplugin"), QStringLiteral("_"), translationsDir()))
|
|
{
|
|
if(!QCoreApplication::installTranslator(&m_translator))
|
|
{
|
|
qWarning() << "could not install translation presenceplugin";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
qWarning() << "could not load translation presenceplugin";
|
|
}
|
|
}
|
|
|
|
void PresencePlugin::attachTo(MainWindow &mainWindow)
|
|
{
|
|
mainWindow.statusBar()->addWidget(new PresenceWidget(mainWindow));
|
|
}
|
|
|
|
SettingsWidget *PresencePlugin::settingsWidget(ZeiterfassungSettings &settings, QWidget *parent) const
|
|
{
|
|
return new PresenceSettingsWidget(settings, parent);
|
|
}
|