Release 1.5 #39

Merged
0xFEEDC0DE64 merged 24 commits from devel into master 2017-12-20 00:29:23 +01:00
69 changed files with 916 additions and 451 deletions
Showing only changes of commit 602ec86127 - Show all commits

View File

@@ -1,9 +1,19 @@
#include "weatherplugin.h"
#include <QDebug>
#include <QStatusBar>
#include "mainwindow.h"
#include "weatherwidget.h"
WeatherPlugin::WeatherPlugin(QObject *parent) :
ZeiterfassungPlugin(parent)
{
qDebug() << "called";
}
void WeatherPlugin::attachTo(MainWindow &mainWindow)
{
mainWindow.statusBar()->addWidget(new WeatherWidget(mainWindow));
}

View File

@@ -15,6 +15,7 @@ public:
explicit WeatherPlugin(QObject *parent = Q_NULLPTR);
// ZeiterfassungPlugin interface
void attachTo(MainWindow &mainWindow) Q_DECL_OVERRIDE;
};
#endif // WEATHERPLUGIN_H

View File

@@ -14,8 +14,10 @@ DEPENDPATH += $$PWD/../../zeiterfassunglib
DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT
HEADERS += weatherplugin.h
HEADERS += weatherplugin.h \
weatherwidget.h
SOURCES += weatherplugin.cpp
SOURCES += weatherplugin.cpp \
weatherwidget.cpp
OTHER_FILES += weatherplugin.json

View File

@@ -0,0 +1,10 @@
#include "weatherwidget.h"
#include "mainwindow.h"
WeatherWidget::WeatherWidget(MainWindow &mainWindow) :
QLabel(&mainWindow),
m_mainWindow(mainWindow)
{
setText(tr("Weather"));
}

View File

@@ -0,0 +1,19 @@
#ifndef WEATHERWIDGET_H
#define WEATHERWIDGET_H
#include <QLabel>
class MainWindow;
class WeatherWidget : public QLabel
{
Q_OBJECT
public:
explicit WeatherWidget(MainWindow &mainWindow);
private:
MainWindow &m_mainWindow;
};
#endif // WEATHERWIDGET_H