icon.cpp
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 #include "support.h"
15 #include "icon.h"
16 #include <QApplication>
17 #include <QPixmap>
18 #include <QStyle>
19 #include <QIcon>
20 
21 //#include "kame-24x24-png.c"
22 extern "C" const unsigned char icon_kame_24x24_png[1065];
23 
24 QPixmap *g_pIconKame24x24;
25 QPixmap *g_pIconKame;
26 QPixmap *g_pIconWarn;
27 QPixmap *g_pIconError;
28 QPixmap *g_pIconInfo;
29 QPixmap *g_pIconStop;
30 QPixmap *g_pIconClose;
31 QPixmap *g_pIconInterface;
32 QPixmap *g_pIconDriver;
33 QPixmap *g_pIconReader;
34 QPixmap *g_pIconScalar;
35 QPixmap *g_pIconGraph;
36 QPixmap *g_pIconScript;
37 QPixmap *g_pIconRoverT;
38 QPixmap *g_pIconLEDOn;
39 QPixmap *g_pIconLEDOff;
40 
41 void makeIcons()
42 {
43  g_pIconKame24x24 = new QPixmap;
44  g_pIconKame24x24->loadFromData( icon_kame_24x24_png, sizeof( icon_kame_24x24_png ), "PNG" );
45 
46  g_pIconKame = new QPixmap(":/icons/kame.png");
47 
48  g_pIconRoverT = new QPixmap(":/icons/rovert.png");
49 
50  g_pIconLEDOn = new QPixmap(":/icons/ledon.png");
51 
52  g_pIconLEDOff = new QPixmap(":/icons/ledoff.png");
53 
54  g_pIconInfo = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(48,48));
55 
56  g_pIconWarn = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(48,48));
57 
58  g_pIconError = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical).pixmap(48,48));
59 
60  g_pIconStop = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_BrowserStop).pixmap(48,48));
61 
62  g_pIconClose = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_TitleBarCloseButton).pixmap(48,48));
63 
64  g_pIconDriver = g_pIconKame;
65 
66  g_pIconInterface = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_ComputerIcon).pixmap(48,48));
67 
68  g_pIconReader = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_MediaPlay).pixmap(48,48));
69 
70  g_pIconScalar = new QPixmap(QApplication::style()->standardIcon(QStyle::SP_FileDialogDetailedView).pixmap(48,48));
71 
72  g_pIconGraph = new QPixmap(":/icons/graph.png");;
73 
74  g_pIconScript = new QPixmap(":/icons/ruby.png");
75 }

Generated for KAME4 by  doxygen 1.8.3