GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
files_dock_widget Class Reference

Dock widget to display files in the current directory. More...

#include "files-dock-widget.h"

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

Public Slots

void accept_directory_line_edit ()
 Accepts user input a the line edit for the current directory. More...
 
void change_directory_up ()
 Slot for handling the up-directory button in the toolbar. More...
 
void do_sync_browser_directory ()
 Slot for handling the sync browser directory button in the toolbar. More...
 
void do_sync_octave_directory ()
 Slot for handling the sync octave directory button in the toolbar. More...
 
virtual void focus (void)
 
void handle_active_dock_changed (octave_dock_widget *, octave_dock_widget *)
 
void handle_settings (const QSettings *)
 
virtual void handle_visibility (bool visible)
 
void item_double_clicked (const QModelIndex &index)
 Slot for handling a change in directory via double click. More...
 
QMainWindowmain_win ()
 
void notice_settings (const QSettings *settings)
 Tells the widget to react on changed settings. More...
 
void set_current_directory (const QString &dir)
 Sets the current directory being displayed. More...
 
void update_octave_directory (const QString &dir)
 set the internal variable that holds the actual octave variable More...
 

Signals

void active_changed (bool active)
 Custom signal that tells whether a user has clicked away that dock widget, i.e the active dock widget has changed. More...
 
void displayed_directory_changed (const QString &dir)
 Emitted, whenever the currently displayed directory changed. More...
 
void find_files_signal (const QString &startdir)
 Emitted, whenever wants to search for a file . More...
 
void load_file_signal (const QString &fileName)
 Emitted, whenever the user requested to load a file. More...
 
void open_file (const QString &fileName)
 Emitted, whenever the user requested to open a file. More...
 
void run_file_signal (const QFileInfo &info)
 Emitted, whenever the user requested to run a file. More...
 

Public Member Functions

 files_dock_widget (QWidget *parent=0)
 
 ~files_dock_widget ()
 
virtual void connect_visibility_changed (void)
 
void make_widget (bool dock=true)
 
void make_window (void)
 
void set_predecessor_widget (octave_dock_widget *prev_widget)
 
void set_title (const QString &)
 

Protected Slots

virtual void add_actions (QList< QAction * > action_list)
 
virtual void do_undo ()
 slots to handle undo More...
 
bool eventFilter (QObject *obj, QEvent *e)
 
virtual void handle_visibility_changed (bool visible)
 Slot to steer changing visibility from outside. More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
 
QWidgetfocusWidget ()
 

Private Types

enum  { MaxMRUDirs = 10 }
 

Private Slots

void contextmenu_copy_selection (bool)
 
void contextmenu_delete (bool)
 
void contextmenu_findfiles (bool)
 
void contextmenu_load (bool)
 
void contextmenu_newdir (bool)
 
void contextmenu_newfile (bool)
 
void contextmenu_open (bool)
 
void contextmenu_open_in_app (bool)
 
void contextmenu_rename (bool)
 
void contextmenu_requested (const QPoint &pos)
 context menu wanted More...
 
void contextmenu_run (bool)
 
void contextmenu_setcurrentdir (bool)
 
void copyClipboard ()
 
void headercontextmenu_requested (const QPoint &pos)
 
void pasteClipboard ()
 
void popdownmenu_findfiles (bool)
 
void popdownmenu_home (bool)
 
void popdownmenu_newdir (bool)
 
void popdownmenu_newfile (bool)
 
void popdownmenu_search_dir (bool)
 
void selectAll ()
 
void toggle_headercontextitem_datemodified ()
 
void toggle_headercontextitem_filesize ()
 
void toggle_headercontextitem_filetype ()
 
void toggle_headercontextitem_showhidden ()
 

Private Member Functions

void display_directory (const QString &dir, bool set_octave_dir=true)
 set a new directory or open a file More...
 
void open_item_in_app (const QModelIndex &index)
 
void process_find_files (const QString &dir_name)
 
void process_new_dir (const QString &parent_name)
 
void process_new_file (const QString &parent_name)
 
void process_set_current_dir (const QString &parent_name)
 

Private Attributes

QComboBox * _current_directory
 
QFileSystemModel * _file_system_model
 The file system model. More...
 
QTreeView_file_tree_view
 The file system view. More...
 
QToolBar * _navigation_tool_bar
 Variables for the actions. More...
 
QString _octave_dir
 
QAction * _sync_browser_directory_action
 
bool _sync_octave_dir
 Internal variables. More...
 
QAction * _sync_octave_directory_action
 

Detailed Description

Dock widget to display files in the current directory.

Definition at line 46 of file files-dock-widget.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
MaxMRUDirs 

Definition at line 162 of file files-dock-widget.h.

Constructor & Destructor Documentation

files_dock_widget::files_dock_widget ( QWidget parent = 0)
files_dock_widget::~files_dock_widget ( )

Member Function Documentation

void files_dock_widget::accept_directory_line_edit ( void  )
slot

Accepts user input a the line edit for the current directory.

Definition at line 303 of file files-dock-widget.cc.

References _current_directory, and display_directory().

Referenced by files_dock_widget().

void octave_dock_widget::active_changed ( bool  active)
signalinherited

Custom signal that tells whether a user has clicked away that dock widget, i.e the active dock widget has changed.

Definition at line 143 of file moc-octave-dock-widget.cc.

Referenced by octave_dock_widget::change_visibility(), octave_dock_widget::closeEvent(), workspace_view::closeEvent(), octave_dock_widget::connect_visibility_changed(), and octave_dock_widget::handle_visibility_changed().

void octave_dock_widget::add_actions ( QList< QAction * >  action_list)
protectedvirtualslotinherited

Definition at line 485 of file octave-dock-widget.cc.

Referenced by octave_dock_widget::octave_dock_widget().

void files_dock_widget::change_directory_up ( void  )
slot

Slot for handling the up-directory button in the toolbar.

Definition at line 309 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and display_directory().

Referenced by files_dock_widget().

void octave_dock_widget::closeEvent ( QCloseEvent *  e)
protectedvirtualinherited
void octave_dock_widget::connect_visibility_changed ( void  )
virtualinherited
void files_dock_widget::contextmenu_copy_selection ( bool  )
privateslot

Definition at line 580 of file files-dock-widget.cc.

References _file_system_model, and _file_tree_view.

Referenced by contextmenu_requested(), and copyClipboard().

void files_dock_widget::contextmenu_delete ( bool  )
privateslot

Definition at line 661 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and warning().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_findfiles ( bool  )
privateslot

Definition at line 756 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and process_find_files().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_load ( bool  )
privateslot

Definition at line 600 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and load_file_signal().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_newdir ( bool  )
privateslot

Definition at line 720 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and process_new_dir().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_newfile ( bool  )
privateslot

Definition at line 703 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and process_new_file().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_open ( bool  )
privateslot
void files_dock_widget::contextmenu_open_in_app ( bool  )
privateslot

Definition at line 570 of file files-dock-widget.cc.

References _file_tree_view, and open_item_in_app().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_rename ( bool  )
privateslot

Definition at line 631 of file files-dock-widget.cc.

References _file_system_model, and _file_tree_view.

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_requested ( const QPoint &  pos)
privateslot
void files_dock_widget::contextmenu_run ( bool  )
privateslot

Definition at line 616 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and run_file_signal().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_setcurrentdir ( bool  )
privateslot
void files_dock_widget::copyClipboard ( void  )
privateslot
void files_dock_widget::display_directory ( const QString &  dir,
bool  set_octave_dir = true 
)
private
void files_dock_widget::displayed_directory_changed ( const QString &  dir)
signal

Emitted, whenever the currently displayed directory changed.

Definition at line 214 of file moc-files-dock-widget.cc.

Referenced by do_sync_octave_directory(), files_dock_widget(), and process_set_current_dir().

