summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnu Mittal <anu22mittal@gmail.com>2015-02-19 16:16:21 (GMT)
committerAnu Mittal <anu22mittal@gmail.com>2015-02-19 16:16:21 (GMT)
commit76f67c7302ec4e02c30f997bcf266fc28277ecb7 (patch)
treefbbb0a2d9d8b2e6b9a44bbba2f5b6f922ad8c540
parent48a9708455d81619beaac2881e9e3451bbe6854c (diff)
Porting src folder -I
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/calculator/calculator.cpp8
-rw-r--r--src/calculator/gasCalculator.cpp1
-rw-r--r--src/calculator/nuclearCalculator.cpp1
-rw-r--r--src/calculator/titrationCalculator.h7
-rw-r--r--src/tools/moleculeview.cpp8
7 files changed, 17 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45c147e..6a89b06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@ find_package(OpenBabel2 REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Widgets Script OpenGL)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Solid Config Archive I18n Parts UnitConversion WidgetsAddons NewStuff KDELibs4Support)
find_package(KF5DocTools REQUIRED)
+find_package(KF5Plotting REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(KF5CoreAddons REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8cd0107..a3ecad8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,6 +8,7 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
+${KF4_INCLUDES}
)
########### next target ###############
@@ -135,7 +136,7 @@ kconfig_add_kcfg_files(kalzium_SRCS prefs.kcfgc )
add_executable(kalzium ${kalzium_SRCS})
-target_link_libraries(kalzium KF5::KHtml KF5::KDELibs4Support KF5::NewStuff KF5::UnitConversion Qt5::Script Qt5::Declarative science ${OPENBABEL2_LIBRARIES})
+target_link_libraries(kalzium KF5::Plotting KF5::KHtml KF5::KDELibs4Support KF5::NewStuff KF5::UnitConversion Qt5::Script Qt5::Declarative science ${OPENBABEL2_LIBRARIES} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
#QT_QTSCRIPT_LIBRARY
if (OPENBABEL2_FOUND)
target_link_libraries(kalzium ${OPENBABEL2_LIBRARIES})
diff --git a/src/calculator/calculator.cpp b/src/calculator/calculator.cpp
index efe57aa..3c187b4 100644
--- a/src/calculator/calculator.cpp
+++ b/src/calculator/calculator.cpp
@@ -24,10 +24,12 @@
#include <kstandardaction.h>
#include <kstandarddirs.h>
#include <ktoolinvocation.h>
-
+#include <QDialog>
+#include <kicon.h>
+#include <KLocalizedString>
calculator::calculator(QWidget *parent) : KDialog(parent)
{
- setCaption(i18n("Chemical Calculator"));
+ setWindowTitle(i18n("Chemical Calculator"));
setButtons(Help | Close);
setDefaultButton(Close);
@@ -123,5 +125,5 @@ void calculator::slotItemSelection(QTreeWidgetItem *item)
void calculator::slotHelp()
{
- KToolInvocation::invokeHelp("calculator", "kalzium");
+ // KToolInvocation::invokeHelp("calculator", "kalzium","");
}
diff --git a/src/calculator/gasCalculator.cpp b/src/calculator/gasCalculator.cpp
index 1a7459c..c25528b 100644
--- a/src/calculator/gasCalculator.cpp
+++ b/src/calculator/gasCalculator.cpp
@@ -22,6 +22,7 @@
#include "kalziumunitcombobox.h"
#include "prefs.h"
#include "kalziumutils.h"
+#include <KLocalizedString>
using namespace KUnitConversion;
diff --git a/src/calculator/nuclearCalculator.cpp b/src/calculator/nuclearCalculator.cpp
index 94bed45..c78c506 100644
--- a/src/calculator/nuclearCalculator.cpp
+++ b/src/calculator/nuclearCalculator.cpp
@@ -22,6 +22,7 @@
#include <math.h>
#include "prefs.h"
#include "kalziumutils.h"
+#include <KLocalizedString>
using namespace KUnitConversion;
diff --git a/src/calculator/titrationCalculator.h b/src/calculator/titrationCalculator.h
index 9880ebe..aa3ab1c 100644
--- a/src/calculator/titrationCalculator.h
+++ b/src/calculator/titrationCalculator.h
@@ -25,10 +25,9 @@
#include <kdebug.h>
#include <prefs.h>
-
-#include "kplotobject.h"
-#include "kplotwidget.h"
-#include "kplotpoint.h"
+#include <KPlotWidget>
+//#include "kplotobject.h"
+//#include <kplotpoint.h>
#include "QString"
#include "QStringList"
diff --git a/src/tools/moleculeview.cpp b/src/tools/moleculeview.cpp
index 611ff10..0bde181 100644
--- a/src/tools/moleculeview.cpp
+++ b/src/tools/moleculeview.cpp
@@ -30,6 +30,7 @@
#include <KLocale>
#include <KUrl>
#include <KGlobal>
+#include <KGlobalSettings>
#include <knewstuff3/downloaddialog.h>
#include <kio/job.h>
@@ -46,12 +47,11 @@
using namespace OpenBabel;
using namespace Avogadro;
+OpenBabel2Wrapper openBabel;
MoleculeDialog::MoleculeDialog(QWidget * parent)
: KDialog(parent), m_periodicTable(0), m_addHydrogens(false)
{
- KGlobalSettings globalSettings;
- OpenBabel2Wrapper openBabel;
// use multi-sample (anti-aliased) OpenGL if available
QGLFormat defFormat = QGLFormat::defaultFormat();
defFormat.setSampleBuffers(true);
@@ -285,9 +285,9 @@ void MoleculeDialog::slotDownloadNewStuff()
KNS3::DownloadDialog dialog(this);
dialog.exec();
-KGlobalSettings globalSettings;
// list of changed entries
- QString destinationDir = globalSettings.documentPath();
+ QString destinationDir =
+ KGlobalSettings ::documentPath();
QDir dir(destinationDir);
if (!dir.exists()) {
destinationDir = QDir::homePath();