Mercurial > hg > octave-lyh
comparison libgui/src/files-dock-widget.h @ 16461:094bd3627ead
move common functionality to octave_dock_widget base class
* octave-dock-widget.h (octave_dock_widget::handle_visibility,
octave_dock_widget::connect_visibility_changed,
octave_dock_widget::focus): New virtual functions.
* documentation-dock-widget.cc, documentation-dock-widget.h,
files-dock-widget.cc, files-dock-widget.h, history-dock-widget.cc,
history-dock-widget.h, terminal-dock-widget.cc,
terminal-dock-widget.h: Inherit handle_visibility,
connect_visibility_changed, and focus methods.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 07 Apr 2013 12:36:07 -0400 |
parents | 4d4e7c6f839d |
children | 605d7f0ee0d8 |
comparison
equal
deleted
inserted
replaced
16460:4d4e7c6f839d | 16461:094bd3627ead |
---|---|
51 | 51 |
52 files_dock_widget (QWidget *parent = 0); | 52 files_dock_widget (QWidget *parent = 0); |
53 | 53 |
54 ~files_dock_widget (); | 54 ~files_dock_widget (); |
55 | 55 |
56 void connect_visibility_changed (void); | |
57 | |
58 public slots: | 56 public slots: |
59 | 57 |
60 /** Slot for handling a change in directory via double click. */ | 58 /** Slot for handling a change in directory via double click. */ |
61 void item_double_clicked (const QModelIndex & index); | 59 void item_double_clicked (const QModelIndex & index); |
62 | 60 |
72 void display_directory (const QString& dir); | 70 void display_directory (const QString& dir); |
73 | 71 |
74 /** Tells the widget to react on changed settings. */ | 72 /** Tells the widget to react on changed settings. */ |
75 void notice_settings (const QSettings *settings); | 73 void notice_settings (const QSettings *settings); |
76 | 74 |
77 void focus (void); | 75 signals: |
78 | 76 |
79 void handle_visibility (bool visible); | |
80 | |
81 signals: | |
82 /** Emitted, whenever the user requested to open a file. */ | 77 /** Emitted, whenever the user requested to open a file. */ |
83 void open_file (const QString& fileName); | 78 void open_file (const QString& fileName); |
84 | 79 |
85 /** Emitted, whenever the currently displayed directory changed. */ | 80 /** Emitted, whenever the currently displayed directory changed. */ |
86 void displayed_directory_changed (const QString& dir); | 81 void displayed_directory_changed (const QString& dir); |
87 | 82 |
88 protected: | 83 private: |
89 | 84 |
90 private: | |
91 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc | 85 // TODO: Add toolbar with buttons for navigating the path, creating dirs, etc |
92 | 86 |
93 /** Toolbar for file and directory manipulation. */ | 87 /** Toolbar for file and directory manipulation. */ |
94 QToolBar * _navigation_tool_bar; | 88 QToolBar * _navigation_tool_bar; |
95 | 89 |