本文整理汇总了C++中UserManager::GetLastVideo方法的典型用法代码示例。如果您正苦于以下问题:C++ UserManager::GetLastVideo方法的具体用法?C++ UserManager::GetLastVideo怎么用?C++ UserManager::GetLastVideo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserManager
的用法示例。
在下文中一共展示了UserManager::GetLastVideo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: likeIt
void DisplayWindow::likeIt()
{
if (m_qpbLike->text() == "Like")
{
if (g_umUserManager.Commend(m_mvModel.m_sVideoID) == SUCCESS)
{
g_umUserManager.GetLastVideo(m_mvModel);
emit updateModel(m_mvModel);
m_qpbLike->setIcon(QIcon(g_sImgRoot + "liked.png"));
m_qpbLike->setText("Liked");
}
else
{
m_qlMsg->setText("Commend Fail, please try again.");
QTimer *timer = new QTimer();
timer->start(1000);
connect(timer, SIGNAL(timeout()), m_qwMessage, SLOT(close()));
connect(timer, SIGNAL(timeout()), timer, SLOT(stop()));
}
}
else if (m_qpbLike->text() == "Liked")
{
if (g_umUserManager.UnCommend(m_mvModel.m_sVideoID) == SUCCESS)
{
g_umUserManager.GetLastVideo(m_mvModel);
emit updateModel(m_mvModel);
m_qpbLike->setIcon(QIcon(g_sImgRoot + "like.png"));
m_qpbLike->setText("Like");
}
else
{
m_qlMsg->setText("Uncommend Fail, please try again.");
QTimer *timer = new QTimer();
timer->start(1000);
connect(timer, SIGNAL(timeout()), m_qwMessage, SLOT(close()));
connect(timer, SIGNAL(timeout()), timer, SLOT(stop()));
}
}
}
示例2: comment
void CommentWindow::comment()
{
if (g_umUserManager.Comment(m_mvModel.m_sVideoID, m_qteComment->toPlainText().toStdString()) == SUCCESS)
{
g_umUserManager.GetLastVideo(m_mvModel);
emit updateModel(m_mvModel);
m_qteComment->clear();
m_qmbMsg->setText("Comment Successfully");
m_qmbMsg->setWindowModality(Qt::WindowModal);
m_qmbMsg->show();
connect(m_qmbMsg, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(toComment()));
}