ui::UiInterface Class Reference

Inheritance diagram for ui::UiInterface:
Inheritance graph
[legend]
Collaboration diagram for ui::UiInterface:
Collaboration graph
[legend]

List of all members.

Public Types

enum  SelectionMode {
  SingleSelection,
  MultiSelection
}

Public Slots

virtual void setTime (const QDateTime &time)=0

Public Member Functions

virtual bool askQuestion (const QString &before, QAbstractItemModel *model=0, const QString &after=QString())=0
virtual
control::data::SelectionData 
getSelection (const QString &before, QAbstractItemModel *model, SelectionMode mode=SingleSelection, const QString &after="")=0
virtual control::data::TaskDetails getTaskDetails (const control::data::TaskRepresentation &rep)=0
virtual
control::data::ReservationDetails 
getReservationDetails (control::ResourceReservationModel *reservations)=0
virtual
control::data::ResourceDetails 
getResourceDetails (const QStringList &types)=0
virtual
control::data::ProjectDetails 
getProjectDetails ()=0
virtual
control::data::StringInputData 
getChoice (const QStringList &options, const QString &message)=0
virtual
control::data::StringInputData 
showTaskDetails (const control::data::TaskRepresentation &rep, const QStringList &options=QStringList(), bool editMode=false)=0
virtual
control::data::SelectionData 
getInvitationSelection (control::InvitationModel *pending, control::InvitationModel *accepted)=0
virtual void showModel (QAbstractItemModel *model, const QString &message=QString())=0
virtual void setOverview (const control::data::OverviewDetails &details)=0
virtual void showError (const QString &message)=0
virtual void showWarning (const QString &message)=0
virtual void showMessage (const QString &message)=0
virtual
control::data::MinMaxDurationData 
getMinMaxDuration (const QString &message)=0
virtual
control::data::StringInputData 
getText (const QString &message)=0
virtual control::data::IntInputData getInt (const QString &message, int value=0, int minValue=-2147483647, int maxValue=2147483647)=0
virtual QString getOpenFileName (const QString &dir=QString(), const QString &filter=QString())=0
virtual QString getSaveFileName (const QString &dir=QString(), const QString &filter=QString())=0
virtual
control::data::DateTimeInputData 
getDateTime (const QString &message=QString())=0
virtual void start ()=0
virtual void loadControllers (const QList< control::ControllerInterface * > &c)
void setUser (const domain::User *user)
const domain::Useruser ()

Protected Attributes

QList
< control::ControllerInterface * > 
controllers

Private Member Functions

virtual void setUsername (const QString &name)=0

Private Attributes

const domain::UsercurrentUser

Detailed Description

Definition at line 35 of file uiinterface.h.


Member Function Documentation

virtual bool ui::UiInterface::askQuestion ( const QString &  before,
QAbstractItemModel *  model = 0,
const QString &  after = QString() 
) [pure virtual]

Presents the user with a question which can be answered positive or negative. The return value is the answer of the user.

Parameters:
before The message that is presented to the user.
model An optional list shown to the user.
after A message presented to the user after the list. If model is 0, this message is displayed right after before.
Returns:
true if the user selects the positive answer
false otherwise

Implemented in TestUi, and ui::Gui.

virtual control::data::StringInputData ui::UiInterface::getChoice ( const QStringList &  options,
const QString &  message 
) [pure virtual]

Presents the user with a choice.

Parameters:
options The possible options
message The message that is presented to the user
Returns:
The String the user gave as input

Implemented in TestUi, and ui::Gui.

virtual control::data::IntInputData ui::UiInterface::getInt ( const QString &  message,
int  value = 0,
int  minValue = -2147483647,
int  maxValue = 2147483647 
) [pure virtual]

Presents the user with a message and the ability to input an int.

Parameters:
message The message to show
value The value that should be filled in by default.
Returns:
The int the user gave as input

Implemented in TestUi, and ui::Gui.

virtual QString ui::UiInterface::getOpenFileName ( const QString &  dir = QString(),
const QString &  filter = QString() 
) [pure virtual]

Lets the user choose a file to open.

Parameters:
dir The default directory to show
filter The extention filter. Only directories or files with the given extention are shown
Returns:
The String of the file that was selected

Implemented in TestUi, and ui::Gui.

virtual control::data::ProjectDetails ui::UiInterface::getProjectDetails (  )  [pure virtual]

Presents the user with a way to choose the details of a project.

Returns:
The selected project details

