示例#1
0
void ProfileDialog::slotOk()
{
    const int index = mListView->itemIndex(mListView->selectedItem());
    if(index < 0)
        return; // none selected

    assert((unsigned int)index < mProfileList.count());

    KConfig profile(*mProfileList.at(index), true, false);
    emit profileSelected(&profile);
    KDialogBase::slotOk();
}
示例#2
0
bool Small::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: monsterKnappen(); break;
    case 1: saveInstance(); break;
    case 2: timerDone(); break;
    case 3: profileSelected((int)static_QUType_int.get(_o+1)); break;
    case 4: contextSelected((int)static_QUType_int.get(_o+1)); break;
    default:
	return KMainWindow::qt_invoke( _id, _o );
    }
    return TRUE;
}
示例#3
0
void QuickConnectDialog::playClicked() {
  QString profile = selectedProfile();

  // Check if there is a loaded profile
  if (0) {
    if (QMessageBox::warning(this, tr("Load profile"),
			     tr("The profile %1 is already loaded.\nAre you sure you want to continue?").arg("TODO"),
			     QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
      return;
  }
  
  qDebug("running with settings...");
  accept();
  close();
  emit profileSelected(profile);
}