📄 fqbclass.hpp
字号:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
Types::TPoint __fastcall GetLinkPoint(int AIndex, char ASide);
DYNAMIC void __fastcall Resize(void);
HIDESBASE MESSAGE void __fastcall WMMove(Messages::TWMMove &Message);
HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &M);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
MESSAGE void __fastcall CMRelease(Messages::TMessage &Message);
void __fastcall _DoExit(System::TObject* Sender);
void __fastcall _DoMinimize(System::TObject* Sender);
void __fastcall _DoRestore(System::TObject* Sender);
__property TfqbCheckListBox* ChBox = {read=FCheckListBox};
public:
__fastcall virtual TfqbTable(Classes::TComponent* AOwner);
__fastcall virtual ~TfqbTable(void);
void __fastcall UpdateFieldList(void);
void __fastcall UpdateLinkList(void);
__property AnsiString AliasName = {read=FAliasName};
__property TfqbFieldList* FieldList = {read=FFieldList, write=FFieldList};
__property TfqbField* SellectedField = {read=GetSellectedField};
__property AnsiString TableName = {read=FTableName, write=SetTableName};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TfqbTable(HWND ParentWindow) : Extctrls::TPanel(ParentWindow) { }
#pragma option pop
};
class DELPHICLASS TfqbTableListBox;
class PASCALIMPLEMENTATION TfqbTableListBox : public Stdctrls::TListBox
{
typedef Stdctrls::TListBox inherited;
protected:
DYNAMIC void __fastcall DblClick(void);
virtual void __fastcall DrawItem(int Index, const Types::TRect &Rect, Windows::TOwnerDrawState State);
virtual void __fastcall CreateWnd(void);
public:
__fastcall virtual TfqbTableListBox(Classes::TComponent* AOwner);
public:
#pragma option push -w-inl
/* TCustomListBox.Destroy */ inline __fastcall virtual ~TfqbTableListBox(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TfqbTableListBox(HWND ParentWindow) : Stdctrls::TListBox(ParentWindow) { }
#pragma option pop
};
struct TGridColumn;
typedef TGridColumn *PGridColumn;
struct TGridColumn
{
public:
AnsiString Table;
AnsiString Alias;
AnsiString Field;
bool Visibl;
AnsiString Where;
int Sort;
int Func;
int Group;
} ;
class DELPHICLASS TfqbEdit;
class PASCALIMPLEMENTATION TfqbEdit : public Stdctrls::TEdit
{
typedef Stdctrls::TEdit inherited;
private:
Buttons::TSpeedButton* FButton;
Classes::TNotifyEvent FOnButtonClick;
Extctrls::TPanel* FPanel;
bool FShowButton;
void __fastcall SetShowButton(const bool Value);
protected:
void __fastcall ButtonClick(System::TObject* Sender);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall CreateWnd(void);
void __fastcall SetEditRect(void);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
public:
__fastcall virtual TfqbEdit(Classes::TComponent* AOwner);
__property Classes::TNotifyEvent OnButtonClick = {read=FOnButtonClick, write=FOnButtonClick};
__property bool ShowButton = {read=FShowButton, write=SetShowButton, nodefault};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TfqbEdit(HWND ParentWindow) : Stdctrls::TEdit(ParentWindow) { }
#pragma option pop
#pragma option push -w-inl
/* TWinControl.Destroy */ inline __fastcall virtual ~TfqbEdit(void) { }
#pragma option pop
};
typedef void __fastcall (__closure *TfqbColumnResizeEvent)(Comctrls::TCustomListView* Sender, int ColumnIndex, int ColumnWidth);
class DELPHICLASS TfqbGrid;
class PASCALIMPLEMENTATION TfqbGrid : public Comctrls::TListView
{
typedef Comctrls::TListView inherited;
private:
TfqbColumnResizeEvent FEndColumnResizeEvent;
Stdctrls::TComboBox* FFunctionList;
Stdctrls::TComboBox* FGroupList;
Menus::TPopupMenu* FPopupMenu;
Stdctrls::TComboBox* FSortList;
Stdctrls::TComboBox* FVisibleList;
TfqbEdit* FWhereEditor;
void __fastcall fqbOnChange(System::TObject* Sender);
void __fastcall fqbOnMenu(System::TObject* Sender);
void __fastcall fqbOnPopup(System::TObject* Sender);
void __fastcall fqbOnSelectItem(System::TObject* Sender, Comctrls::TListItem* Item, bool Selected);
void __fastcall fqbSetBounds(Controls::TControl* &Contr);
protected:
virtual void __fastcall CreateWnd(void);
virtual void __fastcall DoColumnResize(int ColumnIndex, int ColumnWidth);
int __fastcall FindColumnIndex(Windows::PNMHdr pHeader);
int __fastcall FindColumnWidth(Windows::PNMHdr pHeader);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
void __fastcall RecalcColWidth(void);
DYNAMIC void __fastcall Resize(void);
HIDESBASE MESSAGE void __fastcall WMNotify(Messages::TWMNotify &Msg);
HIDESBASE MESSAGE void __fastcall WMVscroll(Messages::TWMNotify &Msg);
public:
__fastcall virtual TfqbGrid(Classes::TComponent* AOwner);
__fastcall virtual ~TfqbGrid(void);
int __fastcall AddColumn(void);
void __fastcall Exchange(const int AItm1, const int AItm2);
void __fastcall fqbUpdate(void);
HIDESBASE void __fastcall UpdateColumn(void);
__property TfqbColumnResizeEvent OnEndColumnResize = {read=FEndColumnResizeEvent, write=FEndColumnResizeEvent};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TfqbGrid(HWND ParentWindow) : Comctrls::TListView(ParentWindow) { }
#pragma option pop
};
class DELPHICLASS TfqbEngine;
class PASCALIMPLEMENTATION TfqbEngine : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
bool FShowSystemTables;
public:
virtual void __fastcall ReadFieldList(const AnsiString ATableName, TfqbFieldList* &AFieldList) = 0 ;
virtual void __fastcall ReadTableList(Classes::TStrings* ATableList) = 0 ;
virtual Db::TDataSet* __fastcall ResultDataSet(void) = 0 ;
virtual void __fastcall SetSQL(const AnsiString Value) = 0 ;
__published:
__property bool ShowSystemTables = {read=FShowSystemTables, write=FShowSystemTables, default=0};
public:
#pragma option push -w-inl
/* TComponent.Create */ inline __fastcall virtual TfqbEngine(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
#pragma option pop
#pragma option push -w-inl
/* TComponent.Destroy */ inline __fastcall virtual ~TfqbEngine(void) { }
#pragma option pop
};
class DELPHICLASS TfqbDialog;
class PASCALIMPLEMENTATION TfqbDialog : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
TfqbEngine* FEngine;
bool __fastcall GetSchemaInsideSQL(void);
AnsiString __fastcall GetSQL();
AnsiString __fastcall GetSQLSchema();
void __fastcall SetEngine(const TfqbEngine* Value);
void __fastcall SetSchemaInsideSQL(const bool Value);
void __fastcall SetSQL(AnsiString Value);
void __fastcall SetSQLSchema(const AnsiString Value);
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
public:
__fastcall virtual TfqbDialog(Classes::TComponent* AOwner);
virtual bool __fastcall Execute(void);
__property AnsiString SQL = {read=GetSQL, write=SetSQL};
__property AnsiString SQLSchema = {read=GetSQLSchema, write=SetSQLSchema};
__published:
__property TfqbEngine* Engine = {read=FEngine, write=SetEngine};
__property bool SchemaInsideSQL = {read=GetSchemaInsideSQL, write=SetSchemaInsideSQL, default=1};
public:
#pragma option push -w-inl
/* TComponent.Destroy */ inline __fastcall virtual ~TfqbDialog(void) { }
#pragma option pop
};
class DELPHICLASS TfqbCore;
class PASCALIMPLEMENTATION TfqbCore : public System::TObject
{
typedef System::TObject inherited;
private:
TfqbEngine* FEngine;
TfqbGrid* FGrid;
bool FSchemaInsideSQL;
AnsiString FSQL;
AnsiString FSQLSchema;
TfqbTableArea* FTableArea;
bool FUseCoding;
AnsiString FText;
bool FUsingQuotes;
AnsiString __fastcall ExtractSchema(const AnsiString Value);
AnsiString __fastcall ExtractSQL(const AnsiString Str);
TfqbEngine* __fastcall GetEngine(void);
TfqbGrid* __fastcall GetGrid(void);
AnsiString __fastcall GetSQL();
AnsiString __fastcall GetSQLSchema();
TfqbTableArea* __fastcall GetTableArea(void);
void __fastcall SetSchemaInsideSQL(const bool Value);
void __fastcall SetSQL(AnsiString Value);
void __fastcall SetSQLSchema(const AnsiString Value);
public:
__fastcall virtual TfqbCore(void);
__fastcall virtual ~TfqbCore(void);
void __fastcall Clear(void);
AnsiString __fastcall GenerateSQL();
void __fastcall LoadFromFile(const AnsiString FileName);
void __fastcall LoadFromStr(const Classes::TStringList* Str);
void __fastcall RecognizeModel(const unsigned crc32, const AnsiString FileName);
void __fastcall SaveToFile(const AnsiString FileName);
void __fastcall SaveToStr(Classes::TStringList* &Str);
__property TfqbEngine* Engine = {read=GetEngine, write=FEngine};
__property TfqbGrid* Grid = {read=GetGrid, write=FGrid};
__property AnsiString SQL = {read=GetSQL, write=SetSQL};
__property AnsiString SQLSchema = {read=GetSQLSchema, write=SetSQLSchema};
__property TfqbTableArea* TableArea = {read=GetTableArea, write=FTableArea};
__property bool SchemaInsideSQL = {read=FSchemaInsideSQL, write=SetSchemaInsideSQL, default=1};
__property bool UsingQuotes = {read=FUsingQuotes, write=FUsingQuotes, nodefault};
};
typedef AnsiString fqbClass__51[30];
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE AnsiString StrFieldType[30];
#define _fqbBeginModel "/*_FQBMODEL"
#define _fqbEndModel "_FQBEND*/"
extern PACKAGE TfqbCore* __fastcall fqbCore(void);
} /* namespace Fqbclass */
using namespace Fqbclass;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Fqbclass
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -