TestUi Class Reference

Inheritance diagram for TestUi:
Inheritance graph
[legend]
Collaboration diagram for TestUi:
Collaboration graph
[legend]

List of all members.

Public Slots

void setTime (const QDateTime &time)

Public Member Functions

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

Public Attributes

TestUiDatadata

Private Member Functions

void setUsername (const QString &name)

Detailed Description

Definition at line 37 of file testui.h.


Member Function Documentation

bool TestUi::askQuestion ( const QString &  before,
QAbstractItemModel *  model = 0,
const QString &  after = QString() 
) [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

Implements ui::UiInterface.

Definition at line 15 of file testui.cpp.

control::data::StringInputData TestUi::getChoice ( const QStringList &  options,
const QString &  message 
) [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

Implements ui::UiInterface.

Definition at line 64 of file testui.cpp.

control::data::IntInputData TestUi::getInt ( const QString &  message,
int  value = 0,
int  minValue = -2147483647,
int  maxValue = 2147483647 
) [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

Implements ui::UiInterface.

Definition at line 118 of file testui.cpp.

QString TestUi::getOpenFileName ( const QString &  dir = QString(),
const QString &  filter = QString() 
) [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

Implements ui::UiInterface.

Definition at line 21 of file testui.cpp.

control::data::ProjectDetails TestUi::getProjectDetails (  )  [virtual]

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

Returns:
The selected project details

Implements ui::UiInterface.

Definition at line 28 of file testui.cpp.

control::data::ResourceDetails TestUi::getResourceDetails ( const QStringList &  types  )  [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

Implements ui::UiInterface.

Definition at line 33 of file testui.cpp.

QString TestUi::getSaveFileName ( const QString &  dir = QString(),
const QString &  filter = QString() 
) [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

Implements ui::UiInterface.

Definition at line 38 of file testui.cpp.

control::data::SelectionData TestUi::getSelection ( const QString &  before,
QAbstractItemModel *  model,
SelectionMode  mode = SingleSelection,
const QString &  after = "" 
) [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

Implements ui::UiInterface.

Definition at line 43 of file testui.cpp.

control::data::TaskDetails TestUi::getTaskDetails ( const control::data::TaskRepresentation rep  )  [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

Implements ui::UiInterface.

Definition at line 52 of file testui.cpp.

control::data::StringInputData TestUi::getText ( const QString &  message  )  [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

Implements ui::UiInterface.

Definition at line 110 of file testui.cpp.

void TestUi::setOverview ( const control::data::OverviewDetails details  )  [virtual]

Shows the user the given models.

Implements ui::UiInterface.

Definition at line 88 of file testui.cpp.

void TestUi::showError ( const QString &  message  )  [virtual]

Shows the user an error message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 126 of file testui.cpp.

void TestUi::showMessage ( const QString &  message  )  [virtual]

Shows the user message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 132 of file testui.cpp.

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

Shows the user the given model.

Implements ui::UiInterface.

Definition at line 137 of file testui.cpp.

control::data::StringInputData TestUi::showTaskDetails ( const control::data::TaskRepresentation rep,
const QStringList &  options = QStringList(),
bool  editMode = false 
) [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.

Implements ui::UiInterface.

Definition at line 72 of file testui.cpp.

void TestUi::showWarning ( const QString &  message  )  [virtual]

Shows the user a warning message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 147 of file testui.cpp.

void TestUi::start (  )  [virtual]

Starts the presentation of the userinterface.

Implements ui::UiInterface.

Definition at line 152 of file testui.cpp.


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:04 2010 for MopTaskManager by  doxygen 1.6.3