39 qDebug() << __FUNCTION__ <<
"called";
49 m_settingsPath = settingsPath;
68 qDebug() << __FUNCTION__ <<
"called";
78 delete m_settings.data();
87 return (QString::fromLatin1(
Qz::VERSION) == QLatin1String(FALKON_VERSION));
96 m_settings =
new QDialog(parent);
97 auto* b =
new QPushButton(
QSL(
"Example Plugin v0.0.1"));
98 auto* closeButton =
new QPushButton(tr(
"Close"));
99 auto* label =
new QLabel();
100 label->setPixmap(QPixmap(
QSL(
":icons/other/about.svg")));
102 auto* l =
new QVBoxLayout(m_settings.data());
105 l->addWidget(closeButton);
106 m_settings.data()->setLayout(l);
108 m_settings.data()->setAttribute(Qt::WA_DeleteOnClose);
109 m_settings.data()->setWindowTitle(tr(
"Example Plugin Settings"));
110 m_settings.data()->setWindowIcon(QIcon(
QSL(
":icons/falkon.svg")));
111 connect(closeButton, SIGNAL(clicked()), m_settings.data(), SLOT(close()));
114 m_settings.data()->show();
115 m_settings.data()->raise();
128 title +=
QSL(
" on image");
132 title +=
QSL(
" on link");
136 title +=
QSL(
" on input");
139 menu->addAction(tr(
"My first plugin action") + title,
this, SLOT(actionSlot()));
144 qDebug() <<
"mousePress" << type << obj << event;
152void TestPlugin::actionSlot()
154 QMessageBox::information(m_view, tr(
"Hello"), tr(
"First plugin action works :-)"));
static void removeSidebar(SideBarInterface *interface)
static void addSidebar(const QString &id, SideBarInterface *interface)
void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override
bool mousePress(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override
void init(InitState state, const QString &settingsPath) override
bool testPlugin() override
void showSettings(QWidget *parent) override
bool isContentEditable() const
FALKON_EXPORT const char * VERSION