示例#1
0
bool ListViews::slotNotify(ObjectType objectType, Action action, std::string key)
{
    if (objectType != MODEL &&
            objectType != STATE &&
            action != ADD)
    {
        assert(CCopasiRootContainer::getDatamodelList()->size() > 0);
        (*CCopasiRootContainer::getDatamodelList())[0]->changed();
    }

    bool success = true;

    // delete the layout windows when the current model is added
    // actually it would have been better to do this when a model is deleted, but
    // the deletion notification is only sent to the listviews if the deleted
    // model had been changed.
    if (objectType == MODEL && action == DELETE)
    {
        mpLayoutsWidget->deleteLayoutWindows();
    }

    if (!updateCurrentWidget(objectType, action, key)) success = false;

    notifyChildWidgets(objectType, action, key);

    return success;
}
示例#2
0
void YourAccounts::protocolChanged()
{
	if (!canChangeWidget())
	{
		ForceWidgetChange = true;
		Protocols->setCurrentProtocol(LastProtocol);
		ForceWidgetChange = false;
		return;
	}

	updateCurrentWidget();
	LastProtocol = Protocols->currentProtocol();
}
示例#3
0
void StackedWidgetView::setSelectionModel(QItemSelectionModel *selectionModel)
{
    m_selectionModel = selectionModel;

    connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(updateCurrentWidget()));
}