2013-06-02 19:09:41 +02:00
|
|
|
/* ============================================================
|
|
|
|
* GreaseMonkey plugin for QupZilla
|
2014-01-11 16:11:42 +01:00
|
|
|
* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
|
2013-06-02 19:09:41 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
|
|
|
#include "gm_icon.h"
|
|
|
|
#include "gm_manager.h"
|
|
|
|
#include "qupzilla.h"
|
|
|
|
|
|
|
|
GM_Icon::GM_Icon(GM_Manager* manager, QupZilla* window)
|
|
|
|
: ClickableLabel(window)
|
|
|
|
, m_manager(manager)
|
|
|
|
, m_window(window)
|
|
|
|
{
|
|
|
|
setCursor(Qt::PointingHandCursor);
|
2013-06-03 15:50:57 +02:00
|
|
|
setPixmap(QPixmap(":gm/data/icon16.png"));
|
2013-06-02 19:09:41 +02:00
|
|
|
setToolTip(tr("Open GreaseMonkey settings"));
|
|
|
|
|
|
|
|
connect(this, SIGNAL(clicked(QPoint)), this, SLOT(openSettings()));
|
|
|
|
}
|
|
|
|
|
|
|
|
void GM_Icon::openSettings()
|
|
|
|
{
|
|
|
|
m_manager->showSettings(m_window);
|
|
|
|
}
|