ResInsight/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.h
Magne Sjaastad 494175d1e6 Extract creation of QShortenedLabel and add context menu
Create an intermediate class used to create a QShortenedLabel. If field is scriptable, add a context menu to support copy of the Python field name to clipboard.
2024-11-25 09:42:12 +01:00

35 lines
645 B
C++

#pragma once
#include "cafPdmUiFieldLabelEditorHandle.h"
#include <QCheckBox>
#include <QLabel>
#include <QPointer>
#include <QWidget>
namespace caf
{
class PdmUiCheckBoxTristateEditor : public PdmUiFieldLabelEditorHandle
{
Q_OBJECT
CAF_PDM_UI_FIELD_EDITOR_HEADER_INIT;
public:
PdmUiCheckBoxTristateEditor() {}
~PdmUiCheckBoxTristateEditor() override {}
protected:
QWidget* createEditorWidget( QWidget* parent ) override;
void configureAndUpdateUi( const QString& uiConfigName ) override;
protected slots:
void slotClicked( bool );
private:
QPointer<QCheckBox> m_checkBox;
};
} // end namespace caf