KVIrc
4.9.2
DeveloperAPIs
|
Describes an item inside the class editor tree widget. More...
#include <ClassEditorWindow.h>
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 |
Describes an item inside the class editor tree widget.
ClassEditorTreeWidgetItem::ClassEditorTreeWidgetItem | ( | QTreeWidget * | pTreeWidget, |
Type | eType, | ||
const QString & | szName | ||
) |
Constructs the class editor tree widget item.
pTreeWidget | The parent tree widget |
eType | The type of the item |
szName | The name of the item |
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.
pParentItem | The parent tree widget item |
eType | The type of the item |
szName | The name of the item |
References Class, KviIconManager::Class, KviIconManager::Function, g_pIconManager, KviIconManager::getSmallIcon(), m_bClassModified, m_bInternal, m_iPos, m_szInheritsClassName, Namespace, KviIconManager::NameSpace, and setName().
|
inline |
Destroys the class editor tree widget item.
|
inline |
Returns the buffer containing the code of the item.
References m_szBuffer.
Referenced by ClassEditorWidget::exportClassBuffer().
|
inline |
Returns true if we class is not built yet, false otherwise.
References m_bClassModified.
Referenced by ClassEditorWidget::build(), and ClassEditorWidget::saveNotBuiltClasses().
|
inline |
|
inline |
Returns the class name of the classes we inherit from.
References m_szInheritsClassName.
Referenced by ClassEditorWidget::build(), ClassEditorWidget::currentItemChanged(), ClassEditorWidget::exportClassBuffer(), ClassEditorWidget::exportClasses(), ClassEditorWidget::renameClass(), ClassEditorWidget::saveNotBuiltClasses(), and ClassEditorWidget::searchInheritedClasses().
|
inline |
Returns true if the item is a class, false otherwise.
References Class, and m_eType.
Referenced by ClassEditorWidget::currentItemChanged(), ClassEditorWidget::customContextMenuRequested(), ClassEditorWidget::removeItem(), ClassEditorWidget::removeItemChildren(), ClassEditorWidget::renameItem(), ClassEditorWidget::renameNamespace(), and ClassEditorWidget::saveLastEditedItem().
|
inline |
Returns true if the function is set as internal, false otherwise.
References m_bInternal.
Referenced by ClassEditorWidget::exportClassBuffer(), and ClassEditorWidget::renameFunction().
|
inline |
Returns true if the item is a member function, false otherwise.
References m_eType, and Method.
Referenced by ClassEditorWidget::currentItemChanged(), ClassEditorWidget::customContextMenuRequested(), ClassEditorWidget::exportClassBuffer(), ClassEditorWidget::newMemberFunction(), and ClassEditorWidget::removeItem().
|
inline |
Returns true if the item is a namespace, false otherwise.
References m_eType, and Namespace.
Referenced by ClassEditorWidget::currentItemChanged(), ClassEditorWidget::customContextMenuRequested(), ClassEditorWidget::removeItem(), ClassEditorWidget::renameItem(), and ClassEditorWidget::saveLastEditedItem().
|
inline |
Returns the name of the item.
References m_szName.
Referenced by ClassEditorWidget::buildFullClassName(), ClassEditorWidget::buildFullItemPath(), ClassEditorWidget::currentItemChanged(), ClassEditorWidget::exportClassBuffer(), ClassEditorWidget::removeItem(), ClassEditorWidget::renameFunction(), and ClassEditorWidget::updateClassHierarchy().
|
inline |
Returns the parameters list.
References m_szReminder.
Referenced by ClassEditorWidget::currentItemChanged(), ClassEditorWidget::exportClassBuffer(), and ClassEditorWidget::renameFunction().
|
inline |
Saves the code of the item in a buffer.
szBuffer | The buffer ;) |
References m_szBuffer, and szBuffer.
Referenced by ClassEditorWidget::createFullClass(), and ClassEditorWidget::loadNotBuiltClasses().
void ClassEditorTreeWidgetItem::setClassNotBuilt | ( | bool | bModified | ) |
Sets the state of the class as non-built.
bModified | Whether the class is modified |
References KviIconManager::Class, KviIconManager::ClassNotBuilt, g_pIconManager, KviIconManager::getSmallIcon(), and m_bClassModified.
Referenced by ClassEditorWidget::build(), ClassEditorWidget::loadNotBuiltClasses(), ClassEditorWidget::removeItemChildren(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), ClassEditorWidget::renameNamespace(), ClassEditorWidget::searchReplace(), and ClassEditorWidget::updateClassHierarchy().
|
inline |
|
inline |
Sets the class name on which the class inherits from.
szInheritsClassName | The parent class name |
References m_szInheritsClassName.
Referenced by ClassEditorWidget::createFullClass(), ClassEditorWidget::loadNotBuiltClasses(), ClassEditorWidget::newClass(), ClassEditorWidget::removeItemChildren(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameNamespace(), and ClassEditorWidget::updateClassHierarchy().
|
inline |
Sets the function as internal.
bInternal | Whether the function is internal or not |
References m_bInternal.
Referenced by ClassEditorWidget::createFullClass(), ClassEditorWidget::newMemberFunction(), and ClassEditorWidget::renameFunction().
void ClassEditorTreeWidgetItem::setName | ( | const QString & | szName | ) |
Sets the name of the item.
szName | The name of the item :P |
References m_szName.
Referenced by ClassEditorTreeWidgetItem(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), and ClassEditorWidget::renameNamespace().
|
inline |
Sets the list of parameters the function accept.
szRem | The parameters' list |
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.
eType | The type! |
References Class, KviIconManager::Class, KviIconManager::Function, g_pIconManager, KviIconManager::getSmallIcon(), m_eType, Namespace, and KviIconManager::NameSpace.
Referenced by ClassEditorWidget::newItem().
|
inline |
|
protected |
Referenced by ClassEditorTreeWidgetItem(), classNotBuilt(), and setClassNotBuilt().
|
protected |
Referenced by ClassEditorTreeWidgetItem(), isInternalFunction(), and setInternalFunction().
|
protected |
Referenced by isClass(), isMethod(), isNamespace(), setType(), and type().
|
protected |
Referenced by ClassEditorTreeWidgetItem(), cursorPosition(), and setCursorPosition().
|
protected |
Referenced by buffer(), and setBuffer().
|
protected |
Referenced by ClassEditorTreeWidgetItem(), inheritsClass(), and setInheritsClass().
|
protected |
Referenced by reminder(), and setReminder().