2 #include "ui_musicsongitemselecteddialog.h"
11 setAttribute(Qt::WA_TranslucentBackground,
false);
12 setSelectionMode(QAbstractItemView::ExtendedSelection);
15 QHeaderView *headerView = horizontalHeader();
16 headerView->resizeSection(0, 30);
18 headerView->resizeSection(1, 219);
20 headerView->resizeSection(1, 222);
27 if(items->count() >= 4)
34 setRowCount(items->count());
35 QHeaderView *headerView = horizontalHeader();
37 for(
int i = 0; i < items->count(); ++i)
41 QTableWidgetItem *item =
new QTableWidgetItem;
46 item =
new QTableWidgetItem;
48 item->setText(
TTK::Widget::elidedText(font(), item->toolTip(), Qt::ElideRight, headerView->sectionSize(1) - 30));
57 for(
int i = 0; i < rowCount(); ++i)
59 const QTableWidgetItem *it = item(i, 0);
78 m_ui->topTitleCloseButton->setIcon(QIcon(
":/functions/btn_close_hover"));
80 m_ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
81 m_ui->topTitleCloseButton->setToolTip(tr(
"Close"));
82 connect(
m_ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));
87 m_ui->confirmButton->setFocusPolicy(Qt::NoFocus);
88 m_ui->selectAllCheckButton->setFocusPolicy(Qt::NoFocus);
92 connect(
m_ui->selectAllCheckButton, SIGNAL(clicked(
bool)),
m_ui->itemTableWidget, SLOT(checkedItemsStatus(
bool)));
102 m_ui->itemTableWidget->addCellItems(items);
117 m_label =
new QLabel(tr(
"Range:"));
129 QHBoxLayout *layout =
new QHBoxLayout(
this);
130 layout->setContentsMargins(0, 0, 0, 0);
139 G_CONNECTION_PTR->connect(className(), MusicSongsContainerWidget::className());
152 MusicSongItemList songs;
155 MusicSongList selectedSongs;
160 if(
m_items.contains(item.m_itemIndex))
162 selectedSongs << item.m_songs;
169 selectedSongs << item.m_songs;
173 return selectedSongs;
178 MusicSongItemList songs;
The class of the song item selected dialog widget.
~MusicSongItemSelectedDialog()
TTK_MODULE_EXPORT bool playlistRowValid(int index)
static const QString CheckBoxStyle01
CheckBox.
static const QString ColorStyle04
#define QtItemSetTextAlignment(p, a)
Item text alignment.
The class of the label widget that can click.
static const QString FontStyle01
Font.
void addCellItems(MusicSongItemList *items)
static const QString ColorStyle02
static const QString ScrollBarStyle01
ScrollBar.
void itemListChanged(const TTKIntList &items)
static const QString PushButtonStyle04
The class of the moving dialog base.
static const QString ColorStyle07
void confirmButtonClicked()
The class of the music song item.
MusicSongItemSelectedDialog(QWidget *parent=nullptr)
static const QString ToolButtonStyle04
Ui::MusicSongItemSelectedDialog * m_ui