Commit ba4fc343 authored by Andrius Štikonas's avatar Andrius Štikonas

Remove KDELibs4Support.

parent 44f6f39d
......@@ -14,7 +14,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
Crash
DocTools
KDELibs4Support
I18n
KIO
WidgetsAddons
......
......@@ -29,7 +29,6 @@ target_link_libraries(kubrick
Qt5::Svg
KF5::Crash
KF5::ConfigCore
KF5::KDELibs4Support
KF5::KIOCore
KF5::XmlGui
KF5KDEGames
......
......@@ -21,7 +21,9 @@
#include "movetracker.h"
#include "scenelabel.h"
#include "kubrick_debug.h"
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardAction>
......@@ -1822,7 +1824,7 @@ void Game::chooseMousePointer ()
void Game::startNextDisplay ()
{
// Pick off the first character of the display sequence.
char c = displaySequence.at(0).toAscii();
char c = displaySequence.at(0).toLatin1();
displaySequence.remove (0, 1);
int nRMoves = 0;
......
......@@ -17,43 +17,44 @@
*******************************************************************************/
#include "gamedialog.h"
#include <KConfigGroup>
#include <KLocalizedString>
#include <QVBoxLayout>
#include <QLabel>
#include <QDialogButtonBox>
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
/******************************************************************************/
/***************** DIALOG BOX TO SELECT A GAME AND LEVEL *****************/
/******************************************************************************/
GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
: KDialog (parent)
: QDialog (parent)
{
myParent = parent;
myChangePuzzle = changePuzzle;
opt = optionTemp;
int margin = marginHint();
int spacing = spacingHint();
QWidget * dad = new QWidget (this);
setMainWidget (dad);
setCaption (i18n ("Rubik's Cube Options"));
setButtons (KDialog::Ok | KDialog::Cancel | KDialog::Help);
setDefaultButton (KDialog::Ok);
QVBoxLayout * mainLayout = new QVBoxLayout (dad);
mainLayout->setSpacing (spacing);
mainLayout->setMargin (margin);
QVBoxLayout *mainLayout = new QVBoxLayout(dad);
mainLayout->addWidget(dad);
setLayout(mainLayout);
setWindowTitle (i18n ("Rubik's Cube Options"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Help);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &GameDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &GameDialog::reject);
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
QHBoxLayout * cubeDimensions = new QHBoxLayout();
mainLayout->addLayout (cubeDimensions);
cubeDimensions->setSpacing (spacing);
QHBoxLayout * difficulty = new QHBoxLayout();
mainLayout->addLayout (difficulty);
difficulty->setSpacing (spacing);
if (changePuzzle) {
// Lay out spin boxes for the cube dimensions.
......@@ -116,7 +117,6 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
QHBoxLayout * speed = new QHBoxLayout();
mainLayout->addLayout (speed);
speed->setSpacing (spacing);
speedL = new QLabel (i18n("Speed of moves:"));
speedN = new QSpinBox ();
......@@ -126,7 +126,6 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
QHBoxLayout * bevel = new QHBoxLayout();
mainLayout->addLayout (bevel);
bevel->setSpacing (spacing);
// xgettext: no-c-format
bevelL = new QLabel (i18n("% of bevel on edges of cubies:"));
......@@ -136,6 +135,8 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
bevel->addWidget (bevelL);
bevel->addWidget (bevelN);
mainLayout->addWidget(buttonBox);
// Set the option-widgets to the current values of the options.
if (changePuzzle) {
dimX->setValue (optionTemp [optXDim]);
......@@ -150,8 +151,8 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
bevelN->setValue (optionTemp [optBevel]);
connect(this, &GameDialog::okClicked, this, &GameDialog::slotOk);
connect(this, &GameDialog::helpClicked, this, &GameDialog::slotHelp);
connect(okButton, &QPushButton::clicked, this, &GameDialog::slotOk);
connect(buttonBox->button(QDialogButtonBox::Help), &QPushButton::clicked, this, &GameDialog::slotHelp);
}
......
......@@ -19,14 +19,12 @@
#ifndef GAMEDIALOG_H
#define GAMEDIALOG_H
// Use KDialog and KMessageBox.
#include <KDialog>
#include <KMessageBox>
#include <QCheckBox>
#include <QDialog>
#include <QLabel>
#include <QSpinBox>
#include <QCheckBox>
#include "kbkglobal.h"
......@@ -40,7 +38,7 @@ class Game;
/******************* DIALOG TO SELECT A GAME AND LEVEL *******************/
/******************************************************************************/
class GameDialog : public KDialog
class GameDialog : public QDialog
{
public:
GameDialog (bool changePuzzle, int optionTemp [8], QWidget * parent = 0);
......
......@@ -25,15 +25,11 @@
#include <QMouseEvent>
#include <QPainter>
#include <QPoint>
#include <QStandardPaths>
#include <QStringList>
// IDW - This is temporary code for KDE 4.1. Do themes properly in KDE 4.2.
#include <KCmdLineArgs>
#include <KAboutData>
#include <QSvgRenderer>
#include "kubrick_debug.h"
#include <KGlobal>
#include <KStandardDirs>
// C++ includes
#include <iostream>
......
......@@ -21,19 +21,20 @@
// Qt includes.
#include <QAction>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QGLFormat>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QSignalMapper>
#include <QStatusBar>
#include <QString>
// KDE includes.
#include <KActionCollection>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KStandardGameAction>
#include <KMessageBox>
#include <KShortcutsDialog>
#include <KStandardGameAction>
#include <KToggleAction>
// Local includes.
......@@ -47,7 +48,7 @@ Kubrick::Kubrick () :
singmasterMoves (0)
{
// Window title.
// setCaption("Rubik's Cube"); // DELETED - This is a *trademark*.
// setWindowTitle("Rubik's Cube"); // DELETED - This is a *trademark*.
// use multi-sample (anti-aliased) OpenGL if available
QGLFormat defFormat = QGLFormat::defaultFormat();
......
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