~azzar1/unity/fix-1028810

« back to all changes in this revision

Viewing changes to dash/LensView.h

  • Committer: Andrea Azzarone
  • Date: 2012-08-22 13:14:18 UTC
  • mfrom: (2516.1.92 unity)
  • Revision ID: azzaronea@gmail.com-20120822131418-mrfwx82k39xnvl9e
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "FilterBar.h"
34
34
#include "unity-shared/Introspectable.h"
35
35
#include "PlacesGroup.h"
36
 
#include "PlacesVScrollBar.h"
37
36
#include "ResultViewGrid.h"
38
37
#include "unity-shared/UBusWrapper.h"
 
38
#include "unity-shared/PlacesVScrollBar.h"
39
39
 
40
40
namespace unity
41
41
{
42
42
namespace dash
43
43
{
 
44
 
44
45
class LensScrollView;
45
 
 
46
46
class LensView : public nux::View, public unity::debug::Introspectable
47
47
{
48
48
  NUX_DECLARE_OBJECT_TYPE(LensView, nux::View);
69
69
  nux::Property<bool> can_refine_search;
70
70
 
71
71
  sigc::signal<void, std::string const&> uri_activated;
 
72
  sigc::signal<void, std::string const&, std::string const&> uri_preview_activated;
72
73
 
73
74
  void PerformSearch(std::string const& search_query);
74
75
  void CheckNoResults(Lens::Hints const& hints);
81
82
  void SetupFilters();
82
83
 
83
84
  void OnCategoryAdded(Category const& category);
 
85
  void OnCategoryOrderChanged();
84
86
  void OnResultAdded(Result const& result);
85
87
  void OnResultRemoved(Result const& result);
86
88
  void UpdateCounts(PlacesGroup* group);
91
93
  void OnViewTypeChanged(ViewType view_type);
92
94
  void QueueFixRenderering();
93
95
  bool FixRenderering();
 
96
  bool ReinitializeFilterModels();
 
97
 
 
98
  static void GetFilterForCategoryIndex(unsigned index, DeeFilter* filter);
 
99
 
 
100
  void BuildPreview(std::string const& uri, Preview::Ptr model);
94
101
 
95
102
  virtual void Draw(nux::GraphicsEngine& gfx_context, bool force_draw);
96
103
  virtual void DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw);
97
 
 
 
104
  
98
105
  virtual bool AcceptKeyNavFocus();
99
106
  virtual std::string GetName() const;
100
107
  virtual void AddProperties(GVariantBuilder* builder);
101
108
 
102
109
  std::string get_search_string() const;
103
110
 
104
 
private:
105
111
  Lens::Ptr lens_;
106
112
  CategoryGroups categories_;
107
113
  ResultCounts counts_;
119
125
 
120
126
  UBusManager ubus_manager_;
121
127
  glib::Source::UniquePtr fix_rendering_idle_;
 
128
  int last_good_filter_model_;
 
129
  glib::Source::UniquePtr fix_filter_models_idle_;
122
130
};
123
131
 
124
132