Objects List Widget. More...

#include <qgobjectslist.h>

Inheritance diagram for QGObjectsList:
[legend]

Public Types

enum  oType {
  Nothing, Docs, Links, Topics,
  CompTopics, IdealTopics, Users, Profiles,
  Communities, CompCommunities, IdealCommunities, Assessments,
  Subjects, Classes
}
 

Signals

void Show (GDoc *doc)
 
void Show (GTopic *topic)
 
void Show (GProfile *profile)
 
void Show (GCommunity *community)
 
void Show (GClass *theclass)
 

Public Member Functions

 QGObjectsList (QWidget *parent=0)
 
void Set (GSession *session, oType type)
 
void Set (oType type, GDoc *doc)
 
void Set (oType type, GProfile *profile)
 
void Set (oType type, GTopic *topic)
 
void Set (oType type, GCommunity *community)
 
void Set (oType type, GMetaEngine *engine, size_t nbres, size_t fragsize, size_t caller)
 
QTreeWidget * tree (void)
 
QTreeWidgetItem * currentItem (void)
 
GUserGetCurrentUser (void)
 
GProfileGetCurrentProfile (void)
 
GDocGetCurrentDoc (void)
 
GTopicGetCurrentTopic (void)
 
GCommunityGetCurrentCommunity (void)
 
void FindNext (const QString &what, bool desc)
 

Private Slots

void HandleItem (QTreeWidgetItem *item, int column)
 

Private Member Functions

QString PrintExtract (const R::RString &extract)
 
virtual ~QGObjectsList (void)
 

Private Attributes

void * Ui
 

Detailed Description

Objects List Widget.

The QGObjectsList provides a widget to list a given set of objects. When the user double clicks on one object, the widget emits a corresponding signal.

Member Enumeration Documentation

enum oType

Type of the list managed by the widget.

Enumerator
Nothing 
Docs 

Nothing populated.

Links 

Documents are listed.

Topics 

Links are listed.

CompTopics 

Topics are listed.

IdealTopics 

Topics with their quality are listed.

Users 

Ideal topics are listed.

Profiles 

Users are listed.

Communities 

Profiles are listed.

CompCommunities 

Communities are listed.

IdealCommunities 

Communities with their quality are listed.

Assessments 

Ideal communities are listed.

Subjects 

Assessments are listed.

Classes 

Subjects are listed. Classes are listed.

Constructor & Destructor Documentation

QGObjectsList ( QWidget *  parent = 0)

Construct the list.

Parameters
parentParent widget.
virtual ~QGObjectsList ( void  )
privatevirtual

Destruct the list.

Returns

Member Function Documentation

void Set ( GSession session,
oType  type 
)

Set the list with a given type.

Parameters
sessionSession.
typeType of the list.
void Set ( oType  type,
GDoc doc 
)

Set the list with a given type for a given document.

Parameters
typeType of the list.
docDocument.
void Set ( oType  type,
GProfile profile 
)

Set the list with a given type for a given profile.

Parameters
typeType of the list.
profileProfile.
void Set ( oType  type,
GTopic topic 
)

Set the list with a given type for a given topic.

Parameters
typeType of the list.
topicTopic.
void Set ( oType  type,
GCommunity community 
)

Set the list with a given type for a given community.

Parameters
typeType of the list.
communityCommunity.
void Set ( oType  type,
GMetaEngine engine,
size_t  nbres,
size_t  fragsize,
size_t  caller 
)

Set the list for a given engine.

Parameters
typeType of the list.
engineEngine.
nbresNumber of results to show.
fragsizeMaximum number of characters of shown fragments.
callerIdentifier of the caller (for example a thread).
QTreeWidget* tree ( void  )

Get the tree.

Returns
Pointer.
QTreeWidgetItem* currentItem ( void  )

Get the current item.

Returns
Pointer.
GUser* GetCurrentUser ( void  )

Get the current user selected in this window.

Returns
Pointer to GUser or 0 if no user is currently selected.
GProfile* GetCurrentProfile ( void  )

Get the current profile selected in this window.

Returns
Pointer to GProfile or 0 if no profile is currently selected.
GDoc* GetCurrentDoc ( void  )

Get the current document selected in this window.

Returns
Pointer to GDoc or 0 if no document is currently selected.
GTopic* GetCurrentTopic ( void  )

Get the current topic selected in this window.

Returns
Pointer to GTopic or 0 if no topic is currently selected.
GCommunity* GetCurrentCommunity ( void  )

Get the current community selected in this window.

Returns
Pointer to GCommunity or 0 if no community is currently selected.
void FindNext ( const QString &  what,
bool  desc 
)

Find the next item containing a given string.

Parameters
whatText to search for.
descSearch (eventually) in the descriptions.
QString PrintExtract ( const R::RString extract)
private

Function that transform an extract in a string that can be printed.

Parameters
extractExtract to print.
Returns
a QString.
void HandleItem ( QTreeWidgetItem *  item,
int  column 
)
privateslot

This slot is called when the user double clicks on a given item.

Parameters
itemItem chosen.
columnCorresponding column.
void Show ( GDoc doc)
signal

A document must be shown.

void Show ( GTopic topic)
signal

A topic must be shown.

void Show ( GProfile profile)
signal

A profile must be shown.

void Show ( GCommunity community)
signal

A community must be shown.

void Show ( GClass theclass)
signal

A class must be shown.

Member Data Documentation

void* Ui
private

Pointer to the widget created by Qt.