summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnu Mittal <anu22mittal@gmail.com>2015-02-26 15:03:33 (GMT)
committerAnu Mittal <anu22mittal@gmail.com>2015-02-26 15:03:33 (GMT)
commitb01feabb497a05e1b2703b4a0d674e6aab7987c5 (patch)
treeb728487719749a0817728cabec8cf64ef48dc9b3
parent75491289daf310bee957f27c0362a6bac4ca1473 (diff)
Porting last subfolder of src -tools
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/calculator/gasCalculator.cpp24
-rw-r--r--src/calculator/titrationCalculator.cpp3
-rw-r--r--src/calculator/titrationCalculator.h4
-rw-r--r--src/detailedgraphicaloverview.cpp1
-rw-r--r--src/detailinfodlg.cpp1
-rw-r--r--src/elementdataviewer.cpp1
-rw-r--r--src/gradientwidget_impl.cpp1
-rw-r--r--src/isotopetable/isotopeguideview.cpp1
-rw-r--r--src/isotopetable/isotopescene.cpp1
-rw-r--r--src/isotopetable/isotopetabledialog.cpp1
-rw-r--r--src/isotopetable/isotopeview.cpp1
-rw-r--r--src/kalzium.cpp6
-rw-r--r--src/kalziumelementproperty.cpp1
-rw-r--r--src/kdeeduglossary.cpp1
-rw-r--r--src/kdeeduglossary.h1
-rw-r--r--src/psetable/elementitem.cpp1
-rw-r--r--src/psetable/numerationitem.cpp1
-rw-r--r--src/psetable/periodictablescene.cpp1
-rw-r--r--src/psetable/periodictableview.cpp1
-rw-r--r--src/psetable/periodictableview.h1
-rw-r--r--src/searchwidget.cpp2
-rw-r--r--src/spectrumviewimpl.cpp1
-rw-r--r--src/spectrumwidget.cpp2
-rw-r--r--src/tableinfowidget.cpp1
-rw-r--r--src/tablesdialog.cpp1
27 files changed, 24 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a89b06..8c2aed5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${OPENBABEL2_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/cmake/modules)
find_package(OpenBabel2 REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Widgets Script OpenGL)
+find_package(Qt5Svg REQUIRED)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Solid Config Archive I18n Parts UnitConversion WidgetsAddons NewStuff KDELibs4Support)
find_package(KF5DocTools REQUIRED)
find_package(KF5Plotting REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a3ecad8..ca4527b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -136,7 +136,7 @@ kconfig_add_kcfg_files(kalzium_SRCS prefs.kcfgc )
add_executable(kalzium ${kalzium_SRCS})
-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})
+target_link_libraries(kalzium KF5::Plotting KF5::KHtml KF5::KDELibs4Support KF5::NewStuff KF5::UnitConversion Qt5::Script Qt5::Declarative science Qt5::Svg ${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/gasCalculator.cpp b/src/calculator/gasCalculator.cpp
index 921239b..2d7c75b 100644
--- a/src/calculator/gasCalculator.cpp
+++ b/src/calculator/gasCalculator.cpp
@@ -23,7 +23,7 @@
#include "prefs.h"
#include "kalziumutils.h"
#include <KLocalizedString>
-#include <KComboBox>
+#include <QComboBox>
using namespace KUnitConversion;
@@ -145,7 +145,7 @@ void gasCalculator::calculatePressure()
double pressure = m_moles * R * temp / (volume - m_moles * b) - m_moles * m_moles * m_Vand_a / volume / volume;
m_pressure = Value(pressure, KUnitConversion::Atmosphere);
- m_pressure = m_pressure.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.pressure_unit)));
+ // m_pressure = m_pressure.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.pressure_unit)));
ui.pressure->setValue(m_pressure.number());
}
@@ -170,7 +170,7 @@ void gasCalculator::calculateVol()
double volume = m_moles * R * temp / pressure + (m_moles * b);
m_vol = Value(volume, KUnitConversion::Liter);
- m_vol = m_vol.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.volume_unit)));
+ // m_vol = m_vol.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.volume_unit)));
ui.volume->setValue(m_vol.number());
}
@@ -183,7 +183,7 @@ void gasCalculator::calculateTemp()
double temp = (pressure + (m_moles * m_moles * m_Vand_a / volume / volume))\
* (volume - m_moles * b) / m_moles / R;
m_temp = Value(temp, KUnitConversion::Kelvin);
- m_temp = m_temp.convertTo(getCurrentUnitId(ui.temp_unit));
+ //m_temp = m_temp.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.temp_unit)));
ui.temp->setValue(m_temp.number());
}
@@ -209,32 +209,32 @@ void gasCalculator::calculateMass()
double mass = (pressure + m_moles * m_moles * m_Vand_a / volume / volume)\
* (volume - m_moles * b) * m_molarMass / R / temp;
m_mass = Value(mass, KUnitConversion::Gram);
- m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.mass_unit)));
ui.mass->setValue(m_mass.number());
}
void gasCalculator::volChanged()
{
- m_vol = Value(ui.volume->value(), getCurrentUnitId(ui.volume_unit));
+ // m_vol = Value(ui.volume->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.volume_unit)));
calculate();
}
void gasCalculator::tempChanged()
{
- m_temp = Value(ui.temp->value(), getCurrentUnitId(ui.temp_unit));
+ // m_temp = Value(ui.temp->value(), getCurrentUnitId(ui.temp_unit));
calculate();
}
void gasCalculator::pressureChanged()
{
- m_pressure = Value(ui.pressure->value(), getCurrentUnitId(ui.pressure_unit));
+ //m_pressure = Value(ui.pressure->value(), getCurrentUnitId(ui.pressure_unit));
calculate();
}
void gasCalculator::massChanged()
{
- m_mass = Value(ui.mass->value(), getCurrentUnitId(ui.mass_unit));
+ //m_mass = Value(ui.mass->value(), getCurrentUnitId(ui.mass_unit));
m_moles = m_mass.convertTo(KUnitConversion::Gram).number() / m_molarMass;
ui.moles->setValue(m_moles);
calculate();
@@ -244,7 +244,7 @@ void gasCalculator::molesChanged(double value)
{
m_moles = value;
m_mass = Value(m_moles * m_molarMass, KUnitConversion::Gram);
- m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit));
ui.mass->setValue(m_mass.number());
calculate();
}
@@ -257,7 +257,7 @@ void gasCalculator::molarMassChanged(double value)
}
m_molarMass = value;
m_mass = Value(m_molarMass * m_moles, KUnitConversion::Gram);
- m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit));
ui.mass->setValue(m_mass.number());
calculate();
}
@@ -270,7 +270,7 @@ void gasCalculator::Vand_aChanged()
void gasCalculator::Vand_bChanged()
{
- m_Vand_b = Value(ui.b->value(), getCurrentUnitId(ui.b_unit));
+ // m_Vand_b = Value(ui.b->value(), getCurrentUnitId(ui.b_unit));
calculate();
}
diff --git a/src/calculator/titrationCalculator.cpp b/src/calculator/titrationCalculator.cpp
index af747e4..44ea152 100644
--- a/src/calculator/titrationCalculator.cpp
+++ b/src/calculator/titrationCalculator.cpp
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <float.h>
#include <QMessageBox>
+#include <KLocalizedString>
using namespace std;
@@ -84,7 +85,7 @@ void titrationCalculator::plot()
uid.kplotwidget->removeAllPlotObjects();
uid.kplotwidget->setLimits(xmin, xmax, ymin, ymax); //now I need to set the limits of the plot
- KPlotObject *kpor = new KPlotObject(Qt::red, KPlotObject::Lines);
+ KPlotObject *kpor = new KPlotObject(Qt::red,KPlotObject::Lines);
KPlotObject *kpog = new KPlotObject(Qt::green, KPlotObject::Lines);
KPlotObject *kpob = new KPlotObject(Qt::blue, KPlotObject::Lines);
redplot = "<polyline points=\"";
diff --git a/src/calculator/titrationCalculator.h b/src/calculator/titrationCalculator.h
index aa3ab1c..18e5b78 100644
--- a/src/calculator/titrationCalculator.h
+++ b/src/calculator/titrationCalculator.h
@@ -26,8 +26,8 @@
#include <kdebug.h>
#include <prefs.h>
#include <KPlotWidget>
-//#include "kplotobject.h"
-//#include <kplotpoint.h>
+#include "kplotobject.h"
+#include <kplotpoint.h>
#include "QString"
#include "QStringList"
diff --git a/src/detailedgraphicaloverview.cpp b/src/detailedgraphicaloverview.cpp
index 5fb716b..cd792ac 100644
--- a/src/detailedgraphicaloverview.cpp
+++ b/src/detailedgraphicaloverview.cpp
@@ -171,4 +171,3 @@ void DetailedGraphicalOverview::paintEvent(QPaintEvent*)
p.end();
}
-#include "detailedgraphicaloverview.moc"
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
index 5932a7f..67e18e6 100644
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -620,4 +620,3 @@ void DetailedInfoDlg::slotUser2()
setElement(pseTables::instance()->getTabletype(m_tableTyp)->previousOf(m_elementNumber));
}
-#include "detailinfodlg.moc"
diff --git a/src/elementdataviewer.cpp b/src/elementdataviewer.cpp
index 49a2a18..43fb01f 100644
--- a/src/elementdataviewer.cpp
+++ b/src/elementdataviewer.cpp
@@ -530,4 +530,3 @@ void ElementDataViewer::initData()
setupAxisData(m_yData);
}
-#include "elementdataviewer.moc"
diff --git a/src/gradientwidget_impl.cpp b/src/gradientwidget_impl.cpp
index 622717a..ca53a15 100644
--- a/src/gradientwidget_impl.cpp
+++ b/src/gradientwidget_impl.cpp
@@ -235,4 +235,3 @@ void GradientWidgetImpl::tick(void)
}
gradient_slider -> setValue (temp + increment);
}
-// #include "gradientwidget_impl.moc"
diff --git a/src/isotopetable/isotopeguideview.cpp b/src/isotopetable/isotopeguideview.cpp
index d96ce80..1790b61 100644
--- a/src/isotopetable/isotopeguideview.cpp
+++ b/src/isotopetable/isotopeguideview.cpp
@@ -103,4 +103,3 @@ void IsotopeGuideView::setZoomLevel(double zoomLevel)
m_zoomLevel = zoomLevel;
}
-#include "isotopeguideview.moc"
diff --git a/src/isotopetable/isotopescene.cpp b/src/isotopetable/isotopescene.cpp
index 18f6a54..c0e6757 100644
--- a/src/isotopetable/isotopescene.cpp
+++ b/src/isotopetable/isotopescene.cpp
@@ -88,4 +88,3 @@ void IsotopeScene::drawIsotopes()
}
}
-#include "isotopescene.moc"
diff --git a/src/isotopetable/isotopetabledialog.cpp b/src/isotopetable/isotopetabledialog.cpp
index 83fb000..b873ae7 100644
--- a/src/isotopetable/isotopetabledialog.cpp
+++ b/src/isotopetable/isotopetabledialog.cpp
@@ -105,4 +105,3 @@ void IsotopeTableDialog::slotZoomLevelChanged(double value)
ui.Slider->blockSignals(b);
}
-#include "isotopetabledialog.moc"
diff --git a/src/isotopetable/isotopeview.cpp b/src/isotopetable/isotopeview.cpp
index dd6bc8e..3cf3b1c 100644
--- a/src/isotopetable/isotopeview.cpp
+++ b/src/isotopetable/isotopeview.cpp
@@ -101,4 +101,3 @@ void IsotopeView::setZoom(double zoom)
emit visibleSceneRectChanged(visibleSceneRect);
}
-#include "isotopeview.moc"
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
index b242010..f52cf5b 100644
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -34,6 +34,7 @@
#include "tableinfowidget.h"
#include "psetables.h"
#include <config-kalzium.h>
+#include <KGlobal>
#ifdef HAVE_FACILE
#include "eqchemview.h"
@@ -50,6 +51,7 @@
#include <QToolBox>
#include <QKeyEvent>
#include <QRegExp>
+#include <QStatusBar>
#include <kmessagebox.h>
#include <kconfigdialog.h>
@@ -57,7 +59,6 @@
#include <kaction.h>
#include <kparts/part.h>
#include <kselectaction.h>
-#include <kstatusbar.h>
#include <kstandarddirs.h>
#include <kstandardaction.h>
#include <kicon.h>
@@ -555,7 +556,7 @@ void Kalzium::slotShowExportDialog()
void Kalzium::setupStatusBar()
{
- statusBar()->insertItem("", 0, 0);
+ statusBar()->insertWiget("", 0, 0);
statusBar()->setItemAlignment(0, Qt::AlignRight);
statusBar()->insertItem("", IDS_ELEMENTINFO, 1);
@@ -651,4 +652,3 @@ QSize Kalzium::sizeHint() const
return QSize(700, 500);
}
-#include "kalzium.moc"
diff --git a/src/kalziumelementproperty.cpp b/src/kalziumelementproperty.cpp
index 2f8dcfa..52e7148 100644
--- a/src/kalziumelementproperty.cpp
+++ b/src/kalziumelementproperty.cpp
@@ -239,4 +239,3 @@ QColor KalziumElementProperty::gradientBrushLogic(int el) const
return gradientColor;
}
-#include "kalziumelementproperty.moc"
diff --git a/src/kdeeduglossary.cpp b/src/kdeeduglossary.cpp
index f561568..af29f1f 100644
--- a/src/kdeeduglossary.cpp
+++ b/src/kdeeduglossary.cpp
@@ -545,4 +545,3 @@ QStringList GlossaryItem::pictures() const
return m_pic;
}
-#include "kdeeduglossary.moc"
diff --git a/src/kdeeduglossary.h b/src/kdeeduglossary.h
index 3b47aee..d2cdbe9 100644
--- a/src/kdeeduglossary.h
+++ b/src/kdeeduglossary.h
@@ -12,6 +12,7 @@
#define KDEEDUGLOSSARY_H
#include <kdialog.h>
+#include <KUrl>
class QDomDocument;
class GlossaryItem;
diff --git a/src/psetable/elementitem.cpp b/src/psetable/elementitem.cpp
index 7cf206e..42e18c4 100644
--- a/src/psetable/elementitem.cpp
+++ b/src/psetable/elementitem.cpp
@@ -154,4 +154,3 @@ void ElementItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
QGraphicsItem::hoverLeaveEvent(event);
}
-#include "elementitem.moc"
diff --git a/src/psetable/numerationitem.cpp b/src/psetable/numerationitem.cpp
index 574f74f..6dafb74 100644
--- a/src/psetable/numerationitem.cpp
+++ b/src/psetable/numerationitem.cpp
@@ -85,4 +85,3 @@ void NumerationItem::setNumerationType(int type)
update();
}
-#include "numerationitem.moc"
diff --git a/src/psetable/periodictablescene.cpp b/src/psetable/periodictablescene.cpp
index 5ea99c0..d137621 100644
--- a/src/psetable/periodictablescene.cpp
+++ b/src/psetable/periodictablescene.cpp
@@ -139,4 +139,3 @@ void PeriodicTableScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
-#include "periodictablescene.moc"
diff --git a/src/psetable/periodictableview.cpp b/src/psetable/periodictableview.cpp
index 5e64a6d..af574fb 100644
--- a/src/psetable/periodictableview.cpp
+++ b/src/psetable/periodictableview.cpp
@@ -180,4 +180,3 @@ PeriodicTableView::~PeriodicTableView()
delete m_tableStates;
}
-#include "periodictableview.moc"
diff --git a/src/psetable/periodictableview.h b/src/psetable/periodictableview.h
index 2c2494a..7c19803 100644
--- a/src/psetable/periodictableview.h
+++ b/src/psetable/periodictableview.h
@@ -33,6 +33,7 @@
#include "numerationitem.h"
#include "periodictablescene.h"
#include "periodictablestates.h"
+#include <QtSvg/QSvgGenerator>
/**
diff --git a/src/searchwidget.cpp b/src/searchwidget.cpp
index 17edc1b..057866b 100644
--- a/src/searchwidget.cpp
+++ b/src/searchwidget.cpp
@@ -93,5 +93,3 @@ void SearchWidget::doSearch()
s->resetSearch();
}
}
-
-#include "searchwidget.moc"
diff --git a/src/spectrumviewimpl.cpp b/src/spectrumviewimpl.cpp
index f9c0488..8c54bb6 100644
--- a/src/spectrumviewimpl.cpp
+++ b/src/spectrumviewimpl.cpp
@@ -128,4 +128,3 @@ void SpectrumViewImpl::updateMax(int right)
m_spectrumWidget->setRightBorder(right);
}
-#include "spectrumviewimpl.moc"
diff --git a/src/spectrumwidget.cpp b/src/spectrumwidget.cpp
index 2264590..5030a23 100644
--- a/src/spectrumwidget.cpp
+++ b/src/spectrumwidget.cpp
@@ -392,4 +392,4 @@ void SpectrumWidget::resetSpectrum()
setBorders(minimumPeak, maximumPeak);
}
-#include "spectrumwidget.moc"
+
diff --git a/src/tableinfowidget.cpp b/src/tableinfowidget.cpp
index 48eb865..dadac48 100644
--- a/src/tableinfowidget.cpp
+++ b/src/tableinfowidget.cpp
@@ -43,4 +43,3 @@ void TableInfoWidget::setTableType(int type)
}
-#include "tableinfowidget.moc"
diff --git a/src/tablesdialog.cpp b/src/tablesdialog.cpp
index 6dd126e..e17003a 100644
--- a/src/tablesdialog.cpp
+++ b/src/tablesdialog.cpp
@@ -276,4 +276,3 @@ void MyTableWidget::copyToClipboard()
QApplication::clipboard()->setText(currentItem()->data(QTableWidgetItem::Type).toString());
}
-#include "tablesdialog.moc"