void CommandDlg::handleOKClicked() {
	name = nameBox->getText();
	if((type != 0) && (name.empty() || commandBox->getText().empty())) {
		createMessageBox().show(T_("Name and command must not be empty"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), MessageBox::BOX_OK, MessageBox::BOX_ICONEXCLAMATION);
		return;
	}

	ctx = 0;
	if(hubMenu->getChecked())
		ctx |= UserCommand::CONTEXT_HUB;
	if(userMenu->getChecked())
		ctx |= UserCommand::CONTEXT_CHAT;
	if(searchMenu->getChecked())
		ctx |= UserCommand::CONTEXT_SEARCH;
	if(fileListMenu->getChecked())
		ctx |= UserCommand::CONTEXT_FILELIST;

	hub = hubBox->getText();

	if(type != 0)
		type = once->getChecked() ? 2 : 1;

	SettingsManager::getInstance()->set(SettingsManager::OPEN_USER_CMD_HELP, openHelp->getChecked());

	endDialog(IDOK);
}
Beispiel #2
0
void
OptionDlg::updateSettings()
{
  g_cfg->apply(m_cfg);
  g_cfg->sync();
  emit settingChanged();
  emit endDialog();
}
Beispiel #3
0
	/// CANCELボタンが押された場合の処理
	///
	/// モーダル:EndDialog(IDCANCEL)を呼び出します @n
	/// モードレス:Destroy()を呼び出します
	virtual bool onCancel() {
		if (m_isModal) {
			endDialog(IDCANCEL);
		}
		else {
			destroy();
		}
		return true;
	}
Beispiel #4
0
	/// OKボタンが押された場合の処理
	///
	/// モーダル:EndDialog(IDOK)を呼び出します @n
	/// モードレス:Destroy()を呼び出します
	virtual bool onOK() {
		if (m_isModal) {
			endDialog(IDOK);
		}
		else {
			destroy();
		}
		return true;
	}
bool W32StandaloneDialogPanel::commandCallback(WPARAM wParam) {
	if (wParam == IDOK) {
		if (myExitOnOk) {
			endDialog(true);
		} else {
			fireEvent(OK_EVENT);
		}
		return true;
	}

	if (wParam == IDCANCEL) {
		if (myExitOnCancel) {
			endDialog(false);
		} else {
			fireEvent(CANCEL_EVENT);
		}
		return true;
	}

	return W32DialogPanel::commandCallback(wParam);
}
Beispiel #6
0
int testpluginPlugin::msg(int msgId, void* wParam, void* lParam)
{
    bool handled = false;
    switch (msgId)
    {
    case MSG_INIT:
        init();
        handled = true;
        break;
    case MSG_GET_LABELS:
        getLabels((InputList*) wParam);
        handled = true;
        break;
    case MSG_GET_ID:
        getID((uint*) wParam);
        handled = true;
        break;
    case MSG_GET_NAME:
        getName((QString*) wParam);
        handled = true;
        break;
    case MSG_GET_RESULTS:
        getResults((InputList*) wParam, (QList<CatItem>*) lParam);
        handled = true;
        break;
    case MSG_GET_CATALOG:
        getCatalog((QList<CatItem>*) wParam);
        handled = true;
        break;
    case MSG_EXTEND_CATALOG:
        extendCatalog((SearchInfo*) wParam, (QList<CatItem>*)lParam);
        handled = true;
        break;
    case MSG_LAUNCH_ITEM:
        handled = launchItem((InputList*) wParam, (QList<CatItem>*) lParam);
        break;
    case MSG_HAS_DIALOG:
        handled = true;
        break;
    case MSG_DO_DIALOG:
        doDialog((QWidget*) wParam, (QWidget**) lParam);
        break;
    case MSG_END_DIALOG:
        endDialog((bool) wParam);
        break;
    case MSG_PATH:
        setPath((QString *) wParam);
    default:
        break;
    }

    return handled;
}
Beispiel #7
0
	virtual void clientMouseUp(const twPoint&, twMouseButton){
        twReleaseCapture();
        if(m_drag!=-1){
            if(m_hover){
                
                m_dropdownList->setSelectedIndex(m_drag);
                endDialog();
                m_dropdownList->sendCmdToParent();
                
                invalidateClientRect(rectForItem(m_drag));
            }
            m_drag=-1;
        }
    }