void files_dock_widget::do_sync_browser_directory ( void  )
slot

Slot for handling the sync browser directory button in the toolbar.

Definition at line 328 of file files-dock-widget.cc.

References _octave_dir, and display_directory().

Referenced by files_dock_widget().

void files_dock_widget::do_sync_octave_directory ( void  )
slot

Slot for handling the sync octave directory button in the toolbar.

Definition at line 319 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and displayed_directory_changed().

Referenced by files_dock_widget().

virtual void octave_dock_widget::do_undo ( void  )
inlineprotectedvirtualslotinherited

slots to handle undo

Definition at line 100 of file octave-dock-widget.h.

Referenced by octave_dock_widget::octave_dock_widget().

bool octave_dock_widget::eventFilter ( QObject obj,
QEvent *  e 
)
protectedslotinherited

Definition at line 455 of file octave-dock-widget.cc.

void files_dock_widget::find_files_signal ( const QString &  startdir)
signal

Emitted, whenever wants to search for a file .

Definition at line 235 of file moc-files-dock-widget.cc.

Referenced by process_find_files().

virtual void octave_dock_widget::focus ( void  )
inlinevirtualslotinherited
QWidget * octave_dock_widget::focusWidget ( )
protectedinherited

Definition at line 311 of file octave-dock-widget.cc.

References Faddeeva::w().

void octave_dock_widget::handle_active_dock_changed ( octave_dock_widget w_old,
octave_dock_widget w_new 
)
slotinherited
void octave_dock_widget::handle_settings ( const QSettings *  settings)
slotinherited
virtual void octave_dock_widget::handle_visibility ( bool  visible)
inlinevirtualslotinherited
virtual void octave_dock_widget::handle_visibility_changed ( bool  visible)
inlineprotectedvirtualslotinherited

Slot to steer changing visibility from outside.

Definition at line 90 of file octave-dock-widget.h.

References octave_dock_widget::active_changed().

Referenced by octave_dock_widget::octave_dock_widget().

void files_dock_widget::headercontextmenu_requested ( const QPoint &  pos)
privateslot
void files_dock_widget::item_double_clicked ( const QModelIndex &  index)
slot

Slot for handling a change in directory via double click.

Definition at line 289 of file files-dock-widget.cc.

References _file_system_model, and set_current_directory().

Referenced by files_dock_widget().

void files_dock_widget::load_file_signal ( const QString &  fileName)
signal

Emitted, whenever the user requested to load a file.

Definition at line 221 of file moc-files-dock-widget.cc.

Referenced by contextmenu_load(), and display_directory().

QMainWindow* octave_dock_widget::main_win ( )
inlineslotinherited

Definition at line 85 of file octave-dock-widget.h.

References octave_dock_widget::_parent.

Referenced by files_dock_widget().

void octave_dock_widget::make_widget ( bool  dock = true)
inherited
void octave_dock_widget::make_window ( void  )
inherited
void files_dock_widget::notice_settings ( const QSettings *  settings)
slot
void files_dock_widget::open_file ( const QString &  fileName)
signal

Emitted, whenever the user requested to open a file.

Definition at line 207 of file moc-files-dock-widget.cc.

Referenced by contextmenu_open(), display_directory(), and files_dock_widget().

void files_dock_widget::open_item_in_app ( const QModelIndex &  index)
private

Definition at line 383 of file files-dock-widget.cc.

References _file_system_model.

Referenced by contextmenu_open_in_app().

void files_dock_widget::pasteClipboard ( void  )
privateslot

Definition at line 924 of file files-dock-widget.cc.

References _current_directory.

void files_dock_widget::popdownmenu_findfiles ( bool  )
privateslot

Definition at line 845 of file files-dock-widget.cc.

References _file_system_model, and process_find_files().

Referenced by files_dock_widget().

void files_dock_widget::popdownmenu_home ( bool  )
privateslot
void files_dock_widget::popdownmenu_newdir ( bool  )
privateslot

Definition at line 851 of file files-dock-widget.cc.

