2020-12-11 23:53:32 +00:00
|
|
|
#include "ORGBExamplePlugin.h"
|
2020-12-12 23:59:34 +00:00
|
|
|
#include "Dependencies/ResourceManager.h"
|
2020-12-11 23:53:32 +00:00
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
bool ORGBPlugin::HasCustomIcon()
|
2020-12-15 00:44:48 +00:00
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
QLabel* ORGBPlugin::TabLabel()
|
2020-12-15 00:44:48 +00:00
|
|
|
{
|
|
|
|
|
QLabel *TLabel = new QLabel();
|
|
|
|
|
TLabel->setText("Example");
|
|
|
|
|
return TLabel;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
std::string ORGBPlugin::PluginName()
|
2020-12-11 23:53:32 +00:00
|
|
|
{
|
|
|
|
|
return "ExamplePlugin";
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
std::string ORGBPlugin::PluginDesc()
|
2020-12-12 17:39:01 +00:00
|
|
|
{
|
|
|
|
|
return "This is an Example plugin for OpenRGB";
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
std::string ORGBPlugin::PluginLocal()
|
2020-12-12 17:39:01 +00:00
|
|
|
{
|
|
|
|
|
return "InfoTab";
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 14:42:24 +00:00
|
|
|
QWidget* ORGBPlugin::CreateGUI(QWidget *Parent, ResourceManager *RM)
|
2020-12-12 17:39:01 +00:00
|
|
|
{
|
|
|
|
|
QWidget *ORGBExamplePage = new QWidget(Parent);
|
|
|
|
|
QLabel *ORGBExampleLabel = new QLabel(ORGBExamplePage);
|
2020-12-12 23:59:34 +00:00
|
|
|
|
|
|
|
|
QPushButton *ORGBExamplePushButton = new QPushButton(ORGBExamplePage);
|
|
|
|
|
qDebug() << ORGBExamplePushButton->objectName();
|
|
|
|
|
connect(ORGBExamplePushButton,SIGNAL(clicked()) ,this , SLOT(on_ExampleButton_clicked()));
|
|
|
|
|
|
2020-12-12 17:39:01 +00:00
|
|
|
ORGBExampleLabel->setText("This is an example page added by plugins");
|
|
|
|
|
return ORGBExamplePage;
|
|
|
|
|
}
|
2020-12-12 23:59:34 +00:00
|
|
|
|
|
|
|
|
void ORGBPlugin::on_ExampleButton_clicked()
|
|
|
|
|
{
|
|
|
|
|
QDialog *ButtonDialog = new QDialog();
|
|
|
|
|
ButtonDialog->setModal(true);
|
|
|
|
|
QLabel *DialogText = new QLabel(ButtonDialog);
|
|
|
|
|
DialogText->setText("This is the result of the button being clicked");
|
|
|
|
|
ButtonDialog->show();
|
|
|
|
|
}
|