source: src-qt4/EasyPBI/backend.cpp @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 17 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#include "backend.h"
2
3QIcon Backend::icon(QString icon){
4  icon = icon.toLower();
5  //Qt embedded resources (http://www.qtcentre.org/wiki/index.php?title=Embedded_resources)
6  QString iconPath = ":/trolltech/styles/commonstyle/images/";
7  if(icon == "new"){ iconPath.append("newdirectory-128.png"); }
8  else if(icon=="load"){ iconPath.append("diropen-128.png"); }
9  else if(icon=="refresh"){ iconPath.append("refresh-32.png"); }
10  else if(icon=="delete"){ iconPath.append("standardbutton-delete-128.png"); }
11  else if(icon=="left"){ iconPath.append("left-128.png"); }
12  else if(icon=="right"){ iconPath.append("right-128.png"); }
13  else if(icon=="up"){ iconPath.append("up-128.png"); }
14  else if(icon=="down"){ iconPath.append("down-128.png"); }
15  else if(icon=="save"){ iconPath.append("standardbutton-save-32.png"); }
16  else if(icon=="help"){ iconPath.append("standardbutton-help-32.png"); }
17  else if(icon=="open"){ iconPath.append("standardbutton-open-32.png"); }
18  else if(icon=="close"){ iconPath.append("standardbutton-close-32.png"); }
19  else if(icon=="file"){ iconPath.append("file-32.png"); }
20  else if(icon=="trash"){ iconPath.append("trash-32.png"); }
21  else if(icon=="clear"){ iconPath.append("standardbutton-clear-128.png"); }
22  else if(icon=="start"){ iconPath.append("media-play-32.png"); }
23  else if(icon=="stop"){ iconPath.append("media-stop-32.png"); }
24  //EasyPBI embedded resources (EasyPBI.qrc)
25  else if(icon=="easypbi"){ iconPath = ":/png/icons/EasyPBIicon.png"; }
26  else if(icon=="freebsd"){ iconPath = ":/png/icons/freebsd.png"; }
27  else if(icon=="pcbsd"){iconPath = ":/png/icons/pcbsd.png"; }
28  else if(icon=="config"){iconPath = ":/png/icons/config.png"; }
29  //onebit iconset icons (http://www.iconfinder.com/search/?q=iconset%3Aonebit)
30  else if(icon=="plus"){iconPath = ":/png/icons/plus.png"; }
31  else if(icon=="minus"){iconPath = ":/png/icons/minus.png"; }
32  else{ iconPath.clear(); }
33       
34  return QIcon(iconPath);
35}
Note: See TracBrowser for help on using the repository browser.