KVIrc  4.9.2
DeveloperAPIs
Public Types | Public Member Functions | Protected Attributes | List of all members
ClassEditorTreeWidgetItem Class Reference

Describes an item inside the class editor tree widget. More...

#include <ClassEditorWindow.h>

+ Inheritance diagram for ClassEditorTreeWidgetItem:

Public Types

enum  Type { Class, Namespace, Method }
 Contains the type of the class item. More...
 

Public Member Functions

const QString & buffer ()
 Returns the buffer containing the code of the item. More...
 
 ClassEditorTreeWidgetItem (QTreeWidget *pTreeWidget, Type eType, const QString &szName)
 Constructs the class editor tree widget item. More...
 
 ClassEditorTreeWidgetItem (ClassEditorTreeWidgetItem *pParentItem, Type eType, const QString &szName)
 Constructs the class editor tree widget item. More...
 
bool classNotBuilt ()
 Returns true if we class is not built yet, false otherwise. More...
 
const int & cursorPosition ()
 Returns the cursor's position. More...
 
QString inheritsClass ()
 Returns the class name of the classes we inherit from. More...
 
bool isClass ()
 Returns true if the item is a class, false otherwise. More...
 
bool isInternalFunction ()
 Returns true if the function is set as internal, false otherwise. More...
 
bool isMethod ()
 Returns true if the item is a member function, false otherwise. More...
 
bool isNamespace ()
 Returns true if the item is a namespace, false otherwise. More...
 
const QString & name ()
 Returns the name of the item. More...
 
QString reminder ()
 Returns the parameters list. More...
 
void setBuffer (const QString &szBuffer)
 Saves the code of the item in a buffer. More...
 
void setClassNotBuilt (bool bModified)
 Sets the state of the class as non-built. More...
 
void setCursorPosition (const int &iPos)
 Sets the cursor position. More...
 
void setInheritsClass (QString szInheritsClassName)
 Sets the class name on which the class inherits from. More...
 
void setInternalFunction (bool bInternal)
 Sets the function as internal. More...
 
void setName (const QString &szName)
 Sets the name of the item. More...
 
void setReminder (const QString &szRem)
 Sets the list of parameters the function accept. More...
 
void setType (Type eType)
 Sets the type of the item. More...
 
Type type ()
 Returns the type of the item. More...
 
 ~ClassEditorTreeWidgetItem ()
 Destroys the class editor tree widget item. More...
 

Protected Attributes

bool m_bClassModified
 
bool m_bInternal
 
Type m_eType
 
int m_iPos
 
QString m_szBuffer
 
QString m_szInheritsClassName
 
QString m_szName
 
QString m_szReminder
 

Detailed Description

Describes an item inside the class editor tree widget.

Member Enumeration Documentation

Contains the type of the class item.

Enumerator
Class 

The item is a class

Namespace 

The item is a namespace

Method 

The item is a member function

Constructor & Destructor Documentation

ClassEditorTreeWidgetItem::ClassEditorTreeWidgetItem ( QTreeWidget *  pTreeWidget,
Type  eType,
const QString &  szName 
)

Constructs the class editor tree widget item.

Parameters
pTreeWidgetThe parent tree widget
eTypeThe type of the item
szNameThe name of the item
Returns
ClassEditorTreeWidgetItem

References KviIconManager::Class, g_pIconManager, KviIconManager::getSmallIcon(), m_bClassModified, m_bInternal, m_iPos, m_szInheritsClassName, Namespace, KviIconManager::NameSpace, and setName().

ClassEditorTreeWidgetItem::ClassEditorTreeWidgetItem ( ClassEditorTreeWidgetItem pParentItem,
Type  eType,
const QString &  szName 
)

Constructs the class editor tree widget item.

Parameters
pParentItemThe parent tree widget item
eTypeThe type of the item
szNameThe name of the item
Returns
ClassEditorTreeWidgetItem

References Class, KviIconManager::Class, KviIconManager::Function, g_pIconManager, KviIconManager::getSmallIcon(), m_bClassModified, m_bInternal, m_iPos, m_szInheritsClassName, Namespace, KviIconManager::NameSpace, and setName().

ClassEditorTreeWidgetItem::~ClassEditorTreeWidgetItem ( )
inline

Destroys the class editor tree widget item.

Member Function Documentation

const QString& ClassEditorTreeWidgetItem::buffer ( )
inline

