4
4
#include "widget/wlibrarytextbrowser.h"
6
#include "widget/wwidget.h"
7
#include "widget/wskincolor.h"
9
6
WLibraryTextBrowser::WLibraryTextBrowser(QWidget* parent)
10
7
: QTextBrowser(parent) {
14
10
WLibraryTextBrowser::~WLibraryTextBrowser() {
18
void WLibraryTextBrowser::setup(QDomNode node) {
19
QPalette pal = palette();
20
if (!WWidget::selectNode(node, "BgColor").isNull()) {
21
QString bgColor = WWidget::selectNodeQString(node, "BgColor");
23
bg.setNamedColor(bgColor);
24
bg = WSkinColor::getCorrectColor(bg);
25
pal.setColor(QPalette::Base, bg);
27
if (!WWidget::selectNode(node, "FgColor").isNull()) {
28
QString fgColor = WWidget::selectNodeQString(node, "FgColor");
30
fg.setNamedColor(fgColor);
31
fg = WSkinColor::getCorrectColor(fg);
32
pal.setColor(QPalette::Text, fg);
37
void WLibraryTextBrowser::onSearch(const QString& text) {
41
void WLibraryTextBrowser::onSearchStarting() {
45
void WLibraryTextBrowser::onSearchCleared() {
49
void WLibraryTextBrowser::onShow() {
53
void WLibraryTextBrowser::loadSelectedTrack() {
54
// Not applicable to text views
57
void WLibraryTextBrowser::loadSelectedTrackToGroup(QString group) {
58
// Not applicable to text views
61
void WLibraryTextBrowser::moveSelection(int delta) {
62
// Not applicable to text views