Implemented in TestUi, and ui::Gui.

virtual control::data::ResourceDetails ui::UiInterface::getResourceDetails ( const QStringList &  types  )  [pure virtual]

Presents the user with a way to choose the details of a resource.

Parameters:
types The types from which to select the new resourcetype
Returns:
The selected resource details

Implemented in TestUi, and ui::Gui.

virtual QString ui::UiInterface::getSaveFileName ( const QString &  dir = QString(),
const QString &  filter = QString() 
) [pure virtual]

Lets the user choose a file to save to.

Parameters:
dir The default directory to show
filter The extention filter. Only directories or files with the given extention are shown
Returns:
The String of the file that was chosen

Implemented in TestUi, and ui::Gui.

virtual control::data::SelectionData ui::UiInterface::getSelection ( const QString &  before,
QAbstractItemModel *  model,
SelectionMode  mode = SingleSelection,
const QString &  after = "" 
) [pure virtual]

Presents the user with a list of objects which to choose from the selected object(s) is/are.

Parameters:
before The string the will be displayed before the model
model The model that contains the list of objects from which to choose.
mode Specifies the selection type. Either only one selection is allowed, or either multiple.
after The string that will be displayed after the model
Returns:
The selected data

Implemented in TestUi, and ui::Gui.

virtual control::data::TaskDetails ui::UiInterface::getTaskDetails ( const control::data::TaskRepresentation rep  )  [pure virtual]

Presents the user with a way to choose the details of a task.

Parameters:
tasks The list of tasks that are presented as possible subtask of the task that is specified
resources The list of resources that are presented as possible needed resources for the task that is specified
details Other data to be filled for the task that is specified
Returns:
The selected task details

Implemented in TestUi, and ui::Gui.

virtual control::data::StringInputData ui::UiInterface::getText ( const QString &  message  )  [pure virtual]

Presents the user with a message and provides means for a user String input.

Parameters:
message The message to be shown
Returns:
The String the user gave as input

Implemented in TestUi, and ui::Gui.

void UiInterface::loadControllers ( const QList< control::ControllerInterface * > &  c  )  [virtual]

Loads the controllers into the userinterface.

Parameters:
c The controllers to be loaded

Reimplemented in ui::Gui.

Definition at line 30 of file uiinterface.cpp.

virtual void ui::UiInterface::setOverview ( const control::data::OverviewDetails details  )  [pure virtual]

Shows the user the given models.

Implemented in TestUi, and ui::Gui.

void UiInterface::setUser ( const domain::User user  ) 

Sets a new user for the user interface

Parameters:
user The user to set

Definition at line 15 of file uiinterface.cpp.

Here is the call graph for this function:

virtual void ui::UiInterface::showError ( const QString &  message  )  [pure virtual]

Shows the user an error message.

Parameters:
message The message to be shown

Implemented in TestUi, and ui::Gui.

virtual void ui::UiInterface::showMessage ( const QString &  message  )  [pure virtual]

Shows the user message.

Parameters:
message The message to be shown

Implemented in TestUi, and ui::Gui.

virtual void ui::UiInterface::showModel ( QAbstractItemModel *  model,
const QString &  message = QString() 
) [pure virtual]

Shows the user the given model.

Implemented in TestUi, and ui::Gui.

virtual control::data::StringInputData ui::UiInterface::showTaskDetails ( const control::data::TaskRepresentation rep,
const QStringList &  options = QStringList(),
bool  editMode = false 
) [pure virtual]

Presents the user with the details of a task and providesthe means to present the user with some options.

Parameters:
tasks The tasks that are presented as subtasks of the task
resources The resources that are presented as the resources of the task
details The task details that are presented for the task
options The list of possible options
editMode bool whether the shown info is editable
Returns:
The option the user has chosen.

Implemented in TestUi, and ui::Gui.

virtual void ui::UiInterface::showWarning ( const QString &  message  )  [pure virtual]

Shows the user a warning message.

Parameters:
message The message to be shown

Implemented in TestUi, and ui::Gui.

virtual void ui::UiInterface::start (  )  [pure virtual]

Starts the presentation of the userinterface.

Implemented in TestUi, and ui::Gui.

const domain::User * UiInterface::user (  ) 

Returns the current user

Definition at line 25 of file uiinterface.cpp.


Member Data Documentation

The controllers of this userinterface.

Definition at line 269 of file uiinterface.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator
Generated on Thu May 27 14:20:21 2010 for MopTaskManager by  doxygen 1.6.3