~lorzeteam/lorze/trunk

« back to all changes in this revision

Viewing changes to Scripts/lrzrestart.py

  • Committer: Andreas Ulrich
  • Date: 2012-12-13 20:54:19 UTC
  • Revision ID: ulrich3110@gmail.com-20121213205419-aucgdskqtqmyrj10
new file structure, new object structure, about dialogue, help dialogue, hep pages in english and german, german translation, ponton5h installer, documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
# -*- coding: utf-8 -*-
3
 
 
4
 
# LORZE erasandcad, a 2D CAD with an intuitive user interface, simple and easy.
5
 
# http://erasand.jimdo.com/python-programme/lorze/
6
 
# (C) 2012, Andreas Ulrich
7
 
 
8
 
# This program is free software: you can redistribute it and/or modify
9
 
# it under the terms of the GNU General Public License as published by
10
 
# the Free Software Foundation, either version 3 of the License, or
11
 
# (at your option) any later version.
12
 
 
13
 
# This program is distributed in the hope that it will be useful,
14
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
# GNU General Public License for more details.
17
 
 
18
 
# You should have received a copy of the GNU General Public License
19
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 
 
21
 
class LorzeRestart():
22
 
    # Lorze restart for starting the gui with different options
23
 
    
24
 
    def __init__(self):
25
 
        # Bool, true= restart
26
 
        self.__restart= False
27
 
        
28
 
        # Container for datas
29
 
        self.__data= None
30
 
        
31
 
        
32
 
    def SetRestart(self, restart):
33
 
        self.__restart= restart
34
 
 
35
 
 
36
 
    def GetRestart(self):
37
 
        return(self.__restart)
38
 
        
39
 
        
40
 
    def SetData(self, data):
41
 
        self.__data= data
42
 
        
43
 
        
44
 
    def GetData(self):
45
 
        return(self.__data)
46
 
 
47
 
 
48
 
if __name__== '__main__':
49
 
    test= LorzeRestart()
50
 
 
51
 
    print('After initialization')
52
 
    print(test.GetRestart())
53
 
    print(test.GetData())
54
 
    
55
 
    print('Set new restart')
56
 
    test.SetRestart(True)
57
 
    test.SetData('TEST')
58
 
    print('Restart should be True / it is', test.GetRestart())
59
 
    print('This is in the datas:', test.GetData())
60