Beispiel #8
0
int controlyPlugin::msg(int msgId, void* wParam, void* lParam)
{
	int handled = 0;
	switch (msgId)
	{		
		case MSG_INIT:
			init();
			handled = 1;
			break;
		case MSG_GET_ID:
			getID((uint*) wParam);
			handled = 1;
			break;
		case MSG_GET_NAME:
			getName((QString*) wParam);
			handled = 1;
			break;
		case MSG_GET_CATALOG:
			getCatalog((QList<CatItem>*) wParam);
			handled = 1;
			break;
		case MSG_GET_RESULTS:
			getResults((QList<InputData>*) wParam, (QList<CatItem>*) lParam);
			handled = 1;
			break;
		case MSG_LAUNCH_ITEM:
			handled = launchItem((QList<InputData>*) wParam, (CatItem*) lParam);
			break;

		case MSG_HAS_DIALOG:
			handled = true;
			break;
		case MSG_DO_DIALOG:
			doDialog((QWidget*) wParam, (QWidget**) lParam);
			break;
		case MSG_END_DIALOG:
			endDialog(wParam != 0);
			break;

		case MSG_PATH:
			setPath((QString *) wParam);
			break;

		default:
			break;
	}
		
	return handled;
}
Beispiel #9
0
void
OptionDlg::keyPressEvent(QKeyEvent *ev)
{
  //printf("OptionDlg::keyPressEvent(0x%04x\n", ev->key());
  switch (ev->key()) {
    case Qt::Key_Escape:
      emit endDialog();
      break;
    case Qt::Key_F33:
      emit updateSettings();
      break;
    default:
      ev->ignore();
  }
}
Beispiel #10
0
int VerbyPlugin::msg(int msgId, void* wParam, void* lParam)
{
	bool handled = false;
	switch (msgId)
	{		
	case MSG_INIT:
		init();
		handled = true;
		break;
	case MSG_GET_ID:
		getID((uint*) wParam);
		handled = true;
		break;
	case MSG_GET_NAME:
		getName((QString*) wParam);
		handled = true;
		break;
	case MSG_GET_LABELS:
		getLabels((QList<InputData>*) wParam);
		handled = true;
		break;
	case MSG_GET_RESULTS:
		getResults((QList<InputData>*) wParam, (QList<CatItem>*) lParam);
		handled = true;
		break;
	case MSG_LAUNCH_ITEM:
		launchItem((QList<InputData>*) wParam, (CatItem*) lParam);
		handled = true;
		break;
	case MSG_HAS_DIALOG:
		handled = true;
		break;
	case MSG_DO_DIALOG:
		doDialog((QWidget*) wParam, (QWidget**) lParam);
		break;
	case MSG_END_DIALOG:
		endDialog(wParam != 0);
		break;

	default:
		break;
	}

	return handled;
}
Beispiel #11
0
 virtual void backgroundTouched(){
     endDialog();
 }
