Added TT-RSS icons.

This commit is contained in:
Martin Rotter 2015-11-30 07:47:09 +01:00
parent b9e2f19bee
commit 01e595d7cd
4 changed files with 25 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -38,8 +38,28 @@ FormAddAccount::FormAddAccount(const QList<ServiceEntryPoint*> &entry_points, Fe
#if defined(Q_OS_OS2)
MessageBox::iconify(m_ui->m_buttonBox);
#endif
connect(m_ui->m_listEntryPoints, SIGNAL(itemSelectionChanged()), this, SLOT(displayActiveEntryPointDetails()));
loadEntryPoints();
}
FormAddAccount::~FormAddAccount() {
delete m_ui;
}
void FormAddAccount::displayActiveEntryPointDetails() {
QList<QListWidgetItem*> selected_items = m_ui->m_listEntryPoints->selectedItems();
if (!selected_items.isEmpty()) {
ServiceEntryPoint *point = static_cast<ServiceEntryPoint*>(selected_items.at(0)->data(Qt::UserRole).value<void*>());
}
}
void FormAddAccount::loadEntryPoints() {
foreach (ServiceEntryPoint *entry_point, m_entryPoints) {
QListWidgetItem *item = new QListWidgetItem(entry_point->icon(), entry_point->name(), m_ui->m_listEntryPoints);
item->setData(Qt::UserRole, QVariant::fromValue((void*) entry_point));
}
}

View File

@ -37,7 +37,12 @@ class FormAddAccount : public QDialog {
explicit FormAddAccount(const QList<ServiceEntryPoint*> &entry_points, FeedsModel *model, QWidget *parent = 0);
virtual ~FormAddAccount();
private slots:
void displayActiveEntryPointDetails();
private:
void loadEntryPoints();
Ui::FormAddAccount *m_ui;
FeedsModel *m_model;
QList<ServiceEntryPoint*> m_entryPoints;