Ejemplo n.º 1
0
void DolphinTabPage::slotViewActivated()
{
    const DolphinView* oldActiveView = activeViewContainer()->view();

    // Set the view, which was active before, to inactive
    // and update the active view type.
    if (m_splitViewEnabled) {
        activeViewContainer()->setActive(false);
        m_primaryViewActive = !m_primaryViewActive;
    } else {
        m_primaryViewActive = true;
    }

    const DolphinView* newActiveView = activeViewContainer()->view();

    if (newActiveView != oldActiveView) {
        disconnect(oldActiveView, SIGNAL(urlChanged(KUrl)),
                   this, SIGNAL(activeViewUrlChanged(KUrl)));
        connect(newActiveView, SIGNAL(urlChanged(KUrl)),
                this, SIGNAL(activeViewUrlChanged(KUrl)));
    }

    emit activeViewUrlChanged(activeViewContainer()->url());
    emit activeViewChanged();
}
Ejemplo n.º 2
0
void VisualizationServiceProxy::onServiceRemoved(VisualizationService *service)
{
    disconnect(service, &VisualizationService::activeViewChanged, this, &VisualizationService::activeViewChanged);
    disconnect(service, &VisualizationService::fps, this, &VisualizationService::fps);
    disconnect(service, &VisualizationService::activeLayoutChanged, this, &VisualizationService::activeLayoutChanged);
    disconnect(service, &VisualizationService::renderingEnabledChanged, this, &VisualizationService::renderingEnabledChanged);

    mVisualizationService = VisualizationService::getNullObject();

    emit activeLayoutChanged();
    emit activeViewChanged();
    emit renderingEnabledChanged();
}
Ejemplo n.º 3
0
void VisualizationServiceProxy::onServiceAdded(VisualizationService* service)
{
    mVisualizationService.reset(service, null_deleter());

    connect(service, &VisualizationService::activeViewChanged, this, &VisualizationService::activeViewChanged);
    connect(service, &VisualizationService::fps, this, &VisualizationService::fps);
    connect(service, &VisualizationService::activeLayoutChanged, this, &VisualizationService::activeLayoutChanged);
    connect(service, &VisualizationService::renderingEnabledChanged, this, &VisualizationService::renderingEnabledChanged);

    emit activeLayoutChanged();
    emit activeViewChanged();
    emit renderingEnabledChanged();
}
Ejemplo n.º 4
0
URLButton::URLButton(URLNavigator* parent)
: QPushButton(parent),
  m_displayHint(0),
  m_urlNavigator(parent)
{
    setFocusPolicy(QWidget::NoFocus);
    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
    setMinimumHeight(parent->minimumHeight());

    connect(this, SIGNAL(clicked()), parent, SLOT(slotRequestActivation()));
    connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()),
            this, SLOT(update()));
}
Ejemplo n.º 5
0
DataSelectWidget::DataSelectWidget(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget *parent, SelectDataStringPropertyBasePtr data, QGridLayout* gridLayout, int row) :
    BaseWidget(parent, "DataSelectWidget", "DataSelectWidget"),
	mData(data),
	mViewService(viewService),
	mPatientModelService(patientModelService)
{

    QHBoxLayout* layout = new QHBoxLayout(this);
    layout->setMargin(0);
    layout->setSpacing(0);

	QWidget* widget = sscCreateDataWidget(this, mData, gridLayout, row);

    mToggleShowAction = this->createAction(this,
                    QIcon(":/icons/open_icon_library/eye.png.png"),
                    "Toggle show data in view", "",
                    SLOT(toggleShowData()),
                    NULL);
    mToggleShowAction->setCheckable(true);
    CXSmallToolButton* toggleShowButton = new CXSmallToolButton();
    toggleShowButton->setDefaultAction(mToggleShowAction);

	mRemoveButton = new EraseDataToolButton(this);
	connect(mRemoveButton, &EraseDataToolButton::eraseData, this, &DataSelectWidget::eraseData);

    if(gridLayout)
    {
    	gridLayout->setMargin(0);
    	gridLayout->setSpacing(0);
    	QHBoxLayout* lay = new QHBoxLayout;
    	lay->addWidget(toggleShowButton);
		lay->addWidget(mRemoveButton);
    	gridLayout->addLayout(lay, row, 2);
    }else
    {
		layout->addWidget(widget);
		layout->addWidget(toggleShowButton);
		layout->addWidget(mRemoveButton);
    }

	connect(mViewService.get(), SIGNAL(activeViewChanged()), this, SLOT(viewGroupChangedSlot()));
    connect(mData.get(), SIGNAL(changed()), this, SLOT(updateDataVisibility()));

	this->viewGroupChangedSlot();
}
Ejemplo n.º 6
0
SidebarPage::SidebarPage(QWidget* parent) :
    QWidget(parent)
{
    connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()),
            this, SLOT(activeViewChanged()));
}
Ejemplo n.º 7
0
DataSelectWidget::~DataSelectWidget()
{
	disconnect(mViewService.get(), SIGNAL(activeViewChanged()), this, SLOT(viewGroupChangedSlot()));
}