Beispiel #12
0
/* 
 *  Constructs a OptionDlg which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
OptionDlg::OptionDlg( QWidget* parent,  const char* name, WFlags fl )
    : OptionForm( parent, name, fl )
{
  connect(m_btnOK, SIGNAL(clicked()), this, SLOT(updateSettings()));
  connect(m_btnCancel, SIGNAL(clicked()), this, SIGNAL(endDialog()));

  // font option ( check OptionDlg::updateExFont method );
  m_wFonts->insertItem(tr("Default Font"), 0);
  //m_wFonts->insertItem("Progress Bar", 1);

  // color option ( check OptionDlg::updateExColor method )
  m_wColors->insertItem(tr("Background"), 0);
  m_wColors->insertItem(tr("Normal Text"), 1);
  m_wColors->insertItem(tr("HighLight Text 1"), 2);
  m_wColors->insertItem(tr("HighLight Text 2"), 3);
  m_wColors->insertItem(tr("HighLight Text 3"), 4);
  m_wColors->insertItem(tr("HighLight Text 4"), 5);
  m_wColors->insertItem(tr("HighLight Text 5"), 6);
  m_wColors->insertItem(tr("HighLight Text 6"), 7);
  m_wColors->insertItem(tr("HighLight Text 7"), 8);
  m_wColors->insertItem(tr("Progress Bar FG"), 9);
  m_wColors->insertItem(tr("Progress Bar BG"), 10);
  m_wColors->insertItem(tr("Progress Bar Text"), 11);

  m_wFontName->insertStringList(QFontDatabase().families());

  connect(m_wFontName, SIGNAL(activated(int)), this, SLOT(updateFontFace()));
  connect(m_wFontSize, SIGNAL(valueChanged(int)), this, SLOT(updateFontFace()));
  connect(m_wFonts, SIGNAL(activated(int)), this, SLOT(changeFont()));
  connect(m_wBold, SIGNAL(toggled(bool)), this, SLOT(updateFontFace()));
  connect(m_wFakeBold, SIGNAL(toggled(bool)), this, SLOT(updateFontFace()));

  connect(m_wColors, SIGNAL(activated(int)), this, SLOT(changeColor()));
  connect(m_wColorEdit, SIGNAL(returnPressed()), this, SLOT(updateColorFace()));
  connect(m_wRed, SIGNAL(valueChanged(int)), this, SLOT(rgbChange()));
  connect(m_wGreen, SIGNAL(valueChanged(int)), this, SLOT(rgbChange()));
  connect(m_wBlue, SIGNAL(valueChanged(int)), this, SLOT(rgbChange()));

  connect(m_wMargin, SIGNAL(valueChanged(int)), this, SLOT(updateMargin(int)));
  connect(m_wLineMargin, SIGNAL(valueChanged(int)),
                                      this, SLOT(updateLineMargin(int)));
  connect(m_wRotation, SIGNAL(valueChanged(int)),
                                      this, SLOT(updateRotation(int)));
  connect(m_wShowBar, SIGNAL(toggled(bool)),
                                      this, SLOT(updateBar()));
  connect(m_wBarHeight, SIGNAL(valueChanged(int)),
                                      this, SLOT(updateBar()));

  connect(m_wScrollHeight, SIGNAL(valueChanged(int)),
                                      this, SLOT(updateScrollHeight(int)));
  connect(m_wScrollDelay, SIGNAL(valueChanged(int)),
                                      this, SLOT(updateScrollDelay(int)));

  connect(m_wScalingMethod,SIGNAL(activated(int)),
      this, SLOT(updateScaleMethod(int)));
  connect(m_wScaleFactor,SIGNAL(valueChanged(int)),
      this, SLOT(updateScaleFactor(int)));
  connect(m_wScaleUp,SIGNAL(stateChanged(int)),
      this, SLOT(updateScaleUp(int)));
  connect(m_wHSlices,SIGNAL(valueChanged(int)),
      this, SLOT(updateSlicingCount()));
  connect(m_wVSlices,SIGNAL(valueChanged(int)),
      this, SLOT(updateSlicingCount()));

  connect(m_wScrollMethod,SIGNAL(activated(int)),
      this, SLOT(updateScrollPolicy(int)));
  connect(m_wPageMethod, SIGNAL(activated(int)),
      this, SLOT(updatePagingPolicy(int)));

  setFocusPolicy(QWidget::StrongFocus);

  m_cfg = NULL;
}
void SettingsDialog::handleOKClicked() {
	write();
	endDialog(IDOK);
}
Beispiel #14
0
void twDialog::endDialog(){
	endDialog(twDR_none);
}
Beispiel #15
0
AcRx::AppRetCode
ArxDbgApp::entryPoint(AcRx::AppMsgCode msg, void* pkt)
{
    if (msg == AcRx::kInitAppMsg) {
		m_acadAppPtr = pkt;	// keep track of this for later use
        acutPrintf("\nAPPMSG: %s, kInitAppMsg", m_appName);
        return initApp();
    }
    else if (msg == AcRx::kUnloadAppMsg) {
        acutPrintf("\nAPPMSG: %s, kUnloadAppMsg", m_appName);
        return exitApp();
    }
    else if (msg == AcRx::kLoadDwgMsg) {
        acutPrintf("\nAPPMSG: %s, kLoadDwgMsg", m_appName);
        return initDwg();
    }
    else if (msg == AcRx::kUnloadDwgMsg) {
        acutPrintf("\nAPPMSG: %s, kUnloadDwgMsg", m_appName);
        return exitDwg();
    }
    else if (msg == AcRx::kInvkSubrMsg) {
        acutPrintf("\nAPPMSG: %s, kInvkSubrMsg", m_appName);
        return invokeSubr();
    }
    else if (msg == AcRx::kCfgMsg) {
        acutPrintf("\nAPPMSG: %s, kCfgMsg", m_appName);
        return config();
    }
    else if (msg == AcRx::kEndMsg) {
        acutPrintf("\nAPPMSG: %s, kEndMsg", m_appName);
        return endDwg();
    }
    else if (msg == AcRx::kQuitMsg) {
        acutPrintf("\nAPPMSG: %s, kQuitMsg", m_appName);
        return quitDwg();
    }
    else if (msg == AcRx::kSaveMsg) {
        acutPrintf("\nAPPMSG: %s, kSaveMsg", m_appName);
        return saveDwg();
    }
    else if (msg == AcRx::kDependencyMsg) {
        acutPrintf("\nAPPMSG: %s, kDependencyMsg", m_appName);

        if (m_appServicePtr == pkt) {
            acutPrintf("\nLocking app: %s", m_appName);
            acrxDynamicLinker->lockApplication(m_acadAppPtr);
        }

        return AcRx::kRetOK;
    }
    else if (msg == AcRx::kNoDependencyMsg) {
        acutPrintf("\nAPPMSG: %s, kNoDependencyMsg", m_appName);

        if (m_appServicePtr == pkt) {
            acutPrintf("\nUnlocking app: %s", m_appName);
            acrxDynamicLinker->unlockApplication(m_acadAppPtr);
        }

        return AcRx::kRetOK;
    }
    else if (msg == AcRx::kOleUnloadAppMsg) {
        acutPrintf("\nAPPMSG: %s, kOleUnloadAppMsg", m_appName);
        return AcRx::kRetOK;
    }
    else if (msg == AcRx::kPreQuitMsg) {
        acutPrintf("\nAPPMSG: %s, kPreQuitMsg", m_appName);
        return AcRx::kRetOK;
    }
    else if (msg == AcRx::kInitDialogMsg) {
        acutPrintf("\nAPPMSG: %s, kInitDialogMsg", m_appName);
        return initDialog(pkt);
    }
    else if (msg == AcRx::kEndDialogMsg) {
        acutPrintf("\nAPPMSG: %s, kEndDialogMsg", m_appName);
        return endDialog(pkt);
    }
    else {
        ASSERT(0);        // just see if it ever happens
        return AcRx::kRetOK;
    }
}