Commit 50f2ee69 authored by Arnold Dumas's avatar Arnold Dumas
Browse files

Use QPushButton instead of KPushButton.

parent 7e3e8269
......@@ -16,7 +16,6 @@
#include <klocalizedstring.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHBoxLayout>
......@@ -25,6 +24,7 @@
#include <QtWidgets/QLabel>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QListWidgetItem>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QStackedWidget>
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
......@@ -45,22 +45,22 @@ WidgetAnnotTools::WidgetAnnotTools( QWidget * parent )
hBoxLayout->addWidget( m_list );
QVBoxLayout *vBoxLayout = new QVBoxLayout();
m_btnAdd = new KPushButton( i18n("&Add..."), this );
m_btnAdd = new QPushButton( i18n("&Add..."), this );
m_btnAdd->setIcon( QIcon::fromTheme("list-add") );
vBoxLayout->addWidget( m_btnAdd );
m_btnEdit = new KPushButton( i18n("&Edit..."), this );
m_btnEdit = new QPushButton( i18n("&Edit..."), this );
m_btnEdit->setIcon( QIcon::fromTheme("edit-rename") );
m_btnEdit->setEnabled( false );
vBoxLayout->addWidget( m_btnEdit );
m_btnRemove = new KPushButton( i18n("&Remove"), this );
m_btnRemove = new QPushButton( i18n("&Remove"), this );
m_btnRemove->setIcon( QIcon::fromTheme("list-remove") );
m_btnRemove->setEnabled( false );
vBoxLayout->addWidget( m_btnRemove );
m_btnMoveUp = new KPushButton( i18n("Move &Up"), this );
m_btnMoveUp = new QPushButton( i18n("Move &Up"), this );
m_btnMoveUp->setIcon( QIcon::fromTheme("arrow-up") );
m_btnMoveUp->setEnabled( false );
vBoxLayout->addWidget( m_btnMoveUp );
m_btnMoveDown = new KPushButton( i18n("Move &Down"), this );
m_btnMoveDown = new QPushButton( i18n("Move &Down"), this );
m_btnMoveDown->setIcon( QIcon::fromTheme("arrow-down") );
m_btnMoveDown->setEnabled( false );
vBoxLayout->addWidget( m_btnMoveDown );
......@@ -69,11 +69,11 @@ WidgetAnnotTools::WidgetAnnotTools( QWidget * parent )
connect(m_list, &QListWidget::itemDoubleClicked, this, &WidgetAnnotTools::slotEdit);
connect(m_list, &QListWidget::currentRowChanged, this, &WidgetAnnotTools::updateButtons);
connect(m_btnAdd, &KPushButton::clicked, this, &WidgetAnnotTools::slotAdd);
connect(m_btnEdit, &KPushButton::clicked, this, &WidgetAnnotTools::slotEdit);
connect(m_btnRemove, &KPushButton::clicked, this, &WidgetAnnotTools::slotRemove);
connect(m_btnMoveUp, &KPushButton::clicked, this, &WidgetAnnotTools::slotMoveUp);
connect(m_btnMoveDown, &KPushButton::clicked, this, &WidgetAnnotTools::slotMoveDown);
connect(m_btnAdd, &QPushButton::clicked, this, &WidgetAnnotTools::slotAdd);
connect(m_btnEdit, &QPushButton::clicked, this, &WidgetAnnotTools::slotEdit);
connect(m_btnRemove, &QPushButton::clicked, this, &WidgetAnnotTools::slotRemove);
connect(m_btnMoveUp, &QPushButton::clicked, this, &WidgetAnnotTools::slotMoveUp);
connect(m_btnMoveDown, &QPushButton::clicked, this, &WidgetAnnotTools::slotMoveDown);
}
WidgetAnnotTools::~WidgetAnnotTools()
......
......@@ -16,7 +16,7 @@
class KLineEdit;
class KComboBox;
class KPushButton;
class QPushButton;
class QLabel;
class QListWidget;
class QListWidgetItem;
......@@ -46,11 +46,11 @@ class WidgetAnnotTools : public QWidget
private:
QListWidget *m_list;
KPushButton *m_btnAdd;
KPushButton *m_btnEdit;
KPushButton *m_btnRemove;
KPushButton *m_btnMoveUp;
KPushButton *m_btnMoveDown;
QPushButton *m_btnAdd;
QPushButton *m_btnEdit;
QPushButton *m_btnRemove;
QPushButton *m_btnMoveUp;
QPushButton *m_btnMoveDown;
private slots:
void updateButtons();
......
......@@ -16,6 +16,7 @@
#include <QSize>
#include <QtCore/QFile>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtGui/QShowEvent>
#include <klocalizedstring.h>
......@@ -23,7 +24,6 @@
#include <kparts/readonlypart.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kpushbutton.h>
#include <kservice.h>
#include <ksharedconfig.h>
#include <QtCore/qloggingcategory.h>
......
......@@ -17,7 +17,7 @@
#include <qevent.h>
#include <kicon.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <qpushbutton.h>
// local includes
#include "searchlineedit.h"
......
......@@ -15,10 +15,10 @@
#include <qstyleoption.h>
#include <qstylepainter.h>
#include <qtoolbutton.h>
#include <qpushbutton.h>
#include <kicon.h>
#include <klocale.h>
#include <kpushbutton.h>
#include "searchlineedit.h"
......@@ -75,13 +75,13 @@ PresentationSearchBar::PresentationSearchBar( Okular::Document *document, QWidge
m_search->setSearchMoveViewport( true );
lay->addWidget( m_search );
KPushButton * findNextBtn = new KPushButton( QIcon::fromTheme( "go-down-search" ), i18n( "Find Next" ), this );
QPushButton * findNextBtn = new QPushButton( QIcon::fromTheme( "go-down-search" ), i18n( "Find Next" ), this );
lay->addWidget( findNextBtn );
m_anchor->installEventFilter( this );
connect( closeBtn, SIGNAL(clicked()), this, SLOT(close()) );
connect(findNextBtn, &KPushButton::clicked, m_search, &SearchLineEdit::findNext);
connect(findNextBtn, &QPushButton::clicked, m_search, &SearchLineEdit::findNext);
}
PresentationSearchBar::~PresentationSearchBar()
......
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