Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2a6d2f04 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QPushButton/QIcon

parent 52d88fed
......@@ -16,25 +16,19 @@
*/
#include "IdGuiElements.h"
IdPushButton::IdPushButton(unsigned int id, QWidget *parent) : KPushButton(parent)
IdPushButton::IdPushButton(unsigned int id, QWidget *parent) : QPushButton(parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
IdPushButton::IdPushButton(unsigned int id, const QString &text, QWidget *parent) : KPushButton(text, parent)
IdPushButton::IdPushButton(unsigned int id, const QString &text, QWidget *parent) : QPushButton(text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
IdPushButton::IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent) : KPushButton(icon, text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
IdPushButton::IdPushButton(unsigned int id, KGuiItem item, QWidget *parent) : KPushButton(item, parent)
IdPushButton::IdPushButton(unsigned int id, const QIcon &icon, const QString &text, QWidget *parent) : QPushButton(icon, text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
......
......@@ -17,21 +17,19 @@
#ifndef IDGUIELEMENTS_H
#define IDGUIELEMENTS_H
#include <KPushButton>
#include <QPushButton>
#include <KComboBox>
#include <KIcon>
#include <QIcon>
#include <QSlider>
#include <QCheckBox>
class IdPushButton : public KPushButton
class IdPushButton : public QPushButton
{
Q_OBJECT
public:
IdPushButton(unsigned int id, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const QString &text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, KGuiItem item, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const QIcon &icon, const QString &text, QWidget *parent = nullptr);
private:
unsigned int _id;
private slots:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment