blob: 4a790c2d71af11df38b2d12aea392e08d86ab779 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2014, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
// This class is a quick sample desktop plugin
//===========================================
#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_SAMPLE_H
#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_SAMPLE_H
#include <QPushButton>
#include <QMessageBox>
#include <QVBoxLayout>
#include "LDPlugin.h"
class SamplePlugin : public LDPlugin{
Q_OBJECT
public:
SamplePlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){
this->setLayout( new QVBoxLayout());
this->layout()->setContentsMargins(0,0,0,0);
button = new QPushButton("sample");
this->layout()->addWidget(button);
connect(button, SIGNAL(clicked()), this, SLOT(showMessage()) );
}
~SamplePlugin(){}
private:
QPushButton *button;
private slots:
void showMessage(){
QMessageBox::information(this,"sample","sample desktop plugin works");
}
};
#endif
|