References _file_system_model, and process_new_dir().

Referenced by files_dock_widget().

void files_dock_widget::popdownmenu_newfile ( bool  )
privateslot

Definition at line 857 of file files-dock-widget.cc.

References _file_system_model, and process_new_file().

Referenced by files_dock_widget().

void files_dock_widget::popdownmenu_search_dir ( bool  )
privateslot

Definition at line 835 of file files-dock-widget.cc.

References _file_system_model, and set_current_directory().

Referenced by files_dock_widget().

void files_dock_widget::process_find_files ( const QString &  dir_name)
private

Definition at line 901 of file files-dock-widget.cc.

References find_files_signal().

Referenced by contextmenu_findfiles(), and popdownmenu_findfiles().

void files_dock_widget::process_new_dir ( const QString &  parent_name)
private

Definition at line 881 of file files-dock-widget.cc.

References _file_system_model.

Referenced by contextmenu_newdir(), and popdownmenu_newdir().

void files_dock_widget::process_new_file ( const QString &  parent_name)
private

Definition at line 863 of file files-dock-widget.cc.

References _file_system_model.

Referenced by contextmenu_newfile(), and popdownmenu_newfile().

void files_dock_widget::process_set_current_dir ( const QString &  parent_name)
private

Definition at line 896 of file files-dock-widget.cc.

References displayed_directory_changed().

Referenced by contextmenu_setcurrentdir(), and display_directory().

void files_dock_widget::run_file_signal ( const QFileInfo &  info)
signal

Emitted, whenever the user requested to run a file.

Definition at line 228 of file moc-files-dock-widget.cc.

Referenced by contextmenu_run(), and files_dock_widget().

void files_dock_widget::selectAll ( void  )
privateslot

Definition at line 937 of file files-dock-widget.cc.

References _current_directory, and _file_tree_view.

void files_dock_widget::set_current_directory ( const QString &  dir)
slot

Sets the current directory being displayed.

Definition at line 297 of file files-dock-widget.cc.

References display_directory().

Referenced by contextmenu_open(), files_dock_widget(), item_double_clicked(), popdownmenu_home(), and popdownmenu_search_dir().

void octave_dock_widget::set_predecessor_widget ( octave_dock_widget prev_widget)
inherited
void octave_dock_widget::set_title ( const QString &  title)
inherited
void files_dock_widget::toggle_headercontextitem_datemodified ( )
privateslot
void files_dock_widget::toggle_headercontextitem_filesize ( )
privateslot
void files_dock_widget::toggle_headercontextitem_filetype ( )
privateslot
void files_dock_widget::toggle_headercontextitem_showhidden ( )
privateslot
void files_dock_widget::update_octave_directory ( const QString &  dir)
slot

set the internal variable that holds the actual octave variable

Definition at line 334 of file files-dock-widget.cc.

References _octave_dir, _sync_octave_dir, and display_directory().

Member Data Documentation

QComboBox* files_dock_widget::_current_directory
private
QFileSystemModel* files_dock_widget::_file_system_model
private
QTreeView* files_dock_widget::_file_tree_view
private
QToolBar* files_dock_widget::_navigation_tool_bar
private

Variables for the actions.

Definition at line 147 of file files-dock-widget.h.

Referenced by files_dock_widget(), and notice_settings().

QString files_dock_widget::_octave_dir
private
QAction* files_dock_widget::_sync_browser_directory_action
private

Definition at line 149 of file files-dock-widget.h.

Referenced by files_dock_widget(), and notice_settings().

bool files_dock_widget::_sync_octave_dir
private

Internal variables.

Definition at line 159 of file files-dock-widget.h.

Referenced by display_directory(), files_dock_widget(), notice_settings(), and update_octave_directory().

QAction* files_dock_widget::_sync_octave_directory_action
private

Definition at line 148 of file files-dock-widget.h.

Referenced by files_dock_widget(), and notice_settings().


The documentation for this class was generated from the following files: