LMMS
Loading...
Searching...
No Matches
PluginBrowser.h
Go to the documentation of this file.
1/*
2 * PluginBrowser.h - include file for PluginBrowser
3 *
4 * Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_GUI_PLUGIN_BROWSER_H
26#define LMMS_GUI_PLUGIN_BROWSER_H
27
28#include <QPixmap>
29
30#include "SideBarWidget.h"
31#include "Plugin.h"
32
33class QTreeWidget;
34
35namespace lmms::gui
36{
37
39{
40 Q_OBJECT
41public:
42 PluginBrowser( QWidget * _parent );
43 ~PluginBrowser() override = default;
44
45private slots:
46 void onFilterChanged( const QString & filter );
47
48private:
49 void addPlugins();
50 void updateRootVisibility( int index );
52
53 QWidget * m_view;
54 QTreeWidget * m_descTree;
55};
56
57
58class PluginDescWidget : public QWidget
59{
60 Q_OBJECT
61public:
63 PluginDescWidget( const PluginKey & _pk, QWidget * _parent );
64 QString name() const;
65 void openInNewInstrumentTrack(QString value);
66
67protected:
68#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
69 void enterEvent(QEnterEvent* event) override;
70#else
71 void enterEvent(QEvent* event) override;
72#endif
73 void leaveEvent( QEvent * _e ) override;
74 void mousePressEvent( QMouseEvent * _me ) override;
75 void paintEvent( QPaintEvent * _pe ) override;
76 void contextMenuEvent(QContextMenuEvent* e) override;
77
78private:
79 constexpr static int DEFAULT_HEIGHT{24};
80
82 QPixmap m_logo;
83
85};
86
87
88} // namespace lmms::gui
89
90#endif // LMMS_GUI_PLUGIN_BROWSER_H
void updateRootVisibilities()
Definition PluginBrowser.cpp:107
void onFilterChanged(const QString &filter)
Definition PluginBrowser.cpp:117
PluginBrowser(QWidget *_parent)
Definition PluginBrowser.cpp:48
void addPlugins()
Definition PluginBrowser.cpp:142
QWidget * m_view
Definition PluginBrowser.h:53
void updateRootVisibility(int index)
Definition PluginBrowser.cpp:100
QTreeWidget * m_descTree
Definition PluginBrowser.h:54
~PluginBrowser() override=default
void mousePressEvent(QMouseEvent *_me) override
Definition PluginBrowser.cpp:285
void contextMenuEvent(QContextMenuEvent *e) override
Definition PluginBrowser.cpp:297
PluginDescWidget(const PluginKey &_pk, QWidget *_parent)
Definition PluginBrowser.cpp:206
QPixmap m_logo
Definition PluginBrowser.h:82
PluginKey m_pluginKey
Definition PluginBrowser.h:81
void leaveEvent(QEvent *_e) override
Definition PluginBrowser.cpp:275
void paintEvent(QPaintEvent *_pe) override
Definition PluginBrowser.cpp:232
bool m_mouseOver
Definition PluginBrowser.h:84
Plugin::Descriptor::SubPluginFeatures::Key PluginKey
Definition PluginBrowser.h:62
static constexpr int DEFAULT_HEIGHT
Definition PluginBrowser.h:79
void enterEvent(QEnterEvent *event) override
Definition PluginBrowser.cpp:262
void openInNewInstrumentTrack(QString value)
Definition PluginBrowser.cpp:308
QString name() const
Definition PluginBrowser.cpp:224
SideBarWidget(const QString &_title, const QPixmap &_icon, QWidget *_parent)
Definition SideBarWidget.cpp:38
* e
Definition inflate.c:1404
static PuglViewHint int value
Definition pugl.h:1708
Definition AudioPortAudio.cpp:223