void VersionSelectDialog::loadList()
{
	TaskDialog *taskDlg = new TaskDialog(this);
	Task *loadTask = m_vlist->getLoadTask();
	loadTask->setParent(taskDlg);
	taskDlg->exec(loadTask);
}
void TaskView::removeDialog(void)
{
    if (ActiveCtrl) {
        taskPanel->removeWidget(ActiveCtrl);
        delete ActiveCtrl;
        ActiveCtrl = 0;
    }

    TaskDialog* remove = NULL;
    if (ActiveDialog) {
        // See 'accept' and 'reject'
        if (ActiveDialog->property("taskview_accept_or_reject").isNull()) {
            const std::vector<QWidget*> &cont = ActiveDialog->getDialogContent();
            for(std::vector<QWidget*>::const_iterator it=cont.begin();it!=cont.end();++it){
                taskPanel->removeWidget(*it);
            }
            remove = ActiveDialog;
            ActiveDialog = 0;
        }
        else {
            ActiveDialog->setProperty("taskview_remove_dialog", true);
        }
    }

    taskPanel->removeStretch();

    // put the watcher back in control
    addTaskWatcher();
    
    if (remove) {
        remove->emitDestructionSignal();
        delete remove;
    }
}
Esempio n. 3
0
void MainWindow::doLogin ( QString inst, const QString& errorMsg )
{
	LoginDialog* loginDlg = new LoginDialog ( this, errorMsg );
	if ( loginDlg->exec() )
	{
		UserInfo uInfo ( loginDlg->getUsername(), loginDlg->getPassword() );

		TaskDialog* tDialog = new TaskDialog ( this );
		LoginTask* loginTask = new LoginTask ( uInfo, inst, tDialog );
		connect ( loginTask, SIGNAL ( loginComplete ( QString, LoginResponse ) ),
		          SLOT ( onLoginComplete ( QString, LoginResponse ) ), Qt::QueuedConnection );
		connect ( loginTask, SIGNAL ( loginFailed ( QString, QString ) ),
		          SLOT ( onLoginFailed( QString, QString ) ), Qt::QueuedConnection );
		tDialog->exec ( loginTask );
	}
}