1,315 changes: 0 additions & 1,315 deletions src/images/svg_icons/application-x-kst.svg

This file was deleted.

Binary file added src/images/svg_icons/application-x-kst.svgz
Binary file not shown.
230 changes: 0 additions & 230 deletions src/images/svg_icons/arrow.svg

This file was deleted.

1,100 changes: 0 additions & 1,100 deletions src/images/svg_icons/changefile.svg

This file was deleted.

1,258 changes: 0 additions & 1,258 deletions src/images/svg_icons/changefile2.svg

This file was deleted.

Binary file added src/images/svg_icons/changefile2.svgz
Binary file not shown.
921 changes: 0 additions & 921 deletions src/images/svg_icons/changerange.svg

This file was deleted.

Binary file added src/images/svg_icons/code-class.svgz
Binary file not shown.
Binary file added src/images/svg_icons/configure.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/data-manager.svgz
Binary file not shown.
769 changes: 0 additions & 769 deletions src/images/svg_icons/data_manager.svg

This file was deleted.

Binary file added src/images/svg_icons/data_manager.svgz
Binary file not shown.
366 changes: 0 additions & 366 deletions src/images/svg_icons/data_wizard.svg

This file was deleted.

676 changes: 0 additions & 676 deletions src/images/svg_icons/datamode.svg

This file was deleted.

718 changes: 0 additions & 718 deletions src/images/svg_icons/datamode_old.svg

This file was deleted.

Binary file added src/images/svg_icons/dialog-information.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-close.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-open-recent.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-open.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-print.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-save-as.svgz
Binary file not shown.
Binary file added src/images/svg_icons/document-save.svgz
Binary file not shown.
Binary file added src/images/svg_icons/draw-bezier-curves.svgz
Binary file not shown.
Binary file added src/images/svg_icons/edit-redo.svgz
Binary file not shown.
Binary file added src/images/svg_icons/edit-undo.svgz
Binary file not shown.
472 changes: 0 additions & 472 deletions src/images/svg_icons/edit_equation.svg

This file was deleted.

Binary file added src/images/svg_icons/edit_equation.svgz
Binary file not shown.
570 changes: 0 additions & 570 deletions src/images/svg_icons/edit_matrix.svg

This file was deleted.

498 changes: 0 additions & 498 deletions src/images/svg_icons/edit_matrix2.svg

This file was deleted.

470 changes: 0 additions & 470 deletions src/images/svg_icons/edit_scalar.svg

This file was deleted.

469 changes: 0 additions & 469 deletions src/images/svg_icons/edit_string.svg

This file was deleted.

462 changes: 0 additions & 462 deletions src/images/svg_icons/edit_vector.svg

This file was deleted.

607 changes: 0 additions & 607 deletions src/images/svg_icons/end.svg

This file was deleted.

Binary file removed src/images/svg_icons/image-x-generic.svgz
Binary file not shown.
Binary file added src/images/svg_icons/insert-image.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kbugbuster.svgz
Binary file not shown.
2,481 changes: 0 additions & 2,481 deletions src/images/svg_icons/kst.svg

This file was deleted.

Binary file added src/images/svg_icons/kst.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_bold.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_changefile.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_changenpts.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_datamode.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_differentiatecurves.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_downarrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_arrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_circle.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/kst_gfx_ellipse.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_label.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_line.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_rectangle.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_gfx_sharedaxisbox.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_italic.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_leftarrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_matrixedit.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_matrixnew.svgz
Binary file not shown.
1,315 changes: 0 additions & 1,315 deletions src/images/svg_icons/kst_mime.svg

This file was deleted.

Binary file added src/images/svg_icons/kst_mime.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_newplot.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_reload.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_rightarrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_scalaredit.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_scalarnew.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_stringedit.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_stringnew.svgz
Binary file not shown.
1,551 changes: 0 additions & 1,551 deletions src/images/svg_icons/kst_tiny.svg

This file was deleted.