Returns the buffer containing the code of the item.

Returns
const QString &

References m_szBuffer.

Referenced by ClassEditorWidget::exportClassBuffer().

bool ClassEditorTreeWidgetItem::classNotBuilt ( )
inline

Returns true if we class is not built yet, false otherwise.

Returns
bool

References m_bClassModified.

Referenced by ClassEditorWidget::build(), and ClassEditorWidget::saveNotBuiltClasses().

const int& ClassEditorTreeWidgetItem::cursorPosition ( )
inline

Returns the cursor's position.

Returns
const int &

References m_iPos.

QString ClassEditorTreeWidgetItem::inheritsClass ( )
inline
bool ClassEditorTreeWidgetItem::isClass ( )
inline
bool ClassEditorTreeWidgetItem::isInternalFunction ( )
inline

Returns true if the function is set as internal, false otherwise.

Returns
bool

References m_bInternal.

Referenced by ClassEditorWidget::exportClassBuffer(), and ClassEditorWidget::renameFunction().

bool ClassEditorTreeWidgetItem::isMethod ( )
inline
bool ClassEditorTreeWidgetItem::isNamespace ( )
inline
const QString& ClassEditorTreeWidgetItem::name ( )
inline
QString ClassEditorTreeWidgetItem::reminder ( )
inline
void ClassEditorTreeWidgetItem::setBuffer ( const QString &  szBuffer)
inline

Saves the code of the item in a buffer.

Parameters
szBufferThe buffer ;)
Returns
void

References m_szBuffer, and szBuffer.

Referenced by ClassEditorWidget::createFullClass(), and ClassEditorWidget::loadNotBuiltClasses().

void ClassEditorTreeWidgetItem::setClassNotBuilt ( bool  bModified)
void ClassEditorTreeWidgetItem::setCursorPosition ( const int &  iPos)
inline

Sets the cursor position.

Parameters
iPosThe position of the cursor
Returns
void

References m_iPos.

void ClassEditorTreeWidgetItem::setInheritsClass ( QString  szInheritsClassName)
inline
void ClassEditorTreeWidgetItem::setInternalFunction ( bool  bInternal)
inline

Sets the function as internal.

Parameters
bInternalWhether the function is internal or not
Returns
void

References m_bInternal.

Referenced by ClassEditorWidget::createFullClass(), ClassEditorWidget::newMemberFunction(), and ClassEditorWidget::renameFunction().

void ClassEditorTreeWidgetItem::setName ( const QString &  szName)

Sets the name of the item.

Parameters
szNameThe name of the item :P
Returns
void

References m_szName.

Referenced by ClassEditorTreeWidgetItem(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), and ClassEditorWidget::renameNamespace().

void ClassEditorTreeWidgetItem::setReminder ( const QString &  szRem)
inline

Sets the list of parameters the function accept.

Parameters
szRemThe parameters' list
Returns
void

References m_szReminder.

Referenced by ClassEditorWidget::createFullClass(), ClassEditorWidget::loadNotBuiltClasses(), ClassEditorWidget::newMemberFunction(), and ClassEditorWidget::renameFunction().

void ClassEditorTreeWidgetItem::setType ( Type  eType)

Sets the type of the item.

Parameters
eTypeThe type!
Returns
void

References Class, KviIconManager::Class, KviIconManager::Function, g_pIconManager, KviIconManager::getSmallIcon(), m_eType, Namespace, and KviIconManager::NameSpace.

Referenced by ClassEditorWidget::newItem().

Type ClassEditorTreeWidgetItem::type ( )
inline

Returns the type of the item.

Returns
Type

References m_eType.

Member Data Documentation

bool ClassEditorTreeWidgetItem::m_bClassModified
protected
bool ClassEditorTreeWidgetItem::m_bInternal
protected
Type ClassEditorTreeWidgetItem::m_eType
protected
int ClassEditorTreeWidgetItem::m_iPos
protected
QString ClassEditorTreeWidgetItem::m_szBuffer
protected

Referenced by buffer(), and setBuffer().

QString ClassEditorTreeWidgetItem::m_szInheritsClassName
protected
QString ClassEditorTreeWidgetItem::m_szName
protected

Referenced by name(), and setName().

QString ClassEditorTreeWidgetItem::m_szReminder
protected

Referenced by reminder(), and setReminder().


The documentation for this class was generated from the following files: