ToolMap
Loading...
Searching...
No Matches
tmShortcutMemory Class Reference

Store shortcuts for attribution in memory. More...

#include <tmshortcutmemory.h>

Inheritance diagram for tmShortcutMemory:

Public Member Functions

void AddShortcutMemory (int iLayerType, int iKey, const wxString &description, long lShortcutValue)
 Add a shortcut to the memory.
 
void Clear ()
 Clear all shortcuts from memory.
 
int GetShortcut (int iKey, int &iLayerType, wxString &description, wxArrayLong &shortcutvalues)
 Get shortcut by key.
 
int GetCount ()
 

Detailed Description

Store shortcuts for attribution in memory.

Shortcuts are stored in :

  • The database
  • Memory For the latest, shortcuts are stored in memory for direct access when attributing. When the following operations are exectued in the Shortcuts_PANEL all shortcuts are read again from the database and stored into memory
  • Project is open
  • New shortcut is added
  • Shortcut is edited
  • A shortcut is removed
    Author
    Lucien Schreiber (c) CREALP 2008
    Date
    18 December 2008

Member Function Documentation

◆ AddShortcutMemory()

void tmShortcutMemory::AddShortcutMemory ( int  iLayerType,
int  iKey,
const wxString &  description,
long  lShortcutValue 
)

Add a shortcut to the memory.

This function store in memory all the active shortcuts.

Parameters
iLayerTypethe type of the layer, valid values are : 0, 1, 2 see PRJDEF_LAYERS_TYPE
iKeythe active shortcut key, between 1-12
descriptionThe shortcut description.
lShortcutValuethe value of the shortcut
Returns
true if shortcut was added sucessfully
Author
Lucien Schreiber (c) CREALP 2008
Date
18 December 2008

◆ Clear()

void tmShortcutMemory::Clear ( )

Clear all shortcuts from memory.

Author
Lucien Schreiber (c) CREALP 2008
Date
18 December 2008

◆ GetShortcut()

int tmShortcutMemory::GetShortcut ( int  iKey,
int &  iLayerType,
wxString &  description,
wxArrayLong &  shortcutvalues 
)

Get shortcut by key.

Parameters
iKeyThe key (1-12) for which we are searching the shortcut
iLayerTypeThe layer type to which the shortcut apply
descriptionThe description of the shortcut
shortcutvaluesAn array of all values for the shortcut
Returns
The number of values for shortcut key specified by iKey. if the shortcut isn't defined, wxNOT_FOUND is returned
Author
Lucien Schreiber (c) CREALP 2008
Date
18 December 2008

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