[niepce] Add "override" where recommended. This is now default.
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] Add "override" where recommended. This is now default.
- Date: Tue, 13 Oct 2015 02:59:30 +0000 (UTC)
commit 3eeaa476a6d6785673217aa5180c5f072ec8c8fe
Author: Hubert Figuière <hub figuiere net>
Date: Fri Jun 19 23:07:02 2015 -0400
Add "override" where recommended. This is now default.
camerawire/src/cwapplication.hpp | 4 +-
camerawire/src/cwwindow.hpp | 2 +-
doc/style-guide | 59 +++++++++++++++++++++
magellan/src/mgapplication.hpp | 4 +-
magellan/src/mgwindow.hpp | 2 +-
src/engine/library/thumbnailcache.hpp | 2 +-
src/ext/libview/header.hh | 2 +-
src/fwk/toolkit/appframe.hpp | 2 +-
src/fwk/toolkit/application.hpp | 2 +-
src/fwk/toolkit/command.hpp | 10 ++--
src/fwk/toolkit/configdatabinder.hpp | 2 +-
src/fwk/toolkit/dialog.hpp | 2 +-
src/fwk/toolkit/mapcontroller.hpp | 2 +-
src/fwk/toolkit/widgets/editablehscale.hpp | 2 +-
src/fwk/toolkit/widgets/imagegridview.hpp | 2 +-
src/fwk/toolkit/widgets/ratinglabel.hpp | 12 ++--
src/fwk/utils/db/insertstatement.hpp | 2 +-
src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp | 36 ++++++------
src/fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp | 2 +-
src/fwk/utils/exception.hpp | 2 +-
src/fwk/utils/worker.hpp | 2 +-
src/libraryclient/libraryclient.hpp | 2 +-
src/libraryclient/locallibraryserver.hpp | 2 +-
src/niepce/modules/darkroom/darkroommodule.hpp | 8 ++--
src/niepce/modules/darkroom/imagecanvas.hpp | 4 +-
src/niepce/modules/darkroom/toolboxcontroller.hpp | 2 +-
src/niepce/modules/map/mapmodule.hpp | 8 ++--
src/niepce/ui/dialogs/editlabels.hpp | 2 +-
src/niepce/ui/dialogs/importdialog.hpp | 2 +-
src/niepce/ui/dialogs/preferencesdialog.hpp | 2 +-
src/niepce/ui/filmstripcontroller.hpp | 8 ++--
src/niepce/ui/gridviewmodule.hpp | 14 +++---
src/niepce/ui/librarycellrenderer.hpp | 8 ++--
src/niepce/ui/metadatapanecontroller.hpp | 2 +-
src/niepce/ui/moduleshell.hpp | 8 ++--
src/niepce/ui/niepceapplication.hpp | 8 ++--
src/niepce/ui/niepcewindow.hpp | 4 +-
src/niepce/ui/selectioncontroller.hpp | 2 +-
src/niepce/ui/thumbstripview.hpp | 2 +-
src/niepce/ui/workspacecontroller.hpp | 4 +-
40 files changed, 153 insertions(+), 94 deletions(-)
---
diff --git a/camerawire/src/cwapplication.hpp b/camerawire/src/cwapplication.hpp
index 3aa9aea..488d8df 100644
--- a/camerawire/src/cwapplication.hpp
+++ b/camerawire/src/cwapplication.hpp
@@ -33,11 +33,11 @@ class CwApplication
public:
static fwk::Application::Ptr create(int & argc, char** & argv);
- virtual fwk::AppFrame::Ptr makeMainFrame();
+ virtual fwk::AppFrame::Ptr makeMainFrame() override;
protected:
CwApplication(int & argc, char** & argv);
- virtual void on_action_preferences();
+ virtual void on_action_preferences() override;
};
diff --git a/camerawire/src/cwwindow.hpp b/camerawire/src/cwwindow.hpp
index e642680..08fca8f 100644
--- a/camerawire/src/cwwindow.hpp
+++ b/camerawire/src/cwwindow.hpp
@@ -39,7 +39,7 @@ public:
CwWindow();
protected:
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
class CameraTreeRecord
diff --git a/doc/style-guide b/doc/style-guide
new file mode 100644
index 0000000..5546cb3
--- /dev/null
+++ b/doc/style-guide
@@ -0,0 +1,59 @@
+NOTE: at the time of writing, the used style may not match this document.
+Therefor the following rules apply:
+1. try to match the existing file indentation
+2. new symbols should follow the style guide
+3. implementation should follow the style guide. You may adapt functions
+you change to the new style if needed.
+
+INTRODUCTION
+------------
+
+This is the style guide for the Niepce project.
+
+
+INDENTATION
+-----------
+
+Spaces, not tab.
+2 spaces.
+
+Curly braces are mandatory.
+
+Opening brace on the same line as the statement
+-except for functions, classes
+
+Inner block, always indented
+-except namespaces
+
+
+SYMBOLS
+-------
+
+Namespaces:
+-Lower case, short
+
+Classes:
+-Camel case, starting with an uppercase
+
+Methods:
+-Camel case, starting with a lowercase
+
+Variables
+-Lower case
+
+Constants
+-Upper case
+
+
+HEADERS
+-------
+
+Use #pragma once for header guards.
+
+
+C++
+---
+
+C++11
+
+Use of 'override' is mandatory. Anywhere it is missing is a bug.
\ No newline at end of file
diff --git a/magellan/src/mgapplication.hpp b/magellan/src/mgapplication.hpp
index bbb7e40..eea36c7 100644
--- a/magellan/src/mgapplication.hpp
+++ b/magellan/src/mgapplication.hpp
@@ -33,11 +33,11 @@ class MgApplication
public:
static fwk::Application::Ptr create(int & argc, char** & argv);
- virtual fwk::AppFrame::Ptr makeMainFrame();
+ virtual fwk::AppFrame::Ptr makeMainFrame() override;
protected:
MgApplication(int & argc, char** & argv);
- virtual void on_action_preferences();
+ virtual void on_action_preferences() override;
};
}
diff --git a/magellan/src/mgwindow.hpp b/magellan/src/mgwindow.hpp
index a962262..637afdc 100644
--- a/magellan/src/mgwindow.hpp
+++ b/magellan/src/mgwindow.hpp
@@ -40,7 +40,7 @@ public:
MgWindow();
protected:
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
diff --git a/src/engine/library/thumbnailcache.hpp b/src/engine/library/thumbnailcache.hpp
index 5ac6ac0..d80846d 100644
--- a/src/engine/library/thumbnailcache.hpp
+++ b/src/engine/library/thumbnailcache.hpp
@@ -66,7 +66,7 @@ public:
static bool is_thumbnail_cached(const std::string & file, const std::string & thumb);
protected:
- virtual void execute(const ptr_t & task);
+ virtual void execute(const ptr_t & task) override;
private:
std::string m_cacheDir;
std::weak_ptr<fwk::NotificationCenter> m_notif_center;
diff --git a/src/ext/libview/header.hh b/src/ext/libview/header.hh
index 5f46815..9c384cc 100644
--- a/src/ext/libview/header.hh
+++ b/src/ext/libview/header.hh
@@ -50,7 +50,7 @@ public:
void SetAlignment(Alignment align);
protected:
- void on_style_updated();
+ void on_style_updated() override;
private:
Gtk::Label mLabel;
diff --git a/src/fwk/toolkit/appframe.hpp b/src/fwk/toolkit/appframe.hpp
index 86dd660..b5a701b 100644
--- a/src/fwk/toolkit/appframe.hpp
+++ b/src/fwk/toolkit/appframe.hpp
@@ -20,7 +20,7 @@ public:
{
}
- virtual void on_ready()
+ virtual void on_ready() override
{
gtkWindow().show();
}
diff --git a/src/fwk/toolkit/application.hpp b/src/fwk/toolkit/application.hpp
index eae821c..d033fcc 100644
--- a/src/fwk/toolkit/application.hpp
+++ b/src/fwk/toolkit/application.hpp
@@ -61,7 +61,7 @@ public:
virtual void quit();
void about();
virtual void add(const Controller::Ptr & sub);
- virtual void terminate();
+ virtual void terminate() override;
Glib::RefPtr<Gtk::IconTheme> getIconTheme() const;
void set_menubar(const Glib::RefPtr<Gio::Menu> & menu)
diff --git a/src/fwk/toolkit/command.hpp b/src/fwk/toolkit/command.hpp
index b577d58..fc2b1bc 100644
--- a/src/fwk/toolkit/command.hpp
+++ b/src/fwk/toolkit/command.hpp
@@ -28,7 +28,7 @@ namespace fwk {
class Command
{
public:
- virtual ~Command() {}
+ virtual ~Command() {}
typedef std::function<void (void)> Function;
virtual void undo() = 0;
virtual void redo() = 0;
@@ -48,11 +48,11 @@ public:
{
}
- virtual void undo()
+ virtual void undo() override
{
m_undo(m_argstorage);
}
- virtual void redo()
+ virtual void redo() override
{
m_argstorage = m_redo();
}
@@ -76,11 +76,11 @@ public:
{
}
- virtual void undo()
+ virtual void undo() override
{
m_undo();
}
- virtual void redo()
+ virtual void redo() override
{
m_redo();
}
diff --git a/src/fwk/toolkit/configdatabinder.hpp b/src/fwk/toolkit/configdatabinder.hpp
index 021bb47..acbb04d 100644
--- a/src/fwk/toolkit/configdatabinder.hpp
+++ b/src/fwk/toolkit/configdatabinder.hpp
@@ -91,7 +91,7 @@ public:
}
- virtual void on_changed(void)
+ virtual void on_changed(void) override
{
try {
m_value = static_cast<property_t&>(m_property).get_value();
diff --git a/src/fwk/toolkit/dialog.hpp b/src/fwk/toolkit/dialog.hpp
index 1938c8f..7c8e1ea 100644
--- a/src/fwk/toolkit/dialog.hpp
+++ b/src/fwk/toolkit/dialog.hpp
@@ -57,7 +57,7 @@ public:
int run_modal();
int run_modal(const Frame::Ptr & parent);
protected:
- virtual Gtk::Widget *buildWidget();
+ virtual Gtk::Widget *buildWidget() override;
bool m_is_setup;
};
diff --git a/src/fwk/toolkit/mapcontroller.hpp b/src/fwk/toolkit/mapcontroller.hpp
index 109cf46..adc3940 100644
--- a/src/fwk/toolkit/mapcontroller.hpp
+++ b/src/fwk/toolkit/mapcontroller.hpp
@@ -31,7 +31,7 @@ class MapController
public:
typedef std::shared_ptr<MapController> Ptr;
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
void centerOn(double lat, double longitude);
diff --git a/src/fwk/toolkit/widgets/editablehscale.hpp b/src/fwk/toolkit/widgets/editablehscale.hpp
index 2bb4787..4689f83 100644
--- a/src/fwk/toolkit/widgets/editablehscale.hpp
+++ b/src/fwk/toolkit/widgets/editablehscale.hpp
@@ -44,7 +44,7 @@ public:
sigc::signal<void,double> & signal_value_changed();
sigc::signal<void,double> & signal_value_changing();
- bool on_button_press_event(GdkEventButton *event);
+ bool on_button_press_event(GdkEventButton *event) override;
private:
diff --git a/src/fwk/toolkit/widgets/imagegridview.hpp b/src/fwk/toolkit/widgets/imagegridview.hpp
index 5c0e919..2cc2d13 100644
--- a/src/fwk/toolkit/widgets/imagegridview.hpp
+++ b/src/fwk/toolkit/widgets/imagegridview.hpp
@@ -74,7 +74,7 @@ public:
* Used to work around the activate that don't pass an event.
* https://bugzilla.gnome.org/show_bug.cgi?id=664368
*/
- virtual bool on_button_press_event(GdkEventButton *event);
+ virtual bool on_button_press_event(GdkEventButton *event) override;
private:
};
diff --git a/src/fwk/toolkit/widgets/ratinglabel.hpp b/src/fwk/toolkit/widgets/ratinglabel.hpp
index 93b71bb..ba7196d 100644
--- a/src/fwk/toolkit/widgets/ratinglabel.hpp
+++ b/src/fwk/toolkit/widgets/ratinglabel.hpp
@@ -53,13 +53,13 @@ public:
// signal emitted when the rating is changed in the UI
sigc::signal<void, int> signal_changed;
protected:
- virtual void on_realize();
- virtual bool on_button_press_event (GdkEventButton* event);
- virtual bool on_draw(const Cairo::RefPtr< Cairo::Context > &cr);
- virtual void on_state_changed (Gtk::StateType previous_state);
+ virtual void on_realize() override;
+ virtual bool on_button_press_event (GdkEventButton* event) override;
+ virtual bool on_draw(const Cairo::RefPtr< Cairo::Context > &cr) override;
+ virtual void on_state_changed (Gtk::StateType previous_state) override;
- virtual void get_preferred_width_vfunc (int& minimum_width, int& natural_width) const;
- virtual void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const;
+ virtual void get_preferred_width_vfunc (int& minimum_width, int& natural_width) const override;
+ virtual void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override;
private:
int m_rating;
bool m_is_editable;
diff --git a/src/fwk/utils/db/insertstatement.hpp b/src/fwk/utils/db/insertstatement.hpp
index 07b2423..ecef738 100644
--- a/src/fwk/utils/db/insertstatement.hpp
+++ b/src/fwk/utils/db/insertstatement.hpp
@@ -46,7 +46,7 @@ public:
ColumnList &a_columns) ;
~InsertStatement() ;
- const std::string& to_string() const ;
+ const std::string& to_string() const override;
const ColumnList& get_columns() const ;
diff --git a/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp b/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
index b4d453f..864c40b 100644
--- a/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
+++ b/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
@@ -54,47 +54,47 @@ class SqliteCnxDrv: public db::IConnectionDriver {
public:
virtual ~SqliteCnxDrv () ;
sqlite3* sqlite_handle() const;
- const char* get_last_error () const ;
+ const char* get_last_error () const override;
- bool start_transaction () ;
+ bool start_transaction () override;
- bool commit_transaction () ;
+ bool commit_transaction () override;
- bool rollback_transaction () ;
+ bool rollback_transaction () override;
- bool execute_statement (const db::SQLStatement &a_statement) ;
+ bool execute_statement (const db::SQLStatement &a_statement) override;
- bool create_function0(const std::string & name, const f0_t & f);
+ bool create_function0(const std::string & name, const f0_t & f) override;
- bool should_have_data () const ;
+ bool should_have_data () const override;
- bool read_next_row () ;
+ bool read_next_row () override;
- virtual int64_t last_row_id();
+ virtual int64_t last_row_id() override;
- unsigned int get_number_of_columns () const ;
+ unsigned int get_number_of_columns () const override;
bool get_column_type (uint32_t a_offset,
- enum db::ColumnType &a_type) const ;
+ enum db::ColumnType &a_type) const override;
- bool get_column_name (uint32_t a_offset, fwk::Buffer &a_name) const ;
+ bool get_column_name (uint32_t a_offset, fwk::Buffer &a_name) const override;
bool get_column_content (uint32_t a_offset,
- fwk::Buffer &a_column_content) const ;
+ fwk::Buffer &a_column_content) const override;
bool get_column_content (uint32_t a_offset,
- int32_t &a_column_content) const ;
+ int32_t &a_column_content) const override;
bool get_column_content (uint32_t a_offset,
- int64_t &a_column_content) const ;
+ int64_t &a_column_content) const override;
bool get_column_content (uint32_t a_offset,
- double& a_column_content) const ;
+ double& a_column_content) const override;
bool get_column_content (uint32_t a_offset,
- std::string& a_column_content) const ;
+ std::string& a_column_content) const override;
- void close () ;
+ void close () override;
};//end IConnectionDriver
}//end namespace sqlite
diff --git a/src/fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp b/src/fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp
index b09a61b..b98e517 100644
--- a/src/fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp
+++ b/src/fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp
@@ -50,7 +50,7 @@ public:
db::IConnectionDriver::Ptr connect_to_db(const db::DBDesc &a_desc,
const std::string &a_user,
- const std::string &a_pass) ;
+ const std::string &a_pass) override;
};//end SqliteCnxMgrDrv
}//end namespace sqlite
diff --git a/src/fwk/utils/exception.hpp b/src/fwk/utils/exception.hpp
index 6ccb343..80c27d6 100644
--- a/src/fwk/utils/exception.hpp
+++ b/src/fwk/utils/exception.hpp
@@ -47,7 +47,7 @@ public:
Exception (const std::exception &) ;
Exception& operator= (const Exception &a_other) ;
virtual ~Exception () throw ();
- const char* what () const throw ();
+ const char* what () const throw () override;
};//class Exception
#define THROW_IF_FAIL(a_cond) \
diff --git a/src/fwk/utils/worker.hpp b/src/fwk/utils/worker.hpp
index fd1cd66..f0e6f9e 100644
--- a/src/fwk/utils/worker.hpp
+++ b/src/fwk/utils/worker.hpp
@@ -51,7 +51,7 @@ public:
void schedule(ptr_t & ); // must be a ref so that the pointer is moved
void clear();
protected:
- virtual void main();
+ virtual void main() override;
queue_t m_tasks;
private:
diff --git a/src/libraryclient/libraryclient.hpp b/src/libraryclient/libraryclient.hpp
index 8e18f4d..3045810 100644
--- a/src/libraryclient/libraryclient.hpp
+++ b/src/libraryclient/libraryclient.hpp
@@ -93,7 +93,7 @@ public:
{ return m_thumbnailCache; }
/* sync call */
- virtual bool fetchKeywordsForFile(int file, eng::Keyword::IdList &keywords);
+ virtual bool fetchKeywordsForFile(int file, eng::Keyword::IdList &keywords) override;
UIDataProvider *getDataProvider() const
{ return m_uidataprovider; }
diff --git a/src/libraryclient/locallibraryserver.hpp b/src/libraryclient/locallibraryserver.hpp
index 79bccc0..373056a 100644
--- a/src/libraryclient/locallibraryserver.hpp
+++ b/src/libraryclient/locallibraryserver.hpp
@@ -45,7 +45,7 @@ namespace libraryclient {
return m_library && m_library->ok();
}
protected:
- virtual void execute(const ptr_t & _op);
+ virtual void execute(const ptr_t & _op) override;
private:
eng::Library::Ptr m_library;
diff --git a/src/niepce/modules/darkroom/darkroommodule.hpp b/src/niepce/modules/darkroom/darkroommodule.hpp
index 5fc159e..29cb225 100644
--- a/src/niepce/modules/darkroom/darkroommodule.hpp
+++ b/src/niepce/modules/darkroom/darkroommodule.hpp
@@ -52,17 +52,17 @@ public:
void set_image(const eng::LibFile::Ptr & file);
- virtual void dispatch_action(const std::string & action_name);
+ virtual void dispatch_action(const std::string & action_name) override;
- virtual void set_active(bool active);
+ virtual void set_active(bool active) override;
- virtual Glib::RefPtr<Gio::MenuModel> getMenu()
+ virtual Glib::RefPtr<Gio::MenuModel> getMenu() override
{ return Glib::RefPtr<Gio::MenuModel>(); }
protected:
void reload_image();
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
void on_selected(eng::library_id_t id);
diff --git a/src/niepce/modules/darkroom/imagecanvas.hpp b/src/niepce/modules/darkroom/imagecanvas.hpp
index 1c29193..624c25e 100644
--- a/src/niepce/modules/darkroom/imagecanvas.hpp
+++ b/src/niepce/modules/darkroom/imagecanvas.hpp
@@ -54,8 +54,8 @@ public:
return m_zoom_mode;
}
protected:
- virtual void on_size_allocate(Gtk::Allocation & allocation);
- virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
+ virtual void on_size_allocate(Gtk::Allocation & allocation) override;
+ virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr) override;
private:
void invalidate();
diff --git a/src/niepce/modules/darkroom/toolboxcontroller.hpp
b/src/niepce/modules/darkroom/toolboxcontroller.hpp
index 0599a8f..c8ea293 100644
--- a/src/niepce/modules/darkroom/toolboxcontroller.hpp
+++ b/src/niepce/modules/darkroom/toolboxcontroller.hpp
@@ -31,7 +31,7 @@ class ToolboxController
public:
typedef std::shared_ptr<ToolboxController> Ptr;
ToolboxController();
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
};
}
diff --git a/src/niepce/modules/map/mapmodule.hpp b/src/niepce/modules/map/mapmodule.hpp
index 62af8e4..359351d 100644
--- a/src/niepce/modules/map/mapmodule.hpp
+++ b/src/niepce/modules/map/mapmodule.hpp
@@ -43,15 +43,15 @@ public:
MapModule(const ui::IModuleShell & shell);
/* ILibraryModule */
- virtual void dispatch_action(const std::string & action_name);
- virtual void set_active(bool active);
- virtual Glib::RefPtr<Gio::MenuModel> getMenu()
+ virtual void dispatch_action(const std::string & action_name) override;
+ virtual void set_active(bool active) override;
+ virtual Glib::RefPtr<Gio::MenuModel> getMenu() override
{ return Glib::RefPtr<Gio::MenuModel>(); }
void on_lib_notification(const eng::LibNotification &ln);
protected:
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
void on_selected(eng::library_id_t id);
diff --git a/src/niepce/ui/dialogs/editlabels.hpp b/src/niepce/ui/dialogs/editlabels.hpp
index f5d77dc..b0f7053 100644
--- a/src/niepce/ui/dialogs/editlabels.hpp
+++ b/src/niepce/ui/dialogs/editlabels.hpp
@@ -41,7 +41,7 @@ public:
typedef std::shared_ptr<EditLabels> Ptr;
EditLabels(const libraryclient::LibraryClient::Ptr &);
- virtual void setup_widget();
+ virtual void setup_widget() override;
private:
void label_name_changed(size_t idx);
void label_colour_changed(size_t idx);
diff --git a/src/niepce/ui/dialogs/importdialog.hpp b/src/niepce/ui/dialogs/importdialog.hpp
index d3fad3d..e1a50bf 100644
--- a/src/niepce/ui/dialogs/importdialog.hpp
+++ b/src/niepce/ui/dialogs/importdialog.hpp
@@ -50,7 +50,7 @@ public:
ImportDialog();
- virtual void setup_widget();
+ virtual void setup_widget() override;
// const std::list<std::string> & to_import() const
// { return m_list_to_import; }
diff --git a/src/niepce/ui/dialogs/preferencesdialog.hpp b/src/niepce/ui/dialogs/preferencesdialog.hpp
index cecda25..f563cbd 100644
--- a/src/niepce/ui/dialogs/preferencesdialog.hpp
+++ b/src/niepce/ui/dialogs/preferencesdialog.hpp
@@ -33,7 +33,7 @@ public:
: fwk::Dialog(GLADEDIR"preferences.ui", "preferences", "")
{
}
- virtual void setup_widget();
+ virtual void setup_widget() override;
private:
fwk::TextPairModelRecord m_theme_combo_model;
diff --git a/src/niepce/ui/filmstripcontroller.hpp b/src/niepce/ui/filmstripcontroller.hpp
index 9d46f6d..7b8e151 100644
--- a/src/niepce/ui/filmstripcontroller.hpp
+++ b/src/niepce/ui/filmstripcontroller.hpp
@@ -43,11 +43,11 @@ public:
FilmStripController(const Glib::RefPtr<ImageListStore> & store);
- virtual Gtk::IconView * image_list();
- virtual eng::library_id_t get_selected();
- virtual void select_image(eng::library_id_t id);
+ virtual Gtk::IconView * image_list() override;
+ virtual eng::library_id_t get_selected() override;
+ virtual void select_image(eng::library_id_t id) override;
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
Gtk::IconView * m_thumbview;
diff --git a/src/niepce/ui/gridviewmodule.hpp b/src/niepce/ui/gridviewmodule.hpp
index 5f14e54..4bcfe48 100644
--- a/src/niepce/ui/gridviewmodule.hpp
+++ b/src/niepce/ui/gridviewmodule.hpp
@@ -63,18 +63,18 @@ public:
void display_none();
/* ILibraryModule */
- virtual void dispatch_action(const std::string & action_name);
- virtual void set_active(bool active);
- virtual Glib::RefPtr<Gio::MenuModel> getMenu()
+ virtual void dispatch_action(const std::string & action_name) override;
+ virtual void set_active(bool active) override;
+ virtual Glib::RefPtr<Gio::MenuModel> getMenu() override
{ return Glib::RefPtr<Gio::MenuModel>(); }
/* IImageSelectable */
- virtual Gtk::IconView * image_list();
- virtual eng::library_id_t get_selected();
- virtual void select_image(eng::library_id_t id);
+ virtual Gtk::IconView * image_list() override;
+ virtual eng::library_id_t get_selected() override;
+ virtual void select_image(eng::library_id_t id) override;
protected:
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
diff --git a/src/niepce/ui/librarycellrenderer.hpp b/src/niepce/ui/librarycellrenderer.hpp
index 3d18c1b..eea1bae 100644
--- a/src/niepce/ui/librarycellrenderer.hpp
+++ b/src/niepce/ui/librarycellrenderer.hpp
@@ -43,18 +43,18 @@ class LibraryCellRenderer
public:
LibraryCellRenderer(libraryclient::UIDataProvider *provider);
- virtual void get_preferred_width_vfunc(Gtk::Widget& widget, int& minimum_width, int& natural_width)
const;
- virtual void get_preferred_height_vfunc(Gtk::Widget& widget, int& minimum_height, int& natural_height)
const;
+ virtual void get_preferred_width_vfunc(Gtk::Widget& widget, int& minimum_width, int& natural_width)
const override;
+ virtual void get_preferred_height_vfunc(Gtk::Widget& widget, int& minimum_height, int& natural_height)
const override;
virtual void render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
- Gtk::CellRendererState flags);
+ Gtk::CellRendererState flags) override;
/** call when the cell is clicked */
virtual bool activate_vfunc(GdkEvent* event, Gtk::Widget& widget,const Glib::ustring & path,
const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area, Gtk::CellRendererState flags);
+ const Gdk::Rectangle& cell_area, Gtk::CellRendererState flags) override;
void set_size(int _size)
{ m_size = _size; }
int size() const
diff --git a/src/niepce/ui/metadatapanecontroller.hpp b/src/niepce/ui/metadatapanecontroller.hpp
index 2b62312..936557d 100644
--- a/src/niepce/ui/metadatapanecontroller.hpp
+++ b/src/niepce/ui/metadatapanecontroller.hpp
@@ -43,7 +43,7 @@ public:
typedef std::shared_ptr<MetaDataPaneController> Ptr;
MetaDataPaneController();
~MetaDataPaneController();
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
void display(eng::library_id_t file_id, const eng::LibMetadata::Ptr & meta);
eng::library_id_t displayed_file() const
{ return m_fileid; }
diff --git a/src/niepce/ui/moduleshell.hpp b/src/niepce/ui/moduleshell.hpp
index 124643b..8be4a87 100644
--- a/src/niepce/ui/moduleshell.hpp
+++ b/src/niepce/ui/moduleshell.hpp
@@ -68,11 +68,11 @@ public:
{
return m_selection_controller->get_list_store();
}
- virtual const SelectionController::Ptr & get_selection_controller() const
+ virtual const SelectionController::Ptr & get_selection_controller() const override
{
return m_selection_controller;
}
- virtual libraryclient::LibraryClient::Ptr getLibraryClient() const
+ virtual libraryclient::LibraryClient::Ptr getLibraryClient() const override
{
return m_libraryclient;
}
@@ -84,14 +84,14 @@ public:
void on_selected(eng::library_id_t id);
void on_image_activated(eng::library_id_t id);
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
void action_edit_delete();
protected:
virtual void add_library_module(const ILibraryModule::Ptr & module,
const std::string & name,
const std::string & label);
- virtual void on_ready();
+ virtual void on_ready() override;
void on_module_deactivated(const std::string & name) const;
void on_module_activated(const std::string & name) const;
private:
diff --git a/src/niepce/ui/niepceapplication.hpp b/src/niepce/ui/niepceapplication.hpp
index 4eb04c6..46c795e 100644
--- a/src/niepce/ui/niepceapplication.hpp
+++ b/src/niepce/ui/niepceapplication.hpp
@@ -31,13 +31,13 @@ class NiepceApplication
public:
static fwk::Application::Ptr create(int & argc, char** & argv);
- virtual fwk::AppFrame::Ptr makeMainFrame();
+ virtual fwk::AppFrame::Ptr makeMainFrame() override;
protected:
NiepceApplication(int & argc, char** & argv);
- virtual void on_action_file_open();
- virtual void on_about();
- virtual void on_action_preferences();
+ virtual void on_action_file_open() override;
+ virtual void on_about() override;
+ virtual void on_action_preferences() override;
};
}
diff --git a/src/niepce/ui/niepcewindow.hpp b/src/niepce/ui/niepcewindow.hpp
index 653f836..f850259 100644
--- a/src/niepce/ui/niepcewindow.hpp
+++ b/src/niepce/ui/niepcewindow.hpp
@@ -49,7 +49,7 @@ public:
virtual ~NiepceWindow();
- virtual void set_title(const std::string & title);
+ virtual void set_title(const std::string & title) override;
libraryclient::LibraryClient::Ptr getLibraryClient() const
{ return m_libClient; }
@@ -57,7 +57,7 @@ public:
{ return m_library_cfg; }
protected:
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
void on_action_file_import();
diff --git a/src/niepce/ui/selectioncontroller.hpp b/src/niepce/ui/selectioncontroller.hpp
index df5d0c3..8e6b377 100644
--- a/src/niepce/ui/selectioncontroller.hpp
+++ b/src/niepce/ui/selectioncontroller.hpp
@@ -111,7 +111,7 @@ public:
eng::library_id_t get_selection() const;
eng::LibFile::Ptr get_file(eng::library_id_t id) const;
protected:
- virtual void _added();
+ virtual void _added() override;
private:
libraryclient::LibraryClient::Ptr getLibraryClient();
diff --git a/src/niepce/ui/thumbstripview.hpp b/src/niepce/ui/thumbstripview.hpp
index 95ff908..4085a47 100644
--- a/src/niepce/ui/thumbstripview.hpp
+++ b/src/niepce/ui/thumbstripview.hpp
@@ -45,7 +45,7 @@ private:
void on_visible_range_changed();
void on_adjustment_changed();
void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
- Gtk::SelectionData&,guint,guint);
+ Gtk::SelectionData&,guint,guint) override;
void update_visible_range(int, int);
void add_range(int, int);
void clear_range (int start_thumb, int end_thumb);
diff --git a/src/niepce/ui/workspacecontroller.hpp b/src/niepce/ui/workspacecontroller.hpp
index f2abd9d..4427a59 100644
--- a/src/niepce/ui/workspacecontroller.hpp
+++ b/src/niepce/ui/workspacecontroller.hpp
@@ -79,13 +79,13 @@ public:
Gtk::TreeModelColumn<int> m_count_n;
};
- virtual void on_ready();
+ virtual void on_ready() override;
void on_lib_notification(const eng::LibNotification &);
void on_count_notification(int);
void on_libtree_selection();
- virtual Gtk::Widget * buildWidget();
+ virtual Gtk::Widget * buildWidget() override;
private:
void on_row_expanded_collapsed(const Gtk::TreeIter& iter,
const Gtk::TreePath& path, bool expanded);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]