| #pragma once |
| |
| #ifndef TABBAR_H |
| #define TABBAR_H |
| |
| #include "tcommon.h" |
| #include <QTabBar> |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TOONZQT_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| #ifdef _WIN32 |
| #pragma warning(disable : 4251) |
| #endif |
| |
| |
| |
| namespace DVGui { |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI TabBar final : public QTabBar { |
| Q_OBJECT |
| |
| std::vector<QPixmap> m_pixmaps; |
| |
| public: |
| TabBar(QWidget *parent = 0); |
| ~TabBar(); |
| |
| void addIconTab(const char *iconPrefixName, const QString &tooltip); |
| void addSimpleTab(const QString &text); |
| void clearTabBar(); |
| |
| protected: |
| void paintEvent(QPaintEvent *event); |
| }; |
| |
| |
| } |
| |
| |
| #endif |