コード例 #1
0
void EPSignalsController::closeSignal()
{
    EPSignal *signal = EPSignalsController::activeSignal();
    if (signal->hasChanged() && !handleUnsavedSignal(signal))
        return;

    remove();
    setActiveSignal((EPSignal *)selectedObject());
    delete signal;
}
コード例 #2
0
bool DesignWidget::removeSelectedObject()
{
	ObjectPtr o = selectedObject();
	if (o)
	{
		if (o->parent())
		{
			treeView_->selectionModel()->clear();
			o->parent()->removeObject(o);
			return true;
		}
	}
	return false;
}
コード例 #3
0
void MainWindow::on_objectList_clicked(const QModelIndex &index)
{
    indexSelected = index.row();
    std::cout << "Index Selected : " << indexSelected << std::endl;
    emit selectedObject(indexSelected);
}