removed appbase directory
This commit is contained in:
+46
-2
@@ -8,7 +8,6 @@ TEMPLATE = app
|
|||||||
PRECOMPILED_HEADER = src/PrecompiledHeader.hpp
|
PRECOMPILED_HEADER = src/PrecompiledHeader.hpp
|
||||||
CONFIG += precompile_header
|
CONFIG += precompile_header
|
||||||
DEFINES += CHATTERINO
|
DEFINES += CHATTERINO
|
||||||
DEFINES += "AB_NAMESPACE=chatterino"
|
|
||||||
DEFINES += AB_CUSTOM_THEME
|
DEFINES += AB_CUSTOM_THEME
|
||||||
DEFINES += AB_CUSTOM_SETTINGS
|
DEFINES += AB_CUSTOM_SETTINGS
|
||||||
CONFIG += AB_NOT_STANDALONE
|
CONFIG += AB_NOT_STANDALONE
|
||||||
@@ -46,7 +45,6 @@ CONFIG(debug, debug|release) {
|
|||||||
|
|
||||||
# Submodules
|
# Submodules
|
||||||
include(lib/warnings.pri)
|
include(lib/warnings.pri)
|
||||||
include(lib/appbase.pri)
|
|
||||||
include(lib/fmt.pri)
|
include(lib/fmt.pri)
|
||||||
include(lib/humanize.pri)
|
include(lib/humanize.pri)
|
||||||
include(lib/libcommuni.pri)
|
include(lib/libcommuni.pri)
|
||||||
@@ -80,10 +78,13 @@ else{
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/Application.cpp \
|
src/Application.cpp \
|
||||||
src/autogenerated/ResourcesAutogen.cpp \
|
src/autogenerated/ResourcesAutogen.cpp \
|
||||||
|
src/BaseSettings.cpp \
|
||||||
|
src/BaseTheme.cpp \
|
||||||
src/BrowserExtension.cpp \
|
src/BrowserExtension.cpp \
|
||||||
src/common/Args.cpp \
|
src/common/Args.cpp \
|
||||||
src/common/Channel.cpp \
|
src/common/Channel.cpp \
|
||||||
src/common/ChannelChatters.cpp \
|
src/common/ChannelChatters.cpp \
|
||||||
|
src/common/ChatterinoSetting.cpp \
|
||||||
src/common/CompletionModel.cpp \
|
src/common/CompletionModel.cpp \
|
||||||
src/common/Credentials.cpp \
|
src/common/Credentials.cpp \
|
||||||
src/common/DownloadManager.cpp \
|
src/common/DownloadManager.cpp \
|
||||||
@@ -118,6 +119,7 @@ SOURCES += \
|
|||||||
src/controllers/taggedusers/TaggedUser.cpp \
|
src/controllers/taggedusers/TaggedUser.cpp \
|
||||||
src/controllers/taggedusers/TaggedUsersController.cpp \
|
src/controllers/taggedusers/TaggedUsersController.cpp \
|
||||||
src/controllers/taggedusers/TaggedUsersModel.cpp \
|
src/controllers/taggedusers/TaggedUsersModel.cpp \
|
||||||
|
src/debug/Benchmark.cpp \
|
||||||
src/main.cpp \
|
src/main.cpp \
|
||||||
src/messages/Emote.cpp \
|
src/messages/Emote.cpp \
|
||||||
src/messages/Image.cpp \
|
src/messages/Image.cpp \
|
||||||
@@ -167,6 +169,7 @@ SOURCES += \
|
|||||||
src/RunGui.cpp \
|
src/RunGui.cpp \
|
||||||
src/singletons/Badges.cpp \
|
src/singletons/Badges.cpp \
|
||||||
src/singletons/Emotes.cpp \
|
src/singletons/Emotes.cpp \
|
||||||
|
src/singletons/Fonts.cpp \
|
||||||
src/singletons/helper/GifTimer.cpp \
|
src/singletons/helper/GifTimer.cpp \
|
||||||
src/singletons/helper/LoggingChannel.cpp \
|
src/singletons/helper/LoggingChannel.cpp \
|
||||||
src/singletons/Logging.cpp \
|
src/singletons/Logging.cpp \
|
||||||
@@ -181,14 +184,20 @@ SOURCES += \
|
|||||||
src/singletons/WindowManager.cpp \
|
src/singletons/WindowManager.cpp \
|
||||||
src/util/DebugCount.cpp \
|
src/util/DebugCount.cpp \
|
||||||
src/util/FormatTime.cpp \
|
src/util/FormatTime.cpp \
|
||||||
|
src/util/FunctionEventFilter.cpp \
|
||||||
|
src/util/FuzzyConvert.cpp \
|
||||||
|
src/util/Helpers.cpp \
|
||||||
src/util/IncognitoBrowser.cpp \
|
src/util/IncognitoBrowser.cpp \
|
||||||
src/util/InitUpdateButton.cpp \
|
src/util/InitUpdateButton.cpp \
|
||||||
src/util/JsonQuery.cpp \
|
src/util/JsonQuery.cpp \
|
||||||
src/util/RapidjsonHelpers.cpp \
|
src/util/RapidjsonHelpers.cpp \
|
||||||
src/util/StreamLink.cpp \
|
src/util/StreamLink.cpp \
|
||||||
|
src/util/WindowsHelper.cpp \
|
||||||
src/widgets/AccountSwitchPopup.cpp \
|
src/widgets/AccountSwitchPopup.cpp \
|
||||||
src/widgets/AccountSwitchWidget.cpp \
|
src/widgets/AccountSwitchWidget.cpp \
|
||||||
src/widgets/AttachedWindow.cpp \
|
src/widgets/AttachedWindow.cpp \
|
||||||
|
src/widgets/BaseWidget.cpp \
|
||||||
|
src/widgets/BaseWindow.cpp \
|
||||||
src/widgets/dialogs/EmotePopup.cpp \
|
src/widgets/dialogs/EmotePopup.cpp \
|
||||||
src/widgets/dialogs/IrcConnectionEditor.cpp \
|
src/widgets/dialogs/IrcConnectionEditor.cpp \
|
||||||
src/widgets/dialogs/LastRunCrashDialog.cpp \
|
src/widgets/dialogs/LastRunCrashDialog.cpp \
|
||||||
@@ -202,16 +211,21 @@ SOURCES += \
|
|||||||
src/widgets/dialogs/UpdateDialog.cpp \
|
src/widgets/dialogs/UpdateDialog.cpp \
|
||||||
src/widgets/dialogs/UserInfoPopup.cpp \
|
src/widgets/dialogs/UserInfoPopup.cpp \
|
||||||
src/widgets/dialogs/WelcomeDialog.cpp \
|
src/widgets/dialogs/WelcomeDialog.cpp \
|
||||||
|
src/widgets/helper/Button.cpp \
|
||||||
src/widgets/helper/ChannelView.cpp \
|
src/widgets/helper/ChannelView.cpp \
|
||||||
src/widgets/helper/ComboBoxItemDelegate.cpp \
|
src/widgets/helper/ComboBoxItemDelegate.cpp \
|
||||||
src/widgets/helper/DebugPopup.cpp \
|
src/widgets/helper/DebugPopup.cpp \
|
||||||
src/widgets/helper/EditableModelView.cpp \
|
src/widgets/helper/EditableModelView.cpp \
|
||||||
|
src/widgets/helper/EffectLabel.cpp \
|
||||||
src/widgets/helper/NotebookButton.cpp \
|
src/widgets/helper/NotebookButton.cpp \
|
||||||
src/widgets/helper/NotebookTab.cpp \
|
src/widgets/helper/NotebookTab.cpp \
|
||||||
src/widgets/helper/ResizingTextEdit.cpp \
|
src/widgets/helper/ResizingTextEdit.cpp \
|
||||||
src/widgets/helper/ScrollbarHighlight.cpp \
|
src/widgets/helper/ScrollbarHighlight.cpp \
|
||||||
src/widgets/helper/SearchPopup.cpp \
|
src/widgets/helper/SearchPopup.cpp \
|
||||||
src/widgets/helper/SettingsDialogTab.cpp \
|
src/widgets/helper/SettingsDialogTab.cpp \
|
||||||
|
src/widgets/helper/SignalLabel.cpp \
|
||||||
|
src/widgets/helper/TitlebarButton.cpp \
|
||||||
|
src/widgets/Label.cpp \
|
||||||
src/widgets/Notebook.cpp \
|
src/widgets/Notebook.cpp \
|
||||||
src/widgets/Scrollbar.cpp \
|
src/widgets/Scrollbar.cpp \
|
||||||
src/widgets/settingspages/AboutPage.cpp \
|
src/widgets/settingspages/AboutPage.cpp \
|
||||||
@@ -232,23 +246,28 @@ SOURCES += \
|
|||||||
src/widgets/splits/SplitInput.cpp \
|
src/widgets/splits/SplitInput.cpp \
|
||||||
src/widgets/splits/SplitOverlay.cpp \
|
src/widgets/splits/SplitOverlay.cpp \
|
||||||
src/widgets/StreamView.cpp \
|
src/widgets/StreamView.cpp \
|
||||||
|
src/widgets/TooltipWidget.cpp \
|
||||||
src/widgets/Window.cpp \
|
src/widgets/Window.cpp \
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/Application.hpp \
|
src/Application.hpp \
|
||||||
src/autogenerated/ResourcesAutogen.hpp \
|
src/autogenerated/ResourcesAutogen.hpp \
|
||||||
|
src/BaseSettings.hpp \
|
||||||
|
src/BaseTheme.hpp \
|
||||||
src/BrowserExtension.hpp \
|
src/BrowserExtension.hpp \
|
||||||
src/common/Aliases.hpp \
|
src/common/Aliases.hpp \
|
||||||
src/common/Args.hpp \
|
src/common/Args.hpp \
|
||||||
src/common/Atomic.hpp \
|
src/common/Atomic.hpp \
|
||||||
src/common/Channel.hpp \
|
src/common/Channel.hpp \
|
||||||
src/common/ChannelChatters.hpp \
|
src/common/ChannelChatters.hpp \
|
||||||
|
src/common/ChatterinoSetting.hpp \
|
||||||
src/common/Common.hpp \
|
src/common/Common.hpp \
|
||||||
src/common/CompletionModel.hpp \
|
src/common/CompletionModel.hpp \
|
||||||
src/common/ConcurrentMap.hpp \
|
src/common/ConcurrentMap.hpp \
|
||||||
src/common/Credentials.hpp \
|
src/common/Credentials.hpp \
|
||||||
src/common/DownloadManager.hpp \
|
src/common/DownloadManager.hpp \
|
||||||
src/common/Env.hpp \
|
src/common/Env.hpp \
|
||||||
|
src/common/FlagsEnum.hpp \
|
||||||
src/common/LinkParser.hpp \
|
src/common/LinkParser.hpp \
|
||||||
src/common/Modes.hpp \
|
src/common/Modes.hpp \
|
||||||
src/common/NetworkCommon.hpp \
|
src/common/NetworkCommon.hpp \
|
||||||
@@ -257,9 +276,11 @@ HEADERS += \
|
|||||||
src/common/NetworkRequest.hpp \
|
src/common/NetworkRequest.hpp \
|
||||||
src/common/NetworkResult.hpp \
|
src/common/NetworkResult.hpp \
|
||||||
src/common/NullablePtr.hpp \
|
src/common/NullablePtr.hpp \
|
||||||
|
src/common/Outcome.hpp \
|
||||||
src/common/ProviderId.hpp \
|
src/common/ProviderId.hpp \
|
||||||
src/common/SignalVector.hpp \
|
src/common/SignalVector.hpp \
|
||||||
src/common/SignalVectorModel.hpp \
|
src/common/SignalVectorModel.hpp \
|
||||||
|
src/common/Singleton.hpp \
|
||||||
src/common/UniqueAccess.hpp \
|
src/common/UniqueAccess.hpp \
|
||||||
src/common/UsernameSet.hpp \
|
src/common/UsernameSet.hpp \
|
||||||
src/common/Version.hpp \
|
src/common/Version.hpp \
|
||||||
@@ -288,6 +309,9 @@ HEADERS += \
|
|||||||
src/controllers/taggedusers/TaggedUser.hpp \
|
src/controllers/taggedusers/TaggedUser.hpp \
|
||||||
src/controllers/taggedusers/TaggedUsersController.hpp \
|
src/controllers/taggedusers/TaggedUsersController.hpp \
|
||||||
src/controllers/taggedusers/TaggedUsersModel.hpp \
|
src/controllers/taggedusers/TaggedUsersModel.hpp \
|
||||||
|
src/debug/AssertInGuiThread.hpp \
|
||||||
|
src/debug/Benchmark.hpp \
|
||||||
|
src/debug/Log.hpp \
|
||||||
src/ForwardDecl.hpp \
|
src/ForwardDecl.hpp \
|
||||||
src/messages/Emote.hpp \
|
src/messages/Emote.hpp \
|
||||||
src/messages/Image.hpp \
|
src/messages/Image.hpp \
|
||||||
@@ -345,6 +369,7 @@ HEADERS += \
|
|||||||
src/RunGui.hpp \
|
src/RunGui.hpp \
|
||||||
src/singletons/Badges.hpp \
|
src/singletons/Badges.hpp \
|
||||||
src/singletons/Emotes.hpp \
|
src/singletons/Emotes.hpp \
|
||||||
|
src/singletons/Fonts.hpp \
|
||||||
src/singletons/helper/GifTimer.hpp \
|
src/singletons/helper/GifTimer.hpp \
|
||||||
src/singletons/helper/LoggingChannel.hpp \
|
src/singletons/helper/LoggingChannel.hpp \
|
||||||
src/singletons/Logging.hpp \
|
src/singletons/Logging.hpp \
|
||||||
@@ -357,28 +382,41 @@ HEADERS += \
|
|||||||
src/singletons/TooltipPreviewImage.hpp \
|
src/singletons/TooltipPreviewImage.hpp \
|
||||||
src/singletons/Updates.hpp \
|
src/singletons/Updates.hpp \
|
||||||
src/singletons/WindowManager.hpp \
|
src/singletons/WindowManager.hpp \
|
||||||
|
src/util/Clamp.hpp \
|
||||||
|
src/util/CombinePath.hpp \
|
||||||
src/util/ConcurrentMap.hpp \
|
src/util/ConcurrentMap.hpp \
|
||||||
src/util/DebugCount.hpp \
|
src/util/DebugCount.hpp \
|
||||||
|
src/util/DistanceBetweenPoints.hpp \
|
||||||
src/util/FormatTime.hpp \
|
src/util/FormatTime.hpp \
|
||||||
|
src/util/FunctionEventFilter.hpp \
|
||||||
|
src/util/FuzzyConvert.hpp \
|
||||||
|
src/util/Helpers.hpp \
|
||||||
src/util/IncognitoBrowser.hpp \
|
src/util/IncognitoBrowser.hpp \
|
||||||
src/util/InitUpdateButton.hpp \
|
src/util/InitUpdateButton.hpp \
|
||||||
src/util/IrcHelpers.hpp \
|
src/util/IrcHelpers.hpp \
|
||||||
src/util/IsBigEndian.hpp \
|
src/util/IsBigEndian.hpp \
|
||||||
src/util/JsonQuery.hpp \
|
src/util/JsonQuery.hpp \
|
||||||
src/util/LayoutCreator.hpp \
|
src/util/LayoutCreator.hpp \
|
||||||
|
src/util/LayoutHelper.hpp \
|
||||||
src/util/Overloaded.hpp \
|
src/util/Overloaded.hpp \
|
||||||
|
src/util/PostToThread.hpp \
|
||||||
src/util/QObjectRef.hpp \
|
src/util/QObjectRef.hpp \
|
||||||
src/util/QStringHash.hpp \
|
src/util/QStringHash.hpp \
|
||||||
src/util/rangealgorithm.hpp \
|
src/util/rangealgorithm.hpp \
|
||||||
src/util/RapidjsonHelpers.hpp \
|
src/util/RapidjsonHelpers.hpp \
|
||||||
|
src/util/RapidJsonSerializeQString.hpp \
|
||||||
src/util/RemoveScrollAreaBackground.hpp \
|
src/util/RemoveScrollAreaBackground.hpp \
|
||||||
src/util/SampleCheerMessages.hpp \
|
src/util/SampleCheerMessages.hpp \
|
||||||
src/util/SharedPtrElementLess.hpp \
|
src/util/SharedPtrElementLess.hpp \
|
||||||
|
src/util/Shortcut.hpp \
|
||||||
src/util/StandardItemHelper.hpp \
|
src/util/StandardItemHelper.hpp \
|
||||||
src/util/StreamLink.hpp \
|
src/util/StreamLink.hpp \
|
||||||
|
src/util/WindowsHelper.hpp \
|
||||||
src/widgets/AccountSwitchPopup.hpp \
|
src/widgets/AccountSwitchPopup.hpp \
|
||||||
src/widgets/AccountSwitchWidget.hpp \
|
src/widgets/AccountSwitchWidget.hpp \
|
||||||
src/widgets/AttachedWindow.hpp \
|
src/widgets/AttachedWindow.hpp \
|
||||||
|
src/widgets/BaseWidget.hpp \
|
||||||
|
src/widgets/BaseWindow.hpp \
|
||||||
src/widgets/dialogs/EmotePopup.hpp \
|
src/widgets/dialogs/EmotePopup.hpp \
|
||||||
src/widgets/dialogs/IrcConnectionEditor.hpp \
|
src/widgets/dialogs/IrcConnectionEditor.hpp \
|
||||||
src/widgets/dialogs/LastRunCrashDialog.hpp \
|
src/widgets/dialogs/LastRunCrashDialog.hpp \
|
||||||
@@ -392,11 +430,13 @@ HEADERS += \
|
|||||||
src/widgets/dialogs/UpdateDialog.hpp \
|
src/widgets/dialogs/UpdateDialog.hpp \
|
||||||
src/widgets/dialogs/UserInfoPopup.hpp \
|
src/widgets/dialogs/UserInfoPopup.hpp \
|
||||||
src/widgets/dialogs/WelcomeDialog.hpp \
|
src/widgets/dialogs/WelcomeDialog.hpp \
|
||||||
|
src/widgets/helper/Button.hpp \
|
||||||
src/widgets/helper/ChannelView.hpp \
|
src/widgets/helper/ChannelView.hpp \
|
||||||
src/widgets/helper/ComboBoxItemDelegate.hpp \
|
src/widgets/helper/ComboBoxItemDelegate.hpp \
|
||||||
src/widgets/helper/CommonTexts.hpp \
|
src/widgets/helper/CommonTexts.hpp \
|
||||||
src/widgets/helper/DebugPopup.hpp \
|
src/widgets/helper/DebugPopup.hpp \
|
||||||
src/widgets/helper/EditableModelView.hpp \
|
src/widgets/helper/EditableModelView.hpp \
|
||||||
|
src/widgets/helper/EffectLabel.hpp \
|
||||||
src/widgets/helper/Line.hpp \
|
src/widgets/helper/Line.hpp \
|
||||||
src/widgets/helper/NotebookButton.hpp \
|
src/widgets/helper/NotebookButton.hpp \
|
||||||
src/widgets/helper/NotebookTab.hpp \
|
src/widgets/helper/NotebookTab.hpp \
|
||||||
@@ -404,6 +444,9 @@ HEADERS += \
|
|||||||
src/widgets/helper/ScrollbarHighlight.hpp \
|
src/widgets/helper/ScrollbarHighlight.hpp \
|
||||||
src/widgets/helper/SearchPopup.hpp \
|
src/widgets/helper/SearchPopup.hpp \
|
||||||
src/widgets/helper/SettingsDialogTab.hpp \
|
src/widgets/helper/SettingsDialogTab.hpp \
|
||||||
|
src/widgets/helper/SignalLabel.hpp \
|
||||||
|
src/widgets/helper/TitlebarButton.hpp \
|
||||||
|
src/widgets/Label.hpp \
|
||||||
src/widgets/Notebook.hpp \
|
src/widgets/Notebook.hpp \
|
||||||
src/widgets/Scrollbar.hpp \
|
src/widgets/Scrollbar.hpp \
|
||||||
src/widgets/settingspages/AboutPage.hpp \
|
src/widgets/settingspages/AboutPage.hpp \
|
||||||
@@ -424,6 +467,7 @@ HEADERS += \
|
|||||||
src/widgets/splits/SplitInput.hpp \
|
src/widgets/splits/SplitInput.hpp \
|
||||||
src/widgets/splits/SplitOverlay.hpp \
|
src/widgets/splits/SplitOverlay.hpp \
|
||||||
src/widgets/StreamView.hpp \
|
src/widgets/StreamView.hpp \
|
||||||
|
src/widgets/TooltipWidget.hpp \
|
||||||
src/widgets/Window.hpp \
|
src/widgets/Window.hpp \
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# include appbase
|
|
||||||
include($$PWD/appbase/main.pro)
|
|
||||||
INCLUDEPATH += $$PWD/appbase
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
Language: Cpp
|
|
||||||
|
|
||||||
AccessModifierOffset: -1
|
|
||||||
AccessModifierOffset: -4
|
|
||||||
AlignEscapedNewlinesLeft: true
|
|
||||||
AllowShortFunctionsOnASingleLine: false
|
|
||||||
AllowShortIfStatementsOnASingleLine: false
|
|
||||||
AllowShortLoopsOnASingleLine: false
|
|
||||||
AlwaysBreakAfterDefinitionReturnType: false
|
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
|
||||||
BasedOnStyle: Google
|
|
||||||
BraceWrapping: {
|
|
||||||
AfterNamespace: 'false'
|
|
||||||
AfterClass: 'true'
|
|
||||||
BeforeElse: 'true'
|
|
||||||
AfterControlStatement: 'true'
|
|
||||||
AfterFunction: 'true'
|
|
||||||
BeforeCatch: 'true'
|
|
||||||
}
|
|
||||||
BreakBeforeBraces: Custom
|
|
||||||
BreakConstructorInitializersBeforeComma: true
|
|
||||||
ColumnLimit: 80
|
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
||||||
DerivePointerBinding: false
|
|
||||||
FixNamespaceComments: true
|
|
||||||
IndentCaseLabels: true
|
|
||||||
IndentWidth: 4
|
|
||||||
IndentWrappedFunctionNames: true
|
|
||||||
IndentPPDirectives: AfterHash
|
|
||||||
NamespaceIndentation: Inner
|
|
||||||
PointerBindsToType: false
|
|
||||||
SpacesBeforeTrailingComments: 2
|
|
||||||
Standard: Auto
|
|
||||||
ReflowComments: false
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QHash>
|
|
||||||
#include <QString>
|
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
#define QStringAlias(name) \
|
|
||||||
namespace chatterino { \
|
|
||||||
struct name { \
|
|
||||||
QString string; \
|
|
||||||
bool operator==(const name &other) const \
|
|
||||||
{ \
|
|
||||||
return this->string == other.string; \
|
|
||||||
} \
|
|
||||||
bool operator!=(const name &other) const \
|
|
||||||
{ \
|
|
||||||
return this->string != other.string; \
|
|
||||||
} \
|
|
||||||
}; \
|
|
||||||
} /* namespace chatterino */ \
|
|
||||||
namespace std { \
|
|
||||||
template <> \
|
|
||||||
struct hash<chatterino::name> { \
|
|
||||||
size_t operator()(const chatterino::name &s) const \
|
|
||||||
{ \
|
|
||||||
return qHash(s.string); \
|
|
||||||
} \
|
|
||||||
}; \
|
|
||||||
} /* namespace std */
|
|
||||||
|
|
||||||
QStringAlias(UserName);
|
|
||||||
QStringAlias(UserId);
|
|
||||||
QStringAlias(Url);
|
|
||||||
QStringAlias(Tooltip);
|
|
||||||
QStringAlias(EmoteId);
|
|
||||||
QStringAlias(EmoteName);
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#include <QApplication>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QStandardPaths>
|
|
||||||
|
|
||||||
#include "ABSettings.hpp"
|
|
||||||
#include "ABTheme.hpp"
|
|
||||||
#include "singletons/Fonts.hpp"
|
|
||||||
#include "widgets/BaseWindow.hpp"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
using namespace AB_NAMESPACE;
|
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
|
|
||||||
auto path =
|
|
||||||
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
|
||||||
qDebug() << path;
|
|
||||||
|
|
||||||
QDir(path).mkdir(".");
|
|
||||||
|
|
||||||
new Settings(path);
|
|
||||||
new Fonts();
|
|
||||||
|
|
||||||
BaseWindow widget(nullptr, BaseWindow::EnableCustomFrame);
|
|
||||||
widget.setWindowTitle("asdf");
|
|
||||||
widget.show();
|
|
||||||
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
#-------------------------------------------------
|
|
||||||
#
|
|
||||||
# Project created by QtCreator 2018-11-19T19:03:22
|
|
||||||
#
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
!AB_NOT_STANDALONE {
|
|
||||||
message(appbase standalone)
|
|
||||||
QT += core gui widgets
|
|
||||||
TARGET = main
|
|
||||||
TEMPLATE = app
|
|
||||||
SOURCES += main.cpp
|
|
||||||
|
|
||||||
# https://bugreports.qt.io/browse/QTBUG-27018
|
|
||||||
equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
|
|
||||||
TARGET = bin/appbase
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
|
|
||||||
|
|
||||||
macx {
|
|
||||||
# osx (Tested on macOS Mojave and High Sierra)
|
|
||||||
CONFIG += c++17
|
|
||||||
} else {
|
|
||||||
CONFIG += c++17
|
|
||||||
win32-msvc* {
|
|
||||||
# win32 msvc
|
|
||||||
QMAKE_CXXFLAGS += /std:c++17
|
|
||||||
} else {
|
|
||||||
# clang/gcc on linux or win32
|
|
||||||
QMAKE_CXXFLAGS += -std=c++17
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug {
|
|
||||||
DEFINES += QT_DEBUG
|
|
||||||
}
|
|
||||||
|
|
||||||
linux {
|
|
||||||
LIBS += -lrt
|
|
||||||
QMAKE_LFLAGS += -lrt
|
|
||||||
}
|
|
||||||
|
|
||||||
macx {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
INCLUDEPATH += /usr/local/opt/openssl/include
|
|
||||||
LIBS += -L/usr/local/opt/openssl/lib
|
|
||||||
}
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
$$PWD/BaseSettings.cpp \
|
|
||||||
$$PWD/BaseTheme.cpp \
|
|
||||||
$$PWD/common/ChatterinoSetting.cpp \
|
|
||||||
$$PWD/debug/Benchmark.cpp \
|
|
||||||
$$PWD/singletons/Fonts.cpp \
|
|
||||||
$$PWD/util/FunctionEventFilter.cpp \
|
|
||||||
$$PWD/util/FuzzyConvert.cpp \
|
|
||||||
$$PWD/util/Helpers.cpp \
|
|
||||||
$$PWD/util/WindowsHelper.cpp \
|
|
||||||
$$PWD/widgets/BaseWidget.cpp \
|
|
||||||
$$PWD/widgets/BaseWindow.cpp \
|
|
||||||
$$PWD/widgets/Label.cpp \
|
|
||||||
$$PWD/widgets/TooltipWidget.cpp \
|
|
||||||
$$PWD/widgets/helper/Button.cpp \
|
|
||||||
$$PWD/widgets/helper/EffectLabel.cpp \
|
|
||||||
$$PWD/widgets/helper/SignalLabel.cpp \
|
|
||||||
$$PWD/widgets/helper/TitlebarButton.cpp \
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/BaseSettings.hpp \
|
|
||||||
$$PWD/BaseTheme.hpp \
|
|
||||||
$$PWD/common/ChatterinoSetting.hpp \
|
|
||||||
$$PWD/common/FlagsEnum.hpp \
|
|
||||||
$$PWD/common/Outcome.hpp \
|
|
||||||
$$PWD/common/Singleton.hpp \
|
|
||||||
$$PWD/debug/AssertInGuiThread.hpp \
|
|
||||||
$$PWD/debug/Benchmark.hpp \
|
|
||||||
$$PWD/debug/Log.hpp \
|
|
||||||
$$PWD/singletons/Fonts.hpp \
|
|
||||||
$$PWD/util/Clamp.hpp \
|
|
||||||
$$PWD/util/CombinePath.hpp \
|
|
||||||
$$PWD/util/DistanceBetweenPoints.hpp \
|
|
||||||
$$PWD/util/FunctionEventFilter.hpp \
|
|
||||||
$$PWD/util/FuzzyConvert.hpp \
|
|
||||||
$$PWD/util/Helpers.hpp \
|
|
||||||
$$PWD/util/LayoutHelper.hpp \
|
|
||||||
$$PWD/util/PostToThread.hpp \
|
|
||||||
$$PWD/util/RapidJsonSerializeQString.hpp \
|
|
||||||
$$PWD/util/Shortcut.hpp \
|
|
||||||
$$PWD/util/WindowsHelper.hpp \
|
|
||||||
$$PWD/widgets/BaseWidget.hpp \
|
|
||||||
$$PWD/widgets/BaseWindow.hpp \
|
|
||||||
$$PWD/widgets/Label.hpp \
|
|
||||||
$$PWD/widgets/TooltipWidget.hpp \
|
|
||||||
$$PWD/widgets/helper/Button.hpp \
|
|
||||||
$$PWD/widgets/helper/EffectLabel.hpp \
|
|
||||||
$$PWD/widgets/helper/SignalLabel.hpp \
|
|
||||||
$$PWD/widgets/helper/TitlebarButton.hpp \
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "util/Clamp.hpp"
|
#include "util/Clamp.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
std::vector<std::weak_ptr<pajlada::Settings::SettingData>> _settings;
|
std::vector<std::weak_ptr<pajlada::Settings::SettingData>> _settings;
|
||||||
|
|
||||||
@@ -125,4 +125,4 @@ AB_SETTINGS_CLASS *getABSettings()
|
|||||||
return AB_SETTINGS_CLASS::instance;
|
return AB_SETTINGS_CLASS::instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
# define AB_SETTINGS_CLASS Settings
|
# define AB_SETTINGS_CLASS Settings
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ private:
|
|||||||
Settings *getSettings();
|
Settings *getSettings();
|
||||||
AB_SETTINGS_CLASS *getABSettings();
|
AB_SETTINGS_CLASS *getABSettings();
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
|
|
||||||
#ifdef CHATTERINO
|
#ifdef CHATTERINO
|
||||||
# include "singletons/Settings.hpp"
|
# include "singletons/Settings.hpp"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "BaseTheme.hpp"
|
#include "BaseTheme.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
namespace {
|
namespace {
|
||||||
double getMultiplierByTheme(const QString &themeName)
|
double getMultiplierByTheme(const QString &themeName)
|
||||||
{
|
{
|
||||||
@@ -63,9 +63,9 @@ void AB_THEME_CLASS::actuallyUpdate(double hue, double multiplier)
|
|||||||
/// WINDOW
|
/// WINDOW
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
this->window.background = lightWin ? "#fff" : QColor(61, 60, 56);
|
this->window.background = lightWin ? "#fff" : QColor(61, 60, 56);
|
||||||
#else
|
#else
|
||||||
this->window.background = lightWin ? "#fff" : "#111";
|
this->window.background = lightWin ? "#fff" : "#111";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QColor fg = this->window.text = lightWin ? "#000" : "#eee";
|
QColor fg = this->window.text = lightWin ? "#000" : "#eee";
|
||||||
@@ -149,7 +149,7 @@ void AB_THEME_CLASS::actuallyUpdate(double hue, double multiplier)
|
|||||||
// QColor("#777"), QColor("#666")}};
|
// QColor("#777"), QColor("#666")}};
|
||||||
|
|
||||||
this->tabs.bottomLine = this->tabs.selected.backgrounds.regular.color();
|
this->tabs.bottomLine = this->tabs.selected.backgrounds.regular.color();
|
||||||
} // namespace AB_NAMESPACE
|
}
|
||||||
|
|
||||||
// Split
|
// Split
|
||||||
bool flat = isLight_;
|
bool flat = isLight_;
|
||||||
@@ -222,4 +222,4 @@ Theme *getTheme()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
# define AB_THEME_CLASS Theme
|
# define AB_THEME_CLASS Theme
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Theme;
|
class Theme;
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ private:
|
|||||||
// Otherwise implemented in BaseThemecpp
|
// Otherwise implemented in BaseThemecpp
|
||||||
Theme *getTheme();
|
Theme *getTheme();
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
|
|
||||||
#ifdef CHATTERINO
|
#ifdef CHATTERINO
|
||||||
# include "singletons/Theme.hpp"
|
# include "singletons/Theme.hpp"
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#include "BaseSettings.hpp"
|
#include "BaseSettings.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting)
|
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting)
|
||||||
{
|
{
|
||||||
_actuallyRegisterSetting(setting);
|
_actuallyRegisterSetting(setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <pajlada/settings.hpp>
|
#include <pajlada/settings.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting);
|
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting);
|
||||||
|
|
||||||
@@ -85,4 +85,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class Paths;
|
class Paths;
|
||||||
@@ -23,4 +23,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
static bool isGuiThread()
|
static bool isGuiThread()
|
||||||
{
|
{
|
||||||
@@ -18,4 +18,4 @@ static void assertInGuiThread()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "Benchmark.hpp"
|
#include "Benchmark.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
BenchmarkGuard::BenchmarkGuard(const QString &_name)
|
BenchmarkGuard::BenchmarkGuard(const QString &_name)
|
||||||
: name_(_name)
|
: name_(_name)
|
||||||
@@ -18,4 +18,4 @@ qreal BenchmarkGuard::getElapsedMs()
|
|||||||
return qreal(timer_.nsecsElapsed()) / 1000000.0;
|
return qreal(timer_.nsecsElapsed()) / 1000000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class BenchmarkGuard : boost::noncopyable
|
class BenchmarkGuard : boost::noncopyable
|
||||||
{
|
{
|
||||||
@@ -19,4 +19,4 @@ private:
|
|||||||
QString name_;
|
QString name_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
inline void log(const std::string &formatString, Args &&... args)
|
inline void log(const std::string &formatString, Args &&... args)
|
||||||
@@ -26,4 +26,4 @@ inline void log(const QString &formatString, Args &&... args)
|
|||||||
log(formatString.toStdString(), std::forward<Args>(args)...);
|
log(formatString.toStdString(), std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
namespace {
|
namespace {
|
||||||
int getBoldness()
|
int getBoldness()
|
||||||
{
|
{
|
||||||
@@ -89,7 +89,7 @@ void Fonts::initialize(Settings &, Paths &)
|
|||||||
},
|
},
|
||||||
false);
|
false);
|
||||||
#endif
|
#endif
|
||||||
} // namespace AB_NAMESPACE
|
}
|
||||||
|
|
||||||
QFont Fonts::getFont(FontStyle type, float scale)
|
QFont Fonts::getFont(FontStyle type, float scale)
|
||||||
{
|
{
|
||||||
@@ -178,4 +178,4 @@ Fonts *getFonts()
|
|||||||
return Fonts::instance;
|
return Fonts::instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class Paths;
|
class Paths;
|
||||||
@@ -90,4 +90,4 @@ private:
|
|||||||
|
|
||||||
Fonts *getFonts();
|
Fonts *getFonts();
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
// http://en.cppreference.com/w/cpp/algorithm/clamp
|
// http://en.cppreference.com/w/cpp/algorithm/clamp
|
||||||
|
|
||||||
@@ -10,4 +10,4 @@ constexpr const T &clamp(const T &v, const T &lo, const T &hi)
|
|||||||
return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v;
|
return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "FunctionEventFilter.hpp"
|
#include "FunctionEventFilter.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
FunctionEventFilter::FunctionEventFilter(
|
FunctionEventFilter::FunctionEventFilter(
|
||||||
QObject *parent, std::function<bool(QObject *, QEvent *)> function)
|
QObject *parent, std::function<bool(QObject *, QEvent *)> function)
|
||||||
@@ -14,4 +14,4 @@ bool FunctionEventFilter::eventFilter(QObject *watched, QEvent *event)
|
|||||||
return this->function_(watched, event);
|
return this->function_(watched, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class FunctionEventFilter : public QObject
|
class FunctionEventFilter : public QObject
|
||||||
{
|
{
|
||||||
@@ -21,4 +21,4 @@ private:
|
|||||||
std::function<bool(QObject *, QEvent *)> function_;
|
std::function<bool(QObject *, QEvent *)> function_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
QString generateUuid()
|
QString generateUuid()
|
||||||
{
|
{
|
||||||
@@ -35,4 +35,4 @@ QString shortenString(const QString &str, unsigned maxWidth)
|
|||||||
return shortened;
|
return shortened;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
auto fS(Args &&... args)
|
auto fS(Args &&... args)
|
||||||
@@ -20,7 +20,7 @@ QString formatRichNamedLink(const QString &url, const QString &name,
|
|||||||
|
|
||||||
QString shortenString(const QString &str, unsigned maxWidth = 50);
|
QString shortenString(const QString &str, unsigned maxWidth = 50);
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
|
|
||||||
namespace fmt {
|
namespace fmt {
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#define async_exec(a) \
|
#define async_exec(a) \
|
||||||
QThreadPool::globalInstance()->start(new LambdaRunnable(a));
|
QThreadPool::globalInstance()->start(new LambdaRunnable(a));
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class LambdaRunnable : public QRunnable
|
class LambdaRunnable : public QRunnable
|
||||||
{
|
{
|
||||||
@@ -56,4 +56,4 @@ static void postToThread(F &&fun, QObject *obj = qApp)
|
|||||||
QCoreApplication::postEvent(obj, new Event(std::forward<F>(fun)));
|
QCoreApplication::postEvent(obj, new Event(std::forward<F>(fun)));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
template <typename WidgetType, typename Func>
|
template <typename WidgetType, typename Func>
|
||||||
inline void createShortcut(WidgetType *w, const char *key, Func func)
|
inline void createShortcut(WidgetType *w, const char *key, Func func)
|
||||||
@@ -21,4 +21,4 @@ inline void createWindowShortcut(WidgetType *w, const char *key, Func func)
|
|||||||
QObject::connect(s, &QShortcut::activated, w, func);
|
QObject::connect(s, &QShortcut::activated, w, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#ifdef USEWINSDK
|
#ifdef USEWINSDK
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
typedef enum MONITOR_DPI_TYPE {
|
typedef enum MONITOR_DPI_TYPE {
|
||||||
MDT_EFFECTIVE_DPI = 0,
|
MDT_EFFECTIVE_DPI = 0,
|
||||||
@@ -81,6 +81,6 @@ void setRegisteredForStartup(bool isRegistered)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# include <Windows.h>
|
# include <Windows.h>
|
||||||
# include <boost/optional.hpp>
|
# include <boost/optional.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
boost::optional<UINT> getWindowDpi(HWND hwnd);
|
boost::optional<UINT> getWindowDpi(HWND hwnd);
|
||||||
void flushClipboard();
|
void flushClipboard();
|
||||||
@@ -13,6 +13,6 @@ void flushClipboard();
|
|||||||
bool isRegisteredForStartup();
|
bool isRegisteredForStartup();
|
||||||
void setRegisteredForStartup(bool isRegistered);
|
void setRegisteredForStartup(bool isRegistered);
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f)
|
BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f)
|
||||||
: QWidget(parent, f)
|
: QWidget(parent, f)
|
||||||
@@ -161,4 +161,4 @@ void BaseWidget::themeChangedEvent()
|
|||||||
// Do any color scheme updates here
|
// Do any color scheme updates here
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <pajlada/signals/signal.hpp>
|
#include <pajlada/signals/signal.hpp>
|
||||||
#include <pajlada/signals/signalholder.hpp>
|
#include <pajlada/signals/signalholder.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Theme;
|
class Theme;
|
||||||
class BaseWindow;
|
class BaseWindow;
|
||||||
@@ -56,4 +56,4 @@ private:
|
|||||||
friend class BaseWindow;
|
friend class BaseWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "widgets/helper/TitlebarButton.hpp"
|
#include "widgets/helper/TitlebarButton.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
BaseWindow::BaseWindow(FlagsEnum<Flags> _flags, QWidget *parent)
|
BaseWindow::BaseWindow(FlagsEnum<Flags> _flags, QWidget *parent)
|
||||||
: BaseWidget(parent,
|
: BaseWidget(parent,
|
||||||
@@ -997,4 +997,4 @@ bool BaseWindow::handleNCHITTEST(MSG *msg, long *result)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -10,7 +10,7 @@ class QHBoxLayout;
|
|||||||
struct tagMSG;
|
struct tagMSG;
|
||||||
typedef struct tagMSG MSG;
|
typedef struct tagMSG MSG;
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Button;
|
class Button;
|
||||||
class EffectLabel;
|
class EffectLabel;
|
||||||
@@ -135,4 +135,4 @@ private:
|
|||||||
friend class BaseWidget;
|
friend class BaseWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
Label::Label(QString text, FontStyle style)
|
Label::Label(QString text, FontStyle style)
|
||||||
: Label(nullptr, text, style)
|
: Label(nullptr, text, style)
|
||||||
@@ -137,4 +137,4 @@ int Label::getOffset()
|
|||||||
return this->hasOffset_ ? int(8 * this->scale()) : 0;
|
return this->hasOffset_ ? int(8 * this->scale()) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <pajlada/signals/signalholder.hpp>
|
#include <pajlada/signals/signalholder.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Label : public BaseWidget
|
class Label : public BaseWidget
|
||||||
{
|
{
|
||||||
@@ -47,4 +47,4 @@ private:
|
|||||||
pajlada::Signals::SignalHolder connections_;
|
pajlada::Signals::SignalHolder connections_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
# include <Windows.h>
|
# include <Windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
TooltipWidget *TooltipWidget::getInstance()
|
TooltipWidget *TooltipWidget::getInstance()
|
||||||
{
|
{
|
||||||
@@ -119,4 +119,4 @@ void TooltipWidget::leaveEvent(QEvent *)
|
|||||||
// clear parents event
|
// clear parents event
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <pajlada/signals/signal.hpp>
|
#include <pajlada/signals/signal.hpp>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class TooltipWidget : public BaseWindow
|
class TooltipWidget : public BaseWindow
|
||||||
{
|
{
|
||||||
@@ -42,4 +42,4 @@ private:
|
|||||||
pajlada::Signals::Connection fontChangedConnection_;
|
pajlada::Signals::Connection fontChangedConnection_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "BaseTheme.hpp"
|
#include "BaseTheme.hpp"
|
||||||
#include "util/FunctionEventFilter.hpp"
|
#include "util/FunctionEventFilter.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
Button::Button(BaseWidget *parent)
|
Button::Button(BaseWidget *parent)
|
||||||
: BaseWidget(parent)
|
: BaseWidget(parent)
|
||||||
@@ -340,4 +340,4 @@ void Button::showMenu()
|
|||||||
this->menuVisible_ = true;
|
this->menuVisible_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class Button : public BaseWidget
|
class Button : public BaseWidget
|
||||||
{
|
{
|
||||||
@@ -88,4 +88,4 @@ private:
|
|||||||
std::unique_ptr<QMenu> menu_{};
|
std::unique_ptr<QMenu> menu_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <QBrush>
|
#include <QBrush>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
EffectLabel::EffectLabel(BaseWidget *parent, int spacing)
|
EffectLabel::EffectLabel(BaseWidget *parent, int spacing)
|
||||||
: Button(parent)
|
: Button(parent)
|
||||||
@@ -40,4 +40,4 @@ Label &EffectLabel2::getLabel()
|
|||||||
return this->label_;
|
return this->label_;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class EffectLabel : public Button
|
class EffectLabel : public Button
|
||||||
{
|
{
|
||||||
@@ -38,4 +38,4 @@ private:
|
|||||||
Label label_;
|
Label label_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "widgets/helper/SignalLabel.hpp"
|
#include "widgets/helper/SignalLabel.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f)
|
SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f)
|
||||||
: QLabel(parent, f)
|
: QLabel(parent, f)
|
||||||
@@ -38,4 +38,4 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event)
|
|||||||
event->ignore();
|
event->ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
class SignalLabel : public QLabel
|
class SignalLabel : public QLabel
|
||||||
{
|
{
|
||||||
@@ -29,4 +29,4 @@ protected:
|
|||||||
void mouseMoveEvent(QMouseEvent *event) override;
|
void mouseMoveEvent(QMouseEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BaseTheme.hpp"
|
#include "BaseTheme.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
TitleBarButton::TitleBarButton()
|
TitleBarButton::TitleBarButton()
|
||||||
: Button(nullptr)
|
: Button(nullptr)
|
||||||
@@ -131,4 +131,4 @@ void TitleBarButton::paintEvent(QPaintEvent *event)
|
|||||||
// this->fancyPaint(painter);
|
// this->fancyPaint(painter);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "widgets/helper/Button.hpp"
|
#include "widgets/helper/Button.hpp"
|
||||||
|
|
||||||
namespace AB_NAMESPACE {
|
namespace chatterino {
|
||||||
|
|
||||||
enum class TitleBarButtonStyle {
|
enum class TitleBarButtonStyle {
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -29,4 +29,4 @@ private:
|
|||||||
TitleBarButtonStyle style_;
|
TitleBarButtonStyle style_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AB_NAMESPACE
|
} // namespace chatterino
|
||||||
Reference in New Issue
Block a user