Exemplo n.º 1
0
bool ScopeINDI::Connect()
{
    // If not configured open the setup dialog
    if (INDIMountName == wxT("INDI Mount")) {
        SetupDialog();
    }
    // define server to connect to.
    setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
    // Receive messages only for our mount.
    watchDevice(INDIMountName.mb_str(wxConvUTF8));
    // Connect to server.
    if (connectServer()) {
        return !ready;
    }
    else {
        // last chance to fix the setup
        SetupDialog();
        setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
        watchDevice(INDIMountName.mb_str(wxConvUTF8));
        if (connectServer()) {
            return !ready;
        }
        else {
            return true;
        }
    }
}
CBrushEntityDialog::CBrushEntityDialog(CFusionTabControls* pParent /*=NULL*/, CFusionDoc* pDoc)
	: CDialog(CBrushEntityDialog::IDD, (CWnd*) pParent)
{
	//{{AFX_DATA_INIT(CBrushEntityDialog)
	//}}AFX_DATA_INIT

	m_pFusionDoc = pDoc;
	m_pParentCtrl = pParent;

	CDialog::Create( IDD, (CWnd*) pParent );

	SetupDialog();
}
Exemplo n.º 3
0
ProjectTypesListView::ProjectTypesListView(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ProjectTypesListView),
    m_rui(*ui),
    m_controller(ControllerSingletons::Instance().GetProjectType())
{
    ui->setupUi(this);

    LoadInitialTypes();

    SetupDialog();

    QObject::connect(&m_controller, SIGNAL(sigProjectTypeRemoved(ProjectType)), this, SLOT(slotProjectTypeRemoved(ProjectType)));
    QObject::connect(&m_controller, SIGNAL(sigProjectTypeModified(ProjectType)), this, SLOT(slotProjectTypeModified(ProjectType)));
}
Exemplo n.º 4
0
TabSecond_GroupTwo_Dialog::TabSecond_GroupTwo_Dialog(QWidget *parent)
    :QDialog(parent)
{
    iParent = NULL;
    iItem = NULL;

    // ÅÅ°æ
//    iLayout = new QGridLayout;
//    iLayout->setColumnStretch(4, 2);
    iLayout = new QBoxLayout(QBoxLayout::TopToBottom);

    // ¹¹Ôì
    SetupDialog();

    this->setLayout(iLayout);
}
Exemplo n.º 5
0
ProjectsListView::ProjectsListView(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ProjectsListView),
    m_rui(*ui),
    m_projectCTRL(ControllerSingletons::Instance().GetProject()),
    m_projectTypeCTRL(ControllerSingletons::Instance().GetProjectType()),
    m_noTypeItemPresent(false)
{
    this->ui->setupUi(this);
    SetupDialog();

    m_rui.tvProjects->model()->removeRow(0);
    LoadInitialProjects();

    QObject::connect(&m_projectCTRL, SIGNAL(sigProjectModified(Project)), this, SLOT(slotProjectModified(Project)));
    QObject::connect(&m_projectCTRL, SIGNAL(sigProjectAdded(Project)), this, SLOT(slotProjectAdded(Project)));
    QObject::connect(&m_projectCTRL, SIGNAL(sigProjectRemoved(Project)), this, SLOT(slotProjectRemoved(Project)));

    QObject::connect(&m_projectTypeCTRL, SIGNAL(sigProjectTypeAdded(ProjectType)), this, SLOT(slotProjectTypeAdded(ProjectType)));
    QObject::connect(&m_projectTypeCTRL, SIGNAL(sigProjectTypeRemoved(ProjectType)), this, SLOT(slotProjectTypeRemoved(ProjectType)));
    QObject::connect(&m_projectTypeCTRL, SIGNAL(sigProjectTypeModified(ProjectType)), this, SLOT(slotProjectTypeModified(ProjectType)));
}
Exemplo n.º 6
0
LRESULT CALLBACK MainWndProc(HWND hWnd,unsigned iMessage,WORD wParam,LONG lParam)
{
LONG lRet = 0L;
HMENU hMenu;
int   Scale;
RECT  rc,rcc;
OPENFILENAME ofn;
char szBuffer[128],szName[MAXFILE+10];

switch(iMessage)
	{
	case WM_COMMAND:
		switch(wParam)
			{
			case 101:	ResetCPU(szCartridge);
						break;
			case 103:	SendMessage(hWnd,WM_CLOSE,0,0L);
						break;
			case 102:	MessageBox(hWnd,"WinSTEM Studio II Emulator\n\nWritten by Paul Robson 2000","About...",MB_OK | MB_ICONINFORMATION);
						break;
			case 104:
			case 106:	hMenu = GetMenu(hWnd);
						CheckMenuItem(hMenu,104,MF_BYCOMMAND | ((wParam == 104) ? MF_CHECKED : MF_UNCHECKED));
						CheckMenuItem(hMenu,106,MF_BYCOMMAND | ((wParam == 106) ? MF_CHECKED : MF_UNCHECKED));
						_EXTSetColour(wParam == 104);
						break;
			case 108:
			case 109:	Scale = (wParam == 108) ? 4 : 1 ;
						GetWindowRect(hWnd,&rc);
						GetClientRect(hWnd,&rcc);

						SetWindowPos(hWnd,
									 NULL,
									 rc.left,
									 rc.top,
									 (rc.right-rc.left)-rcc.right+rcc.right*Scale/2,
									 (rc.bottom-rc.top)-rcc.bottom+rcc.bottom*Scale/2,
									 SWP_NOZORDER);
						break;
			case 105:
						SetupDialog(hWnd,&ofn);
						if (GetOpenFileName(&ofn) != 0)
							{
							ResetCPU(szCartridge);
							SendMessage(hWndMain,WMU_SETTITLE,0,0L);
							}
						break;
			}
		break;

	case WM_DROPFILES:
		DragQueryFile( (HANDLE)wParam,0,szCartridge,sizeof(szCartridge));
		ResetCPU(szCartridge);
		SendMessage(hWndMain,WMU_SETTITLE,0,0L);
		break;

	case WM_DESTROY:
		PostQuitMessage(0);
		break;

	case WMU_SETTITLE:
		if (lstrlen(szCartridge) == 0)
			SetWindowText(hWnd,"WinStem");
		else
			{
			fnsplit(szCartridge,szBuffer,szBuffer,szName,szBuffer);
			strlwr(szName);
			szName[0] = toupper(szName[0]);
			lstrcat(szName," - WinStem");
			SetWindowText(hWnd,szName);
			}
		break;

	default:
		lRet = DefWindowProc(hWnd,iMessage,wParam,lParam);
		break;
	}
return(lRet);
}
Exemplo n.º 7
0
void MainDialog::onSettings()
{
    SetupDialog(*netman_->model(), this).exec();
}