19 #include <QIconEngine>
40 , m_overlayIcon(overlay)
49 QIcon::State state)
override
52 QBrush brush(painter->background());
53 brush.setColor(Qt::transparent);
54 painter->setBackground(brush);
56 painter->eraseRect(rect);
57 painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
58 m_icon.paint(painter, rect, Qt::AlignCenter, mode, state);
59 m_overlayIcon.paint(painter,
60 rect.adjusted(0.4 * rect.width(),
71 QIcon::State state)
override
73 QImage img(size, QImage::Format_ARGB32);
74 img.fill(qRgba(0,0,0,0));
75 QPixmap pix = QPixmap::fromImage(img, Qt::NoFormatConversion);
76 QPainter painter(&pix);
77 this->paint(&painter, QRect(QPoint(0, 0), size), mode, state);
95 QIcon
const & overlayedIcon)
96 : QIcon(new BtOverlayIconEngine(icon, overlayedIcon))
103 :
icon_add(QStringLiteral(
"add.svg"))
141 ,
icon_map(QStringLiteral(
"map.svg"))
195 QBuffer buffer(&bytes);
196 icon.pixmap(extent).save(&buffer,
"PNG");
197 return "<img src=\"data:image/png;base64," + bytes.toBase64() +
"\" />";
QString iconToHtml(QIcon const &icon, int const extent)
OverlayedIcon(QIcon const &icon, QIcon const &overlayedIcon)
RegularIcon(QString const &name)
RegularIcon const icon_document_magnifier
RegularIcon const icon_light_bulb
RegularIcon const icon_unlock
RegularIcon const icon_refresh
OverlayedIcon const icon_cascade_auto
RegularIcon const icon_delete
RegularIcon const icon_dictionary
RegularIcon const icon_export
OverlayedIcon const icon_lexicon_locked
RegularIcon const icon_bible
OverlayedIcon const icon_tile_auto
OverlayedIcon const icon_bible_install
RegularIcon const icon_print
RegularIcon const icon_key_bindings
RegularIcon const icon_back
OverlayedIcon const icon_bible_remove
RegularIcon const icon_swordconfig
RegularIcon const icon_manual
RegularIcon const icon_tabbed
RegularIcon const icon_import
OverlayedIcon const icon_bible_add
RegularIcon const icon_plus
RegularIcon const icon_calendar
RegularIcon const icon_view_tree
RegularIcon const icon_text_under
RegularIcon const icon_configure
RegularIcon const icon_books
RegularIcon const icon_pointing_arrow
RegularIcon const icon_questionmark
RegularIcon const icon_sync
RegularIcon const icon_forward
RegularIcon const icon_startconfig
OverlayedIcon const icon_bible_locked
RegularIcon const icon_find
RegularIcon const icon_commentary
OverlayedIcon const icon_lexicon_add
RegularIcon const icon_edit_copy
RegularIcon const icon_file_save
RegularIcon const icon_edit_clear_locationbar
RegularIcon const icon_window_fullscreen
RegularIcon const icon_lexicon
RegularIcon const icon_book
RegularIcon const icon_questionable
RegularIcon const icon_view_profile
OverlayedIcon const icon_commentary_add
RegularIcon const icon_text_center
RegularIcon const icon_folder_open
RegularIcon const icon_cascade
OverlayedIcon const icon_bible_uninstall
RegularIcon const icon_bibletime
OverlayedIcon const icon_book_add
RegularIcon const icon_checkbox
RegularIcon const icon_automatically
RegularIcon const icon_stop
RegularIcon const icon_tile
RegularIcon const icon_fileclose
RegularIcon const icon_view_mag
RegularIcon const icon_tile_vert
RegularIcon const icon_text_bold
RegularIcon const icon_remove
RegularIcon const icon_contents2
RegularIcon const icon_add
RegularIcon const icon_exit
RegularIcon const icon_text_rightalign
RegularIcon const icon_view_index
static BtIcons * m_instance
OverlayedIcon const icon_folder_add
OverlayedIcon const icon_commentary_locked
RegularIcon const icon_folder
RegularIcon const icon_trash
RegularIcon const icon_text_italic
RegularIcon const icon_lock
RegularIcon const icon_map
RegularIcon const icon_flag
OverlayedIcon const icon_book_locked
RegularIcon const icon_info
OverlayedIcon const icon_tile_horiz_auto
RegularIcon const icon_layer_visible_on
RegularIcon const icon_bookmark
OverlayedIcon const icon_tile_vert_auto
RegularIcon const icon_pencil
RegularIcon const icon_displayconfig
RegularIcon const icon_fonts
RegularIcon const icon_text_leftalign
RegularIcon const icon_tile_horiz
QPixmap pixmap(QSize const &size, QIcon::Mode mode, QIcon::State state) override
void paint(QPainter *painter, QRect const &rect, QIcon::Mode mode, QIcon::State state) override
QIcon const & m_overlayIcon
QIconEngine * clone() const override
BtOverlayIconEngine(QIcon const &icon, QIcon const &overlay)
QDir const & getIconDir()