camelot.camelot.view.plugins

Package camelot :: Package camelot :: Package view :: Package plugins |
[hide private]
[frames] | no frames]

# Source Code for Package camelot.camelot.view.plugins

     1  #  ============================================================================

     2  #

     3  #  Copyright (C) 2007-2008 Conceptive Engineering bvba. All rights reserved.

     4  #  www.conceptive.be / project-camelot@conceptive.be

     5  #

     6  #  This file is part of the Camelot Library.

     7  #

     8  #  This file may be used under the terms of the GNU General Public

     9  #  License version 2.0 as published by the Free Software Foundation

    10  #  and appearing in the file LICENSE.GPL included in the packaging of

    11  #  this file.  Please review the following information to ensure GNU

    12  #  General Public Licensing requirements will be met:

    13  #  http://www.trolltech.com/products/qt/opensource.html

    14  #

    15  #  If you are unsure which license is appropriate for your use, please

    16  #  review the following information:

    17  #  http://www.trolltech.com/products/qt/licensing.html or contact

    18  #  project-camelot@conceptive.be.

    19  #

    20  #  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE

    21  #  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

    22  #

    23  #  For use of this library in commercial applications, please contact

    24  #  project-camelot@conceptive.be

    25  #

    26  #  ============================================================================

    27

    28  """Plugins to include custom Camelot editors into QT Designer"""
    29

    30 -class CamelotEditorPlugin(object):
    31

    32 -  def __init__(self):
    33      self.initialized = False
    34      self._widget = None
    35

    36 -  def initialize(self, core):
    37      if self.initialized:
    38        return
    39      self.initialized = True
    40

    41 -  def isInitialized(self):
    42      return self.initialized
    43

    44 -  def createWidget(self, parent):
    45      return self._widget(parent=parent)
    46

    47 -  def name(self):
    48      return self._widget.__name__
    49

    50 -  def group(self):
    51      return 'Camelot'
    52

    53 -  def toolTip(self):
    54      return ""
    55

    56 -  def whatsThis(self):
    57      return ""
    58

    59 -  def isContainer(self):
    60      return False
    61

    62 -  def domXml(self):
    63      name = self._widget.__name__
    64      return '<widget class="%s" name=\"%s\" />\n'%(name, name)
    65

    66 -  def includeFile(self):
    67      return "camelot.view.controls.editors"
    68