Debian Codegraph @

kysdk-qtwidgets/test/testIcon/widget.cpp

raw
1 #include "widget.h"
2 #include "kwidget.h"
3 #include "themeController.h"
4 #include <QHBoxLayout>
5 #include <QLabel>
6 #include <QPushButton>
7
8 // using namespace kdk;
9
10 Widget::Widget(QWidget *parent)
11 : QWidget(parent)
12 {
13 QHBoxLayout *layout = new QHBoxLayout(this);
14 QPushButton *btn = new QPushButton();
15 QIcon icon1 = QIcon::fromTheme("kylin-music");
16 QIcon icon2 = QIcon::fromTheme("kylin-video");
17 btn->setIcon(ThemeController::overlayIcons(icon1, icon2, 16, 16, 8, 8));
18 QLabel *label = new QLabel();
19 label->setPixmap(ThemeController::overlayPixmaps(icon2.pixmap(24, 24), icon1.pixmap(16, 16), 8, 8));
20 layout->addWidget(btn);
21 layout->addWidget(label);
22 }
23
24 Widget::~Widget()
25 {
26 }