ToolMap
|
Enhance the tmCheckListBox class. More...
#include <tmchecklistboxrank.h>
Public Member Functions | |
~tmCheckListBoxRank () | |
Destructor Do nothing actually. | |
tmCheckListBoxRank (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int nStrings=0, const wxString *choices=nullptr, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr) | |
Constructor for one steps creation. | |
bool | Create (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int nStrings=0, const wxString *choices=nullptr, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr) |
Constructor for two steps creation. | |
wxString | GetRankColName () |
void | SetRankColName (const wxString &colrank=_T("RANK")) |
Set the rank column name. | |
wxString | GetTableName () |
void | SetTableName (const wxString &tabname=TABLE_NAME_OBJECTS) |
Set the table name. | |
void | SetDataBase (DataBaseTM *pDB) |
Public Member Functions inherited from tmCheckListBox | |
~tmCheckListBox () | |
Destructor. | |
tmCheckListBox (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int nStrings=0, const wxString *choices=nullptr, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr) | |
bool | Create (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int nStrings=0, const wxString *choices=nullptr, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr) |
Creator for two steps creation. | |
bool | AddItem (long index=-1, long id=-1, const wxString &name=wxEmptyString, bool checked=false, bool keepFilters=false) |
Add an item in the list. | |
bool | RemoveItem (long index=-1) |
Remove an item in the list. | |
bool | EditItem (long index, long id=-1, const wxString &name=wxEmptyString, short checked=2) |
Modify an item. | |
bool | SwapItem (long index1, long index2=-1) |
Switch two items. | |
bool | MoveItem (long index1, long index2) |
Move an items to a specified position. | |
bool | GetItem (long index, long &id, wxString &name, bool &bcheck) |
Get value for item at the specified position. | |
bool | GetItemId (long index, long &id) |
bool | SetItemCheck (long index, short checked=2) |
void | ClearItems () |
Empty the checklist and associated array. | |
void | ClearFilters () |
Clear the filters and restore original arrays. | |
void | ClearCheckMarks () |
Uncheck all items. | |
void | Filter (wxString filter) |
Filter the list and keep only the labels containing the string. | |
void | ResetOriginalArrays () |
bool | StoreActualChecks () |
Protected Member Functions | |
bool | PrepareOrderStatement (wxString &sqlstatement) |
Prepare the statement for setting order. | |
void | EnableRelevantMenuEntries () |
Protected Member Functions inherited from tmCheckListBox | |
void | Init () |
wxMenu * | GetPopupMenu () |
Additional Inherited Members | |
Protected Attributes inherited from tmCheckListBox | |
bool | m_IsFiltered |
Enhance the tmCheckListBox class.
This derivated class add the ability to save the order of the list in a database in a rank column
tmCheckListBoxRank::~tmCheckListBoxRank | ( | ) |
Destructor Do nothing actually.
tmCheckListBoxRank::tmCheckListBoxRank | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
int | nStrings = 0 , |
||
const wxString * | choices = nullptr , |
||
long | style = 0 , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxListBoxNameStr |
||
) |
Constructor for one steps creation.
see documentation for wxCheckListBox for parameters description
bool tmCheckListBoxRank::Create | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
int | nStrings = 0 , |
||
const wxString * | choices = nullptr , |
||
long | style = 0 , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxListBoxNameStr |
||
) |
Constructor for two steps creation.
see documentation for wxCheckListBox for parameters description
|
protectedvirtual |
Reimplemented from tmCheckListBox.
|
protected |
Prepare the statement for setting order.
Create the sql statement for setting the item's order in the database
sqlstatement | string will be filled with the issued statement for setting the item's order |
void tmCheckListBoxRank::SetRankColName | ( | const wxString & | colrank = _T("RANK") | ) |
Set the rank column name.
If your rank column has default name "RANK", no need to call this function
colrank | The name of the rank column (default is RANK) |
void tmCheckListBoxRank::SetTableName | ( | const wxString & | tabname = TABLE_NAME_OBJECTS | ) |
Set the table name.
The table name will be used for setting order when user press the "Save order" popup menu.
tabname | The name of the table. Default is the value of TABLE_NAME_OBJECTS |