GNU Octave  3.8.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.
void change_directory_up ()
 Slot for handling the up-directory button in the toolbar.
void do_sync_browser_directory ()
 Slot for handling the sync browser directory button in the toolbar.
void do_sync_octave_directory ()
 Slot for handling the sync octave directory button in the toolbar.
virtual void focus (void)
virtual void handle_visibility (bool visible)
void item_double_clicked (const QModelIndex &index)
 Slot for handling a change in directory via double click.
QMainWindowmain_win ()
void notice_settings (const QSettings *settings)
 Tells the widget to react on changed settings.
void set_current_directory (const QString &dir)
 Sets the current directory being displayed.
void update_octave_directory (const QString &dir)
 set the internal variable that holds the actual octave variable

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.
void displayed_directory_changed (const QString &dir)
 Emitted, whenever the currently displayed directory changed.
void find_files_signal (const QString &startdir)
 Emitted, whenever wants to search for a file .
void load_file_signal (const QString &fileName)
 Emitted, whenever the user requested to load a file.
void open_file (const QString &fileName)
 Emitted, whenever the user requested to open a file.
void run_file_signal (const QFileInfo &info)
 Emitted, whenever the user requested to run a file.

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_title (const QString &)

Protected Slots

virtual void handle_visibility_changed (bool visible)
 Slot to steer changing visibility from outside.

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
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 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
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.
QTreeView_file_tree_view
 The file system view.
QToolBar * _navigation_tool_bar
 Variables for the actions.
QString _octave_dir
QAction * _sync_browser_directory_action
bool _sync_octave_dir
 Internal variables.
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 161 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 279 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.

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 files_dock_widget::change_directory_up ( void  )
slot

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

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

References _file_system_model, _file_tree_view, and display_directory().

Referenced by files_dock_widget().

virtual void octave_dock_widget::closeEvent ( QCloseEvent *  e)
inlineprotectedvirtualinherited

Reimplemented in workspace_view.

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

References octave_dock_widget::active_changed().

void octave_dock_widget::connect_visibility_changed ( void  )
virtualinherited
void files_dock_widget::contextmenu_copy_selection ( bool  )
privateslot

Definition at line 536 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 617 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 712 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 556 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 676 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 659 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

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

References _file_tree_view, and item_double_clicked().

Referenced by contextmenu_requested().

void files_dock_widget::contextmenu_open_in_app ( bool  )
privateslot

Definition at line 526 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 587 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 572 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.

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 304 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 295 of file files-dock-widget.cc.

References _file_system_model, _file_tree_view, and displayed_directory_changed().

Referenced by files_dock_widget().

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

Emitted, whenever wants to search for a file .

Referenced by process_find_files().

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

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

References Faddeeva::w().

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 265 of file files-dock-widget.cc.

References _file_system_model, and set_current_directory().

Referenced by contextmenu_open(), and files_dock_widget().

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

Emitted, whenever the user requested to load a file.

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.

Referenced by display_directory(), and files_dock_widget().

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

Definition at line 359 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 874 of file files-dock-widget.cc.

References _current_directory.

void files_dock_widget::popdownmenu_findfiles ( bool  )
privateslot

Definition at line 794 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

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

References set_current_directory().

Referenced by files_dock_widget().

void files_dock_widget::popdownmenu_newdir ( bool  )
privateslot

Definition at line 800 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 806 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 784 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 851 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 830 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 812 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 846 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.

Referenced by contextmenu_run(), and files_dock_widget().

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

Sets the current directory being displayed.

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

References display_directory().

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

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 310 of file files-dock-widget.cc.

References _octave_dir, _sync_octave_dir, and display_directory().

Referenced by main_window::change_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 146 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 148 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 158 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 147 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: