Skip to content

Commit

Permalink
Use layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
messmerd committed Aug 17, 2024
1 parent 774e3b6 commit e768a58
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 175 deletions.
16 changes: 3 additions & 13 deletions include/PluginPinConnectorView.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
#define LMMS_GUI_PLUGIN_PIN_CONNECTOR_VIEW_H

#include <QWidget>
#include <QScrollArea>

#include "embed.h"
#include "lmms_export.h"
#include "ModelView.h"

class QPixmap;
class QScrollArea;
//class QScrollArea;

namespace lmms
{
Expand All @@ -48,7 +47,6 @@ class SubWindow;

class LMMS_EXPORT PluginPinConnectorView
: public QWidget
//: public QScrollArea
, public ModelView
{
Q_OBJECT
Expand All @@ -57,28 +55,20 @@ class LMMS_EXPORT PluginPinConnectorView
PluginPinConnectorView(PluginPinConnector* model, QWidget* parent);

auto sizeHint() const -> QSize override;
auto minimumSizeHint() const -> QSize override;

void toggleVisibility();

public slots:
void update();

protected:
void paintEvent(QPaintEvent* pe) override;

private:
class MatrixView;

void updateGeometry();
void updatePositions();

SubWindow* m_subWindow = nullptr;
QScrollArea* m_scrollArea = nullptr;
QWidget* m_widget = nullptr;

QRect m_inRect;
QRect m_outRect;
QSize m_minSize;
//QScrollArea* m_scrollArea = nullptr;

MatrixView* m_inView = nullptr;
MatrixView* m_outView = nullptr;
Expand Down
5 changes: 0 additions & 5 deletions src/core/PluginPinConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
TODO:
- Methods to set custom plugin channel names
- Remember to emit dataChanged signal
- Fix layout/alignment
- In updateGeometry, if minimum needed size is smaller than default window size,
set setMinimumSize to it (respecting margins), else set it to the default size
- Give BoolModels a name for automation
- Use labels with tooltips for channel names?
- Truncate the text if needed
- New icons?
- Testing! (esp. loading/saving)
*/
Expand Down
Loading

0 comments on commit e768a58

Please sign in to comment.