Cleanup
[carla.git] / source / frontend / widgets / collapsablewidget.hpp
blob4b5f15be7641e7687ce2cdaf290270fab4c0df19
1 /*
2 * Carla plugin host
3 * Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
18 #include "QtWidgets/qboxlayout.h"
19 #ifdef __clang__
20 # pragma clang diagnostic push
21 # pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
22 # pragma clang diagnostic ignored "-Wdeprecated-register"
23 #elif defined(__GNUC__) && __GNUC__ >= 8
24 # pragma GCC diagnostic push
25 # pragma GCC diagnostic ignored "-Wclass-memaccess"
26 # pragma GCC diagnostic ignored "-Wdeprecated-copy"
27 #endif
29 #include <QtWidgets/QFrame>
30 #include <QtWidgets/QVBoxLayout>
32 #ifdef __clang__
33 # pragma clang diagnostic pop
34 #elif defined(__GNUC__) && __GNUC__ >= 8
35 # pragma GCC diagnostic pop
36 #endif
38 #include "CarlaDefines.h"
40 // --------------------------------------------------------------------------------------------------------------------
41 // Jack Application Dialog
43 class CollapsibleBox : public QFrame
45 struct Self;
46 Self& self;
48 // ----------------------------------------------------------------------------------------------------------------
50 public:
51 explicit CollapsibleBox(QWidget* parent);
52 ~CollapsibleBox() override;
54 // ----------------------------------------------------------------------------------------------------------------
55 // public methods
57 QVBoxLayout* getContentLayout() const noexcept;
59 // ----------------------------------------------------------------------------------------------------------------
60 // private slots
62 private slots:
63 void toolButtonPressed(bool toggled);
66 // --------------------------------------------------------------------------------------------------------------------
68 extern "C" {
70 CARLA_API void* carla_frontend_createCollapsibleBox(void* parent);
74 // --------------------------------------------------------------------------------------------------------------------