2 #include "ui_musicsongitemselecteddialog.h"
10 setAttribute(Qt::WA_TranslucentBackground,
false);
11 setSelectionMode(QAbstractItemView::ExtendedSelection);
14 QHeaderView *headerView = horizontalHeader();
15 headerView->resizeSection(0, 30);
17 headerView->resizeSection(1, 219);
19 headerView->resizeSection(1, 222);
26 if(items->count() >= 4)
33 setRowCount(items->count());
34 QHeaderView *headerView = horizontalHeader();
36 for(
int i = 0; i < items->count(); ++i)
40 QTableWidgetItem *item =
new QTableWidgetItem;
45 item =
new QTableWidgetItem;
47 item->setText(
TTK::Widget::elidedText(font(), item->toolTip(), Qt::ElideRight, headerView->sectionSize(1) - 30));
56 for(
int i = 0; i < rowCount(); ++i)
58 const QTableWidgetItem *it = item(i, 0);
77 m_ui->topTitleCloseButton->setIcon(QIcon(
":/functions/btn_close_hover"));
79 m_ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
80 m_ui->topTitleCloseButton->setToolTip(tr(
"Close"));
81 connect(
m_ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));
86 m_ui->confirmButton->setFocusPolicy(Qt::NoFocus);
87 m_ui->selectAllCheckButton->setFocusPolicy(Qt::NoFocus);
91 connect(
m_ui->selectAllCheckButton, SIGNAL(clicked(
bool)),
m_ui->itemTableWidget, SLOT(checkedItemsStatus(
bool)));
101 m_ui->itemTableWidget->addCellItems(items);
116 m_label =
new QLabel(tr(
"Range:"));
128 QHBoxLayout *layout =
new QHBoxLayout(
this);
129 layout->setContentsMargins(0, 0, 0, 0);
147 MusicSongItemList items;
150 MusicSongList selectedSongs;
155 if(
m_items.contains(item.m_itemIndex))
157 selectedSongs << item.m_songs;
164 selectedSongs << item.m_songs;
168 return selectedSongs;
173 MusicSongItemList items;
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