diff --git a/conf/dlgpresentationbase.ui b/conf/dlgpresentationbase.ui index 31db6938b..fc22679c9 100644 --- a/conf/dlgpresentationbase.ui +++ b/conf/dlgpresentationbase.ui @@ -41,13 +41,10 @@ - + false - - sec. - 5 @@ -313,9 +310,9 @@
kcolorbutton.h
- KIntSpinBox - KIntSpinBox -
knuminput.h
+ KPluralHandlingSpinBox + QSpinBox +
KPluralHandlingSpinBox
diff --git a/conf/okular.kcfg b/conf/okular.kcfg index f77b69046..55f5cdc6d 100644 --- a/conf/okular.kcfg +++ b/conf/okular.kcfg @@ -37,7 +37,7 @@ 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() && infoFile.open( QIODevice::ReadOnly ) ) { QDomDocument doc; diff --git a/conf/preferencesdialog.cpp b/conf/preferencesdialog.cpp index 096bee1da..1ddb5e6e7 100644 --- a/conf/preferencesdialog.cpp +++ b/conf/preferencesdialog.cpp @@ -10,7 +10,7 @@ // reimplementing this #include "preferencesdialog.h" -#include +#include // single config pages #include "dlggeneral.h" diff --git a/conf/settings.kcfgc b/conf/settings.kcfgc index dfbb44107..5d17a9e8a 100644 --- a/conf/settings.kcfgc +++ b/conf/settings.kcfgc @@ -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 diff --git a/conf/widgetannottools.cpp b/conf/widgetannottools.cpp index b6b591249..7934d91ee 100644 --- a/conf/widgetannottools.cpp +++ b/conf/widgetannottools.cpp @@ -28,6 +28,10 @@ #include #include #include +#include +#include +#include +#include #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(&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 ); } diff --git a/conf/widgetannottools.h b/conf/widgetannottools.h index c1ed276f4..455b9c228 100644 --- a/conf/widgetannottools.h +++ b/conf/widgetannottools.h @@ -10,7 +10,7 @@ #ifndef _WIDGETANNOTTOOLS_H_ #define _WIDGETANNOTTOOLS_H_ -#include +#include #include #include @@ -61,7 +61,7 @@ class WidgetAnnotTools : public QWidget void slotMoveDown(); }; -class EditAnnotToolDialog : public KDialog +class EditAnnotToolDialog : public QDialog { Q_OBJECT diff --git a/shell/main.cpp b/shell/main.cpp index 821b52979..6146cb396 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -14,7 +14,7 @@ #include "shell.h" -#include +#include #include #include #include diff --git a/shell/okular_main.cpp b/shell/okular_main.cpp index 72d5bd2a2..c0fbb151e 100644 --- a/shell/okular_main.cpp +++ b/shell/okular_main.cpp @@ -16,7 +16,7 @@ #include "shell.h" #include -#include +#include #include #include #include diff --git a/shell/shell.cpp b/shell/shell.cpp index 422b517a4..f813a2925 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -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(); diff --git a/shell/shell.h b/shell/shell.h index b0fa7d742..bc1a35da7 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -20,13 +20,13 @@ #include #include #include -#include +#include #include 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 diff --git a/tests/mainshelltest.cpp b/tests/mainshelltest.cpp index 2a9ee8dd3..19a09f23f 100644 --- a/tests/mainshelltest.cpp +++ b/tests/mainshelltest.cpp @@ -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; } diff --git a/ui/latexrenderer.cpp b/ui/latexrenderer.cpp index 0b25ccfdb..468fa95b0 100644 --- a/ui/latexrenderer.cpp +++ b/ui/latexrenderer.cpp @@ -13,7 +13,7 @@ #include "latexrenderer.h" #include -#include + #include #include @@ -22,6 +22,7 @@ #include #include #include +#include #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!";