25 if(parent()->metaObject()->indexOfSlot(
"queryAllFinished()") != -1)
27 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), parent(), SLOT(queryAllFinished()));
54 if(!
isValid(row) || row >= songInfos.count())
75 const int row = currentRow();
77 if(!
isValid(row) || row >= songInfos.count())
82 switch(action->data().toInt())
92 MusicQueryTableWidget::contextMenuEvent(event);
97 const int row = currentRow();
99 if(!
isValid(row) || row >= songInfos.count())
104 menu.addAction(QIcon(
":/contextMenu/btn_play"), tr(
"Play"))->setData(0);
105 menu.addAction(tr(
"Download More..."))->setData(1);
106 connect(&menu, SIGNAL(triggered(QAction*)), SLOT(
actionChanged(QAction*)));
108 menu.exec(QCursor::pos());
165 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
192 QScrollArea *scrollArea =
new QScrollArea(
this);
194 layout()->addWidget(scrollArea);
198 QVBoxLayout *grid =
new QVBoxLayout(
function);
200 QWidget *firstTopFuncWidget =
new QWidget(
function);
201 QHBoxLayout *firstTopFuncLayout =
new QHBoxLayout(firstTopFuncWidget);
203 QLabel *firstLabel =
new QLabel(
function);
206 QPushButton *backButton =
new QPushButton(tr(
"Back"));
207 backButton->setFixedSize(90, 30);
209 backButton->setCursor(QCursor(Qt::PointingHandCursor));
210 connect(backButton, SIGNAL(clicked()),
this, SIGNAL(
backToMainMenu()));
212 firstTopFuncLayout->addWidget(firstLabel);
213 firstTopFuncLayout->addWidget(backButton);
214 grid->addWidget(firstTopFuncWidget);
216 QWidget *topFuncWidget =
new QWidget(
function);
217 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
220 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
223 QWidget *topLineWidget =
new QWidget(topFuncWidget);
224 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
225 topLineLayout->setContentsMargins(10, 5, 5, 0);
227 QLabel *nameLabel =
new QLabel(topLineWidget);
228 QFont nameFont = nameLabel->font();
229 nameFont.setPixelSize(20);
230 nameLabel->setFont(nameFont);
234 QLabel *typeLabel =
new QLabel(topLineWidget);
238 topLineLayout->addWidget(nameLabel);
239 topLineLayout->addStretch(1);
240 topLineLayout->addWidget(typeLabel);
241 topLineLayout->addStretch(5);
242 topLineWidget->setLayout(topLineLayout);
245 topFuncLayout->addWidget(topLineWidget);
246 topFuncWidget->setLayout(topFuncLayout);
247 grid->addWidget(topFuncWidget);
249 QWidget *functionWidget =
new QWidget(
this);
251 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
256 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
259 hLayout->addStretch(1);
260 functionWidget->setLayout(hLayout);
262 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
267 backButton->setFocusPolicy(Qt::NoFocus);
270 grid->addWidget(functionWidget);
274 function->setLayout(grid);
283 QWidget *songWidget =
new QWidget(
this);
284 QVBoxLayout *vLayout =
new QVBoxLayout(songWidget);
285 vLayout->setSpacing(0);
286 vLayout->setContentsMargins(0, 0, 0, 0);
288 QWidget *middleFuncWidget =
new QWidget(songWidget);
290 QHBoxLayout *middleFuncLayout =
new QHBoxLayout(middleFuncWidget);
291 middleFuncLayout->setContentsMargins(0, 5, 0, 5);
293 QLabel *marginLabel =
new QLabel(middleFuncWidget);
294 marginLabel->setFixedWidth(1);
295 QCheckBox *allCheckBox =
new QCheckBox(
" " + tr(
"All"), middleFuncWidget);
296 QPushButton *downloadButton =
new QPushButton(tr(
"Download"), middleFuncWidget);
297 downloadButton->setFixedSize(55, 25);
298 downloadButton->setCursor(QCursor(Qt::PointingHandCursor));
301 allCheckBox->setFocusPolicy(Qt::NoFocus);
302 downloadButton->setFocusPolicy(Qt::NoFocus);
305 middleFuncLayout->addWidget(marginLabel);
306 middleFuncLayout->addWidget(allCheckBox);
307 middleFuncLayout->addStretch(1);
308 middleFuncLayout->addWidget(downloadButton);
309 connect(allCheckBox, SIGNAL(clicked(
bool)),
m_queryTableWidget, SLOT(checkedItemsState(
bool)));
312 vLayout->addWidget(middleFuncWidget);
314 vLayout->addStretch(1);
315 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.
void setQueryType(QueryType type)
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