CCylinderData Dialog::GetTableData()
{
    auto SelectedRow(SearchGrid(*m_Table, *m_Controller, CQTableIndexFunctor()));
    CCylinderData Data;

    Data.SetIndex(m_Table->item(SelectedRow, CCylinderVolumeEnums::IndexColumn)->text().toDouble());
    Data.SetRadius(m_Table->item(SelectedRow, CCylinderVolumeEnums::RadiusColumn)->text().toDouble());
    Data.SetRadiusUnit(GetComboText(*m_Table, SelectedRow, CCylinderVolumeEnums::RadiusUnitColumn).toStdString());
    Data.SetHeight(m_Table->item(SelectedRow, CCylinderVolumeEnums::HeightColumn)->text().toDouble());
    Data.SetHeightUnit(GetComboText(*m_Table, SelectedRow, CCylinderVolumeEnums::HeightUnitColumn).toStdString());
    Data.SetVolume(m_Table->item(SelectedRow, CCylinderVolumeEnums::VolumnColumn)->text().toDouble());

    return Data;
}
Exemplo n.º 2
0
BOOL GetComboCurSelText(OUT LPTSTR* lpStr, IN HWND hwndCombo)
{
	LRESULT lresIndex = ::SendMessage(hwndCombo, CB_GETCURSEL, 0, 0);
	if (lresIndex == CB_ERR)
        return FALSE;

    return GetComboText(lpStr, (WPARAM) lresIndex, hwndCombo);
}
Exemplo n.º 3
0
void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
	GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu);
	GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu);
	GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr);
#ifdef ENABLE_SIO1API
	GetComboText(Sio1ConfS.Combo, Sio1ConfS.plist, Config.Sio1);
#endif
	GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1);
	GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2);
	GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios);

	SaveConfig();

	gtk_widget_destroy(ConfDlg);
	ConfDlg = NULL;
}
Exemplo n.º 4
0
void OnNet_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
	GetComboText(NetConfS.Combo, NetConfS.plist, Config.Net);
	SaveConfig();
	gtk_widget_destroy(GTK_WIDGET(dialog));
	NetDlg = NULL;
}