QVBoxLayout *mainLayout = new QVBoxLayout;
QHBoxLayout *lineEditLayout = new QHBoxLayout;
QGridLayout *listLayout = new QGridLayout;
+ QVBoxLayout *buttonLayout = new QVBoxLayout;
m_addTagEdit = new QLineEdit("");
QPushButton *addButton = new QPushButton(tr("Add"));
lineEditLayout->addWidget(addButton);
QPushButton *deleteButton = new QPushButton(tr("Delete"));
- QPushButton *cancelButton = new QPushButton(tr("Cancel"));
QPushButton *okButton = new QPushButton(tr("Update"));
+ buttonLayout->addWidget(deleteButton, 0, Qt::AlignBottom);
+ buttonLayout->addWidget(okButton, 0, Qt::AlignBottom);
QLabel *yourTagsLabel = new QLabel(tr("Your tags:"));
yourTagsLabel->setAlignment(Qt::AlignCenter);
popularTagsLabel->setAlignment(Qt::AlignCenter);
m_userTagsView = new QListWidget();
m_popularTagsView = new QListWidget();
+ m_popularTagsView->setSelectionMode(QAbstractItemView::NoSelection);
listLayout->addWidget(yourTagsLabel, 0, 0);
listLayout->addWidget(popularTagsLabel, 0, 1);
listLayout->addWidget(m_userTagsView, 1, 0);
- listLayout->addWidget(m_userTagsView, 1, 1);
+ listLayout->addWidget(m_popularTagsView, 1, 1);
+ listLayout->addLayout(buttonLayout, 0, 2, -1, 1);
mainLayout->addLayout(lineEditLayout);
mainLayout->addLayout(listLayout);
connect(okButton, SIGNAL(clicked()),
this, SLOT(accept()));
- connect(cancelButton, SIGNAL(clicked()),
- this, SLOT(reject()));
-
connect(addButton, SIGNAL(clicked()),
this, SLOT(addTagToList()));
void TagsDialog::populatePopularTags(const QHash<QString, QString> &popularTags)
{
+ qDebug() << __PRETTY_FUNCTION__;
+
m_popularTagsView->clear();
foreach (QString tag, popularTags)
void TagsDialog::populateUserTags(const QHash<QString, QString> &userTags)
{
+ qDebug() << __PRETTY_FUNCTION__;
+
m_userTagsView->clear();
foreach (QString tag, m_newTags) {