summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnu Mittal <anu22mittal@gmail.com>2015-03-15 08:56:46 (GMT)
committerAnu Mittal <anu22mittal@gmail.com>2015-03-15 08:56:46 (GMT)
commitf73f5ea045a2498f1b9a7a56c655c5c4a1222624 (patch)
treed90ec23d47e0ae9290bdc85d50f3086491e271b4
parent8c21b13bc9a231bc25ff084434e7bd51558ad732 (diff)
reverting changes
-rw-r--r--compoundviewer/CMakeLists.txt1
-rw-r--r--compoundviewer/kalziumglwidget.cpp3
-rw-r--r--compoundviewer/kalziumglwidget.h3
-rw-r--r--src/detailinfodlg.cpp4
-rw-r--r--src/kalzium.cpp21
-rw-r--r--src/main.cpp6
6 files changed, 20 insertions, 18 deletions
diff --git a/compoundviewer/CMakeLists.txt b/compoundviewer/CMakeLists.txt
index a2ff9c2..8d7aa36 100644
--- a/compoundviewer/CMakeLists.txt
+++ b/compoundviewer/CMakeLists.txt
@@ -17,6 +17,7 @@ target_link_libraries(compoundviewer avogadro
KF5::WidgetsAddons
KF5::CoreAddons
Qt5::OpenGL
+ Qt5::Gui
${OPENGL_LIBRARIES}
)
diff --git a/compoundviewer/kalziumglwidget.cpp b/compoundviewer/kalziumglwidget.cpp
index cfa067c..ae2126b 100644
--- a/compoundviewer/kalziumglwidget.cpp
+++ b/compoundviewer/kalziumglwidget.cpp
@@ -20,10 +20,9 @@
#include <avogadro/pluginmanager.h>
#include <avogadro/toolgroup.h>
#include <avogadro/engine.h>
-#include <QtOpenGL/QGLWidget>
#include <QWidget>
#include "openbabel2wrapper.h"
-
+#include<avogadro/glwidget.h>
#include <config-kalzium.h>
KalziumGLWidget::KalziumGLWidget(QWidget *parent) : Avogadro::GLWidget(parent),
diff --git a/compoundviewer/kalziumglwidget.h b/compoundviewer/kalziumglwidget.h
index f5608b0..548dcc8 100644
--- a/compoundviewer/kalziumglwidget.h
+++ b/compoundviewer/kalziumglwidget.h
@@ -14,7 +14,8 @@
#ifndef KALZIUMGLWIDGET_H
#define KALZIUMGLWIDGET_H
-
+#include<QtWidgets>
+#include<QtOpenGL>
#include <avogadro/glwidget.h>
class Q_DECL_EXPORT KalziumGLWidget : public Avogadro::GLWidget
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
index 4c5671a..3dabf32 100644
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -33,7 +33,7 @@
#include <QIcon>
#include <KPageDialog>
#include <QMessage>
-
+#include <KUrl>
#include "psetables.h"
#include <QFile>
@@ -573,7 +573,7 @@ QString DetailedInfoDlg::createWikiLink(QString link, QString displayString)
return html;
}
-void DetailedInfoDlg::slotLinkClicked(constQUrl &url)
+void DetailedInfoDlg::slotLinkClicked(const KUrl &url)
{
if (!url.isEmpty() && url.isValid()) {
KRun *krun = new KRun(url, 0);
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
index 54fc11d..f9ce77a 100644
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -34,7 +34,7 @@
#include "tableinfowidget.h"
#include "psetables.h"
#include <config-kalzium.h>
-#include <QGlobal>
+#include <KGlobal>
#ifdef HAVE_FACILE
#include "eqchemview.h"
@@ -53,22 +53,23 @@
#include <QRegExp>
#include <QStatusBar>
-#include <QMessagebox>
+#include <QMessageBox>
#include <kconfigdialog.h>
-#include <qiconloader.h>
+#include <kiconloader.h>
#include <kaction.h>
#include <kparts/part.h>
#include <kselectaction.h>
-#include <Qstandarddirs>
+#include <kstandarddirs.h>
#include <kstandardaction.h>
#include <QIcon>
#include <kservicetypetrader.h>
-#include <QUrl>
+#include <KUrl>
#include <kfiledialog.h>
#include <QLocale>
#include <KPluginLoader>
// #include <KTabWidget>
#include <QGridLayout>
+#include <KLocalizedString>
#define IDS_ELEMENTINFO 7
@@ -77,7 +78,7 @@ Kalzium::Kalzium() : KXmlGuiWindow(0)
setObjectName("KalziumMainWindow");
// adding the libkdeedu catalog
- QGlobal::locale()->insertCatalog("libkdeedu");
+ KGlobal::locale()->insertCatalog("libkdeedu");
// Init pointers with null
m_infoDialog = 0;
@@ -341,14 +342,14 @@ void Kalzium::slotGlossary()
// creating the glossary dialog and loading the glossaries we have
m_glossarydlg = new GlossaryDialog(this);
m_glossarydlg->setObjectName(QLatin1String("glossary"));
- QString dir = QGlobal::dirs()->findResourceDir("data", "kalzium/data/");
+ QString dir = KGlobal::dirs()->findResourceDir("data", "kalzium/data/");
QString picturepath = dir + "kalzium/data/bg.jpg";
- QUrl u = QUrl::fromPath(dir + "kalzium/data/knowledge.xml");
+ KUrl u = KUrl::fromPath(dir + "kalzium/data/knowledge.xml");
Glossary *g = new Glossary(u);
g->setName(i18n("Knowledge"));
g->setBackgroundPicture(picturepath);
m_glossarydlg->addGlossary(g, true);
- u = QUrl::fromPath(dir + "kalzium/data/tools.xml");
+ u = KUrl::fromPath(dir + "kalzium/data/tools.xml");
g = new Glossary(u, dir + "kalzium/data/toolpics/");
g->setName(i18n("Tools"));
g->setBackgroundPicture(picturepath);
@@ -584,7 +585,7 @@ void Kalzium::elementHover(int num)
void Kalzium::extractIconicInformationAboutElement(int elementNumber)
{
QString setname = "school";
- QString pathname = QGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
+ QString pathname = kGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
QString filename = pathname + setname + '/' + "iconinformation.txt";
QFile file(filename);
diff --git a/src/main.cpp b/src/main.cpp
index f5c2e9c..d4d20cd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -74,12 +74,12 @@ int main(int argc, char **argv)
about.addCredit(ki18n("Tiago Porangaba"),ki18n("New interface design and usability improvements"));
about.addCredit(ki18n("Etienne Rebetez"),ki18n("Adding new sizable Periodic System"));
- qCmdLineArgs::init(argc, argv, &about);
+ QCommandLineParser::init(argc, argv, &about);
qCmdLineOptions options;
#if defined(HAVE_OPENBABEL2) && defined(HAVE_EIGEN) && defined(HAVE_AVOGADRO)
options.add("molecule <file>", ki18n("Open the given molecule file"));
#endif
- qCmdLineArgs::addCmdLineOptions(options);
+ QCommandLineParser::addCmdLineOptions(options);
KApplication app;
Kalzium *mainWin = 0;
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
RESTORE(Kalzium);
} else {
// no session.. just start up normally
- qCmdLineArgs *args = qCmdLineArgs::parsedArgs();
+ QCommandLineParser *args = QCommandLineParser::parsedArgs();
/// @todo do something with the command line args here