ctkCollapsibleButtonPlugin.cpp

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 // CTK includes
00022 #include "ctkCollapsibleButtonPlugin.h"
00023 #include "ctkCollapsibleButton.h"
00024 
00025 //-----------------------------------------------------------------------------
00026 ctkCollapsibleButtonPlugin::ctkCollapsibleButtonPlugin(QObject *_parent)
00027         : QObject(_parent)
00028 {
00029 }
00030 
00031 //-----------------------------------------------------------------------------
00032 QWidget *ctkCollapsibleButtonPlugin::createWidget(QWidget *_parent)
00033 {
00034   ctkCollapsibleButton* _widget = new ctkCollapsibleButton(_parent);
00035   return _widget;
00036 }
00037 
00038 //-----------------------------------------------------------------------------
00039 QString ctkCollapsibleButtonPlugin::domXml() const
00040 {
00041   return "<widget class=\"ctkCollapsibleButton\" \
00042           name=\"CTKCollapsibleButton\">\n"
00043           " <property name=\"geometry\">\n"
00044           "  <rect>\n"
00045           "   <x>0</x>\n"
00046           "   <y>0</y>\n"
00047           "   <width>300</width>\n"
00048           "   <height>100</height>\n"
00049           "  </rect>\n"
00050           " </property>\n"
00051           " <property name=\"text\">"
00052           "  <string>CollapsibleButton</string>"
00053           " </property>"
00054           " <property name=\"contentsFrameShape\">"
00055           "  <enum>QFrame::StyledPanel</enum>"
00056           " </property>"
00057           "</widget>\n";
00058 }
00059 
00060 //-----------------------------------------------------------------------------
00061 QIcon ctkCollapsibleButtonPlugin::icon() const
00062 {
00063   return QIcon(":/Icons/groupboxcollapsible.png");
00064 }
00065 
00066 //-----------------------------------------------------------------------------
00067 QString ctkCollapsibleButtonPlugin::includeFile() const
00068 {
00069   return "ctkCollapsibleButton.h";
00070 }
00071 
00072 //-----------------------------------------------------------------------------
00073 bool ctkCollapsibleButtonPlugin::isContainer() const
00074 {
00075   return true;
00076 }
00077 
00078 //-----------------------------------------------------------------------------
00079 QString ctkCollapsibleButtonPlugin::name() const
00080 {
00081   return "ctkCollapsibleButton";
00082 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines