Eneboo - Documentación para desarrolladores
|
#include <workspace.h>
Tipos públicos | |
enum | Type { ProjectType, FormFileType, FormSourceType, SourceFileType, ObjectType } |
Métodos públicos | |
WorkspaceItem (QListView *parent, Project *p) | |
WorkspaceItem (QListViewItem *parent, SourceFile *sf) | |
WorkspaceItem (QListViewItem *parent, FormFile *ff, Type t=FormFileType) | |
WorkspaceItem (QListViewItem *parent, QObject *o, Project *p) | |
void | paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int align) |
Type | type () const |
bool | isModified () const |
QString | text (int) const |
void | fillCompletionList (QStringList &completion) |
bool | checkCompletion (const QString &completion) |
QString | key (int, bool) const |
void | setOpen (bool) |
void | setAutoOpen (bool) |
bool | isAutoOpen () const |
Atributos públicos | |
Project * | project |
SourceFile * | sourceFile |
FormFile * | formFile |
QObject * | object |
bool | useOddColor |
enum WorkspaceItem::Type |
WorkspaceItem::WorkspaceItem | ( | QListViewItem * | parent, |
SourceFile * | sf | ||
) |
WorkspaceItem::WorkspaceItem | ( | QListViewItem * | parent, |
FormFile * | ff, | ||
Type | t = FormFileType |
||
) |
WorkspaceItem::WorkspaceItem | ( | QListViewItem * | parent, |
QObject * | o, | ||
Project * | p | ||
) |
void WorkspaceItem::fillCompletionList | ( | QStringList & | completion | ) |
bool WorkspaceItem::isAutoOpen | ( | ) | const [inline] |
bool WorkspaceItem::isModified | ( | ) | const |
Returns a key that can be used for sorting by column column. The default implementation returns text(). Derived classes may also incorporate the order indicated by ascending into this key, although this is not recommended.
If you want to sort on non-alphabetical data, e.g. dates, numbers, etc., it is more efficient to reimplement compare().
Reimplementado de QListViewItem.
void WorkspaceItem::paintCell | ( | QPainter * | p, |
const QColorGroup & | cg, | ||
int | column, | ||
int | width, | ||
int | align | ||
) | [virtual] |
This virtual function paints the contents of one column of an item and aligns it as described by align.
p is a QPainter open on the relevant paint device. p is translated so (0, 0) is the top-left pixel in the cell and width-1, height()-1 is the bottom-right pixel in the cell. The other properties of p (pen, brush, etc) are undefined. cg is the color group to use. column is the logical column number within the item that is to be painted; 0 is the column which may contain a tree.
This function may use QListView::itemMargin() for readability spacing on the left and right sides of data such as text, and should honor isSelected() and QListView::allColumnsShowFocus().
If you reimplement this function, you should also reimplement width().
The rectangle to be painted is in an undefined state when this function is called, so you must draw on all the pixels. The painter p has the right font on entry.
Reimplementado de QListViewItem.
void WorkspaceItem::setAutoOpen | ( | bool | b | ) |
void WorkspaceItem::setOpen | ( | bool | o | ) | [virtual] |
Opens or closes an item, i.e. shows or hides an item's children.
If o is TRUE all child items are shown initially. The user can hide them by clicking the - icon to the left of the item. If o is FALSE, the children of this item are initially hidden. The user can show them by clicking the + icon to the left of the item.
Reimplementado de QListViewItem.
Returns the text in column column, or QString::null if there is no text in that column.
Reimplementado de QListViewItem.
Type WorkspaceItem::type | ( | ) | const [inline] |