myplugin.h
#include <QLabel>
#include "/home/michael/Projects/QPanel/qpanelappletinterface.h"
class ClockPlugin
: public QObject,
public QPanelAppletInterface
{
Q_OBJECT
Q_INTERFACES(QPanelAppletInterface)
public:
MyPlugin();
void showPreferencesDialog();
private:
};
#include <QLabel>
#include "/home/michael/Projects/QPanel/qpanelappletinterface.h"
class ClockPlugin : public QObject, public QPanelAppletInterface
{
Q_OBJECT
Q_INTERFACES(QPanelAppletInterface)
public:
MyPlugin();
QWidget* getWidget();
void showPreferencesDialog();
private:
QLabel* label;
};
To copy to clipboard, switch view to plain text mode
myplugin.cpp
#include "myplugin.h"
MyPlugin::MyPlugin()
{
label
= new QLabel("Time goes here");
}
{
return label;
}
void MyPlugin::showPreferencesDialog()
{
// no preferences
}
#include "myplugin.h"
MyPlugin::MyPlugin()
{
label = new QLabel("Time goes here");
}
QWidget* MyPlugin::getWidget()
{
return label;
}
void MyPlugin::showPreferencesDialog()
{
// no preferences
}
To copy to clipboard, switch view to plain text mode
myplugin.pro
######################################################################
# Automatically generated by qmake (2.01a) Fri Aug 27 08:29:32 2010
######################################################################
TEMPLATE = lib
CONFIG = plugin
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += myplugin.h
SOURCES += myplugin.cpp
######################################################################
# Automatically generated by qmake (2.01a) Fri Aug 27 08:29:32 2010
######################################################################
TEMPLATE = lib
CONFIG = plugin
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += myplugin.h
SOURCES += myplugin.cpp
To copy to clipboard, switch view to plain text mode
Bookmarks