mirror of
https://github.com/gtalent/sc9k.git
synced 2025-01-23 00:33:36 -06:00
Split slide tag across lines
This commit is contained in:
parent
a0a1cd8af1
commit
0db9bff0de
@ -191,11 +191,11 @@ void OpenLPClient::handleSlideListResponse(QNetworkReply *reply) {
|
||||
auto doc = QJsonDocument::fromJson(data);
|
||||
auto items = doc.object()["results"].toObject()["slides"].toArray();
|
||||
for (auto const&item : items) {
|
||||
auto slide = item.toObject();
|
||||
auto const slide = item.toObject();
|
||||
auto text = slide["text"].toString();
|
||||
auto tag = slide["tag"].toString();
|
||||
slideList.push_back(text);
|
||||
tagList.push_back(tag);
|
||||
slideList.push_back(std::move(text));
|
||||
tagList.push_back(std::move(tag));
|
||||
}
|
||||
emit slideListUpdate(tagList, slideList);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ QString SlideView::getNextSong() const {
|
||||
}
|
||||
|
||||
void SlideView::pollUpdate(QString const&songName, int slide) {
|
||||
auto songItems = m_songSelector->findItems(songName, Qt::MatchFixedString);
|
||||
auto const songItems = m_songSelector->findItems(songName, Qt::MatchFixedString);
|
||||
if (songItems.empty()) {
|
||||
return;
|
||||
}
|
||||
@ -68,7 +68,10 @@ void SlideView::changeSong(int song) {
|
||||
}
|
||||
}
|
||||
|
||||
void SlideView::slideListUpdate(QStringList const&tagList, QStringList const&slideList) {
|
||||
void SlideView::slideListUpdate(QStringList tagList, QStringList const&slideList) {
|
||||
for (auto &tag : tagList) {
|
||||
tag = tag.split("").join("\n");
|
||||
}
|
||||
m_currentSlide = 0;
|
||||
m_slideTable->setRowCount(static_cast<int>(slideList.size()));
|
||||
for (int i = 0; i < slideList.size(); ++i) {
|
||||
|
@ -28,7 +28,7 @@ class SlideView: public QWidget {
|
||||
|
||||
void songListUpdate(QStringList const&songList);
|
||||
|
||||
void slideListUpdate(QStringList const&tagList, QStringList const&songList);
|
||||
void slideListUpdate(QStringList tagList, QStringList const&songList);
|
||||
|
||||
void reset();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user