~ubuntu-branches/ubuntu/saucy/clementine/saucy

« back to all changes in this revision

Viewing changes to src/library/libraryfilterwidget.h

  • Committer: Package Import Robot
  • Author(s): Thomas PIERSON
  • Date: 2012-01-01 20:43:39 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120101204339-lsb6nndwhfy05sde
Tags: 1.0.1+dfsg-1
New upstream release. (Closes: #653926, #651611, #657391)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
  static const int kFilterDelay = 500; // msec
46
46
 
 
47
  enum DelayBehaviour {
 
48
    AlwaysInstant,
 
49
    DelayedOnLargeLibraries,
 
50
    AlwaysDelayed,
 
51
  };
 
52
 
47
53
  void SetFilterHint(const QString& hint);
 
54
  void SetApplyFilterToLibrary(bool filter_applies_to_model) { filter_applies_to_model_ = filter_applies_to_model; }
 
55
  void SetDelayBehaviour(DelayBehaviour behaviour) { delay_behaviour_ = behaviour; }
48
56
  void SetAgeFilterEnabled(bool enabled);
49
57
  void SetGroupByEnabled(bool enabled);
50
58
 
 
59
  QMenu* menu() const { return library_menu_; }
51
60
  void AddMenuAction(QAction* action);
52
61
 
53
62
  void SetSettingsGroup(const QString& group) { settings_group_ = group; }
61
70
  void UpPressed();
62
71
  void DownPressed();
63
72
  void ReturnPressed();
 
73
  void Filter(const QString& text);
64
74
 
65
75
 protected:
66
76
  void keyReleaseEvent(QKeyEvent* e);
87
97
 
88
98
  QTimer* filter_delay_;
89
99
 
 
100
  bool filter_applies_to_model_;
 
101
  DelayBehaviour delay_behaviour_;
 
102
 
90
103
  QString settings_group_;
91
104
 
92
105
  // Since on Mac ui_->filter is nonexistent and on other platforms