summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Chowdhury <rahulc93@gmail.com>2015-09-10 14:42:06 (GMT)
committerRahul Chowdhury <rahulc93@gmail.com>2015-09-10 14:42:06 (GMT)
commit9c08b2f145ae5df85c5e4581774fbda2c8573285 (patch)
tree0dbe6aa734172f0539dd8910613d1071e39c4975
parent8d71f707c393ea2dc6604d9b0789c67039646e18 (diff)
Fix QIcon port
-rw-r--r--compoundviewer/CMakeLists.txt2
-rw-r--r--src/detailinfodlg.cpp6
-rw-r--r--src/gradientwidget_impl.cpp6
-rw-r--r--src/kalzium.cpp26
4 files changed, 20 insertions, 20 deletions
diff --git a/compoundviewer/CMakeLists.txt b/compoundviewer/CMakeLists.txt
index 8d7aa36..58ac2b4 100644
--- a/compoundviewer/CMakeLists.txt
+++ b/compoundviewer/CMakeLists.txt
@@ -11,7 +11,7 @@ set(compoundviewer_SRCS
add_library(compoundviewer ${compoundviewer_SRCS})
-target_link_libraries(compoundviewer avogadro
+target_link_libraries(compoundviewer ${AvogadroLibs_LIBRARY_DIR}/libavogadro.so
${OPENBABEL2_LIBRARIES}
KF5::I18n
KF5::WidgetsAddons
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
index e6c60d1..232adfa 100644
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -119,7 +119,7 @@ KHTMLPart* DetailedInfoDlg::addHTMLTab(const QString& title, const QString& icon
QWidget* frame = new QWidget(this);
KPageWidgetItem *item = addPage(frame, title);
item->setHeader(icontext);
- item->setIcon(QIcon(iconname));
+ item->setIcon(QIcon::fromTheme(iconname));
QVBoxLayout *layout = new QVBoxLayout(frame);
layout->setMargin(0);
@@ -467,7 +467,7 @@ void DetailedInfoDlg::createContent()
QWidget *m_pModelTab = new QWidget(this);
item = addPage(m_pModelTab, i18n("Atom Model"));
item->setHeader(i18n("Atom Model"));
- item->setIcon(QIcon("orbits"));
+ item->setIcon(QIcon::fromTheme("orbits"));
QVBoxLayout *modelLayout = new QVBoxLayout(m_pModelTab);
modelLayout->setMargin(0);
wOrbits = new OrbitsWidget(m_pModelTab);
@@ -482,7 +482,7 @@ void DetailedInfoDlg::createContent()
QWidget *m_pSpectrumTab = new QWidget(this);
item = addPage(m_pSpectrumTab, i18n("Spectrum"));
item->setHeader(i18n("Spectrum"));
- item->setIcon(QIcon("spectrum"));
+ item->setIcon(QIcon::fromTheme("spectrum"));
QVBoxLayout *spectrumLayout = new QVBoxLayout(m_pSpectrumTab);
spectrumLayout->setMargin(0);
m_spectrumStack = new QStackedWidget(m_pSpectrumTab);
diff --git a/src/gradientwidget_impl.cpp b/src/gradientwidget_impl.cpp
index d05a02a..20bb977 100644
--- a/src/gradientwidget_impl.cpp
+++ b/src/gradientwidget_impl.cpp
@@ -42,7 +42,7 @@ GradientWidgetImpl::GradientWidgetImpl(QWidget *parent) : QWidget(parent), m_pla
connect(Play, SIGNAL(clicked()), this, SLOT(play()));
connect(m_timer, SIGNAL(timeout()), this, SLOT(tick()));
- Play->setIcon(QIcon("media-playback-start"));
+ Play->setIcon(QIcon::fromTheme("media-playback-start"));
}
GradientWidgetImpl::~GradientWidgetImpl()
@@ -215,14 +215,14 @@ void GradientWidgetImpl::play(void)
m_timer->start(200);
m_play = true; //start playing
- Play->setIcon(QIcon("media-playback-pause"));
+ Play->setIcon(QIcon::fromTheme("media-playback-pause"));
}
void GradientWidgetImpl::stop(void)
{
//Currently playing, stop the timer.
m_timer -> stop();
- Play->setIcon(QIcon("media-playback-start"));
+ Play->setIcon(QIcon::fromTheme("media-playback-start"));
m_play = false; //Stop
}
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
index 840df0d..bfe8799 100644
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -174,35 +174,35 @@ void Kalzium::setupActions()
// tools actions
m_pPlotAction = actionCollection()->addAction("tools_plotdata");
m_pPlotAction->setText(i18n("&Plot Data..."));
- m_pPlotAction->setIcon(QIcon("plot"));
+ m_pPlotAction->setIcon(QIcon::fromTheme("plot"));
connect(m_pPlotAction, SIGNAL(triggered()), this, SLOT(slotPlotData()));
// calculator actions
m_pcalculator = actionCollection()->addAction("tools_calculate");
m_pcalculator->setText(i18n("Perform &Calculations..."));
- m_pcalculator->setIcon(QIcon("calculate"));
+ m_pcalculator->setIcon(QIcon::fromTheme("calculate"));
m_pcalculator->setWhatsThis(i18nc("WhatsThis Help", "This is the calculator, it performs basic chemical calculations."));
connect(m_pcalculator, SIGNAL(triggered()), this, SLOT(showCalculator()));
m_pIsotopeTableAction= actionCollection()->addAction("tools_isotopetable");
m_pIsotopeTableAction->setText(i18n("&Isotope Table..."));
- m_pIsotopeTableAction->setIcon(QIcon("isotopemap"));
+ m_pIsotopeTableAction->setIcon(QIcon::fromTheme("isotopemap"));
m_pIsotopeTableAction->setWhatsThis(i18nc("WhatsThis Help", "This table shows all of the known isotopes of the chemical elements."));
connect(m_pIsotopeTableAction, SIGNAL(triggered()), this, SLOT(slotIsotopeTable()));
m_pGlossaryAction = actionCollection()->addAction("tools_glossary");
m_pGlossaryAction->setText(i18n("&Glossary..."));
- m_pGlossaryAction->setIcon(QIcon("glossary"));
+ m_pGlossaryAction->setIcon(QIcon::fromTheme("glossary"));
connect(m_pGlossaryAction, SIGNAL(triggered()), this, SLOT(slotGlossary()));
m_pRSAction = actionCollection()->addAction("tools_rs");
m_pRSAction->setText(i18n("&R/S Phrases..."));
- m_pRSAction->setIcon(QIcon("kalzium_rs"));
+ m_pRSAction->setIcon(QIcon::fromTheme("kalzium_rs"));
connect(m_pRSAction, SIGNAL(triggered()), this, SLOT(slotRS()));
m_pOBConverterAction = actionCollection()->addAction("tools_obconverter");
m_pOBConverterAction->setText(i18n("Convert chemical files..."));
- m_pOBConverterAction->setIcon(QIcon("edit-copy"));
+ m_pOBConverterAction->setIcon(QIcon::fromTheme("edit-copy"));
m_pOBConverterAction->setWhatsThis(i18nc("WhatsThis Help", "With this tool, you can convert files containing chemical data between various file formats."));
connect(m_pOBConverterAction, SIGNAL(triggered()), this, SLOT(slotOBConverter()));
#ifndef HAVE_OPENBABEL2
@@ -211,7 +211,7 @@ void Kalzium::setupActions()
m_pMoleculesviewer = actionCollection()->addAction("tools_moleculeviewer");
m_pMoleculesviewer->setText(i18n("Molecular Editor..."));
- m_pMoleculesviewer->setIcon(QIcon("kalzium_molviewer"));
+ m_pMoleculesviewer->setIcon(QIcon::fromTheme("kalzium_molviewer"));
m_pMoleculesviewer->setWhatsThis(i18nc("WhatsThis Help", "This tool allows you to view and edit 3D molecular structures."));
connect(m_pMoleculesviewer, SIGNAL(triggered()), this, SLOT(slotMoleculeviewer()));
#if !defined(HAVE_OPENBABEL2) || !defined(HAVE_EIGEN) || !defined(HAVE_AVOGADRO)
@@ -220,7 +220,7 @@ void Kalzium::setupActions()
m_pTables = actionCollection()->addAction("tools_tables");
m_pTables->setText(i18n("&Tables..."));
- m_pTables->setIcon(QIcon("kalzium_tables"));
+ m_pTables->setIcon(QIcon::fromTheme("kalzium_tables"));
m_pTables->setWhatsThis(i18nc("WhatsThis Help", "This will open a dialog with listings of symbols and numbers related to chemistry."));
connect(m_pTables, SIGNAL(triggered()), this, SLOT(slotTables()));
@@ -228,17 +228,17 @@ void Kalzium::setupActions()
// other period view options
m_pLegendAction = m_legendDock->toggleViewAction();
actionCollection()->addAction("view_legend", m_pLegendAction);
- m_pLegendAction->setIcon(QIcon("legend"));
+ m_pLegendAction->setIcon(QIcon::fromTheme("legend"));
m_pLegendAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide the legend for the periodic table."));
m_SidebarAction = m_dockWin->toggleViewAction();
actionCollection()->addAction("view_sidebar", m_SidebarAction);
- m_SidebarAction->setIcon(QIcon("sidebar"));
+ m_SidebarAction->setIcon(QIcon::fromTheme("sidebar"));
m_SidebarAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide a sidebar with additional information and a set of tools."));
m_SidebarAction = m_tableDock->toggleViewAction();
actionCollection()->addAction("view_tablebar", m_SidebarAction);
- m_SidebarAction->setIcon(QIcon("kalzium_tables"));
+ m_SidebarAction->setIcon(QIcon::fromTheme("kalzium_tables"));
m_SidebarAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide a sidebar with additional information about the table."));
// the standard actions
@@ -301,7 +301,7 @@ void Kalzium::setupSidebars()
m_detailWidget->setObjectName("DetailedGraphicalOverview");
m_detailWidget->setMinimumSize(200, m_detailWidget->minimumSize().height());
- m_toolbox->addItem(m_detailWidget, QIcon("overview"), i18n("Overview"));
+ m_toolbox->addItem(m_detailWidget, QIcon::fromTheme("overview"), i18n("Overview"));
m_gradientWidget = new GradientWidgetImpl(m_toolbox);
m_gradientWidget->setObjectName("viewtWidget");
@@ -313,7 +313,7 @@ void Kalzium::setupSidebars()
connect(m_gradientWidget->gradient_combo, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotSwitchtoLookGradient(int)));
- m_toolbox->addItem(m_gradientWidget, QIcon("statematter"), i18n("View"));
+ m_toolbox->addItem(m_gradientWidget, QIcon::fromTheme("statematter"), i18n("View"));
addDockWidget(Qt::LeftDockWidgetArea, m_dockWin);
addDockWidget(Qt::BottomDockWidgetArea, m_tableDock, Qt::Horizontal);