コード例 #1
0
PlotDataPropertyWidget::PlotDataPropertyWidget(PlotDataProperty* prop, QWidget* parent)
    : QPropertyWidgetWithEditorWindow(prop, parent, true, false)
    , editBt_(new QPushButton(tr("Show Data")))
    , property_(prop)
    , plotDataWidget_(0)
    , updateFromPropertyFlag_(true)
{
    createEditorWindow(Qt::LeftDockWidgetArea);

    addWidget(editBt_);
    connect(editBt_, SIGNAL(clicked()), this, SLOT(toggleWidgetVisibility()));

    addVisibilityControls();
    QFontInfo fontInfo(font());
    editBt_->setFont(QFont(fontInfo.family(), QPropertyWidget::fontSize_));
}
コード例 #2
0
void OpenCLPropertyWidget::setProperty() {
    if (!disconnected_) {
        // lazy instantiation of shader editor window
        if (!editorWindow_) {
            createEditorWindow(Qt::LeftDockWidgetArea, QString::fromStdString(" (original source: " + property_->get().programFilename_ + ")"), 700, 700);

            tgtAssert(editorWindow_, "OpenCL editor not instantiated");
        }

        if (editorWindow_->isVisible()) {
            //close widget
            editorWindow_->close();
        }
        else {
            //open Widget
            editorWindow_->showNormal();
        }
    }
}
コード例 #3
0
void SpatialTransFuncPropertyWidget::setProperty() {
    if (!disconnected_) {
        // lazy instantiation of transfunc editor window
        if (!editorWindow_) {
            createEditorWindow(Qt::RightDockWidgetArea);
            tgtAssert(editorWindow_, "Transfunc editor not instantiated");
        }

        if (editorWindow_->isVisible()) {
            //close widget
            editorWindow_->close();
        }
        else {
            //open Widget
            editorWindow_->showNormal();
            plugin_->updateFromProperty();
        }
    }
}
コード例 #4
0
OpenCLPropertyWidget::OpenCLPropertyWidget(OpenCLProperty* prop, QWidget* parent)
    : QPropertyWidgetWithEditorWindow(prop, parent)
    , plugin_(0)
    , property_(prop)
    , editBt_(new QPushButton(tr("edit")))
{

    if (editorVisibleOnStartup())
        createEditorWindow(Qt::LeftDockWidgetArea, QString::fromStdString(" (original source: " + property_->get().programFilename_ + ")"), 700, 700);

    addWidget(editBt_);

    connect(editBt_, SIGNAL(clicked()), this, SLOT(setProperty()));
    connect(editBt_, SIGNAL(clicked()), this, SIGNAL(widgetChanged()));

    addVisibilityControls();

    QFontInfo fontInfo(font());
    editBt_->setFont(QFont(fontInfo.family(), QPropertyWidget::fontSize_));
}
コード例 #5
0
SpatialTransFuncPropertyWidget::SpatialTransFuncPropertyWidget(SpatialTransFuncProperty* prop, QWidget* parent)
    : QPropertyWidgetWithEditorWindow(prop, parent, false)
    , plugin_(0)
    , property_(prop)
    , editBt_(new QPushButton(tr("edit")))
{

    tgtAssert(prop, "No property passed");

    if (!prop->getLazyEditorInstantiation() || editorVisibleOnStartup())
        createEditorWindow(Qt::RightDockWidgetArea);

    addWidget(editBt_);

    connect(editBt_, SIGNAL(clicked()), this, SLOT(setProperty()));
    connect(editBt_, SIGNAL(clicked()), this, SIGNAL(widgetChanged()));

    addVisibilityControls();
    QFontInfo fontInfo(font());
    editBt_->setFont(QFont(fontInfo.family(), QPropertyWidget::fontSize_));
}
コード例 #6
0
void ZColorMapWidgetWithEditorWindow::labelClicked()
{
  createEditorWindow();
}
コード例 #7
0
void Z3DTransferFunctionWidgetWithEditorWindow::labelClicked()
{
  createEditorWindow();
}