Commit c5690571 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Using kstars.qrc resource file to store important icons, ui, and KNewStuff3...

Using kstars.qrc resource file to store important icons, ui, and KNewStuff3 files. In case the icon is not available in the current theme, we fall back to the icons inside the QRC file. All previous icons are deleted.
parent 365df263
......@@ -647,6 +647,8 @@ ecm_add_app_icon(KSTARS_APP_SRCS ICONS
${CMAKE_CURRENT_SOURCE_DIR}/icons/128-apps-kstars.png
)
qt5_add_resources(KSTARS_APP_SRCS data/kstars.qrc)
add_executable(kstars ${KSTARS_APP_SRCS})
target_link_libraries(kstars KStarsLib)
......@@ -655,7 +657,7 @@ install(TARGETS kstars ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install(PROGRAMS org.kde.kstars.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kstars.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kstars.knsrc DESTINATION ${KDE_INSTALL_CONFDIR})
install(FILES kstarsui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
install(FILES fitsviewer.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
#install(FILES kstars.knsrc DESTINATION ${KDE_INSTALL_CONFDIR})
#install(FILES kstarsui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
#install(FILES fitsviewer.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
install(FILES kstars.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
[KNewStuff3]
ProvidersUrl=http://edu.kde.org/kstars/downloads/providers.xml
ProvidersUrl=https://edu.kde.org/kstars/downloads/providers.xml
TargetDir=kstars
Uncompress=true
<RCC>
<qresource prefix="/icons">
<file>catalog.png</file>
<file>cbound.png</file>
<file>clines.png</file>
<file>cnames.png</file>
<file>colors.png</file>
<file>constellationart.png</file>
<file>deepsky.png</file>
<file>ekos_align.png</file>
<file>ekos_ccd.png</file>
<file>ekos_focus.png</file>
<file>ekos_guide.png</file>
<file>ekos_mount.png</file>
<file>ekos_scheduler.png</file>
<file>ekos_setup.png</file>
<file>ekos.png</file>
<file>fitsviewer.png</file>
<file>flag.png</file>
<file>fov.png</file>
<file>grid.png</file>
<file>guides.png</file>
<file>hgrid.png</file>
<file>horizon.png</file>
<file>indi.png</file>
<file>kstars.png</file>
<file>mw.png</file>
<file>planets.png</file>
<file>satellites.png</file>
<file>solarsystem.png</file>
<file>stars.png</file>
<file>supernovae.png</file>
<file>xplanet.png</file>
<file>advanced.png</file>
</qresource>
<qresource prefix="/kconfig">
<file>kstars.knsrc</file>
</qresource>
<qresource prefix="/kxmlgui5/kstars">
<file>kstarsui.rc</file>
<file>fitsviewerui.rc</file>
</qresource>
</RCC>
......@@ -50,7 +50,7 @@ EkosManager::EkosManager()
new EkosAdaptor(this);
QDBusConnection::sessionBus().registerObject("/KStars/Ekos", this);
setWindowIcon(QIcon::fromTheme("kstars_ekos"));
setWindowIcon(QIcon::fromTheme("kstars_ekos", QIcon(":/icons/ekos.png")));
nDevices=0;
nConnectedDevices=0;
......@@ -113,12 +113,12 @@ EkosManager::EkosManager()
loadProfiles();
// Setup Tab
toolsWidget->tabBar()->setTabIcon(0, QIcon::fromTheme("kstars_ekos_setup"));
toolsWidget->tabBar()->setTabIcon(0, QIcon(":/icons/ekos_setup.png"));
toolsWidget->tabBar()->setTabToolTip(0, i18n("Setup"));
// Initialize Ekos Scheduler Module
schedulerProcess = new Ekos::Scheduler();
toolsWidget->addTab( schedulerProcess, QIcon::fromTheme("kstars_ekos_scheduler"), "");
toolsWidget->addTab( schedulerProcess, QIcon(":/icons/ekos_scheduler.png"), "");
toolsWidget->tabBar()->setTabToolTip(1, i18n("Scheduler"));
connect(schedulerProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1310,7 +1310,7 @@ void EkosManager::initCapture()
return;
captureProcess = new Ekos::Capture();
int index = toolsWidget->addTab( captureProcess, QIcon::fromTheme("kstars_ekos_ccd"), "");
int index = toolsWidget->addTab( captureProcess, QIcon(":/icons/ekos_ccd.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18nc("Charge-Coupled Device", "CCD"));
connect(captureProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1359,7 +1359,7 @@ void EkosManager::initAlign()
return;
alignProcess = new Ekos::Align();
int index = toolsWidget->addTab( alignProcess, QIcon::fromTheme("kstars_ekos_align"), "");
int index = toolsWidget->addTab( alignProcess, QIcon(":/icons/ekos_align.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Align"));
connect(alignProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1388,7 +1388,7 @@ void EkosManager::initFocus()
return;
focusProcess = new Ekos::Focus();
int index = toolsWidget->addTab( focusProcess, QIcon::fromTheme("kstars_ekos_focus"), "");
int index = toolsWidget->addTab( focusProcess, QIcon(":/icons/ekos_focus.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Focus"));
connect(focusProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1424,7 +1424,7 @@ void EkosManager::initMount()
return;
mountProcess = new Ekos::Mount();
int index = toolsWidget->addTab(mountProcess, QIcon::fromTheme("kstars_ekos_mount"), "");
int index = toolsWidget->addTab(mountProcess, QIcon(":/icons/ekos_mount.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Mount"));
connect(mountProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1450,7 +1450,7 @@ void EkosManager::initGuide()
if (managedDevices.contains(KSTARS_TELESCOPE) && managedDevices[KSTARS_TELESCOPE]->isConnected())
guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
int index = toolsWidget->addTab( guideProcess, QIcon::fromTheme("kstars_ekos_guide"), "");
int index = toolsWidget->addTab( guideProcess, QIcon(":/icons/ekos_guide.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Guide"));
connect(guideProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
}
......
......@@ -203,7 +203,7 @@ FITSViewer::FITSViewer (QWidget *parent)
connect(filterMapper, SIGNAL(mapped(int)), this, SLOT(applyFilter(int)));
/* Create GUI */
createGUI("fitsviewer.rc");
createGUI("fitsviewerui.rc");
setWindowTitle(i18n("KStars FITS Viewer"));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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