15 : QWidget(parent),
ui(
new Ui_wdgpreseticonlibrary)
16{
18
19 ui->sldHue->setRange(0.0,360.0,1);
20 ui->sldHue->setSingleStep(1.0);
21 ui->sldHue->setPrefix(i18n(
"Hue:"));
22
23 ui->sldSat->setRange(-50.0,50.0,1);
24 ui->sldSat->setSingleStep(1.0);
25 ui->sldSat->setPrefix(i18n(
"Saturation:"));
26
27 ui->sldLevels->setRange(-50.0,50.0,1);
28 ui->sldLevels->setSingleStep(1.0);
29 ui->sldLevels->setPrefix(i18n(
"Mid-gray level:"));
30
31
34
37
39 if (background_paths.size()>0) {
42 }
44
45
46
47
48 QImage empty = QImage(200, 200, QImage::Format_ARGB32);
49 empty.fill(Qt::transparent);
50 m_baseModel->appendRow(
new QStandardItem(QIcon(QPixmap::fromImage(empty)), NULL));
51
53 for (int i=0; i<toolIcon_paths.size(); i++) {
54 QImage pix;
55 pix.load(toolIcon_paths.at(i));
56 QStandardItem *image = new QStandardItem(QIcon(QPixmap::fromImage(pix)), NULL);
58 }
59
60
61 empty = QImage(40, 40, QImage::Format_ARGB32);
62 empty.fill(Qt::transparent);
63 m_optionalModel->appendRow(
new QStandardItem(QIcon(QPixmap::fromImage(empty)), NULL));
64
66 for (int i=0; i<emblemIcon_paths.size(); i++) {
67 QImage pix;
68 pix.load(emblemIcon_paths.at(i));
69 QStandardItem *image = new QStandardItem(QIcon(QPixmap::fromImage(pix)), NULL);
71 }
72
73 connect(
ui->vwBase->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(
updateIcon()));
74 connect(
ui->vwOptional->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(
updateIcon()));
78}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
Ui_wdgpreseticonlibrary * ui
QStandardItemModel * m_optionalModel
QStandardItemModel * m_baseModel
static QStringList findAllAssets(const QString &type, const QString &filter=QString(), SearchOptions options=NoSearchOptions)