removed SplitColumn

This commit is contained in:
fourtf 2018-06-26 17:16:58 +02:00
parent c74bc00106
commit 6ee1fc303e
5 changed files with 31 additions and 63 deletions

View file

@ -210,7 +210,6 @@ SOURCES += \
src/widgets/settingspages/SettingsPage.cpp \ src/widgets/settingspages/SettingsPage.cpp \
src/widgets/settingspages/SpecialChannelsPage.cpp \ src/widgets/settingspages/SpecialChannelsPage.cpp \
src/widgets/splits/Split.cpp \ src/widgets/splits/Split.cpp \
src/widgets/splits/SplitColumn.cpp \
src/widgets/splits/SplitContainer.cpp \ src/widgets/splits/SplitContainer.cpp \
src/widgets/splits/SplitHeader.cpp \ src/widgets/splits/SplitHeader.cpp \
src/widgets/splits/SplitInput.cpp \ src/widgets/splits/SplitInput.cpp \
@ -380,7 +379,6 @@ HEADERS += \
src/widgets/settingspages/SettingsPage.hpp \ src/widgets/settingspages/SettingsPage.hpp \
src/widgets/settingspages/SpecialChannelsPage.hpp \ src/widgets/settingspages/SpecialChannelsPage.hpp \
src/widgets/splits/Split.hpp \ src/widgets/splits/Split.hpp \
src/widgets/splits/SplitColumn.hpp \
src/widgets/splits/SplitContainer.hpp \ src/widgets/splits/SplitContainer.hpp \
src/widgets/splits/SplitHeader.hpp \ src/widgets/splits/SplitHeader.hpp \
src/widgets/splits/SplitInput.hpp \ src/widgets/splits/SplitInput.hpp \

View file

@ -193,7 +193,7 @@ void TwitchEmotes::refresh(const std::shared_ptr<TwitchAccount> &user)
emoteData.filled = true; emoteData.filled = true;
}; };
getAuthorized(url, clientID, oauthToken, QThread::currentThread(), loadEmotes); twitchApiGetAuthorized(url, clientID, oauthToken, QThread::currentThread(), loadEmotes);
} }
void TwitchEmotes::loadSetData(std::shared_ptr<TwitchEmotes::EmoteSet> emoteSet) void TwitchEmotes::loadSetData(std::shared_ptr<TwitchEmotes::EmoteSet> emoteSet)

View file

@ -352,45 +352,45 @@ void ResourceManager::loadChannelData(const QString &roomID, bool bypassCache)
QString cheermoteURL = "https://api.twitch.tv/kraken/bits/actions?channel_id=" + roomID; QString cheermoteURL = "https://api.twitch.tv/kraken/bits/actions?channel_id=" + roomID;
get2(cheermoteURL, QThread::currentThread(), true, twitchApiGet2(
[this, roomID](const rapidjson::Document &d) { cheermoteURL, QThread::currentThread(), true, [this, roomID](const rapidjson::Document &d) {
ResourceManager::Channel &ch = this->channels[roomID]; ResourceManager::Channel &ch = this->channels[roomID];
ParseCheermoteSets(ch.jsonCheermoteSets, d); ParseCheermoteSets(ch.jsonCheermoteSets, d);
for (auto &set : ch.jsonCheermoteSets) { for (auto &set : ch.jsonCheermoteSets) {
CheermoteSet cheermoteSet; CheermoteSet cheermoteSet;
cheermoteSet.regex = cheermoteSet.regex =
QRegularExpression("^" + set.prefix.toLower() + "([1-9][0-9]*)$"); QRegularExpression("^" + set.prefix.toLower() + "([1-9][0-9]*)$");
for (auto &tier : set.tiers) { for (auto &tier : set.tiers) {
Cheermote cheermote; Cheermote cheermote;
cheermote.color = QColor(tier.color); cheermote.color = QColor(tier.color);
cheermote.minBits = tier.minBits; cheermote.minBits = tier.minBits;
// TODO(pajlada): We currently hardcode dark here :| // TODO(pajlada): We currently hardcode dark here :|
// We will continue to do so for now since we haven't had to // We will continue to do so for now since we haven't had to
// solve that anywhere else // solve that anywhere else
cheermote.emoteDataAnimated.image1x = tier.images["dark"]["animated"]["1"]; cheermote.emoteDataAnimated.image1x = tier.images["dark"]["animated"]["1"];
cheermote.emoteDataAnimated.image2x = tier.images["dark"]["animated"]["2"]; cheermote.emoteDataAnimated.image2x = tier.images["dark"]["animated"]["2"];
cheermote.emoteDataAnimated.image3x = tier.images["dark"]["animated"]["4"]; cheermote.emoteDataAnimated.image3x = tier.images["dark"]["animated"]["4"];
cheermote.emoteDataStatic.image1x = tier.images["dark"]["static"]["1"]; cheermote.emoteDataStatic.image1x = tier.images["dark"]["static"]["1"];
cheermote.emoteDataStatic.image2x = tier.images["dark"]["static"]["2"]; cheermote.emoteDataStatic.image2x = tier.images["dark"]["static"]["2"];
cheermote.emoteDataStatic.image3x = tier.images["dark"]["static"]["4"]; cheermote.emoteDataStatic.image3x = tier.images["dark"]["static"]["4"];
cheermoteSet.cheermotes.emplace_back(cheermote); cheermoteSet.cheermotes.emplace_back(cheermote);
} }
std::sort(cheermoteSet.cheermotes.begin(), cheermoteSet.cheermotes.end(), std::sort(cheermoteSet.cheermotes.begin(), cheermoteSet.cheermotes.end(),
[](const auto &lhs, const auto &rhs) { [](const auto &lhs, const auto &rhs) {
return lhs.minBits < rhs.minBits; // return lhs.minBits < rhs.minBits; //
}); });
ch.cheermoteSets.emplace_back(cheermoteSet); ch.cheermoteSets.emplace_back(cheermoteSet);
} }
}); });
} }
void ResourceManager::loadDynamicTwitchBadges() void ResourceManager::loadDynamicTwitchBadges()

View file

@ -1,7 +0,0 @@
#include "SplitColumn.hpp"
namespace chatterino {
namespace helper {
} // namespace helper
} // namespace chatterino

View file

@ -1,23 +0,0 @@
#pragma once
#include "widgets/splits/Split.hpp"
#include <vector>
namespace chatterino {
class SplitColumn
{
public:
SplitColumn() = default;
void insert(Split *split, int index = -1);
void remove(int index);
double getFlex();
void setFlex(double flex);
private:
std::vector<Split> items;
};
} // namespace chatterino