예제 #1
0
void WExpandedValuableItem::buildExpanderUIEvent()
{
    appendDescriptionTab();
    appendTagsTab < ui::tag::TTagContainer <hacc::model::CValuable, hacc::model::CValuables> >();

    QSqlQuery q = HACC_DB->query("select description, image from valuables where id=?",
                                 QVariantList() << hacc::model::CValuable::id());
    if(HACC_QUERY_DATA_AVIALABLE(q))
    {
        //! \todo Добавить действие, если запрос не вернет данных
        setMoreData(HACC_DB_2_STRG(q, 0), q.value(1));
    }
}
예제 #2
0
파일: Item.cpp 프로젝트: ruphy/kfunambol
/**
* Creates a new Item object.
*
* @param target item target - NULL ALLOWED
* @param source item source - NULL ALLOWED
* @param meta item meta data - NULL ALLOWED
* @param data item data - NULL ALLOWED
*
*/
Item::Item( Target* target,
            Source* source,
            Meta*   meta  ,
            ComplexData* data,
            bool moreData) {
    initialize();
    setTarget(target);
    setSource(source);
    setTargetParent(NULL);
    setSourceParent(NULL);
    setMeta(meta);
    setData(data);
    setMoreData(moreData);

}
예제 #3
0
void WExpandedThingItem::thingUpdated()
{
    QSqlQuery q = HACC_DB->query("select name, icon_id, description, image from things where id=?",
                                 QVariantList() << hacc::model::CThing::id());
    if(HACC_QUERY_DATA_AVIALABLE(q))
    {
        //! \todo Добавить действие, если запрос не вернет данных
        setThingData(HACC_DB_2_DBID(q, 1), HACC_DB_2_STRG(q, 0));
        if(expanded())
        {
            setMoreData(HACC_DB_2_STRG(q, 2), q.value(3));
        }
        updateGeometry();
    }
}