classic fourtf commit
@@ -30,7 +30,11 @@ SOURCES += main.cpp\
|
|||||||
notebooktab.cpp \
|
notebooktab.cpp \
|
||||||
notebookpage.cpp \
|
notebookpage.cpp \
|
||||||
notebookbutton.cpp \
|
notebookbutton.cpp \
|
||||||
colorscheme.cpp
|
colorscheme.cpp \
|
||||||
|
chatwidgetheader.cpp \
|
||||||
|
chatwidgetinput.cpp \
|
||||||
|
chatwidgetview.cpp \
|
||||||
|
notebookpagedroppreview.cpp
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
chatwidget.h \
|
chatwidget.h \
|
||||||
@@ -38,6 +42,13 @@ HEADERS += mainwindow.h \
|
|||||||
notebooktab.h \
|
notebooktab.h \
|
||||||
notebookpage.h \
|
notebookpage.h \
|
||||||
notebookbutton.h \
|
notebookbutton.h \
|
||||||
colorscheme.h
|
colorscheme.h \
|
||||||
|
chatwidgetheader.h \
|
||||||
|
chatwidgetinput.h \
|
||||||
|
chatwidgetview.h \
|
||||||
|
notebookpagedroppreview.h
|
||||||
|
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
resources.qrc
|
||||||
|
|||||||
@@ -2,25 +2,42 @@
|
|||||||
#include "QPainter"
|
#include "QPainter"
|
||||||
#include "QFont"
|
#include "QFont"
|
||||||
#include "QFontDatabase"
|
#include "QFontDatabase"
|
||||||
|
#include "QVBoxLayout"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
|
||||||
ChatWidget::ChatWidget(QWidget *parent)
|
ChatWidget::ChatWidget(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent),
|
||||||
|
vbox(this)
|
||||||
{
|
{
|
||||||
QFont font("Segoe UI", 15, QFont::Normal, false);
|
vbox.setSpacing(0);
|
||||||
this->font = font;
|
vbox.setMargin(1);
|
||||||
|
|
||||||
|
vbox.addWidget(&header);
|
||||||
|
vbox.addWidget(&view);
|
||||||
|
vbox.addWidget(&input);
|
||||||
|
|
||||||
|
// QFont font("Segoe UI", 15, QFont::Normal, false);
|
||||||
|
// this->font = font;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatWidget::~ChatWidget()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::paintEvent(QPaintEvent *)
|
void ChatWidget::paintEvent(QPaintEvent *)
|
||||||
{
|
{
|
||||||
QPainter painter (this);
|
QPainter painter (this);
|
||||||
QColor color (255, 0, 0);
|
|
||||||
|
|
||||||
painter.setBrush(color);
|
painter.fillRect(rect(), ColorScheme::getInstance().ChatBackground);
|
||||||
painter.setPen(color);
|
|
||||||
|
|
||||||
painter.setFont(this->font);
|
// QColor color (255, 0, 0);
|
||||||
painter.drawRect(5, 10, 10, 5);
|
|
||||||
|
|
||||||
QString text = "test text";
|
// painter.setPen(color);
|
||||||
painter.drawText(20, 20, text);
|
|
||||||
|
// painter.setFont(this->font);
|
||||||
|
// painter.drawRect(0, 0, width() - 1, height() - 1);
|
||||||
|
|
||||||
|
// QString text = "test text";
|
||||||
|
// painter.drawText(20, 20, text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,29 @@
|
|||||||
#define CHATWIDGET_H
|
#define CHATWIDGET_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include "QVBoxLayout"
|
||||||
#include "QFont"
|
#include "QFont"
|
||||||
|
#include "chatwidgetheader.h"
|
||||||
|
#include "chatwidgetview.h"
|
||||||
|
#include "chatwidgetinput.h"
|
||||||
|
|
||||||
class ChatWidget : public QWidget
|
class ChatWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChatWidget(QWidget *parent = 0);
|
ChatWidget(QWidget *parent = 0);
|
||||||
|
~ChatWidget();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QFont font;
|
QFont font;
|
||||||
|
QVBoxLayout vbox;
|
||||||
|
ChatWidgetHeader header;
|
||||||
|
ChatWidgetView view;
|
||||||
|
ChatWidgetInput input;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHATWIDGET_H
|
#endif // CHATWIDGET_H
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
#include "chatwidgetheader.h"
|
||||||
|
#include "QPainter"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
#include "chatwidget.h"
|
||||||
|
#include "notebookpage.h"
|
||||||
|
#include "QDrag"
|
||||||
|
#include "QMimeData"
|
||||||
|
#include "QByteArray"
|
||||||
|
|
||||||
|
ChatWidgetHeader::ChatWidgetHeader()
|
||||||
|
: QWidget()
|
||||||
|
{
|
||||||
|
setFixedHeight(32);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatWidgetHeader::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
|
||||||
|
painter.fillRect(rect(), ColorScheme::getInstance().ChatHeaderBackground);
|
||||||
|
painter.setPen(ColorScheme::getInstance().ChatHeaderBorder);
|
||||||
|
painter.drawRect(0, 0, width() - 1, height() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatWidgetHeader::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
dragging = true;
|
||||||
|
|
||||||
|
dragStart = event->pos();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatWidgetHeader::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (dragging)
|
||||||
|
{
|
||||||
|
if (std::abs(dragStart.x() - event->pos().x()) > 12 ||
|
||||||
|
std::abs(dragStart.y() - event->pos().y()) > 12)
|
||||||
|
{
|
||||||
|
auto chatWidget = getChatWidget();
|
||||||
|
auto page = static_cast<NotebookPage*>(chatWidget->parentWidget());
|
||||||
|
|
||||||
|
if (page != NULL)
|
||||||
|
{
|
||||||
|
NotebookPage::isDraggingSplit = true;
|
||||||
|
NotebookPage::draggingSplit = chatWidget;
|
||||||
|
|
||||||
|
auto originalLocation = page->removeFromLayout(chatWidget);
|
||||||
|
|
||||||
|
QDrag *drag = new QDrag(chatWidget);
|
||||||
|
QMimeData* mimeData = new QMimeData;
|
||||||
|
|
||||||
|
mimeData->setData("chatterino/split", "xD");
|
||||||
|
|
||||||
|
drag->setMimeData(mimeData);
|
||||||
|
|
||||||
|
Qt::DropAction dropAction = drag->exec(Qt::MoveAction);
|
||||||
|
|
||||||
|
if (dropAction == Qt::IgnoreAction)
|
||||||
|
{
|
||||||
|
page->addToLayout(chatWidget, originalLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
NotebookPage::isDraggingSplit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatWidget* ChatWidgetHeader::getChatWidget()
|
||||||
|
{
|
||||||
|
return static_cast<ChatWidget*>(parentWidget());
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CHATWIDGETHEADER_H
|
||||||
|
#define CHATWIDGETHEADER_H
|
||||||
|
|
||||||
|
#include "QWidget"
|
||||||
|
#include "QPaintEvent"
|
||||||
|
#include "QPoint"
|
||||||
|
#include "QMouseEvent"
|
||||||
|
|
||||||
|
class ChatWidget;
|
||||||
|
|
||||||
|
class ChatWidgetHeader : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ChatWidgetHeader();
|
||||||
|
ChatWidget* getChatWidget();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *);
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QPoint dragStart;
|
||||||
|
bool dragging = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHATWIDGETHEADER_H
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#include "chatwidgetinput.h"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
#include "QPainter"
|
||||||
|
|
||||||
|
ChatWidgetInput::ChatWidgetInput()
|
||||||
|
{
|
||||||
|
setFixedHeight(38);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatWidgetInput::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
|
||||||
|
painter.fillRect(rect(), ColorScheme::getInstance().ChatInputBackground);
|
||||||
|
painter.setPen(ColorScheme::getInstance().ChatInputBorder);
|
||||||
|
painter.drawRect(0, 0, width() - 1, height() - 1);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef CHATWIDGETINPUT_H
|
||||||
|
#define CHATWIDGETINPUT_H
|
||||||
|
|
||||||
|
#include "QWidget"
|
||||||
|
#include "QPaintEvent"
|
||||||
|
|
||||||
|
class ChatWidgetInput : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ChatWidgetInput();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHATWIDGETINPUT_H
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "chatwidgetview.h"
|
||||||
|
|
||||||
|
ChatWidgetView::ChatWidgetView()
|
||||||
|
: QWidget()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef CHATVIEW_H
|
||||||
|
#define CHATVIEW_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class ChatWidgetView : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ChatWidgetView();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHATVIEW_H
|
||||||
@@ -9,12 +9,31 @@ void ColorScheme::setColors(float hue, float multiplyer)
|
|||||||
|
|
||||||
auto isLightTheme = IsLightTheme;
|
auto isLightTheme = IsLightTheme;
|
||||||
|
|
||||||
auto getColor = [isLightTheme, multiplyer] (qreal h, qreal s, qreal l) -> QColor
|
auto getColor = [isLightTheme, multiplyer] (qreal h, qreal s, qreal l, qreal a = 1.0)
|
||||||
{
|
{
|
||||||
return QColor::fromHslF(h, s, (((l - 0.5) * multiplyer) + 0.5));
|
return QColor::fromHslF(h, s, (((l - 0.5) * multiplyer) + 0.5), a);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DropPreviewBackground = getColor(hue, 0.5, 0.5, 0.3);
|
||||||
|
|
||||||
TextCaret = IsLightTheme ? QColor(0, 0, 0) : QColor(255, 255, 255);
|
TextCaret = IsLightTheme ? QColor(0, 0, 0) : QColor(255, 255, 255);
|
||||||
|
|
||||||
// ChatBorder = IsLightTheme ? QColor()
|
// tab
|
||||||
|
TabPanelBackground = QColor(255, 255, 255);
|
||||||
|
TabBackground = QColor(255, 255, 255);
|
||||||
|
TabHoverBackground = getColor(hue, 0, 0.05);
|
||||||
|
TabSelectedBackground = getColor(hue, 0.5, 0.5);
|
||||||
|
TabHighlightedBackground = getColor(hue, 0.5, 0.2);
|
||||||
|
TabNewMessageBackground = QBrush(getColor(hue, 0.5, 0.2), Qt::DiagCrossPattern);
|
||||||
|
TabText = QColor(0, 0, 0);
|
||||||
|
TabHoverText = QColor(0, 0, 0);
|
||||||
|
TabSelectedText = QColor(255, 255, 255);
|
||||||
|
TabHighlightedText = QColor(0, 0, 0);
|
||||||
|
|
||||||
|
// Chat
|
||||||
|
ChatBackground = getColor(0, 0.1, 1);
|
||||||
|
ChatHeaderBackground = getColor(0, 0.1, 0.9);
|
||||||
|
ChatHeaderBorder = getColor(0, 0.1, 0.85);
|
||||||
|
ChatInputBackground = getColor(0, 0.1, 0.95);
|
||||||
|
ChatInputBorder = getColor(0, 0.1, 0.9);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,15 @@
|
|||||||
#define COLORSCHEME_H
|
#define COLORSCHEME_H
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
#include <QBrush>
|
||||||
|
|
||||||
class ColorScheme
|
class ColorScheme
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool IsLightTheme;
|
bool IsLightTheme;
|
||||||
|
|
||||||
|
QColor DropPreviewBackground;
|
||||||
|
|
||||||
QColor TooltipBackground;
|
QColor TooltipBackground;
|
||||||
QColor TooltipText;
|
QColor TooltipText;
|
||||||
QColor ChatSeperator;
|
QColor ChatSeperator;
|
||||||
@@ -15,9 +18,13 @@ public:
|
|||||||
QColor ChatBackgroundHighlighted;
|
QColor ChatBackgroundHighlighted;
|
||||||
QColor ChatBackgroundResub;
|
QColor ChatBackgroundResub;
|
||||||
QColor ChatBackgroundWhisper;
|
QColor ChatBackgroundWhisper;
|
||||||
QColor ChatInputOuter;
|
|
||||||
QColor ChatInputInner;
|
QColor ChatHeaderBorder;
|
||||||
|
QColor ChatHeaderBackground;
|
||||||
|
|
||||||
|
QColor ChatInputBackground;
|
||||||
QColor ChatInputBorder;
|
QColor ChatInputBorder;
|
||||||
|
|
||||||
QColor ChatMessageSeperatorBorder;
|
QColor ChatMessageSeperatorBorder;
|
||||||
QColor ChatMessageSeperatorBorderInner;
|
QColor ChatMessageSeperatorBorderInner;
|
||||||
QColor ChatBorder;
|
QColor ChatBorder;
|
||||||
@@ -32,12 +39,13 @@ public:
|
|||||||
QColor ScrollbarThumb;
|
QColor ScrollbarThumb;
|
||||||
QColor ScrollbarThumbSelected;
|
QColor ScrollbarThumbSelected;
|
||||||
QColor ScrollbarArrow;
|
QColor ScrollbarArrow;
|
||||||
QColor TabPanelBG;
|
|
||||||
QColor TabBG;
|
QColor TabPanelBackground;
|
||||||
QColor TabHoverBG;
|
QColor TabBackground;
|
||||||
QColor TabSelectedBG;
|
QColor TabHoverBackground;
|
||||||
QColor TabHighlightedBG;
|
QColor TabSelectedBackground;
|
||||||
QColor TabNewMessageBG;
|
QColor TabHighlightedBackground;
|
||||||
|
QBrush TabNewMessageBackground;
|
||||||
QColor TabText;
|
QColor TabText;
|
||||||
QColor TabHoverText;
|
QColor TabHoverText;
|
||||||
QColor TabSelectedText;
|
QColor TabSelectedText;
|
||||||
|
|||||||
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 680 B |
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 255 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 330 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 362 B |
|
After Width: | Height: | Size: 354 B |
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 292 B |
|
After Width: | Height: | Size: 116 B |
@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
//ColorScheme::makeScheme(0, -0.8);
|
ColorScheme::getInstance().setColors(0, -0.8);
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
#include <QPalette>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "chatwidget.h"
|
#include "chatwidget.h"
|
||||||
#include "notebook.h"
|
#include "notebook.h"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
@@ -11,6 +13,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
this->notebook.addPage();
|
this->notebook.addPage();
|
||||||
this->notebook.addPage();
|
this->notebook.addPage();
|
||||||
this->notebook.addPage();
|
this->notebook.addPage();
|
||||||
|
|
||||||
|
QPalette palette;
|
||||||
|
palette.setColor(QPalette::Background, ColorScheme::getInstance().TabPanelBackground);
|
||||||
|
setPalette(palette);
|
||||||
|
|
||||||
|
resize(1280, 800);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "notebookpage.h"
|
#include "notebookpage.h"
|
||||||
#include "notebookbutton.h"
|
#include "notebookbutton.h"
|
||||||
#include "QFormLayout"
|
#include "QFormLayout"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
|
||||||
Notebook::Notebook(QWidget *parent)
|
Notebook::Notebook(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
@@ -24,7 +25,7 @@ Notebook::Notebook(QWidget *parent)
|
|||||||
NotebookPage* Notebook::addPage()
|
NotebookPage* Notebook::addPage()
|
||||||
{
|
{
|
||||||
auto tab = new NotebookTab(this);
|
auto tab = new NotebookTab(this);
|
||||||
auto page = new NotebookPage(tab);
|
auto page = new NotebookPage(this, tab);
|
||||||
|
|
||||||
if (pages.count() == 0)
|
if (pages.count() == 0)
|
||||||
{
|
{
|
||||||
@@ -38,18 +39,20 @@ NotebookPage* Notebook::addPage()
|
|||||||
|
|
||||||
void Notebook::select(NotebookPage* page)
|
void Notebook::select(NotebookPage* page)
|
||||||
{
|
{
|
||||||
if (selected != nullptr)
|
if (page == selected) return;
|
||||||
{
|
|
||||||
selected->setParent(nullptr);
|
|
||||||
selected->tab->setSelected(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (page != nullptr)
|
if (page != nullptr)
|
||||||
{
|
{
|
||||||
page->setParent(this);
|
page->setHidden(false);
|
||||||
page->tab->setSelected(true);
|
page->tab->setSelected(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selected != nullptr)
|
||||||
|
{
|
||||||
|
selected->setHidden(true);
|
||||||
|
selected->tab->setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
selected = page;
|
selected = page;
|
||||||
|
|
||||||
performLayout();
|
performLayout();
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "notebookbutton.h"
|
#include "notebookbutton.h"
|
||||||
#include "QPainter"
|
#include "QPainter"
|
||||||
|
#include "QPainterPath"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
|
||||||
NotebookButton::NotebookButton(QWidget *parent)
|
NotebookButton::NotebookButton(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@@ -14,22 +16,25 @@ void NotebookButton::paintEvent(QPaintEvent *)
|
|||||||
QColor background;
|
QColor background;
|
||||||
QColor foreground;
|
QColor foreground;
|
||||||
|
|
||||||
|
auto colorScheme = ColorScheme::getInstance();
|
||||||
|
|
||||||
if (mouseDown)
|
if (mouseDown)
|
||||||
{
|
{
|
||||||
foreground = QColor(0, 0, 0);
|
background = colorScheme.TabSelectedBackground;
|
||||||
background = QColor(255, 255, 255);
|
foreground = colorScheme.TabSelectedText;
|
||||||
}
|
}
|
||||||
else if (mouseOver)
|
else if (mouseOver)
|
||||||
{
|
{
|
||||||
foreground = QColor(255, 255, 255);
|
background = colorScheme.TabHoverBackground;
|
||||||
background = QColor(0, 0, 0);
|
foreground = colorScheme.TabSelectedBackground;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreground = QColor(0, 0, 0);
|
background = colorScheme.TabPanelBackground;
|
||||||
background = QColor(255, 255, 255);
|
foreground = colorScheme.TabSelectedBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
painter.setPen(Qt::NoPen);
|
||||||
painter.fillRect(this->rect(), background);
|
painter.fillRect(this->rect(), background);
|
||||||
|
|
||||||
float h = this->height(), w = this->width();
|
float h = this->height(), w = this->width();
|
||||||
@@ -41,11 +46,43 @@ void NotebookButton::paintEvent(QPaintEvent *)
|
|||||||
}
|
}
|
||||||
else if (icon == IconUser)
|
else if (icon == IconUser)
|
||||||
{
|
{
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
painter.setRenderHint(QPainter::HighQualityAntialiasing);
|
||||||
|
|
||||||
|
auto a = w/8;
|
||||||
|
QPainterPath path;
|
||||||
|
|
||||||
|
path.arcMoveTo(a, 4 * a, 6 * a, 6 * a, 0);
|
||||||
|
path.arcTo(a, 4 * a, 6 * a, 6 * a, 0, 180);
|
||||||
|
|
||||||
|
painter.fillPath(path, foreground);
|
||||||
|
|
||||||
|
painter.setBrush(background);
|
||||||
|
painter.drawEllipse(2*a, 1*a, 4*a, 4*a);
|
||||||
|
|
||||||
|
painter.setBrush(foreground);
|
||||||
|
painter.drawEllipse(2.5*a, 1.5*a, 3*a + 1, 3*a);
|
||||||
}
|
}
|
||||||
else // IconSettings
|
else // IconSettings
|
||||||
{
|
{
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
painter.setRenderHint(QPainter::HighQualityAntialiasing);
|
||||||
|
|
||||||
|
auto a = w/8;
|
||||||
|
QPainterPath path;
|
||||||
|
|
||||||
|
path.arcMoveTo(a, a, 6*a, 6*a, 0 - (360 / 32.0));
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
path.arcTo(a, a, 6*a, 6*a, i * (360 / 8.0) - (360 / 32.0), (360 / 32.0));
|
||||||
|
path.arcTo(2*a, 2*a, 4*a, 4*a, i * (360 / 8.0) + (360 / 32.0), (360 / 32.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
painter.fillPath(path, foreground);
|
||||||
|
|
||||||
|
painter.setBrush(background);
|
||||||
|
painter.drawEllipse(3*a, 3*a, 2*a, 2*a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ class NotebookButton : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static const int IconPlus = 0;
|
static const int IconPlus = 0;
|
||||||
static const int IconUser = 0;
|
static const int IconUser = 1;
|
||||||
static const int IconSettings = 0;
|
static const int IconSettings = 2;
|
||||||
|
|
||||||
int icon = 0;
|
int icon = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,200 @@
|
|||||||
#include "QWidget"
|
#include "QWidget"
|
||||||
#include "QPainter"
|
#include "QPainter"
|
||||||
|
#include "QHBoxLayout"
|
||||||
|
#include "QVBoxLayout"
|
||||||
|
#include "QMimeData"
|
||||||
#include "notebookpage.h"
|
#include "notebookpage.h"
|
||||||
#include "notebooktab.h"
|
#include "notebooktab.h"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
#include "chatwidget.h"
|
||||||
|
|
||||||
NotebookPage::NotebookPage(NotebookTab *tab)
|
bool NotebookPage::isDraggingSplit = false;
|
||||||
|
ChatWidget* NotebookPage::draggingSplit = NULL;
|
||||||
|
std::pair<int, int> NotebookPage::dropPosition = std::pair<int, int>(-1, -1);
|
||||||
|
|
||||||
|
NotebookPage::NotebookPage(QWidget *parent, NotebookTab *tab)
|
||||||
|
: QWidget(parent),
|
||||||
|
parentbox(this),
|
||||||
|
preview(this)
|
||||||
{
|
{
|
||||||
this->tab = tab;
|
this->tab = tab;
|
||||||
tab->page = this;
|
tab->page = this;
|
||||||
|
|
||||||
|
setHidden(true);
|
||||||
|
setAcceptDrops(true);
|
||||||
|
|
||||||
|
parentbox.addSpacing(2);
|
||||||
|
parentbox.addLayout(&hbox);
|
||||||
|
parentbox.setMargin(0);
|
||||||
|
|
||||||
|
hbox.setSpacing(1);
|
||||||
|
hbox.setMargin(0);
|
||||||
|
|
||||||
|
QVBoxLayout* vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
|
||||||
|
hbox.addLayout(vbox);
|
||||||
|
|
||||||
|
vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
|
||||||
|
hbox.addLayout(vbox);
|
||||||
|
|
||||||
|
vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
|
||||||
|
hbox.addLayout(vbox);
|
||||||
|
|
||||||
|
vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
vbox->addWidget(new ChatWidget());
|
||||||
|
|
||||||
|
hbox.addLayout(vbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::pair<int, int> NotebookPage::removeFromLayout(ChatWidget *widget)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < hbox.count(); ++i)
|
||||||
|
{
|
||||||
|
auto vbox = static_cast<QVBoxLayout*>(hbox.itemAt(i));
|
||||||
|
|
||||||
|
for (int j = 0; j < vbox->count(); ++j)
|
||||||
|
{
|
||||||
|
if (vbox->itemAt(j)->widget() != widget) continue;
|
||||||
|
|
||||||
|
widget->setParent(NULL);
|
||||||
|
|
||||||
|
bool isLastItem = vbox->count() == 0;
|
||||||
|
|
||||||
|
if (isLastItem)
|
||||||
|
{
|
||||||
|
hbox.removeItem(vbox);
|
||||||
|
|
||||||
|
delete vbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::pair<int, int>(i, isLastItem ? -1 : j);;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::pair<int, int>(-1, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::addToLayout(ChatWidget *widget, std::pair<int, int> position = std::pair<int, int>(-1, -1))
|
||||||
|
{
|
||||||
|
// add vbox at the end
|
||||||
|
if (position.first < 0 || position.first >= hbox.count())
|
||||||
|
{
|
||||||
|
auto vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(widget);
|
||||||
|
|
||||||
|
hbox.addLayout(vbox);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// insert vbox
|
||||||
|
if (position.second == -1)
|
||||||
|
{
|
||||||
|
auto vbox = new QVBoxLayout();
|
||||||
|
vbox->addWidget(widget);
|
||||||
|
|
||||||
|
hbox.insertLayout(position.first, vbox);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add to existing vbox
|
||||||
|
auto vbox = static_cast<QVBoxLayout*>(hbox.itemAt(position.first));
|
||||||
|
|
||||||
|
vbox->insertWidget(std::max(0, std::min(vbox->count(), position.second)), widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::dragEnterEvent(QDragEnterEvent *event)
|
||||||
|
{
|
||||||
|
if (!event->mimeData()->hasFormat("chatterino/split")) return;
|
||||||
|
|
||||||
|
if (isDraggingSplit)
|
||||||
|
{
|
||||||
|
dropRegions.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < hbox.count() + 1; ++i)
|
||||||
|
{
|
||||||
|
dropRegions.push_back(DropRegion(QRect(((i*4 - 1) * width() / hbox.count()) / 4, 0, width()/hbox.count()/2, height()), std::pair<int, int>(i, -1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < hbox.count(); ++i)
|
||||||
|
{
|
||||||
|
auto vbox = static_cast<QVBoxLayout*>(hbox.itemAt(i));
|
||||||
|
|
||||||
|
for (int j = 0; j < vbox->count() + 1; ++j)
|
||||||
|
{
|
||||||
|
dropRegions.push_back(DropRegion(QRect(i*width()/hbox.count(), ((j*2 - 1) * height() / vbox->count()) / 2, width()/hbox.count(), height()/vbox->count()), std::pair<int, int>(i, j)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setPreviewRect(event->pos());
|
||||||
|
|
||||||
|
event->acceptProposedAction();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::dragMoveEvent(QDragMoveEvent *event)
|
||||||
|
{
|
||||||
|
setPreviewRect(event->pos());
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::setPreviewRect(QPoint mousePos)
|
||||||
|
{
|
||||||
|
for (DropRegion region : dropRegions)
|
||||||
|
{
|
||||||
|
if (region.rect.contains(mousePos))
|
||||||
|
{
|
||||||
|
preview.move(region.rect.x(), region.rect.y());
|
||||||
|
preview.resize(region.rect.width(), region.rect.height());
|
||||||
|
preview.show();
|
||||||
|
preview.raise();
|
||||||
|
|
||||||
|
dropPosition = region.position;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
preview.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::dragLeaveEvent(QDragLeaveEvent *event)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPage::dropEvent(QDropEvent *event)
|
||||||
|
{
|
||||||
|
if (isDraggingSplit)
|
||||||
|
{
|
||||||
|
event->acceptProposedAction();
|
||||||
|
|
||||||
|
NotebookPage::draggingSplit->setParent(this);
|
||||||
|
|
||||||
|
addToLayout(NotebookPage::draggingSplit, dropPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
preview.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotebookPage::paintEvent(QPaintEvent *)
|
void NotebookPage::paintEvent(QPaintEvent *)
|
||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
||||||
painter.setPen(QColor(255, 0, 0));
|
// painter.fillRect(rect(), ColorScheme::getInstance().ChatBackground);
|
||||||
painter.drawRect(0, 0, width() - 1, height() - 1);
|
|
||||||
|
|
||||||
painter.drawText(8, 8, QString::number(tab->x()));
|
// painter.fillRect(0, 0, width(), 2, ColorScheme::getInstance().TabSelectedBackground);
|
||||||
|
|
||||||
|
painter.fillRect(rect(), ColorScheme::getInstance().TabSelectedBackground);
|
||||||
|
|
||||||
|
painter.fillRect(0, 0, width(), 2, ColorScheme::getInstance().TabSelectedBackground);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,19 +2,59 @@
|
|||||||
#define NOTEBOOKPAGE_H
|
#define NOTEBOOKPAGE_H
|
||||||
|
|
||||||
#include "QWidget"
|
#include "QWidget"
|
||||||
|
#include "QRect"
|
||||||
|
#include "QVector"
|
||||||
|
#include "QHBoxLayout"
|
||||||
|
#include "QVBoxLayout"
|
||||||
|
#include "QDragEnterEvent"
|
||||||
#include "notebookpage.h"
|
#include "notebookpage.h"
|
||||||
#include "notebooktab.h"
|
#include "notebooktab.h"
|
||||||
|
#include "chatwidget.h"
|
||||||
|
#include "notebookpagedroppreview.h"
|
||||||
|
|
||||||
class NotebookPage : public QWidget
|
class NotebookPage : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NotebookPage(NotebookTab *tab);
|
NotebookPage(QWidget *parent, NotebookTab *tab);
|
||||||
NotebookTab* tab;
|
NotebookTab* tab;
|
||||||
|
QVBoxLayout parentbox;
|
||||||
|
QHBoxLayout hbox;
|
||||||
|
|
||||||
|
std::pair<int, int> removeFromLayout(ChatWidget* widget);
|
||||||
|
void addToLayout(ChatWidget* widget, std::pair<int, int> position);
|
||||||
|
|
||||||
|
static bool isDraggingSplit;
|
||||||
|
static ChatWidget* draggingSplit;
|
||||||
|
static std::pair<int, int> dropPosition;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
struct DropRegion
|
||||||
|
{
|
||||||
|
QRect rect;
|
||||||
|
std::pair<int, int> position;
|
||||||
|
|
||||||
|
DropRegion(QRect rect, std::pair<int, int> position)
|
||||||
|
{
|
||||||
|
this->rect = rect;
|
||||||
|
this->position = position;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<DropRegion> dropRegions;
|
||||||
|
|
||||||
|
NotebookPageDropPreview preview;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setPreviewRect(QPoint mousePos);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOTEBOOKPAGE_H
|
#endif // NOTEBOOKPAGE_H
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#include "notebookpagedroppreview.h"
|
||||||
|
#include "QPainter"
|
||||||
|
#include "colorscheme.h"
|
||||||
|
|
||||||
|
NotebookPageDropPreview::NotebookPageDropPreview(QWidget *parent = 0)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookPageDropPreview::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
|
||||||
|
painter.fillRect(rect(), ColorScheme::getInstance().DropPreviewBackground);
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#ifndef NOTEBOOKPAGEDROPPREVIEW_H
|
||||||
|
#define NOTEBOOKPAGEDROPPREVIEW_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class NotebookPageDropPreview : public QWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NotebookPageDropPreview(QWidget *parent);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // NOTEBOOKPAGEDROPPREVIEW_H
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
#include <QPainter>
|
||||||
#include "notebook.h"
|
#include "notebook.h"
|
||||||
#include "notebooktab.h"
|
#include "notebooktab.h"
|
||||||
#include "QPainter"
|
#include "colorscheme.h"
|
||||||
|
|
||||||
NotebookTab::NotebookTab(Notebook *notebook)
|
NotebookTab::NotebookTab(Notebook *notebook)
|
||||||
: QWidget(notebook)
|
: QWidget(notebook)
|
||||||
@@ -9,6 +10,19 @@ NotebookTab::NotebookTab(Notebook *notebook)
|
|||||||
text = "<no title>";
|
text = "<no title>";
|
||||||
|
|
||||||
calcSize();
|
calcSize();
|
||||||
|
|
||||||
|
setAcceptDrops(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
int NotebookTab::getHighlightStyle()
|
||||||
|
{
|
||||||
|
return highlightStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotebookTab::setHighlightStyle(int style)
|
||||||
|
{
|
||||||
|
highlightStyle = style;
|
||||||
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotebookTab::setSelected(bool value)
|
void NotebookTab::setSelected(bool value)
|
||||||
@@ -31,35 +45,35 @@ void NotebookTab::paintEvent(QPaintEvent *)
|
|||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
||||||
QColor bg = QColor(255, 255, 255), fg = QColor(0, 0, 0);
|
QColor fg = QColor(0, 0, 0);
|
||||||
|
|
||||||
// if (selected)
|
auto colorScheme = ColorScheme::getInstance();
|
||||||
// {
|
|
||||||
// bg = App.ColorScheme.TabSelectedBG;
|
|
||||||
// text = App.ColorScheme.TabSelectedText;
|
|
||||||
// }
|
|
||||||
// else if (mouseOver)
|
|
||||||
// {
|
|
||||||
// bg = App.ColorScheme.TabHoverBG;
|
|
||||||
// text = App.ColorScheme.TabHoverText;
|
|
||||||
// }
|
|
||||||
// else if ()
|
|
||||||
// {
|
|
||||||
// bg = App.ColorScheme.TabHighlightedBG;
|
|
||||||
// text = App.ColorScheme.TabHighlightedText;
|
|
||||||
// }
|
|
||||||
// else if ()
|
|
||||||
// {
|
|
||||||
// bg = App.ColorScheme.TabNewMessageBG;
|
|
||||||
// text = App.ColorScheme.TabHighlightedText;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// bg = App.ColorScheme.TabBG;
|
|
||||||
// text = App.ColorScheme.TabText;
|
|
||||||
// }
|
|
||||||
|
|
||||||
painter.fillRect(rect(), bg);
|
if (selected)
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), colorScheme.TabSelectedBackground);
|
||||||
|
fg = colorScheme.TabSelectedText;
|
||||||
|
}
|
||||||
|
else if (mouseOver)
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), colorScheme.TabHoverBackground);
|
||||||
|
fg = colorScheme.TabHoverText;
|
||||||
|
}
|
||||||
|
else if (highlightStyle == HighlightHighlighted)
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), colorScheme.TabHighlightedBackground);
|
||||||
|
fg = colorScheme.TabHighlightedText;
|
||||||
|
}
|
||||||
|
else if (highlightStyle == HighlightNewMessage)
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), colorScheme.TabNewMessageBackground);
|
||||||
|
fg = colorScheme.TabHighlightedText;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
painter.fillRect(rect(), colorScheme.TabBackground);
|
||||||
|
fg = colorScheme.TabText;
|
||||||
|
}
|
||||||
|
|
||||||
painter.setPen(fg);
|
painter.setPen(fg);
|
||||||
painter.drawText(4, (height() + fontMetrics().height()) / 2, text);
|
painter.drawText(4, (height() + fontMetrics().height()) / 2, text);
|
||||||
@@ -70,6 +84,8 @@ void NotebookTab::mousePressEvent(QMouseEvent *)
|
|||||||
mouseDown = true;
|
mouseDown = true;
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
|
|
||||||
|
notebook->select(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotebookTab::mouseReleaseEvent(QMouseEvent *)
|
void NotebookTab::mouseReleaseEvent(QMouseEvent *)
|
||||||
@@ -77,8 +93,6 @@ void NotebookTab::mouseReleaseEvent(QMouseEvent *)
|
|||||||
mouseDown = false;
|
mouseDown = false;
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
|
|
||||||
notebook->select(page);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotebookTab::enterEvent(QEvent *)
|
void NotebookTab::enterEvent(QEvent *)
|
||||||
@@ -94,3 +108,8 @@ void NotebookTab::leaveEvent(QEvent *)
|
|||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NotebookTab::dragEnterEvent(QDragEnterEvent *event)
|
||||||
|
{
|
||||||
|
notebook->select(page);
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public:
|
|||||||
bool getSelected();
|
bool getSelected();
|
||||||
void setSelected(bool value);
|
void setSelected(bool value);
|
||||||
|
|
||||||
|
int getHighlightStyle();
|
||||||
|
void setHighlightStyle(int style);
|
||||||
|
|
||||||
|
static const int HighlightNone = 0;
|
||||||
|
static const int HighlightHighlighted = 1;
|
||||||
|
static const int HighlightNewMessage = 2;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
@@ -29,12 +36,15 @@ protected:
|
|||||||
void enterEvent(QEvent *) Q_DECL_OVERRIDE;
|
void enterEvent(QEvent *) Q_DECL_OVERRIDE;
|
||||||
void leaveEvent(QEvent *) Q_DECL_OVERRIDE;
|
void leaveEvent(QEvent *) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Notebook *notebook;
|
Notebook *notebook;
|
||||||
bool selected = false;
|
bool selected = false;
|
||||||
|
|
||||||
bool mouseOver = false;
|
bool mouseOver = false;
|
||||||
bool mouseDown = false;
|
bool mouseDown = false;
|
||||||
|
int highlightStyle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOTEBOOKTAB_H
|
#endif // NOTEBOOKTAB_H
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/images">
|
||||||
|
<file>images/AppearanceEditorPart_16x.png</file>
|
||||||
|
<file>images/BrowserLink_16x.png</file>
|
||||||
|
<file>images/cheer1.png</file>
|
||||||
|
<file>images/cheer100.png</file>
|
||||||
|
<file>images/cheer1000.png</file>
|
||||||
|
<file>images/cheer5000.png</file>
|
||||||
|
<file>images/cheer10000.png</file>
|
||||||
|
<file>images/cheer100000.png</file>
|
||||||
|
<file>images/CopyLongTextToClipboard_16x.png</file>
|
||||||
|
<file>images/CustomActionEditor_16x.png</file>
|
||||||
|
<file>images/Emoji_Color_1F60A_19.png</file>
|
||||||
|
<file>images/Filter_16x.png</file>
|
||||||
|
<file>images/format_Bold_16xLG.png</file>
|
||||||
|
<file>images/Message_16xLG.png</file>
|
||||||
|
<file>images/settings.png</file>
|
||||||
|
<file>images/tool_moreCollapser_off16.png</file>
|
||||||
|
<file>images/twitchprime_bg.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||