コード例 #1
0
ファイル: ModeDialog.cpp プロジェクト: dwangarc/stabilization
void CModeDlg::OnModeTrack()
{
	OnModeUnChanged();
	::SendMessage(::GetDlgItem(m_hWnd, IDC_TRACK),	BM_SETCHECK, 1, 0);
	modeType = TRACK;
	OnModeChanged();
}
コード例 #2
0
FReply FEnvQueryParamSetupCustomization::ToggleMode()
{
	bIsNamed = !bIsNamed;
	OnModeChanged();

	return FReply::Handled();
}
コード例 #3
0
ファイル: ModeDialog.cpp プロジェクト: dwangarc/stabilization
void CModeDlg::OnModeMotion()
{
	OnModeUnChanged();
	::SendMessage(::GetDlgItem(m_hWnd, IDC_MOTION),	BM_SETCHECK, 1, 0);
	modeType = MOTION_DETECTION;
	OnModeChanged();
}
コード例 #4
0
ファイル: ModeDialog.cpp プロジェクト: dwangarc/stabilization
void CModeDlg::OnModeBase()
{
	OnModeUnChanged();
	::SendMessage(::GetDlgItem(m_hWnd, IDC_BASE),	BM_SETCHECK, 1, 0);
	modeType = BASE;
	OnModeChanged();
}
コード例 #5
0
ファイル: ModeDialog.cpp プロジェクト: dwangarc/stabilization
void CModeDlg::OnModeAnalyze()
{
	OnModeUnChanged();
	::SendMessage(::GetDlgItem(m_hWnd, IDC_ANALYZE),	BM_SETCHECK, 1, 0);
	modeType = ANALYZE;
	OnModeChanged();
}
コード例 #6
0
ファイル: ModeDialog.cpp プロジェクト: dwangarc/stabilization
void CModeDlg::OnModeUnStabilization()
{
	OnModeUnChanged();
	::SendMessage(::GetDlgItem(m_hWnd, IDC_UNSTABILIZE),	BM_SETCHECK, 1, 0);
	modeType = UN_STABILIZE;
	OnModeChanged();
}
コード例 #7
0
void FEnvQueryParamSetupCustomization::CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
	PropertyHandle = StructPropertyHandle;
	CacheMyValues();

	// create struct header
	HeaderRow.NameContent()
	[
		StructPropertyHandle->CreatePropertyNameWidget()
	]
	.ValueContent()
	[
		SNew(SHorizontalBox)
		+SHorizontalBox::Slot()
		.Padding(0.0f, 2.0f, 5.0f, 2.0f)
		.VAlign(VAlign_Center)
		.AutoWidth()
		[
			SNew(SButton)
			.OnClicked( this, &FEnvQueryParamSetupCustomization::ToggleMode )
			.ContentPadding(2.0f)
			.VAlign(VAlign_Center)
			.Content()
			[
				SNew(STextBlock) 
				.Text(this, &FEnvQueryParamSetupCustomization::GetComboText)
				.Font(IDetailLayoutBuilder::GetDetailFont())
				.ToolTipText(this, &FEnvQueryParamSetupCustomization::GetComboTooltip)
			]
		]
		+SHorizontalBox::Slot()
		.Padding(0.0f, 2.0f, 5.0f, 2.0f)
		[
			SAssignNew(TextBox, SEditableTextBox)
			.Visibility(this, &FEnvQueryParamSetupCustomization::GetParamNameVisibility)
			.OnTextCommitted(this, &FEnvQueryParamSetupCustomization::OnParamNameCommitted)
		]
		+SHorizontalBox::Slot()
		.Padding(0.0f, 2.0f, 5.0f, 2.0f)
		[
			SNew(SNumericEntryBox<float>)
			.AllowSpin(false)
			.Visibility(this, &FEnvQueryParamSetupCustomization::GetParamNumValueVisibility)
			.Value(this, &FEnvQueryParamSetupCustomization::GetParamNumValue)
			.OnValueChanged(this, &FEnvQueryParamSetupCustomization::OnParamNumValueChanged)
		]
		+SHorizontalBox::Slot()
		.Padding(0.0f, 2.0f, 5.0f, 2.0f)
		[
			SNew(SCheckBox)
			.Visibility(this, &FEnvQueryParamSetupCustomization::GetParamBoolValueVisibility)
			.IsChecked(this, &FEnvQueryParamSetupCustomization::GetParamBoolValue )
			.OnCheckStateChanged(this, &FEnvQueryParamSetupCustomization::OnParamBoolValueChanged )
		]
	];

	OnModeChanged();
}
コード例 #8
0
ファイル: Connector.cpp プロジェクト: 0vermind/NeoLoader
void CConnector::Load()
{
	int Index = m_pMode->findData(theGUI->Cfg()->GetString("Core/Mode"));
	if(Index != -1)
	{
		m_pMode->setCurrentIndex(Index);
		OnModeChanged(Index);
	}

	m_pPassword->setText(theGUI->Cfg()->GetString("Core/Password"));

	m_pPipeName->setText(theGUI->Cfg()->GetString("Core/LocalName"));

	m_pHostPort->setText(theGUI->Cfg()->GetString("Core/RemotePort"));
	m_pHostName->setText(theGUI->Cfg()->GetString("Core/RemoteHost"));

	m_pAutoConnect->setCurrentIndex(theGUI->Cfg()->GetInt("Core/AutoConnect"));

	if(m_Mode == -1)
	{
		m_Mode = Index;

		switch(Index)
		{
		case 2:
			//m_pStartBtn->setEnabled(true);
			m_pConnectBtn->setEnabled(true);
			break;
		case 3:
			//m_pStartBtn->setEnabled(false);
			m_pConnectBtn->setEnabled(true);
			break;
		default:
			//m_pStartBtn->setEnabled(false);
			m_pConnectBtn->setEnabled(false);
		}
	}
}
コード例 #9
0
void FEnvDirectionCustomization::CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
	// create struct header
	HeaderRow.NameContent()
	[
		StructPropertyHandle->CreatePropertyNameWidget()
	]
	.ValueContent()
	.VAlign(VAlign_Center)
	[
		SNew(STextBlock)
		.Text(this, &FEnvDirectionCustomization::GetShortDescription)
		.Font(IDetailLayoutBuilder::GetDetailFont())
	];

	ModeProp = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FEnvDirection,DirMode));
	if (ModeProp.IsValid())
	{
		FSimpleDelegate OnModeChangedDelegate = FSimpleDelegate::CreateSP(this, &FEnvDirectionCustomization::OnModeChanged);
		ModeProp->SetOnPropertyValueChanged(OnModeChangedDelegate);
	}
	
	OnModeChanged();
}
コード例 #10
0
ファイル: tCZoneMainLayer.cpp プロジェクト: dulton/53_hero
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void tCZoneMainLayer::CreateModeItems()
{
    m_pLoadingModesLabel->hide();
    //Make sure this only happens once
    disconnect( &m_ModesModel, SIGNAL( Populated() ), this, SLOT( CreateModeItems() ) );

    const int numberOfModes = m_ModesModel.rowCount();

    if( numberOfModes > 0 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 0 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode1() ) );        
    }

    if( numberOfModes > 1 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 1 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode2() ) );
    }

    if( numberOfModes > 2 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 2 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode3() ) );
    }

    if( numberOfModes > 3 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 3 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode4() ) );
    }

    if ( numberOfModes > 4 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 4 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode5() ) );        
    }

    if ( numberOfModes == 6 )
    {
        tAction* pMenuAction = CreateGridMenuAction( 5 );
        m_pGrid->AddAction( pMenuAction, false );
        Connect( pMenuAction, SIGNAL( triggered() ), this, SLOT( OnMode6() ) );        
    }

    if ( numberOfModes > 6 ) //The More Modes item
    {      
        // If there is a current mode and it's one of the more items then highlight the more button        
        tAction* pAction = new tAction( this );
        pAction->setText( QString( tr( "More Modes" ) + "..." ) );
        pAction->setIcon( style()->standardIcon( NIT( tNOSStyle::NIT_CZoneMode ) ) );        
        m_pGrid->AddAction( pAction, false );
        Connect( pAction, SIGNAL( triggered() ), this, SIGNAL( MoreModes() ) );
    }

    OnModeChanged();
    Connect( &m_ModesModel, SIGNAL( ModeChanged() ), this, SLOT( OnModeChanged() ) );
}
コード例 #11
0
void HDRMergeOptionsDialog::SetCommandLineArgument(wxString cmd)
{
    m_cmd=cmd;
    if (m_cmd.IsEmpty())
        m_cmd=wxT(HUGIN_HDRMERGE_ARGS);
    m_cmd.LowerCase();
	// parse arguments
    static const wxCmdLineEntryDesc cmdLineDesc[] =
    {
    // wxT is required previous to wxWidgets 2.9, and not recommended after it.
    // Here it causes errors converting between const wchar_t * and const char*.
#if wxCHECK_VERSION(2,9,0)
        { wxCMD_LINE_OPTION, "m", NULL, NULL, wxCMD_LINE_VAL_STRING },
        { wxCMD_LINE_SWITCH, "c", NULL, NULL},
        { wxCMD_LINE_OPTION, "i", NULL, NULL, wxCMD_LINE_VAL_NUMBER },
        { wxCMD_LINE_OPTION, "s", NULL, NULL, wxCMD_LINE_VAL_STRING },
        { wxCMD_LINE_OPTION, "a", NULL, NULL, wxCMD_LINE_VAL_STRING },
#else
        { wxCMD_LINE_OPTION, wxT("m"), NULL, NULL, wxCMD_LINE_VAL_STRING },
        { wxCMD_LINE_SWITCH, wxT("c"), NULL, NULL},
        { wxCMD_LINE_OPTION, wxT("i"), NULL, NULL, wxCMD_LINE_VAL_NUMBER },
        { wxCMD_LINE_OPTION, wxT("s"), NULL, NULL, wxCMD_LINE_VAL_STRING },
        { wxCMD_LINE_OPTION, wxT("a"), NULL, NULL, wxCMD_LINE_VAL_STRING },
#endif
        { wxCMD_LINE_NONE }
    };
    wxCmdLineParser parser;
    parser.SetDesc(cmdLineDesc);
    parser.SetCmdLine(m_cmd);
    parser.Parse(false);
    wxString param;
    if(parser.Found(wxT("m"),&param))
    {
        if(param.CmpNoCase(wxT("avg_slow"))==0)
            m_mode->SetSelection(1);
        else
        {
            if(param.CmpNoCase(wxT("khan"))==0)
                m_mode->SetSelection(2);
            else
                m_mode->SetSelection(0);
        };
    }
    else
        m_mode->SetSelection(0);
    m_option_c->SetValue(parser.Found(wxT("c")));
    long i;
    if(parser.Found(wxT("i"),&i))
        m_khan_iter->SetValue(i);
    else
        m_khan_iter->SetValue(4);
    if(parser.Found(wxT("s"),&param))
    {
        //change locale for correct numeric output
        char * p = setlocale(LC_NUMERIC,NULL);
        char * old_locale = strdup(p);
        setlocale(LC_NUMERIC,"C");
        double sigma=0.0;
        param.ToDouble(&sigma);
        //reset locale
        setlocale(LC_NUMERIC,old_locale);
        free(old_locale);
        //using current locale for value in GUI
        m_khan_sigma->SetValue(wxString::Format(wxT("%.2f"),sigma));
    }
    else
        m_khan_sigma->SetValue(wxT("30"));
    if(parser.Found(wxT("a"),&param))
    {
        m_option_khan_af->SetValue(param.Contains(wxT("f")));
        m_option_khan_ag->SetValue(param.Contains(wxT("g")));
        m_option_khan_am->SetValue(param.Contains(wxT("m")));
    }
    wxCommandEvent dummy;
    OnModeChanged(dummy);
};