COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
#include <BrowserDialog.hpp>
Inherits QDialog.
Public Member Functions | |
BrowserDialog (QWidget *parent=0) | |
bool | show (bool multi_select, QVariant &selected) |
Shows the dialog. More... | |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *event) |
Method called when user presses a key or a combination of keys. More... | |
virtual bool | focusNextPrevChild (bool next) |
Method called when user presses "Tab" key. More... | |
Private Slots | |
void | filter_edited (const QString &new_text) |
void | double_clicked (const QModelIndex &index) |
void | current_path_changed (const QString &path) |
void | completer_activated (const QString &text) |
void | path_edited (const QString &text) |
void | message (const QString &message, uiCommon::LogMessage::Type type) |
Slot called when has been added to the log. More... | |
void | add_favorite () |
Add the current path as a favorite. More... | |
void | remove_favorite () |
Remove the currently selected favorite. More... | |
void | favorite_selected (const QModelIndex &index) |
Slot called when user clicks on a favorite directory to go to that place. More... | |
Private Member Functions | |
void | init_gui () |
Inits the GUI. More... | |
Private Attributes | |
boost::shared_ptr< core::NRemoteFSBrowser > | m_model |
The underlying model. More... | |
FileFilter * | m_filter_model |
QListView * | m_view |
The view. More... | |
QDialogButtonBox * | m_buttons |
The box that displays the dialog buttons. More... | |
QGridLayout * | m_main_layout |
Main layout of the dialog. More... | |
QListView * | m_favorites_view |
View for the favorite places. More... | |
FavoritesModel * | m_favorites_model |
Model for the favorite places. More... | |
QHBoxLayout * | m_path_layout |
Top layout for the graphical components related to the path. More... | |
QLabel * | m_lab_path |
Label for the path. More... | |
QLineEdit * | m_edit_path |
Line edit for the path. More... | |
QHBoxLayout * | m_fav_buttons_layout |
Layout for buttons related to favorites. More... | |
QPushButton * | m_bt_add_fav |
Button for adding a favorite. More... | |
QPushButton * | m_bt_remove_fav |
Button for removing a favorite. More... | |
QHBoxLayout * | m_filter_layout |
Layout for the graphical components related to the filter. More... | |
QLabel * | m_lab_filter |
Label for the filter. More... | |
QLineEdit * | m_edit_filter |
Line edit for the filter. More... | |
QCompleter * | m_completer |
Completer for the path completion. More... | |
QString | m_old_path |
Old path. More... | |
bool | m_updating_completer |
If true , the completer is currently being updated. More... | |
Provides graphical services for browsing a remote filesystem based by using and instance of #NRemoteFSBrowser
class.
Definition at line 46 of file BrowserDialog.hpp.
BrowserDialog | ( | QWidget * | parent = 0 | ) |
Contructor.
parent | Parent object. Can be null. |
Definition at line 43 of file BrowserDialog.cpp.
|
privateslot |
Add the current path as a favorite.
Definition at line 255 of file BrowserDialog.cpp.
|
privateslot |
Slot called when an element has been selected in the completer.
text | The selected text. |
Definition at line 91 of file BrowserDialog.cpp.
|
privateslot |
Slot called when the current path in the underlying model has changed.
path | The new current path. |
Definition at line 81 of file BrowserDialog.cpp.
|
privateslot |
Slot called when user double-clicks on an item in the view.
index | The index of the item that was double=clicked. |
Definition at line 69 of file BrowserDialog.cpp.
|
privateslot |
Slot called when user clicks on a favorite directory to go to that place.
index | Index selected. |
Definition at line 284 of file BrowserDialog.cpp.
|
privateslot |
Slot called when user edits the filter.
new_text | The new text. |
Definition at line 61 of file BrowserDialog.cpp.
|
protectedvirtual |
Method called when user presses "Tab" key.
This methods overrides base class method. If the path text edit has the focus, the completer is displayed, the first item is selected and appended to the path. If the path text edit does not have the focus, the base method is called.
Definition at line 180 of file BrowserDialog.cpp.
|
private |
Inits the GUI.
Definition at line 299 of file BrowserDialog.cpp.
|
protectedvirtual |
Method called when user presses a key or a combination of keys.
This method overrides base class method and calls it before any other treatement. Depending on what is pressed, the method has 3 working modes:
#editFilter
is focused in. To avoid confusion, list m_view is focused out. event | Event that occured. |
Definition at line 129 of file BrowserDialog.cpp.
|
privateslot |
Slot called when has been added to the log.
A messaged box is showed with the message.
message | The message. |
type | The message type. |
Definition at line 243 of file BrowserDialog.cpp.
|
privateslot |
Slot called when user edits the path.
path | The new path. |
Definition at line 98 of file BrowserDialog.cpp.
|
privateslot |
Remove the currently selected favorite.
Definition at line 270 of file BrowserDialog.cpp.
bool show | ( | bool | multi_select, |
QVariant & | selected | ||
) |
Shows the dialog.
This is a blocking method. It will not return until the dialog is hidden.
multi_select | If true , user will be able to select multiple items at the same time. |
selected | After the method returns, if multi_select was false , contains a QString with the path to the selected file. If multi_select was true , contains a QStringList with the paths to selected files. If user cancels the diolog, the parameter is not modified. |
true
if user clicked on "OK" button; otherwise, returns false
. Definition at line 197 of file BrowserDialog.cpp.
|
private |
Button for adding a favorite.
Definition at line 171 of file BrowserDialog.hpp.
|
private |
Button for removing a favorite.
Definition at line 174 of file BrowserDialog.hpp.
|
private |
The box that displays the dialog buttons.
Definition at line 147 of file BrowserDialog.hpp.
|
private |
Completer for the path completion.
Definition at line 186 of file BrowserDialog.hpp.
|
private |
Line edit for the filter.
Definition at line 183 of file BrowserDialog.hpp.
|
private |
Line edit for the path.
Definition at line 165 of file BrowserDialog.hpp.
|
private |
Layout for buttons related to favorites.
Definition at line 168 of file BrowserDialog.hpp.
|
private |
Model for the favorite places.
Definition at line 156 of file BrowserDialog.hpp.
|
private |
View for the favorite places.
Definition at line 153 of file BrowserDialog.hpp.
|
private |
Layout for the graphical components related to the filter.
Definition at line 177 of file BrowserDialog.hpp.
|
private |
The filtering model. It lies between the model and the view and adds the icons management besides the filtering.
Definition at line 141 of file BrowserDialog.hpp.
|
private |
Label for the filter.
Definition at line 180 of file BrowserDialog.hpp.
|
private |
Label for the path.
Definition at line 162 of file BrowserDialog.hpp.
|
private |
Main layout of the dialog.
Definition at line 150 of file BrowserDialog.hpp.
|
private |
The underlying model.
Definition at line 137 of file BrowserDialog.hpp.
|
private |
Old path.
Definition at line 189 of file BrowserDialog.hpp.
|
private |
Top layout for the graphical components related to the path.
Definition at line 159 of file BrowserDialog.hpp.
|
private |
If true
, the completer is currently being updated.
Definition at line 192 of file BrowserDialog.hpp.
|
private |
The view.
Definition at line 144 of file BrowserDialog.hpp.
Send comments to: COOLFluiD Web Admin |