mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use layouts for tracks in Well Log Plot
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
#include <QPointer>
|
||||
#include <QWidget>
|
||||
@@ -48,6 +51,7 @@ class RiuWellLogPlot : public QWidget, public RiuInterfaceToViewWindow
|
||||
|
||||
public:
|
||||
RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent = nullptr );
|
||||
|
||||
~RiuWellLogPlot() override;
|
||||
|
||||
RimWellLogPlot* ownerPlotDefinition();
|
||||
@@ -61,36 +65,33 @@ public:
|
||||
void setPlotTitle( const QString& plotTitle );
|
||||
virtual QSize preferredSize() const;
|
||||
|
||||
void showTitle();
|
||||
void hideTitle();
|
||||
|
||||
public slots:
|
||||
void updateChildrenLayout();
|
||||
void setTitleVisible( bool visible );
|
||||
|
||||
protected:
|
||||
void resizeEvent( QResizeEvent* event ) override;
|
||||
void showEvent( QShowEvent* ) override;
|
||||
void changeEvent( QEvent* ) override;
|
||||
void contextMenuEvent( QContextMenuEvent* ) override;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
void keyPressEvent( QKeyEvent* keyEvent ) override;
|
||||
|
||||
QLabel* createTitleLabel() const;
|
||||
|
||||
private:
|
||||
void updateScrollBar( double minDepth, double maxDepth );
|
||||
std::map<int, int> calculateTrackWidthsToMatchFrame( int frameWidth ) const;
|
||||
void placeChildWidgets( int frameHeight, int frameWidth );
|
||||
void positionTitle( int frameWidth );
|
||||
void updateScrollBar( double minDepth, double maxDepth );
|
||||
// std::map<int, int> calculateTrackWidthsToMatchFrame( int frameWidth ) const;
|
||||
// void placeChildWidgets( int frameHeight, int frameWidth );
|
||||
// void positionTitle( int frameWidth );
|
||||
|
||||
private slots:
|
||||
void slotSetMinDepth( int value );
|
||||
void scheduleUpdateChildrenLayout();
|
||||
|
||||
protected:
|
||||
QPointer<QVBoxLayout> m_layout;
|
||||
QPointer<QHBoxLayout> m_plotLayout;
|
||||
QPointer<QFrame> m_plotFrame;
|
||||
QPointer<QGridLayout> m_trackLayout;
|
||||
QPointer<QLabel> m_plotTitle;
|
||||
QScrollBar* m_scrollBar;
|
||||
QList<QPointer<QwtLegend>> m_legends;
|
||||
QList<QPointer<RiuWellLogTrack>> m_trackPlots;
|
||||
caf::PdmPointer<RimWellLogPlot> m_plotDefinition;
|
||||
QTimer* m_scheduleUpdateChildrenLayoutTimer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user