summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnu Mittal <anu22mittal@gmail.com>2015-03-03 14:10:08 (GMT)
committerAnu Mittal <anu22mittal@gmail.com>2015-03-03 14:10:08 (GMT)
commit5426d9030c9f3a2d9f66ca14492ca231e773dc19 (patch)
treeb1c43803d3ba197a09d04f4e1cc1fa0a900015ca
parentc3a3248eb57d97af85bdb4ac262c26dc1d22e212 (diff)
porting src :-1: error: cannot find -lQt5::Declarative
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/calculator/gasCalculator.cpp24
-rw-r--r--src/exportdialog.cpp3
-rw-r--r--src/exportdialog.h2
-rw-r--r--src/kalziumdataobject.cpp6
-rw-r--r--src/kalziumgradienttype.cpp28
-rw-r--r--src/kalziumutils.cpp4
-rw-r--r--src/legendwidget.cpp1
-rw-r--r--src/rsdialog.cpp6
-rw-r--r--src/search.cpp1
-rw-r--r--src/spectrumwidget.cpp2
11 files changed, 38 insertions, 41 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d2c158..0723db8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.8.12)
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(Qt5 REQUIRED COMPONENTS Widgets Script OpenGL)
find_package(Qt5Svg REQUIRED)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Solid Config Archive KHtml I18n Parts UnitConversion WidgetsAddons NewStuff KDELibs4Support)
find_package(KF5DocTools REQUIRED)
diff --git a/src/calculator/gasCalculator.cpp b/src/calculator/gasCalculator.cpp
index a68aab3..fc7a2af 100644
--- a/src/calculator/gasCalculator.cpp
+++ b/src/calculator/gasCalculator.cpp
@@ -23,7 +23,7 @@
#include "prefs.h"
#include "kalziumutils.h"
#include <KLocalizedString>
-#include <QComboBox>
+#include <KComboBox>
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->value())));
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->value())));
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(KUnitConversion::UnitId(ui.temp_unit)));
+ // m_temp = m_temp.convertTo(getCurrentUnitId(ui.temp_unit->value()));
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(KUnitConversion::UnitId(ui.mass_unit)));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(KUnitConversion::UnitId(ui.mass_unit->value())));
ui.mass->setValue(m_mass.number());
}
void gasCalculator::volChanged()
{
- m_vol = Value(ui.volume->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.volume_unit)));
+ //m_vol = Value(ui.volume->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.volume_unit->value())));
calculate();
}
void gasCalculator::tempChanged()
{
- m_temp = Value(ui.temp->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.temp_unit)));
+ // m_temp = Value(ui.temp->value(), getCurrentUnitId(ui.temp_unit->value()));
calculate();
}
void gasCalculator::pressureChanged()
{
- m_pressure = Value(ui.pressure->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.pressure_unit)));
+ // m_pressure = Value(ui.pressure->value(), getCurrentUnitId(ui.pressure_unit->value()));
calculate();
}
void gasCalculator::massChanged()
{
- m_mass = Value(ui.mass->value(), getCurrentUnitId(KUnitConversion::UnitId(ui.mass_unit)));
+ //m_mass = Value(ui.mass->value(), getCurrentUnitId(ui.mass_unit->value()));
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(KUnitConversion::UnitId(ui.mass_unit)));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit->value()));
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(KUnitConversion::UnitId(ui.mass_unit)));
+ // m_mass = m_mass.convertTo(getCurrentUnitId(ui.mass_unit->value()));
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(KUnitConversion::UnitId(ui.b_unit)));
+ // m_Vand_b = Value(ui.b->value(), getCurrentUnitId(ui.b_unit->value()));
calculate();
}
diff --git a/src/exportdialog.cpp b/src/exportdialog.cpp
index a21dc26..559861b 100644
--- a/src/exportdialog.cpp
+++ b/src/exportdialog.cpp
@@ -17,8 +17,9 @@
#include <QFont>
#include <KMessageBox>
-
+#include <kdialog.h>
#include <kdebug.h>
+#include <KLocalizedString>
static const char HTML_HEADER[] =
"<html>"
diff --git a/src/exportdialog.h b/src/exportdialog.h
index 7aa5543..c950009 100644
--- a/src/exportdialog.h
+++ b/src/exportdialog.h
@@ -16,7 +16,7 @@
#include <QListWidget>
#include <element.h>
-
+#include <KDialog>
#include "kalziumdataobject.h"
#include "ui_exportdialog.h"
diff --git a/src/kalziumdataobject.cpp b/src/kalziumdataobject.cpp
index 3d171c6..19f8fa4 100644
--- a/src/kalziumdataobject.cpp
+++ b/src/kalziumdataobject.cpp
@@ -137,12 +137,12 @@ Element* KalziumDataObject::element(int number)
return 0;
return ElementList[ number-1 ];
}
-
+/*
QString KalziumDataObject::unitAsString(const int unit) const
{
- return KUnitConversion::Converter().unit(unit).data()->symbol();
+ return KUnitConversion::Converter().KUnitConversion::UnitId(unit(unit).data())->symbol();
}
-
+*/
QPixmap KalziumDataObject::pixmap(int number)
{
// checking that we are requesting a valid element
diff --git a/src/kalziumgradienttype.cpp b/src/kalziumgradienttype.cpp
index 5130f85..e9fe0d1 100644
--- a/src/kalziumgradienttype.cpp
+++ b/src/kalziumgradienttype.cpp
@@ -197,13 +197,13 @@ int KalziumCovalentRadiusGradientType::decimals() const
double KalziumCovalentRadiusGradientType::minValue() const
{
KUnitConversion::Value minValue(0.32, KUnitConversion::Angstrom);
- return minValue.convertTo(Prefs::lengthUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::lengthUnit())).number();
}
double KalziumCovalentRadiusGradientType::maxValue() const
{
KUnitConversion::Value minValue(2.25, KUnitConversion::Angstrom);
- return minValue.convertTo(Prefs::lengthUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::lengthUnit())).number();
}
bool KalziumCovalentRadiusGradientType::logarithmicGradient() const
@@ -255,13 +255,13 @@ int KalziumVanDerWaalsRadiusGradientType::decimals() const
double KalziumVanDerWaalsRadiusGradientType::minValue() const
{
KUnitConversion::Value minValue(1.2, KUnitConversion::Angstrom);
- return minValue.convertTo(Prefs::lengthUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::lengthUnit())).number();
}
double KalziumVanDerWaalsRadiusGradientType::maxValue() const
{
KUnitConversion::Value minValue(3.0, KUnitConversion::Angstrom);
- return minValue.convertTo(Prefs::lengthUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::lengthUnit())).number();
}
bool KalziumVanDerWaalsRadiusGradientType::logarithmicGradient() const
@@ -364,13 +364,13 @@ int KalziumBoilingPointGradientType::decimals() const
double KalziumBoilingPointGradientType::minValue() const
{
KUnitConversion::Value minValue(4.216, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
double KalziumBoilingPointGradientType::maxValue() const
{
KUnitConversion::Value minValue(5870.0, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
bool KalziumBoilingPointGradientType::logarithmicGradient() const
@@ -420,13 +420,13 @@ int KalziumMeltingPointGradientType::decimals() const
double KalziumMeltingPointGradientType::minValue() const
{
KUnitConversion::Value minValue(0.94, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
double KalziumMeltingPointGradientType::maxValue() const
{
KUnitConversion::Value minValue(3825.0, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
bool KalziumMeltingPointGradientType::logarithmicGradient() const
@@ -474,13 +474,13 @@ int KalziumSOMGradientType::decimals() const
double KalziumSOMGradientType::minValue() const
{
KUnitConversion::Value minValue(0.94, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
double KalziumSOMGradientType::maxValue() const
{
KUnitConversion::Value minValue(5870.0, KUnitConversion::Kelvin);
- return minValue.convertTo(Prefs::temperatureUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::temperatureUnit())).number();
}
bool KalziumSOMGradientType::logarithmicGradient() const
@@ -642,13 +642,13 @@ int KalziumElectronegativityGradientType::decimals() const
double KalziumElectronaffinityGradientType::minValue() const
{
KUnitConversion::Value minValue(-0.07, KUnitConversion::Electronvolt);
- return minValue.convertTo(Prefs::energiesUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::energiesUnit())).number();
}
double KalziumElectronaffinityGradientType::maxValue() const
{
KUnitConversion::Value minValue(3.7, KUnitConversion::Electronvolt);
- return minValue.convertTo(Prefs::energiesUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::energiesUnit())).number();
}
bool KalziumElectronaffinityGradientType::logarithmicGradient() const
@@ -697,13 +697,13 @@ int KalziumIonizationGradientType::decimals() const
double KalziumIonizationGradientType::minValue() const
{
KUnitConversion::Value minValue(3.89, KUnitConversion::Electronvolt);
- return minValue.convertTo(Prefs::energiesUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::energiesUnit())).number();
}
double KalziumIonizationGradientType::maxValue() const
{
KUnitConversion::Value minValue(25.0, KUnitConversion::Electronvolt);
- return minValue.convertTo(Prefs::energiesUnit()).number();
+ return minValue.convertTo(KUnitConversion::UnitId(Prefs::energiesUnit())).number();
}
bool KalziumIonizationGradientType::logarithmicGradient() const
diff --git a/src/kalziumutils.cpp b/src/kalziumutils.cpp
index bae9c54..c7b7e7a 100644
--- a/src/kalziumutils.cpp
+++ b/src/kalziumutils.cpp
@@ -179,9 +179,9 @@ void KalziumUtils::populateUnitCombobox(QComboBox *comboBox, const QList<int> &u
QString unitString;
foreach (int unit, unitList) {
- unitString = KUnitConversion::Converter().unit(unit).data()->description();
+ //unitString = KUnitConversion::Converter().unit(unit).data()->description();
unitString.append(" (");
- unitString.append(KUnitConversion::Converter().unit(unit).data()->symbol());
+ //unitString.append(KUnitConversion::Converter().unit(unit).data()->symbol());
unitString.append(")");
comboBox->addItem(unitString, unit);
}
diff --git a/src/legendwidget.cpp b/src/legendwidget.cpp
index 4c71236..671015a 100644
--- a/src/legendwidget.cpp
+++ b/src/legendwidget.cpp
@@ -226,4 +226,3 @@ void LegendItem::leaveEvent(QEvent* event)
QWidget::leaveEvent(event);
}
-#include "legendwidget.moc"
diff --git a/src/rsdialog.cpp b/src/rsdialog.cpp
index 64a6b60..cd9e626 100644
--- a/src/rsdialog.cpp
+++ b/src/rsdialog.cpp
@@ -26,8 +26,7 @@
#include "kalziumutils.h"
#include <KLocale>
-#include <ktoolinvocation.h>
-#include <KToolInvocation>
+#include <KConfigWidgets/khelpclient.h>
#include <KMessageBox>
RSDialog::RSDialog(QWidget* parent) : KDialog(parent)
@@ -313,7 +312,7 @@ void RSDialog::createRPhrases()
void RSDialog::slotHelp()
{
- KToolInvocation::invokeHelp("rs_phrases", QLatin1String("kalzium"));
+ KHelpClient::invokeHelp("rs_phrases", QLatin1String("kalzium"));
}
void RSDialog::invalidPhaseString()
@@ -321,4 +320,3 @@ void RSDialog::invalidPhaseString()
KMessageBox::error(0, i18n("At least one of the specified phrases is invalid."));
}
-#include "rsdialog.moc"
diff --git a/src/search.cpp b/src/search.cpp
index 7ff6464..b470ed1 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -94,4 +94,3 @@ void Search::resetSearch()
emit searchReset();
}
-#include "search.moc"
diff --git a/src/spectrumwidget.cpp b/src/spectrumwidget.cpp
index 5030a23..63aaaf6 100644
--- a/src/spectrumwidget.cpp
+++ b/src/spectrumwidget.cpp
@@ -149,7 +149,7 @@ QColor SpectrumWidget::wavelengthToRGB(double wavelength)
double blue = 0.0, green = 0.0, red = 0.0, factor = 0.0;
// wavelengthTo RGB function works with nanometers.
- wavelength = KUnitConversion::Value(wavelength, Prefs::spectrumWavelengthUnit())
+ wavelength = KUnitConversion::Value(wavelength, KUnitConversion::UnitId(Prefs::spectrumWavelengthUnit()))
.convertTo(KUnitConversion::Nanometer).number();
int wavelength_ = (int)floor(wavelength);