Binary file added src/images/svg_icons/kst_tiny.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_uparrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_vectoredit.svgz
Binary file not shown.
Binary file added src/images/svg_icons/kst_vectornew.svgz
Binary file not shown.
980 changes: 0 additions & 980 deletions src/images/svg_icons/layoutmode.svg

This file was deleted.

Binary file added src/images/svg_icons/layoutmode.svgz
Binary file not shown.
395 changes: 0 additions & 395 deletions src/images/svg_icons/lr_arrow.svg

This file was deleted.

2,856 changes: 0 additions & 2,856 deletions src/images/svg_icons/magnifying_glass.svg

This file was deleted.

Binary file added src/images/svg_icons/magnifying_glass.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/new-log-event.svgz
Binary file not shown.
481 changes: 0 additions & 481 deletions src/images/svg_icons/new_curve.svg

This file was deleted.

Binary file added src/images/svg_icons/new_curve.svgz
Binary file not shown.
477 changes: 0 additions & 477 deletions src/images/svg_icons/new_curve2.svg

This file was deleted.

Binary file added src/images/svg_icons/new_curve2.svgz
Binary file not shown.
456 changes: 0 additions & 456 deletions src/images/svg_icons/new_equation.svg

This file was deleted.

Binary file added src/images/svg_icons/new_equation.svgz
Binary file not shown.
550 changes: 0 additions & 550 deletions src/images/svg_icons/new_matrix.svg
Diff not rendered.
454 changes: 0 additions & 454 deletions src/images/svg_icons/new_scalar.svg
Diff not rendered.
453 changes: 0 additions & 453 deletions src/images/svg_icons/new_string.svg
Diff not rendered.
450 changes: 0 additions & 450 deletions src/images/svg_icons/new_vector.svg
Diff not rendered.
570 changes: 0 additions & 570 deletions src/images/svg_icons/newplot.svg
Diff not rendered.
Binary file modified src/images/svg_icons/page-previous.svgz
Binary file not shown.
676 changes: 0 additions & 676 deletions src/images/svg_icons/plainplot.svg
Diff not rendered.
Binary file added src/images/svg_icons/plainplot.svgz
Binary file not shown.
800 changes: 0 additions & 800 deletions src/images/svg_icons/plotdialog.svg
Diff not rendered.
Binary file added src/images/svg_icons/plotdialog.svgz
Binary file not shown.
Binary file added src/images/svg_icons/tab-close.svgz
Binary file not shown.
Binary file added src/images/svg_icons/tab-new.svgz
Binary file not shown.
Binary file added src/images/svg_icons/text-x-log.svgz
Binary file not shown.
2,876 changes: 0 additions & 2,876 deletions src/images/svg_icons/tied-zoom.svg
Diff not rendered.
Binary file added src/images/svg_icons/tied-zoom.svgz
Binary file not shown.
316 changes: 0 additions & 316 deletions src/images/svg_icons/tiedzoom.svg
Diff not rendered.
Binary file added src/images/svg_icons/tiedzoom.svgz
Binary file not shown.
Binary file added src/images/svg_icons/tools-wizard.svgz
Binary file not shown.
Binary file added src/images/svg_icons/transform-move.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/arrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/end.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/lr_arrow.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/zoomx.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/zoomxy.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/zoomy.svgz
Binary file not shown.
Binary file added src/images/svg_icons/unused/zoomzy.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/x-zoom.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/xy-zoom.svgz
Binary file not shown.
Binary file modified src/images/svg_icons/y-zoom.svgz
Binary file not shown.
921 changes: 0 additions & 921 deletions src/images/svg_icons/zoomx.svg
Diff not rendered.
965 changes: 0 additions & 965 deletions src/images/svg_icons/zoomxy.svg
Diff not rendered.
951 changes: 0 additions & 951 deletions src/images/svg_icons/zoomy.svg
Diff not rendered.
965 changes: 0 additions & 965 deletions src/images/svg_icons/zoomzy.svg
Diff not rendered.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added src/images/unused/kst_newplot.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
5 changes: 5 additions & 0 deletions src/kst/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ int main(int argc, char *argv[]) {
// qDebug() << "Dir = " + app.applicationDirPath() + "/../share/kst" + localeSuffix;
app.installTranslator(&kstDirectoryTranslator);

#ifdef QT5
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif


app.initMainWindow();
if (app.mainWindow()->initFromCommandLine()) {
app.mainWindow()->show();
Expand Down
3 changes: 3 additions & 0 deletions src/libkst/editablematrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

#include "debug.h"
#include <qbytearray.h>

#include <QXmlStreamWriter>


namespace Kst {

const QString EditableMatrix::staticTypeString = "Editable Matrix";
Expand Down Expand Up @@ -59,6 +61,7 @@ void EditableMatrix::save(QXmlStreamWriter &xml) {
xml.writeAttribute("ystep", QString::number(yStepSize()));
xml.writeTextElement("data", qCompress(qba).toBase64());
xml.writeEndElement();

}


Expand Down
1 change: 1 addition & 0 deletions src/libkst/editablevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// qCompress the bytearray
#include <QXmlStreamWriter>
#include <QFile>
//#include <QDataStream>

#include "debug.h"
namespace Kst {
Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
kst_init(${kst_binary_name} app)

if(kst_qt5)
kst_files_ignore(svgitem)
add_definitions(-DKST_NO_SVG)
#kst_files_ignore(svgitem)
#add_definitions(-DKST_NO_SVG)
#add_definitions(-DKST_NO_PRINTER)
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
Expand Down
9 changes: 5 additions & 4 deletions src/libkstapp/contenttab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "objectstore.h"
#include "relation.h"
#include "dialoglauncher.h"
#include "geticon.h"

#include <qdebug.h>

Expand All @@ -25,10 +26,10 @@ ContentTab::ContentTab(QWidget *parent, ObjectStore *store)

setupUi(this);

_up->setIcon(QPixmap(":kst_uparrow.png"));
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setIcon(KstGetIcon("kst_uparrow"));
_down->setIcon(KstGetIcon("kst_downarrow"));
_add->setIcon(KstGetIcon("kst_rightarrow"));
_remove->setIcon(KstGetIcon("kst_leftarrow"));
_up->setToolTip(tr("Raise in plot order: Alt+Up"));
_down->setToolTip(tr("Lower in plot order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
Expand Down
9 changes: 5 additions & 4 deletions src/libkstapp/datawizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "sharedaxisboxitem.h"
#include "boxitem.h"
#include "updateserver.h"
#include "geticon.h"


namespace Kst {
Expand Down Expand Up @@ -184,10 +185,10 @@ DataWizardPageVectors::DataWizardPageVectors(QWidget *parent)
: QWizardPage(parent) {
setupUi(this);

_up->setIcon(QPixmap(":kst_uparrow.png"));
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setIcon(KstGetIcon("kst_uparrow"));
_down->setIcon(KstGetIcon("kst_downarrow"));
_add->setIcon(KstGetIcon("kst_rightarrow"));
_remove->setIcon(KstGetIcon("kst_leftarrow"));
_up->setToolTip(tr("Raise in plot order: Alt+Up"));
_down->setToolTip(tr("Lower in plot order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
Expand Down
9 changes: 5 additions & 4 deletions src/libkstapp/differentiatecurvesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "linestyle.h"
#include "curve.h"
#include "colorsequence.h"
#include "geticon.h"

#include "objectstore.h"
#include "mainwindow.h"
Expand Down Expand Up @@ -48,10 +49,10 @@ DifferentiateCurvesDialog::DifferentiateCurvesDialog(QWidget *parent)
connect(_selectedListBox, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));

// Use the standard icons
_up->setIcon(QPixmap(":kst_uparrow.png"));
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setIcon(KstGetIcon("kst_uparrow"));
_down->setIcon(KstGetIcon("kst_downarrow"));
_add->setIcon(KstGetIcon("kst_rightarrow"));
_remove->setIcon(KstGetIcon("kst_leftarrow"));
_up->setToolTip(tr("Move the selected property up the priority list"));
_down->setToolTip(tr("Move the selected property down the priority list"));
_add->setToolTip(tr("Add the selected property to the list of properties to cycle through"));
Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/labelcreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "objectstore.h"
#include "mainwindow.h"
#include "document.h"
#include "geticon.h"

#include "applicationsettings.h"
#include "dialogdefaults.h"
Expand All @@ -30,10 +31,10 @@ LabelCreator::LabelCreator(QWidget *parent)
setWindowTitle(tr("Create Label Dialog"));
_bold->setFixedWidth(32);
_bold->setFixedHeight(32);
_bold->setIcon(QPixmap(":kst_bold.png"));
_bold->setIcon(KstGetIcon("kst_bold"));
_italic->setFixedWidth(32);
_italic->setFixedHeight(32);
_italic->setIcon(QPixmap(":kst_italic.png"));
_italic->setIcon(KstGetIcon("kst_italic"));
_labelColor->setFixedWidth(32);
_labelColor->setFixedHeight(32);

Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/labelpropertiestab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "objectstore.h"
#include "mainwindow.h"
#include "document.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -41,10 +42,10 @@ LabelPropertiesTab::LabelPropertiesTab(QWidget *parent)

_bold->setFixedWidth(32);
_bold->setFixedHeight(32);
_bold->setIcon(QPixmap(":kst_bold.png"));
_bold->setIcon(KstGetIcon("kst_bold"));
_italic->setFixedWidth(32);
_italic->setFixedHeight(32);
_italic->setIcon(QPixmap(":kst_italic.png"));
_italic->setIcon(KstGetIcon("kst_italic"));
_labelColor->setFixedWidth(32);
_labelColor->setFixedHeight(32);

Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/labeltab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "objectstore.h"
#include "mainwindow.h"
#include "document.h"
#include "geticon.h"

#include "applicationsettings.h"

Expand All @@ -26,9 +27,9 @@ LabelTab::LabelTab(PlotItem* plotItem, QWidget *parent)

setupUi(this);

_globalLabelBold->setIcon(QPixmap(":kst_bold.png"));
_globalLabelBold->setIcon(KstGetIcon("kst_bold"));
_globalLabelBold->setFixedWidth(32);
_globalLabelItalic->setIcon(QPixmap(":kst_italic.png"));
_globalLabelItalic->setIcon(KstGetIcon("kst_italic"));
_globalLabelItalic->setFixedWidth(32);
_globalLabelColor->setFixedWidth(32);
_globalLabelColor->setFixedHeight(32);
Expand Down
13 changes: 7 additions & 6 deletions src/libkstapp/legendtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "legendtab.h"
#include "objectstore.h"
#include "geticon.h"

#include <qdebug.h>

Expand All @@ -24,21 +25,21 @@ LegendTab::LegendTab(QWidget *parent)

_single = true;

_up->setIcon(QPixmap(":kst_uparrow.png"));
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setIcon(KstGetIcon("kst_uparrow"));
_down->setIcon(KstGetIcon("kst_downarrow"));
_add->setIcon(KstGetIcon("kst_rightarrow"));
_remove->setIcon(KstGetIcon("kst_leftarrow"));
_up->setToolTip(tr("Raise in list order: Alt+Up"));
_down->setToolTip(tr("Lower in list order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
_remove->setToolTip(tr("Remove: Alt+r"));

_bold->setFixedWidth(32);
_bold->setFixedHeight(32);
_bold->setIcon(QPixmap(":kst_bold.png"));
_bold->setIcon(KstGetIcon("kst_bold"));
_italic->setFixedWidth(32);
_italic->setFixedHeight(32);
_italic->setIcon(QPixmap(":kst_italic.png"));
_italic->setIcon(KstGetIcon("kst_italic"));
_labelColor->setFixedWidth(32);
_labelColor->setFixedHeight(32);

Expand Down
96 changes: 49 additions & 47 deletions src/libkstapp/mainwindow.cpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/libkstapp/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class MainWindow : public QMainWindow
static void setWidgetFlags(QWidget*);
void updateRecentKstFiles(const QString& newfilename = QString());


public Q_SLOTS:
void showDataManager();
void showDebugDialog();
Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/overridelabeltab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
#include "objectstore.h"
#include "mainwindow.h"
#include "document.h"
#include "geticon.h"

namespace Kst {

OverrideLabelTab::OverrideLabelTab(QString title, QWidget *parent)
: DialogTab(parent), _fontDirty(false) {

setupUi(this);
_bold->setIcon(QPixmap(":kst_bold.png"));
_bold->setIcon(KstGetIcon("kst_bold"));
_bold->setFixedWidth(32);
_italic->setIcon(QPixmap(":kst_italic.png"));
_italic->setIcon(KstGetIcon("kst_italic"));
_italic->setFixedWidth(32);
_labelColor->setFixedWidth(32);
_labelColor->setFixedHeight(32);
Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/svgitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
#ifndef SVGITEM_H
#define SVGITEM_H


#include "viewitem.h"
#include "graphicsfactory.h"

class QSvgRenderer;
#include <QSvgRenderer>

namespace Kst {

Expand Down Expand Up @@ -55,7 +56,6 @@ class CreateSvgCommand : public CreateCommand
void createItem();
};


class SvgItemFactory : public GraphicsFactory {
public:
SvgItemFactory();
Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/themedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "ellipseitem.h"
#include "arrowitem.h"
#include "labelitem.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -54,10 +55,10 @@ ThemeDialog::ThemeDialog(QWidget *parent) : QDialog(parent) {

_bold->setFixedWidth(32);
_bold->setFixedHeight(32);
_bold->setIcon(QPixmap(":kst_bold.png"));
_bold->setIcon(KstGetIcon("kst_bold"));
_italic->setFixedWidth(32);
_italic->setFixedHeight(32);
_italic->setIcon(QPixmap(":kst_italic.png"));
_italic->setIcon(KstGetIcon("kst_italic"));
_labelColor->setFixedWidth(32);
_labelColor->setFixedHeight(32);

Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/viewvectordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "vectormodel.h"
#include "editmultiplewidget.h"
#include "updateserver.h"
#include "geticon.h"

#include <datacollection.h>
#include <objectstore.h>
Expand Down Expand Up @@ -62,12 +63,12 @@ ViewVectorDialog::ViewVectorDialog(QWidget *parent, Document *doc)
}
// Add/remove buttons
_addButton = new QPushButton();
_addButton->setIcon(QPixmap(":kst_rightarrow.png"));
_addButton->setIcon(KstGetIcon("kst_rightarrow"));
_addButton->setShortcut(tr("Alt+S"));
_addButton->setToolTip(tr("View selected vector(s)"));
_addButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
_removeButton = new QPushButton();
_removeButton->setIcon(QPixmap(":kst_leftarrow.png"));
_removeButton->setIcon(KstGetIcon("kst_leftarrow"));
_removeButton->setShortcut(tr("Alt+R"));
_removeButton->setToolTip(tr("Remove selected vector(s) from view"));
_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/datasourceselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "datasourceselector.h"

#include "datasourceselectordialog.h"
#include "geticon.h"

#include <QStyle>
#include <QLineEdit>
Expand Down Expand Up @@ -55,7 +56,7 @@ void DataSourceSelector::setup() {
setLayout(layout);

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
_fileButton->setIcon(QPixmap(":kst_changefile.png"));
_fileButton->setIcon(KstGetIcon("kst_changefile"));
_fileButton->setFixedSize(size + 8, size + 8);

setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/filerequester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
***************************************************************************/

#include "filerequester.h"
#include "geticon.h"

#include <QStyle>
#include <QLineEdit>
Expand Down Expand Up @@ -45,7 +46,7 @@ void FileRequester::setup() {
setLayout(layout);

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
_fileButton->setIcon(QPixmap(":kst_changefile.png"));
_fileButton->setIcon(KstGetIcon("kst_changefile"));
_fileButton->setFixedSize(size + 8, size + 8);

setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
Expand Down
29 changes: 29 additions & 0 deletions src/widgets/geticon.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/***************************************************************************
* *
* copyright : (C) 2016 C. Barth Netterfield
* netterfield@astro.utoronto.ca *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <QIcon>
#include <QFile>
#include <QDebug>

QIcon KstGetIcon(QString icon_name) {
static bool has_svg = true;

QString svg_name = ":svg_icons/"+icon_name+".svgz";
if (QFile::exists(svg_name)) {
//qDebug() << svg_name;
return QIcon(svg_name);
} else {
QString png_name = ":"+icon_name+".png";
qDebug() << png_name;
return QIcon(png_name);
}
}

7 changes: 7 additions & 0 deletions src/widgets/geticon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef GETICON_H
#define GETICON_H

QIcon KstGetIcon(QString icon_name);

#endif // GETICON_H

5 changes: 3 additions & 2 deletions src/widgets/matrixselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "dialoglauncher.h"
#include "datacollection.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -26,8 +27,8 @@ MatrixSelector::MatrixSelector(QWidget *parent, ObjectStore *store)

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);

_newMatrix->setIcon(QPixmap(":kst_matrixnew.png"));
_editMatrix->setIcon(QPixmap(":kst_matrixedit.png"));
_newMatrix->setIcon(KstGetIcon("kst_matrixnew"));
_editMatrix->setIcon(KstGetIcon("kst_matrixedit"));

_newMatrix->setFixedSize(size + 8, size + 8);
_editMatrix->setFixedSize(size + 8, size + 8);
Expand Down
5 changes: 3 additions & 2 deletions src/widgets/scalarselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "updateserver.h"

#include "enodes.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -29,8 +30,8 @@ ScalarSelector::ScalarSelector(QWidget *parent, ObjectStore *store)

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);

_newScalar->setIcon(QPixmap(":kst_scalarnew.png"));
_editScalar->setIcon(QPixmap(":kst_scalaredit.png"));
_newScalar->setIcon(KstGetIcon("kst_scalarnew"));
_editScalar->setIcon(KstGetIcon("kst_scalaredit"));

_newScalar->setFixedSize(size + 8, size + 8);
_editScalar->setFixedSize(size + 8, size + 8);
Expand Down
5 changes: 3 additions & 2 deletions src/widgets/stringselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "dialoglauncher.h"
#include "objectstore.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -24,8 +25,8 @@ StringSelector::StringSelector(QWidget *parent, ObjectStore *store)

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);

_newString->setIcon(QPixmap(":kst_stringnew.png"));
_editString->setIcon(QPixmap(":kst_stringedit.png"));
_newString->setIcon(KstGetIcon("kst_stringnew"));
_editString->setIcon(KstGetIcon("kst_stringedit"));

_newString->setFixedSize(size + 8, size + 8);
_editString->setFixedSize(size + 8, size + 8);
Expand Down
5 changes: 3 additions & 2 deletions src/widgets/vectorselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "dialogdefaults.h"
#include "curve.h"
#include "updateserver.h"
#include "geticon.h"

namespace Kst {

Expand All @@ -28,8 +29,8 @@ VectorSelector::VectorSelector(QWidget *parent, ObjectStore *store)

int size = style()->pixelMetric(QStyle::PM_SmallIconSize);

_newVector->setIcon(QPixmap(":kst_vectornew.png"));
_editVector->setIcon(QPixmap(":kst_vectoredit.png"));
_newVector->setIcon(KstGetIcon("kst_vectornew"));
_editVector->setIcon(KstGetIcon("kst_vectoredit"));

_newVector->setFixedSize(size + 8, size + 8);
_editVector->setFixedSize(size + 8, size + 8);
Expand Down