17#ifndef _TM_QUERIESEDITOR_H_
18#define _TM_QUERIESEDITOR_H_
20#include <wx/listctrl.h>
21#include <wx/statusbr.h>
24#include "../core/queriesbuilder.h"
25#include "../gis/tmmanagerevent.h"
26#include "listgenreport_status.h"
27#include "managed_aui_wnd.h"
28#include "queries_panel_dlg.h"
29#include "wxflatbutton.h"
35const int ID_QUERIESEDITOR = 10049;
36const int ID_QUERIES_LIST = 10051;
37const int ID_QUERIES_ADD = 10052;
38const int ID_QUERIES_REMOVE = 10064;
39const int ID_QUERIES_RUN = 10236;
40const int ID_QUERIES_APPLY_SYMBOLOGY = 10066;
41const int ID_QUERIES_EDIT = 10067;
42#define SYMBOL_QUERIES_PANEL_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
43#define SYMBOL_QUERIES_PANEL_TITLE _("Queries")
44#define SYMBOL_QUERIES_PANEL_IDNAME ID_QUERIESEDITOR
45#define SYMBOL_QUERIES_PANEL_SIZE wxSize(200, 100)
46#define SYMBOL_QUERIES_PANEL_POSITION wxDefaultPosition
48DECLARE_EVENT_TYPE(tmEVT_QUERY_MENU, -1)
56 virtual void BeforeAdding();
58 virtual void AfterAdding(
bool bRealyAddItem);
60 virtual void BeforeDeleting();
62 virtual void BeforeEditing();
64 virtual void AfterEditing(
bool bRealyEdited);
66 virtual void OnDoubleClickItem(wxListEvent& event);
68 void OnQueryEdit(wxCommandEvent& event);
70 void OnQueryMenuUpdateUISelected(wxUpdateUIEvent& event);
72 DECLARE_EVENT_TABLE();
75 virtual void OnContextMenu(wxListEvent& event);
79 wxArrayInt* pColsSize =
nullptr, wxSize size = wxDefaultSize);
83 void OnContextualMenu(wxContextMenuEvent& event);
91 m_Selected = selected;
94 virtual void AddItem();
105 wxAuiPaneInfo m_PaneInfo;
108 wxWindow* m_ParentEvt;
109 bool m_IsProjectOpen;
113 void InitMemberValues();
116 void OnPressQueryMenu(wxCommandEvent& event);
118 DECLARE_EVENT_TABLE()
122 Queries_PANEL(wxWindow* parent, wxWindowID
id, wxAuiManager* auimanager);
131 void OnQueryApplySymbology(wxCommandEvent& event);
137 wxSizer*
CreateControls(wxWindow* parent,
bool call_fit =
true,
bool set_sizer =
true);
143 void SetTOCCtrl(
TocCtrl* toc) {
151 bool IsQuerySelected();
Definition database_tm.h:80
Definition listgenreport.h:319
Definition managed_aui_wnd.h:32
Definition queries_panel.h:50
Display the Queries Panel.
Definition queries_panel.h:103
void SetDataBase(DataBaseTM *database)
Set the database object.
Definition queries_panel.cpp:146
void OnRunQueries(wxCommandEvent &event)
User press the run query.
Definition queries_panel.cpp:240
void OnRemoveQueries(wxCommandEvent &event)
User press the remove queries.
Definition queries_panel.cpp:229
void EnableQueriesPanel(bool projectopen=true)
Indicate if a project is open or not.
Definition queries_panel.cpp:195
void OnAddQueries(wxCommandEvent &event)
User press the Add queries button.
Definition queries_panel.cpp:214
bool LoadQueries(DataBaseTM *database)
Load the queries from the database.
Definition queries_panel.cpp:164
wxSizer * CreateControls(wxWindow *parent, bool call_fit=true, bool set_sizer=true)
Creates the controls and sizers.
Definition queries_panel.cpp:104
~Queries_PANEL()
Destructor.
Definition queries_panel.cpp:83
Store ID of selected data into memory.
Definition tmselecteddatamemory.h:43