Commit d13c6329 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

KDialog -> QDialog.

parent 6f8b7cf6
......@@ -49,6 +49,7 @@ find_package(KF5 CONFIG REQUIRED COMPONENTS
I18n
KDELibs4Support
NewStuff
WidgetsAddons
)
# subdirectories to build
......
......@@ -77,6 +77,7 @@ target_link_libraries(artikulatecore
${QT_QTXMLPATTERNS_LIBRARY}
${QT_QTSQL_LIBRARY}
KF5::ConfigGui
KF5::WidgetsAddons
)
set_target_properties(
artikulatecore
......
......@@ -23,8 +23,7 @@
#include "phoneme.h"
#include "phonemegroup.h"
#include <QDebug>
#include <KLocale>
#include <KGlobal>
#include <KLocalizedString>
Language::Language(QObject *parent)
: QObject(parent)
......
......@@ -26,7 +26,6 @@
#include "settings.h"
#include <QDebug>
#include <KSaveFile>
#include <QTemporaryFile>
#include <sys/stat.h>
......
......@@ -42,8 +42,6 @@
#include <QDomDocument>
#include <QUuid>
#include <QDir>
#include <KGlobal>
#include <QDebug>
#include <QUrl>
#include <QStandardPaths>
......
......@@ -27,7 +27,7 @@
#include "phonemegroup.h"
#include <QDebug>
#include <KLocale>
#include <KLocalizedString>
#include <QStringList>
#include <QPair>
#include <QUuid>
......
......@@ -28,7 +28,7 @@
#include <QList>
#include <QHash>
#include <QDebug>
#include <KLocale>
#include <KLocalizedString>
TrainingSession::TrainingSession(QObject *parent)
: QObject(parent)
......
......@@ -29,7 +29,7 @@
#include <QUuid>
#include <QDebug>
#include <KLocale>
#include <KLocalizedString>
#include <QUrl>
Unit::Unit(QObject *parent)
......
......@@ -27,25 +27,36 @@
#include "core/resources/courseresource.h"
#include "core/resources/skeletonresource.h"
#include "settings.h"
#include <KLocale>
#include <KLocalizedString>
#include <KStandardGuiItem>
#include <QPushButton>
#include <QUuid>
#include <QDialogButtonBox>
NewCourseDialog::NewCourseDialog(ResourceManager *m_resourceManager)
: KDialog(0)
: QDialog(0)
, m_fixedLanguage(0)
, m_resourceManager(m_resourceManager)
, m_createdCourse(0)
{
setPlainCaption(i18n("Create New Course"));
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setWindowTitle(i18n("Create New Course"));
QWidget *widget = new QWidget(this);
ui = new Ui::NewCourseDialog;
ui->setupUi(widget);
setMainWidget(widget);
QDialogButtonBox *buttons = new QDialogButtonBox(this);
QPushButton *okButton = new QPushButton;
KGuiItem::assign(okButton, KStandardGuiItem::ok());
okButton->setShortcut(Qt::Key_Return);
buttons->addButton(okButton, QDialogButtonBox::AcceptRole);
widget->layout()->addWidget(buttons);
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
QPushButton *cancelButton = new QPushButton;
KGuiItem::assign(cancelButton, KStandardGuiItem::cancel());
okButton->setShortcut(Qt::Key_Cancel);
buttons->addButton(cancelButton, QDialogButtonBox::RejectRole);
//FIXME only allow creation when data repository is set
//FIXME only allow creation when unique ID is given: check this and give feedback
......
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