ToolMap
Loading...
Searching...
No Matches
ScaleList Class Reference
Inheritance diagram for ScaleList:
ListGenReportWithDialog ListGenReport

Public Member Functions

 ScaleList (wxWindow *parent, wxWindowID id, DataBaseTM *database, PrjDefMemManage *pProjectMem, wxSize size=wxDefaultSize)
 Constructor.
 
 ~ScaleList ()
 Destructor.
 
virtual int Compare (int iColumnCompareType, const wxString &x_strValue1, const wxString &x_strValue2, bool bAsending)
 Compare two values for sorting data.
 
void SetListCtrls (wxChoice *orderchoice=nullptr)
 
void SetScaleToList (long lscale, int index=-1)
 Set the scale value.
 
long GetScaleFromList (int index)
 Get the scale value.
 
- Public Member Functions inherited from ListGenReportWithDialog
 ListGenReportWithDialog (wxWindow *parent, wxWindowID id, wxSize size=wxDefaultSize)
 
 ListGenReportWithDialog (wxWindow *parent, wxWindowID id, wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr, wxSize size=wxDefaultSize, long style=wxLC_REPORT)
 
virtual int ImportParsedFileToListCtrl (const wxString &filename, const int &FilterIndex)
 Import file data to list.
 
void SetDialog (wxDialog *pDialog)
 
virtual void AddItem ()
 
virtual void DeleteItem ()
 
void EditItem ()
 
- Public Member Functions inherited from ListGenReport
void SortListItem (int x_col, int low, int high, int typecol, bool bAscending=TRUE)
 Sort columns.
 
void SwapRow (int x_row1, int x_row2)
 Swap two items value.
 
 ListGenReport (wxWindow *parent, wxWindowID id, wxSize size=wxDefaultSize)
 Constructor for derived class.
 
 ListGenReport (wxWindow *parent, wxWindowID id, wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr, wxSize size=wxDefaultSize, long style=wxLC_REPORT)
 Constructor.
 
 ~ListGenReport ()
 Desctructor.
 
void AddItemToList (wxString myValue, int iPosition=-1)
 Add an item to the list.
 
wxString GetItemColText (int iItem, int iCol)
 Get the text of a specified column for a specified item.
 
bool SetItemText (int iItem, int iCol, wxString text)
 Set the text of a specified column for a specified item.
 
long GetSelectedItem ()
 Get the first item selected.
 
void SetSelectedItem (long index)
 
int GetAllSelectedItem (wxArrayLong &results)
 Get all selected item.
 
void MoveItem (int iItem, int iNewPos=0)
 Move item in the list.
 
bool DataToList (ListGenDialog *pdialog, wxArrayString &myValues)
 Change list values using a ListGenDialog.
 
bool DeleteSelectedItem ()
 Delete the selected item.
 
virtual int GetAllDataAsStringArray (wxArrayString &myStringArray, long index)
 Get all data from a row into an array of string.
 
bool ItemExist (long index)
 Check for an item existence.
 
virtual bool EditDataToList (const wxArrayString &myValue, int index=-1)
 Fill list using a string array.
 
int ExportListParsedToFile (const wxString &filename, const int &FilterIndex)
 Export values of a list to a parsed file.
 
int GetColumnClicked (wxWindow *parent, int iIndex, int iBorderMargin)
 Get the column in wich user has clicked.
 
 DECLARE_EVENT_TABLE ()
 

Additional Inherited Members

- Static Public Attributes inherited from ListGenReport
static const int ID_LIST = wxID_ANY
 
- Protected Member Functions inherited from ListGenReportWithDialog
void InitMembers ()
 
virtual void AddingValueToArray (wxArrayString &myImportedValues)
 
virtual void OnDoubleClickItem (wxListEvent &event)
 
virtual void OnPressBackSpace (wxListEvent &event)
 
- Protected Member Functions inherited from ListGenReport
void CreateColumns (wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr)
 
virtual void OnContextMenu (wxListEvent &event)
 
void OnMoveItemInList (wxCommandEvent &event)
 
virtual void OnSortColumns (wxListEvent &event)
 Called when user click on the column header.
 
void OnInit ()
 
- Protected Attributes inherited from ListGenReportWithDialog
wxDialog * m_pDialog
 
- Protected Attributes inherited from ListGenReport
ListGenMenum_ListContextMenu
 
TextParserm_ImportParser
 

Member Function Documentation

◆ Compare()

int ScaleList::Compare ( int  iColumnCompareType,
const wxString &  x_strValue1,
const wxString &  x_strValue2,
bool  bAscending 
)
virtual

Compare two values for sorting data.

This function compare values of two items based on the column type wich could be one of the LIST_FIELD_TYPE

Parameters
iColumnCompareTypeOne of the LIST_FIELD_TYPE value indicating wich sort of column we are trying to sort
x_strValue1The string value of item 1 (may be converted internally based on column type)
x_strValue2The string value of item 2 (may be converted internally based on column type)
bAscendinga TRUE value indicate an ascending sort and a FALSE one indicate a descending sort
Returns
if value 1 is greater than value 2 return 1, if equal return 0 and finaly if value 1 is smaller than value 2 return -1
Author
Lucien Schreiber (c) CREALP 2007
Date
03 April 2008

Reimplemented from ListGenReport.

◆ GetScaleFromList()

long ScaleList::GetScaleFromList ( int  index)

Get the scale value.

Return the long value of the scale for a specified item (without the 1:)

Parameters
indexthe zero based item index we want the scale for
Returns
the scale value without the 1: text
Author
Lucien Schreiber (c) CREALP 2007
Date
25 March 2008

◆ SetScaleToList()

void ScaleList::SetScaleToList ( long  lscale,
int  index = -1 
)

Set the scale value.

Insert a new scale item or change an existing one adding the 1: text in front of the scale value

Parameters
lscalethe scale value (without the 1:)
indexzero based index of the item to modify or -1 if we want to add an item (the default)
Author
Lucien Schreiber (c) CREALP 2007
Date
25 March 2008

The documentation for this class was generated from the following files: