ToolMap
Loading...
Searching...
No Matches
tmsymbol.h
1/***************************************************************************
2 tmsymbol.h
3 Deals with GIS symbology and associed dialog
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17// comment doxygen
18
19#ifndef _TM_SYMBOL_H_
20#define _TM_SYMBOL_H_
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include "../components/wxserialize/tmserialize.h" // for object serialization
31#include "tmlayerpropertiesdef.h" // for tmLayerProperties definition
32#include "tmsymboldlg.h"
33
34class DataBaseTM;
35
37
38class tmSymbol : public wxObject {
39 private:
40 DataBaseTM* m_pDB;
41 TOC_GENERIC_NAME m_TocName;
42
43 virtual tmSymbolDLG* GetSymbolDialog(wxWindow* parent, const wxPoint& dlgpos);
44
45 virtual bool GetDialogData(tmSymbolDLG* dlg);
46
47 protected:
48 int m_LayerTransparency;
49
50 char ConvertTransparency(int itransparency);
51
52 DataBaseTM* GetDatabase() {
53 return m_pDB;
54 }
55
56 TOC_GENERIC_NAME GetTocName() {
57 return m_TocName;
58 }
59
60 public:
61 tmSymbol();
62
63 ~tmSymbol();
64
65 static tmSymbol* CreateSymbolBasedOnType(TM_GIS_SPATIAL_TYPES spattype, TOC_GENERIC_NAME tocname);
66
67 static tmSymbol* CreateCopySymbolBasedOnType(TM_GIS_SPATIAL_TYPES spattype, TOC_GENERIC_NAME tocname,
68 tmSymbol* origin);
69
70 int ShowSymbologyDialog(wxWindow* parent, const wxPoint& dlgpos = wxDefaultPosition);
71
72 virtual int ShowLabelDialog(wxWindow* parent, tmLayerProperties* properties,
73 const wxPoint& pos = wxDefaultPosition);
74
75 virtual bool Serialize(tmSerialize& s);
76
77 virtual int GetTransparency() {
78 return 0;
79 }
80
81 void SetDatabase(DataBaseTM* database) {
82 m_pDB = database;
83 }
84
85 void SetTocName(TOC_GENERIC_NAME tocname) {
86 m_TocName = tocname;
87 }
88};
89
90#endif
Definition database_tm.h:80
Storing object of layer type.
Definition tmlayerproperties.h:47
Definition tmserialize.h:36
Definition tmsymboldlg.h:55
Definition tmsymbol.h:38
char ConvertTransparency(int itransparency)
Convert transparency.
Definition tmsymbol.cpp:43
int ShowSymbologyDialog(wxWindow *parent, const wxPoint &dlgpos=wxDefaultPosition)
Display the symbology dialog.
Definition tmsymbol.cpp:66