Commit 16f13c04 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

kdelibs4support--

parent f5938319
......@@ -41,13 +41,10 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="kcfg_SlidesAdvanceTime" >
<widget class="KPluralHandlingSpinBox" name="kcfg_SlidesAdvanceTime" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="suffix" >
<string> sec.</string>
</property>
<property name="value" >
<number>5</number>
</property>
......@@ -313,9 +310,9 @@
<header>kcolorbutton.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>KIntSpinBox</extends>
<header>knuminput.h</header>
<class>KPluralHandlingSpinBox</class>
<extends>QSpinBox</extends>
<header>KPluralHandlingSpinBox</header>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -37,7 +37,7 @@
<code>
QStringList annotationTools;
// load the default tool list from the 'xml tools definition' file
QFile infoFile( KStandardDirs::locate("data", "okular/tools.xml") );
QFile infoFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "okular/tools.xml") );
if ( infoFile.exists() &amp;&amp; infoFile.open( QIODevice::ReadOnly ) )
{
QDomDocument doc;
......
......@@ -10,7 +10,7 @@
// reimplementing this
#include "preferencesdialog.h"
#include <klocale.h>
#include <KLocalizedString>
// single config pages
#include "dlggeneral.h"
......
......@@ -6,5 +6,5 @@ Mutators=true
Singleton=true
Visibility=OKULAR_PART_EXPORT
IncludeFiles=settings_core.h,okular_part_export.h
SourceIncludeFiles=kstandarddirs.h,qdom.h
SourceIncludeFiles=qdom.h,QStandardPaths
MemberVariables=dpointer
......@@ -28,6 +28,10 @@
#include <QtWidgets/QStackedWidget>
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
#include "core/annotations.h"
#include "ui/annotationwidgets.h"
......@@ -254,36 +258,51 @@ void WidgetAnnotTools::slotMoveDown()
}
EditAnnotToolDialog::EditAnnotToolDialog( QWidget *parent, const QDomElement &initialState )
: KDialog( parent ), m_stubann( 0 ), m_annotationWidget( 0 )
: QDialog( parent ), m_stubann( 0 ), m_annotationWidget( 0 )
{
setButtons( Ok | Cancel );
setDefaultButton( Ok );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
okButton->setDefault(true);
QLabel * tmplabel;
QWidget *widget = new QWidget( this );
QGridLayout * widgetLayout = new QGridLayout( widget );
setMainWidget(widget);
mainLayout->addWidget(widget);
mainLayout->addWidget(buttonBox);
m_name = new KLineEdit( widget );
mainLayout->addWidget(m_name);
tmplabel = new QLabel( i18n( "&Name:" ), widget );
mainLayout->addWidget(tmplabel);
tmplabel->setBuddy( m_name );
widgetLayout->addWidget( tmplabel, 0, 0, Qt::AlignRight );
widgetLayout->addWidget( m_name, 0, 1 );
m_type = new KComboBox( false, widget );
mainLayout->addWidget(m_type);
connect(m_type, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &EditAnnotToolDialog::slotTypeChanged);
tmplabel = new QLabel( i18n( "&Type:" ), widget );
mainLayout->addWidget(tmplabel);
tmplabel->setBuddy( m_type );
widgetLayout->addWidget( tmplabel, 1, 0, Qt::AlignRight );
widgetLayout->addWidget( m_type, 1, 1 );
m_toolIcon = new QLabel( widget );
mainLayout->addWidget(m_toolIcon);
m_toolIcon->setAlignment( Qt::AlignRight | Qt::AlignTop );
m_toolIcon->setMinimumSize( 40, 32 );
widgetLayout->addWidget( m_toolIcon, 0, 2, 2, 1 );
m_appearanceBox = new QGroupBox( i18n( "Appearance" ), widget );
mainLayout->addWidget(m_appearanceBox);
m_appearanceBox->setLayout( new QVBoxLayout( m_appearanceBox ) );
widgetLayout->addWidget( m_appearanceBox, 2, 0, 1, 3 );
......@@ -301,11 +320,11 @@ EditAnnotToolDialog::EditAnnotToolDialog( QWidget *parent, const QDomElement &in
if ( initialState.isNull() )
{
setCaption( i18n("Create annotation tool") );
setWindowTitle( i18n("Create annotation tool") );
}
else
{
setCaption( i18n("Edit annotation tool") );
setWindowTitle( i18n("Edit annotation tool") );
loadTool( initialState );
}
......
......@@ -10,7 +10,7 @@
#ifndef _WIDGETANNOTTOOLS_H_
#define _WIDGETANNOTTOOLS_H_
#include <kdialog.h>
#include <QDialog>
#include <qdom.h>
#include <qwidget.h>
......@@ -61,7 +61,7 @@ class WidgetAnnotTools : public QWidget
void slotMoveDown();
};
class EditAnnotToolDialog : public KDialog
class EditAnnotToolDialog : public QDialog
{
Q_OBJECT
......
......@@ -14,7 +14,7 @@
#include "shell.h"
#include <klocale.h>
#include <KLocalizedString>
#include <QtDBus/qdbusinterface.h>
#include <QTextStream>
#include <kwindowsystem.h>
......
......@@ -16,7 +16,7 @@
#include "shell.h"
#include <QtWidgets/qapplication.h>
#include <klocale.h>
#include <KLocalizedString>
#include <QtDBus/qdbusinterface.h>
#include <QTextStream>
#include <kwindowsystem.h>
......
......@@ -37,7 +37,7 @@
#include <KToggleFullScreenAction>
#include <KActionCollection>
#include <KWindowSystem>
#include <KTabWidget>
#include <QTabWidget>
#include <KXMLGUIFactory>
#include <QDragMoveEvent>
#include <QTabBar>
......@@ -89,7 +89,7 @@ Shell::Shell( const QString &serializedOptions )
if (firstPart)
{
// Setup tab bar
m_tabWidget = new KTabWidget( this );
m_tabWidget = new QTabWidget( this );
m_tabWidget->setTabsClosable( true );
m_tabWidget->setElideMode( Qt::ElideRight );
m_tabWidget->tabBar()->hide();
......
......@@ -20,13 +20,13 @@
#include <kparts/readwritepart.h>
#include <QMimeType>
#include <QMimeDatabase>
#include <kaction.h>
#include <qaction.h>
#include <QtDBus/QtDBus>
class KRecentFilesAction;
class KToggleAction;
class KTabWidget;
class QTabWidget;
class KPluginFactory;
class KDocumentViewer;
......@@ -144,7 +144,7 @@ private:
KToggleAction* m_showMenuBarAction;
bool m_menuBarWasShown, m_toolBarWasShown;
bool m_unique;
KTabWidget* m_tabWidget;
QTabWidget* m_tabWidget;
KToggleAction* m_openInTab;
struct TabState
......
......@@ -58,7 +58,7 @@ class MainShellTest : public QObject, public Okular::PartTest
Q_OBJECT
public:
static KTabWidget* tabWidget(Shell *s)
static QTabWidget* tabWidget(Shell *s)
{
return s->m_tabWidget;
}
......
......@@ -13,7 +13,7 @@
#include "latexrenderer.h"
#include <QtCore/QDebug>
#include <kstandarddirs.h>
#include <kprocess.h>
#include <QColor>
......@@ -22,6 +22,7 @@
#include <QImage>
#include <qtemporaryfile.h>
#include <QTextStream>
#include <QStandardPaths>
#include "debug_ui.h"
......@@ -139,7 +140,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin
\\end{document}";
tempFile->close();
QString latexExecutable = KStandardDirs::findExe("latex");
QString latexExecutable = QStandardPaths::findExecutable("latex");
if (latexExecutable.isEmpty())
{
qCDebug(OkularUiDebug) << "Could not find latex!";
......@@ -163,7 +164,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin
return LatexFailed;
}
QString dvipngExecutable = KStandardDirs::findExe("dvipng");
QString dvipngExecutable = QStandardPaths::findExecutable("dvipng");
if (dvipngExecutable.isEmpty())
{
qCDebug(OkularUiDebug) << "Could not find dvipng!";
......
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