QTfrontend/ui/widget/themeprompt.cpp
changeset 8419 d99f46b676b5
parent 8385 9e8924ff9813
child 8434 4821897a0f10
equal deleted inserted replaced
8418:4543cc2049af 8419:d99f46b676b5
    79 	ThemeModel * themes = DataManager::instance().themeModel();
    79 	ThemeModel * themes = DataManager::instance().themeModel();
    80 	for (int i = 0; i < themes->rowCount(); i++)
    80 	for (int i = 0; i < themes->rowCount(); i++)
    81 	{
    81 	{
    82 		QModelIndex index = themes->index(i, 0);
    82 		QModelIndex index = themes->index(i, 0);
    83 		QToolButton * btn = new QToolButton();
    83 		QToolButton * btn = new QToolButton();
       
    84 		bool dlc = themes->data(index, Qt::UserRole + 2).toBool();
    84 		btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    85 		btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    85 		btn->setIcon(qVariantValue<QIcon>(themes->data(index, Qt::UserRole)));
    86 		btn->setIcon(qVariantValue<QIcon>(themes->data(index, Qt::UserRole)));
    86 		btn->setText(themes->data(index, Qt::DisplayRole).toString());
    87 		btn->setText((dlc ? "*" : "") + themes->data(index, Qt::DisplayRole).toString());
    87 		btn->setIconSize(QSize(60, 60));
    88 		btn->setIconSize(QSize(60, 60));
    88 		btn->setProperty("themeID", QVariant(i));
    89 		btn->setProperty("themeID", QVariant(i));
    89 		btn->setStyleSheet("padding: 2px;");
    90 		btn->setStyleSheet("padding: 2px;");
    90 		connect(btn, SIGNAL(clicked()), this, SLOT(themeClicked()));
    91 		connect(btn, SIGNAL(clicked()), this, SLOT(themeClicked()));
    91 		themesGrid->addWidget(btn);
    92 		themesGrid->addWidget(btn);