ui::Gui Class Reference

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

List of all members.

Public Slots

void setTime (const QDateTime &time)

Public Member Functions

void start ()
void loadControllers (const QList< control::ControllerInterface * > &c)
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 ()
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 showModel (QAbstractItemModel *model, const QString &message)
void setOverview (const control::data::OverviewDetails &details)
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::DateTimeInputData getDateTime (const QString &message=QString())

Private Member Functions

void setUsername (const QString &name)

Private Attributes

QMainWindow window
ui::OverviewWidgetoverviewWidget
QLabel * userLabel
QLabel * timeLabel

Detailed Description

Definition at line 16 of file gui.h.


Member Function Documentation

bool Gui::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 85 of file gui.cpp.

control::data::StringInputData Gui::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 228 of file gui.cpp.

control::data::IntInputData Gui::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 381 of file gui.cpp.

QString Gui::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 394 of file gui.cpp.

control::data::ProjectDetails Gui::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 212 of file gui.cpp.

Here is the call graph for this function:

control::data::ResourceDetails Gui::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 197 of file gui.cpp.

Here is the call graph for this function:

QString Gui::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 399 of file gui.cpp.

control::data::SelectionData Gui::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 119 of file gui.cpp.

control::data::TaskDetails Gui::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 156 of file gui.cpp.

Here is the call graph for this function:

control::data::StringInputData Gui::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 371 of file gui.cpp.

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

Loads the controllers into the userinterface.

Parameters:
c The controllers to be loaded

Reimplemented from ui::UiInterface.

Definition at line 41 of file gui.cpp.

Here is the call graph for this function:

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

Shows the user the given models.

Implements ui::UiInterface.

Definition at line 309 of file gui.cpp.

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

Shows the user an error message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 314 of file gui.cpp.

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

Shows the user message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 324 of file gui.cpp.

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

Shows the user the given model.

Implements ui::UiInterface.

Definition at line 289 of file gui.cpp.

control::data::StringInputData Gui::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 241 of file gui.cpp.

Here is the call graph for this function:

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

Shows the user a warning message.

Parameters:
message The message to be shown

Implements ui::UiInterface.

Definition at line 319 of file gui.cpp.

void Gui::start (  )  [virtual]

Starts the presentation of the userinterface.

Implements ui::UiInterface.

Definition at line 430 of file gui.cpp.

Here is the call graph for this function:


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