diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-02 15:07:41 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-02 15:15:33 +0100 |
commit | c5bd9d4ed1d80ac91d46146565127b0c185f1b43 (patch) | |
tree | b4ee9ba5999778450f8eb4006df89110617b4a10 /Libraries/LibGUI/GTreeView.h | |
parent | 2d39da5405a4527e91e853ddb1e56a539c96c6c1 (diff) | |
download | serenity-c5bd9d4ed1d80ac91d46146565127b0c185f1b43.zip |
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
Diffstat (limited to 'Libraries/LibGUI/GTreeView.h')
-rw-r--r-- | Libraries/LibGUI/GTreeView.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Libraries/LibGUI/GTreeView.h b/Libraries/LibGUI/GTreeView.h index 69e0ee5d39..b30e40a39e 100644 --- a/Libraries/LibGUI/GTreeView.h +++ b/Libraries/LibGUI/GTreeView.h @@ -28,26 +28,28 @@ #include <LibGUI/GAbstractTableView.h> -class GTreeView : public GAbstractTableView { - C_OBJECT(GTreeView) +namespace GUI { + +class TreeView : public AbstractTableView { + C_OBJECT(TreeView) public: - virtual ~GTreeView() override; + virtual ~TreeView() override; - virtual void scroll_into_view(const GModelIndex&, Orientation); + virtual void scroll_into_view(const ModelIndex&, Orientation); virtual int item_count() const override; protected: - explicit GTreeView(GWidget*); + explicit TreeView(Widget*); - virtual void paint_event(GPaintEvent&) override; - virtual void doubleclick_event(GMouseEvent&) override; - virtual void keydown_event(GKeyEvent&) override; + virtual void paint_event(PaintEvent&) override; + virtual void doubleclick_event(MouseEvent&) override; + virtual void keydown_event(KeyEvent&) override; virtual void did_update_selection() override; virtual void did_update_model() override; private: - virtual GModelIndex index_at_event_position(const Point&, bool& is_toggle) const override; + virtual ModelIndex index_at_event_position(const Point&, bool& is_toggle) const override; int item_height() const { return 16; } int max_item_width() const { return frame_inner_rect().width(); } @@ -56,7 +58,7 @@ private: int icon_spacing() const { return 2; } int toggle_size() const { return 9; } int text_padding() const { return 2; } - virtual void toggle_index(const GModelIndex&) override; + virtual void toggle_index(const ModelIndex&) override; virtual void update_column_sizes() override; template<typename Callback> @@ -64,10 +66,12 @@ private: struct MetadataForIndex; - MetadataForIndex& ensure_metadata_for_index(const GModelIndex&) const; + MetadataForIndex& ensure_metadata_for_index(const ModelIndex&) const; mutable HashMap<void*, NonnullOwnPtr<MetadataForIndex>> m_view_metadata; RefPtr<GraphicsBitmap> m_expand_bitmap; RefPtr<GraphicsBitmap> m_collapse_bitmap; }; + +} |