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

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

◆ Type

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() [1/2]

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, m_bClassModified, m_bInternal, m_eType, m_iPos, m_szInheritsClassName, KviIconManager::NameSpace, Namespace, and setName().

Referenced by ClassEditorTreeWidgetItem().

◆ ClassEditorTreeWidgetItem() [2/2]

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, ClassEditorTreeWidgetItem(), KviIconManager::Function, g_pIconManager, m_bClassModified, m_bInternal, m_eType, m_iPos, m_szInheritsClassName, KviIconManager::NameSpace, Namespace, and setName().

◆ ~ClassEditorTreeWidgetItem()

ClassEditorTreeWidgetItem::~ClassEditorTreeWidgetItem ( )
inline

Destroys the class editor tree widget item.

Member Function Documentation

◆ buffer()

const QString & ClassEditorTreeWidgetItem::buffer ( )
inline

Returns the buffer containing the code of the item.

Returns
const QString &

References m_szBuffer.

Referenced by ClassEditorWidget::exportClassBuffer().

◆ classNotBuilt()

bool ClassEditorTreeWidgetItem::classNotBuilt ( )
inline

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

Returns
bool

References m_bClassModified.

Referenced by ClassEditorWidget::build().

◆ cursorPosition()

const int & ClassEditorTreeWidgetItem::cursorPosition ( )
inline

Returns the cursor's position.

Returns
const int &

References m_iPos.

◆ inheritsClass()

QString ClassEditorTreeWidgetItem::inheritsClass ( )
inline

◆ isClass()

bool ClassEditorTreeWidgetItem::isClass ( )
inline

Returns true if the item is a class, false otherwise.

Returns
bool

References Class, and m_eType.

Referenced by ClassEditorWidget::removeItem(), ClassEditorWidget::removeItemChildren(), ClassEditorWidget::renameItem(), and ClassEditorWidget::renameNamespace().

◆ isInternalFunction()

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().

◆ isMethod()

bool ClassEditorTreeWidgetItem::isMethod ( )
inline

Returns true if the item is a member function, false otherwise.

Returns
bool

References m_eType, and Method.

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

◆ isNamespace()

bool ClassEditorTreeWidgetItem::isNamespace ( )
inline

Returns true if the item is a namespace, false otherwise.

Returns
bool

References m_eType, and Namespace.

Referenced by ClassEditorWidget::removeItem().

◆ name()

◆ reminder()

QString ClassEditorTreeWidgetItem::reminder ( )
inline

Returns the parameters list.

Returns
QString

References m_szReminder.

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

◆ setBuffer()

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().

◆ setClassNotBuilt()

void ClassEditorTreeWidgetItem::setClassNotBuilt ( bool bModified)

◆ setCursorPosition()

void ClassEditorTreeWidgetItem::setCursorPosition ( const int & iPos)
inline

Sets the cursor position.

Parameters
iPosThe position of the cursor
Returns
void

References m_iPos.

◆ setInheritsClass()

void ClassEditorTreeWidgetItem::setInheritsClass ( QString szInheritsClassName)
inline

Sets the class name on which the class inherits from.

Parameters
szInheritsClassNameThe parent class name
Returns
void

References m_szInheritsClassName.

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

◆ setInternalFunction()

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().

◆ setName()

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(), ClassEditorTreeWidgetItem(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), and ClassEditorWidget::renameNamespace().

◆ setReminder()

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().

◆ setType()

void ClassEditorTreeWidgetItem::setType ( Type eType)

Sets the type of the item.

Parameters
eTypeThe type!
Returns
void

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

Referenced by ClassEditorWidget::newItem().

◆ type()

Type ClassEditorTreeWidgetItem::type ( )
inline

Returns the type of the item.

Returns
Type

References m_eType.

Member Data Documentation

◆ m_bClassModified

bool ClassEditorTreeWidgetItem::m_bClassModified
protected

◆ m_bInternal

bool ClassEditorTreeWidgetItem::m_bInternal
protected

◆ m_eType

Type ClassEditorTreeWidgetItem::m_eType
protected

◆ m_iPos

int ClassEditorTreeWidgetItem::m_iPos
protected

◆ m_szBuffer

QString ClassEditorTreeWidgetItem::m_szBuffer
protected

Referenced by buffer(), and setBuffer().

◆ m_szInheritsClassName

QString ClassEditorTreeWidgetItem::m_szInheritsClassName
protected

◆ m_szName

QString ClassEditorTreeWidgetItem::m_szName
protected

Referenced by name(), and setName().

◆ m_szReminder

QString ClassEditorTreeWidgetItem::m_szReminder
protected

Referenced by reminder(), and setReminder().


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