-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlara_toolbox_item.py
executable file
·61 lines (51 loc) · 1.76 KB
/
lara_toolbox_item.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#_____________________________________________________________________________
#
# PROJECT: LARA
# CLASS: lara_toolbox_item
# FILENAME: lara_toolbox_item.py
#
# CATEGORY:
#
# AUTHOR: mark doerr
# EMAIL: [email protected]
#
# VERSION: 0.0.3
#
# CREATION_DATE: 2013/05/05
# LASTMODIFICATION_DATE: 2014/14/15
#
# BRIEF_DESCRIPTION: lara_toolbox_item
# DETAILED_DESCRIPTION:
#
# ____________________________________________________________________________
#
# Copyright:
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
# INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE.
#
# For further Information see COPYING file that comes with this distribution.
#_______________________________________________________________________________
from PyQt4 import Qt, QtCore, QtGui
#import logging
class LA_ToolBoxItem(QtGui.QListWidgetItem):
""" LARA toolbox item for mainwindows toolbox side tab"""
def __init__(self, text="", icon=None, parent=None):
super(LA_ToolBoxItem, self).__init__(icon, text ,parent)
self.setTextAlignment(QtCore.Qt.AlignHCenter)
self.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsDragEnabled )
def diagramClass(self):
return(self.diagram_class)
def pixmap(self):
return(self.icon.pixmap(64))
def text(self):
return(self.text)
def name(self):
return(self.item_name)