Mercurial > octave-nkf
comparison libgui/src/octave-dock-widget.h @ 16611:999400bebe5e
move more common code from dock widgets into octave-dock-widget.h
* terminal-dock-widget.cc, file-editor.cc, files-dock-widget.cc,
workspace-view.cc (constructor): remove connectiong changed_settings signal
* files-dock-widget.cc/.h, file-editor.h: do not include QSettings here
* octave-dock-widget.h(constructor): connect changed_settings signal
* octave-dock-widget.h: include QSettings, empty virtual slot notice-settings
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 04 May 2013 23:37:27 +0200 |
parents | 094bd3627ead |
children | d749c9b588e5 |
comparison
equal
deleted
inserted
replaced
16610:a1f613e5066d | 16611:999400bebe5e |
---|---|
22 | 22 |
23 #if !defined (octave_dock_widget_h) | 23 #if !defined (octave_dock_widget_h) |
24 #define octave_dock_widget_h 1 | 24 #define octave_dock_widget_h 1 |
25 | 25 |
26 #include <QDockWidget> | 26 #include <QDockWidget> |
27 #include <QSettings> | |
27 | 28 |
28 class octave_dock_widget : public QDockWidget | 29 class octave_dock_widget : public QDockWidget |
29 { | 30 { |
30 Q_OBJECT | 31 Q_OBJECT |
31 | 32 |
37 connect (this, SIGNAL (visibilityChanged (bool)), | 38 connect (this, SIGNAL (visibilityChanged (bool)), |
38 this, SLOT (handle_visibility_changed (bool))); | 39 this, SLOT (handle_visibility_changed (bool))); |
39 | 40 |
40 connect (this, SIGNAL (topLevelChanged (bool)), | 41 connect (this, SIGNAL (topLevelChanged (bool)), |
41 this, SLOT (top_level_changed (bool))); | 42 this, SLOT (top_level_changed (bool))); |
43 | |
44 connect (p, SIGNAL (settings_changed (const QSettings*)), | |
45 this, SLOT (notice_settings (const QSettings*))); | |
42 } | 46 } |
43 | 47 |
44 virtual ~octave_dock_widget () { } | 48 virtual ~octave_dock_widget () { } |
45 | 49 |
46 virtual void connect_visibility_changed (void) | 50 virtual void connect_visibility_changed (void) |
47 { | 51 { |
48 connect (this, SIGNAL (visibilityChanged (bool)), | 52 connect (this, SIGNAL (visibilityChanged (bool)), |
49 this, SLOT (handle_visibility (bool))); | 53 this, SLOT (handle_visibility (bool))); |
50 } | 54 } |
55 | |
51 | 56 |
52 signals: | 57 signals: |
53 | 58 |
54 /** Custom signal that tells whether a user has clicked away | 59 /** Custom signal that tells whether a user has clicked away |
55 * that dock widget, i.e the active dock widget has | 60 * that dock widget, i.e the active dock widget has |
80 { | 85 { |
81 if (visible && ! isFloating ()) | 86 if (visible && ! isFloating ()) |
82 focus (); | 87 focus (); |
83 } | 88 } |
84 | 89 |
90 virtual void notice_settings (const QSettings*) | |
91 { | |
92 } | |
93 | |
85 protected slots: | 94 protected slots: |
86 | 95 |
87 /** Slot to steer changing visibility from outside. */ | 96 /** Slot to steer changing visibility from outside. */ |
88 virtual void handle_visibility_changed (bool visible) | 97 virtual void handle_visibility_changed (bool visible) |
89 { | 98 { |