Changeset e6ab8a2 in confclerk_git for src/mvc


Ignore:
Timestamp:
07/04/11 23:42:02 (12 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
526128c
Parents:
8dd3dd2
Message:

Removed the ability to show "pictures" (maps) of rooms and maps of conferences.
The XML file does not contain picture/map/image information of conferences or rooms.
We left the room.picture definition in the database SQL because there is no "drop column"
in sqlite.

Location:
src/mvc
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/conference.cpp

    r8dd3dd2 re6ab8a2  
    3434    << QSqlField("active", QVariant::Bool)
    3535    << QSqlField("url", QVariant::String)
    36     << QSqlField("map", QVariant::String)
    3736    );
    3837
  • src/mvc/conference.h

    r8dd3dd2 re6ab8a2  
    5252    bool isActive() const { return value("active").toBool(); }
    5353    QString url() const { return stringFromNullable(value("url")); }
    54     QString map() const { return stringFromNullable(value("map")); }
    5554
    5655    #if 0
  • src/mvc/delegate.cpp

    r8dd3dd2 re6ab8a2  
    150150            mControls[AlarmControlOff]->paint(painter, option.rect);
    151151#endif
    152         if (event->room()->hasMap())
    153             mControls[MapControl]->paint(painter, option.rect);
    154152        if(event->hasTimeConflict())
    155153            mControls[WarningControl]->paint(painter, option.rect);
     
    376374    mControls.insert(AlarmControlOff,
    377375                    new Control(AlarmControlOff, QString(":icons/appointment-soon-off.png"), mControls[FavouriteControlOff]));
    378 
    379     // MAP ICON
    380     mControls.insert(MapControl,
    381                     new Control(MapControl, QString(":icons/applications-internet.png"), mControls[AlarmControlOn]));
    382 #else
    383     // MAP ICON
    384     mControls.insert(MapControl,
    385                     new Control(MapControl, QString(":icons/applications-internet.png"), mControls[FavouriteControlOn]));
    386376#endif
    387377
    388378    // WARNING ICON
    389379    mControls.insert(WarningControl,
    390                     new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[MapControl]));
     380                    new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[FavouriteControlOn]));
    391381}
    392382
  • src/mvc/delegate.h

    r8dd3dd2 re6ab8a2  
    3838            AlarmControlOn,
    3939            AlarmControlOff,
    40             MapControl,
    4140            WarningControl
    4241        };
  • src/mvc/room.cpp

    r8dd3dd2 re6ab8a2  
    2222
    2323QString const Room::sTableName = QString("room");
    24 int const Room::sTableColCount = 3;
     24int const Room::sTableColCount = 2;
    2525const QString Room::NAME = "name";
    2626
    2727QSqlRecord const Room::sColumns = Room::toRecord(QList<QSqlField>()
    2828    << QSqlField("id", QVariant::Int)
    29     << QSqlField(NAME, QVariant::String)
    30     << QSqlField("picture", QVariant::String));
     29    << QSqlField(NAME, QVariant::String));
    3130
    3231Room Room::retrieveByName(QString name)
  • src/mvc/room.h

    r8dd3dd2 re6ab8a2  
    3636    QString name() const { return value("name").toString(); }
    3737    void setName(const QString & type) { setValue("name", type); }
    38     // TODO: make naming consistent - either "picture" or "map"
    39     QVariant map() const { return value("picture"); }
    40     bool hasMap() const
    41     {
    42         // empty strings also treasted as NULL,
    43         // as storing NULLs requires rewrite of storing code and DB scheme
    44         return !isNull("picture") and !value("picture").toString().isEmpty();
    45     }
    4638    int insert();
    4739public:
  • src/mvc/treeview.cpp

    r8dd3dd2 re6ab8a2  
    126126            }
    127127            break;
    128         case Delegate::MapControl:
    129             {
    130                 // handle Alarm Control clicked
    131                 emit(requestForMap(aIndex));
    132                 handled = true;
    133             }
    134         break;
    135128        case Delegate::WarningControl:
    136129        {
  • src/mvc/treeview.h

    r8dd3dd2 re6ab8a2  
    3737    void handleItemClicked(const QModelIndex &index);
    3838signals:
    39     void requestForMap(const QModelIndex &aIndex);
    4039    void requestForConflicts(const QModelIndex &aIndex);
    4140    void eventHasChanged(int aEventId, bool aReloadModel = false); // emited when user changes some event details, eg. sets it Favourite
Note: See TracChangeset for help on using the changeset viewer.