Changeset bda4629 in confclerk_git


Ignore:
Timestamp:
01/21/17 23:22:39 (5 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
5fc5d13
Parents:
7ea396f
git-author:
Philipp Spitzer <philipp@…> (01/21/17 23:19:49)
git-committer:
Philipp Spitzer <philipp@…> (01/21/17 23:22:39)
Message:

Added back-cycling option in Event::cycleFavourite.

Location:
src/mvc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    r7ea396f rbda4629  
    212212}
    213213
    214 void Event::cycleFavourite() {
     214void Event::cycleFavourite(bool back) {
    215215    switch (favourite()) {
    216         case Favourite_no: setFavourite(Favourite_strong); break;
    217         case Favourite_strong: setFavourite(Favourite_weak); break;
    218         case Favourite_weak: setFavourite(Favourite_no); break;
     216        case Favourite_no: setFavourite(back ? Favourite_weak : Favourite_strong); break;
     217        case Favourite_strong: setFavourite(back ? Favourite_no : Favourite_weak); break;
     218        case Favourite_weak: setFavourite(back ? Favourite_strong : Favourite_no); break;
    219219    }
    220220}
  • src/mvc/event.h

    r7ea396f rbda4629  
    8787    void setLanguage(const QString & language) { setValue("language", language); }
    8888    void setFavourite(Favourite favourite) { setValue("favourite", (int) favourite); }
    89     void cycleFavourite();
     89    void cycleFavourite(bool back = false);
    9090    void setHasAlarm(bool alarm) { setValue("alarm", (int)((alarm))); }
    9191    void setTag(const QString& tag) { setValue("tag", tag); }
Note: See TracChangeset for help on using the changeset viewer.