File: convdlg.cpp

package info (click to toggle)
rtklib 2.4.3%2Bdfsg1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 41,796 kB
  • sloc: cpp: 51,592; ansic: 50,584; fortran: 987; makefile: 861; sh: 45
file content (62 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "rtklib.h"
#include "convdlg.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TConvDialog *ConvDialog;
//---------------------------------------------------------------------------
static double str2dbl(AnsiString str)
{
	double val=0.0;
	sscanf(str.c_str(),"%lf",&val);
	return val;
}
//---------------------------------------------------------------------------
__fastcall TConvDialog::TConvDialog(TComponent* Owner)
	: TForm(Owner)
{
	int i;
	for (i=0;i<=MAXRCVFMT;i++) {
		InFormat->Items->Add(formatstrs[i]);
	}
	InFormat->ItemIndex=0;
}
//---------------------------------------------------------------------------
void __fastcall TConvDialog::FormShow(TObject *Sender)
{
	AnsiString s;
	Conversion->Checked=ConvEna;
	InFormat ->ItemIndex=ConvInp;
	OutFormat->ItemIndex=ConvOut;
	OutMsgs->Text=ConvMsg;
	Options->Text=ConvOpt;
	UpdateEnable();
}
//---------------------------------------------------------------------------
void __fastcall TConvDialog::BtnOkClick(TObject *Sender)
{
	ConvEna=Conversion->Checked;
	ConvInp=InFormat->ItemIndex;
	ConvOut=OutFormat->ItemIndex;
	ConvMsg=OutMsgs->Text;
	ConvOpt=Options->Text;
}
//---------------------------------------------------------------------------
void __fastcall TConvDialog::ConversionClick(TObject *Sender)
{
	UpdateEnable();
}
//---------------------------------------------------------------------------
void __fastcall TConvDialog::UpdateEnable(void)
{
	InFormat ->Enabled=Conversion->Checked;
	OutFormat->Enabled=Conversion->Checked;
	OutMsgs  ->Enabled=Conversion->Checked;
	Options  ->Enabled=Conversion->Checked;
}
//---------------------------------------------------------------------------