File indexing completed on 2025-06-29 04:10:00
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2016 C. Barth Netterfield 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 #include "geticon.h" 0013 0014 #include <QIcon> 0015 #include <QFile> 0016 #include <QDebug> 0017 0018 QIcon KstGetIcon(QString icon_name) { QString svg_name = ":svg_icons/"+icon_name+".svgz"; 0019 if (QFile::exists(svg_name)) { 0020 return QIcon(svg_name); 0021 } else { 0022 QString png_name = ":"+icon_name+".png"; 0023 return QIcon(png_name); 0024 } 0025 }