Commit f6c7e5f5 authored by Christoph Feck's avatar Christoph Feck
Browse files

Revert changes to wrong Qt classes

parent f73f5ea0
......@@ -29,10 +29,9 @@
#include <KConfig>
#include <KConfigWidgets/khelpclient.h>
#include <krun.h>
#include <QGlobal>
#include <KGlobal>
#include <QIcon>
#include <KPageDialog>
#include <QMessage>
#include <KUrl>
#include "psetables.h"
......@@ -58,10 +57,10 @@ DetailedInfoDlg::DetailedInfoDlg(int el, QWidget *parent) : KPageDialog(parent),
setButtonGuiItem(User2, KGuiItem(i18nc("Previous element", "Previous"),(layoutDirection() == Qt::LeftToRight) ? "arrow-left" : "arrow-right", i18n("Goes to the previous element")));
resize(820, 580);
*/
m_baseHtml = QGlobal::dirs()->findResourceDir("appdata", "data/") + "data/htmlview/";
m_baseHtml2 = QGlobal::dirs()->findResourceDir("appdata", "data/") + "data/hazardsymbols/";
m_baseHtml = KGlobal::dirs()->findResourceDir("appdata", "data/") + "data/htmlview/";
m_baseHtml2 = KGlobal::dirs()->findResourceDir("appdata", "data/") + "data/hazardsymbols/";
//X m_picsdir = QGlobal::dirs()->findResourceDir("appdata", "elempics/") + "elempics/";
//X m_picsdir = KGlobal::dirs()->findResourceDir("appdata", "elempics/") + "elempics/";
// creating the tabs but not the contents, as that will be done when setting the element
createContent();
......@@ -283,7 +282,7 @@ QString DetailedInfoDlg::getHtml(DATATYPE type)
}
case EXTRA:
{
QString language(QGlobal::locale()->languageCodeToName(QGlobal::locale()->language()));
QString language(KGlobal::locale()->languageCodeToName(KGlobal::locale()->language()));
//Wikipedia.org
// html.append ("<tr><td><img src=\"wiki.png\" alt=\"icon\"/></td><td>");
......@@ -306,7 +305,7 @@ QString DetailedInfoDlg::getHtml(DATATYPE type)
html.append ("<tr><td>");
html.append ("<a href=\"http://"); // http://
html.append ("www.webelements.com/");
if (QGlobal::locale()->language().split('_').at(0) == "en") {
if (KGlobal::locale()->language().split('_').at(0) == "en") {
html.append (m_element->dataAsString(ChemicalDataObject::name).toLower()); // hydrogen
}
html.append ("\" target=\"_blank\" >");
......@@ -558,7 +557,7 @@ QString DetailedInfoDlg::createWikiLink(QString link)
QString DetailedInfoDlg::createWikiLink(QString link, QString displayString)
{
QString html;
QString language(QGlobal::locale()->language());
QString language(KGlobal::locale()->language());
//Wikipedia.org
html.append ("<a href=\"http://"); // http://
......
......@@ -23,6 +23,7 @@
#include <QClipboard>
#include <kdebug.h>
#include <klocale.h>
#include "ui_equationview.h"
......
......@@ -16,7 +16,7 @@
#include <QTimer>
#include <kdebug.h>
#include <QLocale>
#include <KLocale>
#include <QIcon>
#include <element.h>
......
......@@ -51,7 +51,7 @@
#include <QToolBox>
#include <QKeyEvent>
#include <QRegExp>
#include <QStatusBar>
#include <KStatusBar>
#include <QMessageBox>
#include <kconfigdialog.h>
......@@ -557,7 +557,7 @@ void Kalzium::slotShowExportDialog()
void Kalzium::setupStatusBar()
{
QStatusBar *statusBar = new QStatusBar(this);
KStatusBar *statusBar = new KStatusBar(this);
setStatusBar(statusBar);
statusBar->insertItem("", 0, 0);
......@@ -571,7 +571,7 @@ void Kalzium::elementHover(int num)
{
// extractIconicInformationAboutElement(num);
Element *e = KalziumDataObject::instance()->element(num);
QStatusBar *statusBar = new QStatusBar(this);
KStatusBar *statusBar = new KStatusBar(this);
setStatusBar(statusBar);
statusBar->changeItem(i18nc("For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u",
e->dataAsString(ChemicalDataObject::name),
......@@ -585,7 +585,7 @@ void Kalzium::elementHover(int num)
void Kalzium::extractIconicInformationAboutElement(int elementNumber)
{
QString setname = "school";
QString pathname = kGlobal::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);
......
......@@ -32,8 +32,8 @@
#include <kdebug.h>
#include <QUrl>
#include <kstandarddirs.h>
#include <QPixmapCache>
#include <QGlobal>
#include <KPixmapCache>
#include <KGlobal>
#include <kunitconversion/converter.h>
struct StaticKalziumDataObject
......@@ -192,11 +192,11 @@ void KalziumDataObject::cleanup()
void KalziumDataObject::loadIconSet()
{
QPixmapCache cache("kalzium");
KPixmapCache cache("kalzium");
//FIXME in case we ever get more than one theme we need
//a settings-dialog where we can select the different iconsets...
const QString setname = "school";
const QString pathname = QGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
const QString pathname = KGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
for (int i = 0; i < m_numOfElements; ++i)
{
......
......@@ -18,9 +18,9 @@
***************************************************************************/
#include <kaboutdata.h>
#include <QCommandLineOption>
#include <QLocale>
#include <kaboutdata.h>
#include <KCmdLineArgs>
#include <KLocale>
#include <k4aboutdata.h>
#include <kapplication.h>
......@@ -46,8 +46,8 @@ int main(int argc, char **argv)
caml_startup(argv);
#endif
KAboutData about("kalzium", 0, ki18n("Kalzium"), version, ki18n(description),
KAboutData::License_GPL, ki18n("(C) 2002-2014 Carsten Niehaus"), KLocalizedString(), "http://edu.kde.org/kalzium");
K4AboutData about("kalzium", 0, ki18n("Kalzium"), version, ki18n(description),
K4AboutData::License_GPL, ki18n("(C) 2002-2014 Carsten Niehaus"), KLocalizedString(), "http://edu.kde.org/kalzium");
about.addAuthor(ki18n("Carsten Niehaus"), KLocalizedString(), "cniehaus@kde.org");
about.addCredit(ki18n("Pino Toscano"), ki18n("Large code contributions; resident guru helping the other developers"));
about.addCredit(ki18n("Benoit Jacob"), ki18n("Base work on the molecular viewer, mentored Marcus during his SoC"));
......@@ -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"));
QCommandLineParser::init(argc, argv, &about);
qCmdLineOptions options;
KCmdLineArgs::init(argc, argv, &about);
KCmdLineOptions options;
#if defined(HAVE_OPENBABEL2) && defined(HAVE_EIGEN) && defined(HAVE_AVOGADRO)
options.add("molecule <file>", ki18n("Open the given molecule file"));
#endif
QCommandLineParser::addCmdLineOptions(options);
KCmdLineArgs::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
QCommandLineParser *args = QCommandLineParser::parsedArgs();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
/// @todo do something with the command line args here
......
Supports Markdown
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