//--------------------------------------------------------------------------- // set the indent from the right margin (in points?) // void __fastcall TTaeParaAttributes::SetRightIndent(int Value) { TParaFormat Paragraph; InitPara(Paragraph); Paragraph.dwMask = PFM_RIGHTINDENT; Paragraph.dxRightIndent = Value * 20; SetAttributes(Paragraph); }
//--------------------------------------------------------------------------- // set the first line indent (in points?) from the left margin // void __fastcall TTaeParaAttributes::SetFirstIndent(int Value) { TParaFormat Paragraph; InitPara(Paragraph); Paragraph.dwMask = PFM_STARTINDENT; Paragraph.dxStartIndent = Value * 20; SetAttributes(Paragraph); }
//--------------------------------------------------------------------------- // set the paragraph indent (in points?) from the left margin // void __fastcall TTaeParaAttributes::SetLeftIndent(int Value) { TParaFormat Paragraph; InitPara(Paragraph); Paragraph.dwMask = PFM_OFFSET; Paragraph.dxOffset = Value * 20; SetAttributes(Paragraph); }
//--------------------------------------------------------------------------- // set the paragraph alignment for the text // void __fastcall TTaeParaAttributes::SetAlignment(TAlignment Value) { TParaFormat Paragraph; InitPara(Paragraph); Paragraph.dwMask = PFM_ALIGNMENT; Paragraph.wAlignment = (WORD) (Value + 1); SetAttributes(Paragraph); }
ShowImageBase2::ShowImageBase2(QWidget *parent,GDALDataset *p) : QGraphicsView(parent) { ui.setupUi(this); pDataset=p; InitPara(); CalBoundary(); scene=new QGraphicsScene; setScene(scene); setWindowTitle("ImageBase2"); resize(nShowImageWidth,nShowImageWidth); }
//--------------------------------------------------------------------------- // set the numbering style for the paragraphs // void __fastcall TTaeParaAttributes::SetNumbering(TNumberingStyle Value) { TParaFormat Paragraph; switch (Value) { case nsBullet: if (LeftIndent < 10) LeftIndent = 10; break; case nsNone: LeftIndent = 0; break; } InitPara(Paragraph); Paragraph.dwMask = PFM_NUMBERING; Paragraph.wNumbering = Value; SetAttributes(Paragraph); }
//--------------------------------------------------------------------------- // fetch the paragraph attributes of the first paragraph of the text // void __fastcall TTaeParaAttributes::GetAttributes(TParaFormat& Paragraph) { InitPara(Paragraph); if (FRichEdit->HandleAllocated()) ::SendMessage(FRichEdit->Handle, EM_GETPARAFORMAT, 0, (LPARAM) &Paragraph); }
int main (void) { //Test //Test(); //Init InitDevice(); //Send Startup Message FCMessageSend("vFlyOK"); //等待INS的GPS完成启动 //WaitGPS(); //改变运行状态并发送状态信息 RunState=DefaultRunState; FCEventSend(RunState); //初始化参数 InitPara(); FCMessageSend("InitParaOK"); //启动主计时器 TimerEnable(0); while(1) { if(Do==DoWorkLoop) { LED2ON(); INS(); SwitchMode(); if(FPGAState==TRUE) { GetPWM(); } //FCA(); //FCALimitPWM(void); FCAGetNav(); FCAPWMOut(); SmoothPWM(40); SetPWM(); //CollectMedianDataFun(40); FCACollectPosYaw(5); FCACollectMedianDataFun(40); FCFrameProcess(); if(MainLoopRunCounter%DataSendDF==0) { DataReturn(0); } if(MainLoopRunCounter%DataRecDF==DataRecDF/2) { DataReturn(1); } MainLoopRunCounter++; LED2OFF(); Do=DoNothing; } if(Do==DoFactoryLoop) { LED1ON(); GpioClrLOW(P1_25);//一律切换到手驾 INS(); FCFrameProcess(); if(DataToDownload==0) { if(MainLoopRunCounter%DataSendDF==0) { DataReturn(0); } /* if(MainLoopRunCounter%DataRecDF==DataRecDF/2) { DataReturn(1); } */ } else { DataDownload(); } MainLoopRunCounter++; LED1OFF(); Do=DoNothing; } } return 0; }