Changeset 508de33 for src/mvc/room.h


Ignore:
Timestamp:
05/05/10 15:58:23 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
525448c
Parents:
0d995ed
Message:

do not draw showmap button for event is there is no map for its room

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/room.h

    r0d995ed r508de33  
    3636    void setName(const QString & type) { setValue("name", type); }
    3737    // TODO: make naming consistent - either "picture" or "map"
    38      QVariant map() const { return value("picture"); }
     38    QVariant map() const { return value("picture"); }
     39    bool hasMap() const
     40    {
     41        // empty strings also treasted as NULL,
     42        // as storing NULLs requires rewrite of storing code and DB scheme
     43        return !isNull("picture") and !value("picture").toString().isEmpty();
     44    }
    3945    int insert();
    4046public:
Note: See TracChangeset for help on using the changeset viewer.