31 if(!
isValid(row) || row >= songInfos.count())
52 const int row = currentRow();
54 if(!
isValid(row) || row >= songInfos.count())
59 switch(action->data().toInt())
69 MusicQueryTableWidget::contextMenuEvent(event);
74 const int row = currentRow();
76 if(!
isValid(row) || row >= songInfos.count())
81 menu.addAction(QIcon(
":/contextMenu/btn_play"), tr(
"Play"))->setData(0);
82 menu.addAction(tr(
"Download More..."))->setData(1);
83 connect(&menu, SIGNAL(triggered(QAction*)), SLOT(
actionChanged(QAction*)));
85 menu.exec(QCursor::pos());
144 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
171 QScrollArea *scrollArea =
new QScrollArea(
this);
173 layout()->addWidget(scrollArea);
177 QVBoxLayout *grid =
new QVBoxLayout(
function);
179 QWidget *firstTopFuncWidget =
new QWidget(
function);
180 QHBoxLayout *firstTopFuncLayout =
new QHBoxLayout(firstTopFuncWidget);
182 QLabel *firstLabel =
new QLabel(
function);
185 QPushButton *backButton =
new QPushButton(tr(
"Back"));
186 backButton->setFixedSize(90, 30);
188 backButton->setCursor(QCursor(Qt::PointingHandCursor));
189 connect(backButton, SIGNAL(clicked()),
this, SIGNAL(
backToMainMenu()));
191 firstTopFuncLayout->addWidget(firstLabel);
192 firstTopFuncLayout->addWidget(backButton);
193 grid->addWidget(firstTopFuncWidget);
195 QWidget *topFuncWidget =
new QWidget(
function);
196 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
199 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
202 QWidget *topLineWidget =
new QWidget(topFuncWidget);
203 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
204 topLineLayout->setContentsMargins(10, 5, 5, 0);
206 QLabel *nameLabel =
new QLabel(topLineWidget);
207 QFont nameFont = nameLabel->font();
208 nameFont.setPixelSize(20);
209 nameLabel->setFont(nameFont);
213 QLabel *typeLabel =
new QLabel(topLineWidget);
217 topLineLayout->addWidget(nameLabel);
218 topLineLayout->addStretch(1);
219 topLineLayout->addWidget(typeLabel);
220 topLineLayout->addStretch(5);
221 topLineWidget->setLayout(topLineLayout);
224 topFuncLayout->addWidget(topLineWidget);
225 topFuncWidget->setLayout(topFuncLayout);
226 grid->addWidget(topFuncWidget);
228 QWidget *functionWidget =
new QWidget(
this);
230 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
235 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
238 hLayout->addStretch(1);
239 functionWidget->setLayout(hLayout);
241 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
246 backButton->setFocusPolicy(Qt::NoFocus);
249 grid->addWidget(functionWidget);
253 function->setLayout(grid);
262 QWidget *songWidget =
new QWidget(
this);
263 QVBoxLayout *vLayout =
new QVBoxLayout(songWidget);
264 vLayout->setSpacing(0);
265 vLayout->setContentsMargins(0, 0, 0, 0);
267 QWidget *middleFuncWidget =
new QWidget(songWidget);
269 QHBoxLayout *middleFuncLayout =
new QHBoxLayout(middleFuncWidget);
270 middleFuncLayout->setContentsMargins(0, 5, 0, 5);
272 QLabel *marginLabel =
new QLabel(middleFuncWidget);
273 marginLabel->setFixedWidth(1);
274 QCheckBox *allCheckBox =
new QCheckBox(
TTK_SPACE + tr(
"All"), middleFuncWidget);
275 QPushButton *downloadButton =
new QPushButton(tr(
"Download"), middleFuncWidget);
276 downloadButton->setFixedSize(55, 25);
277 downloadButton->setCursor(QCursor(Qt::PointingHandCursor));
280 allCheckBox->setFocusPolicy(Qt::NoFocus);
281 downloadButton->setFocusPolicy(Qt::NoFocus);
284 middleFuncLayout->addWidget(marginLabel);
285 middleFuncLayout->addWidget(allCheckBox);
286 middleFuncLayout->addStretch(1);
287 middleFuncLayout->addWidget(downloadButton);
288 connect(allCheckBox, SIGNAL(clicked(
bool)),
m_queryTableWidget, SLOT(checkedItemsState(
bool)));
291 vLayout->addWidget(middleFuncWidget);
293 vLayout->addStretch(1);
294 songWidget->setLayout(vLayout);
The class of the search result data item.
static const QString FontStyle03
virtual void startToRequest(const QString &url)=0
static const QString CheckBoxStyle01
CheckBox.
The class of the mv radio program request.
static const QString ColorStyle04
static const QString FontStyle01
Font.
static const QString PushButtonStyle03
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
static bool isCoverValid(const QString &url)
static const QString MenuStyle02
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
The class of the abstract query download data from net.
const TTK::MusicSongInformationList & items() const