mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
#ifndef YACREADER_TITLED_TOOLBAR_H
|
|
#define YACREADER_TITLED_TOOLBAR_H
|
|
|
|
#include "themable.h"
|
|
|
|
#include <QLabel>
|
|
#include <QPaintEvent>
|
|
#include <QPainter>
|
|
#include <QPoint>
|
|
#include <QWidget>
|
|
|
|
class QIcon;
|
|
class BusyIndicator;
|
|
|
|
class DropShadowLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DropShadowLabel(QWidget *parent = 0);
|
|
void paintEvent(QPaintEvent *event);
|
|
void setColor(const QColor &color);
|
|
void setDropShadowColor(const QColor &color);
|
|
|
|
private:
|
|
QColor dropShadowColor;
|
|
QColor textColor;
|
|
void drawText(QPainter *painter, QPoint offset);
|
|
void drawTextEffect(QPainter *painter, QPoint offset);
|
|
};
|
|
|
|
class YACReaderTitledToolBar : public QWidget, protected Themable
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit YACReaderTitledToolBar(const QString &title, QWidget *parent = 0);
|
|
|
|
signals:
|
|
void cancelOperationRequested();
|
|
|
|
public slots:
|
|
void addAction(QAction *action);
|
|
void addSpacing(int space);
|
|
void addSepartor();
|
|
void showBusyIndicator();
|
|
void hideBusyIndicator();
|
|
void setTitle(const QString &title);
|
|
|
|
protected:
|
|
void applyTheme(const Theme &theme) override;
|
|
|
|
private:
|
|
DropShadowLabel *nameLabel;
|
|
BusyIndicator *busyIndicator;
|
|
QList<QWidget *> separators;
|
|
};
|
|
|
|
#endif // YACREADER_TITLED_TOOLBAR_H
|