contentstorage/caclient/src/caquery.cpp
changeset 104 9b022b1f357c
parent 73 4bc7b118b3df
child 121 0b3699f6c654
equal deleted inserted replaced
103:b99b84bcd2d1 104:9b022b1f357c
   133 {
   133 {
   134     return m_d->parentId();
   134     return m_d->parentId();
   135 }
   135 }
   136 
   136 
   137 /*!
   137 /*!
       
   138  Sets child id.
       
   139  \param id id of the child.
       
   140  */
       
   141 void CaQuery::setChildId(int id)
       
   142 {
       
   143     m_d->setChildId(id);
       
   144 }
       
   145 
       
   146 /*!
       
   147  Returns child id.
       
   148  \retval child id.
       
   149  */
       
   150 int CaQuery::childId() const
       
   151 {
       
   152     return m_d->childId();
       
   153 }
       
   154 
       
   155 /*!
   138  Sets names of entry types.
   156  Sets names of entry types.
   139  \param entryTypeNames list of entry type names (strings).
   157  \param entryTypeNames list of entry type names (strings).
   140  */
   158  */
   141 void CaQuery::setEntryTypeNames(const QStringList &entryTypeNames)
   159 void CaQuery::setEntryTypeNames(const QStringList &entryTypeNames)
   142 {
   160 {
   286  Constructor.
   304  Constructor.
   287  \param queryPublic reference to CaQuery.
   305  \param queryPublic reference to CaQuery.
   288  */
   306  */
   289 CaQueryPrivate::CaQueryPrivate(CaQuery *queryPublic) :
   307 CaQueryPrivate::CaQueryPrivate(CaQuery *queryPublic) :
   290     m_q(queryPublic), mEntryRoles(ItemEntryRole | GroupEntryRole),
   308     m_q(queryPublic), mEntryRoles(ItemEntryRole | GroupEntryRole),
   291     mParentId(0), mEntryTypeNames(), mFlagsOn(), mFlagsOff(),
   309     mParentId(0), mChildId(0), mEntryTypeNames(), mFlagsOn(), mFlagsOff(),
   292     mSortAttribute(DefaultSortAttribute),
   310     mSortAttribute(DefaultSortAttribute),
   293     mSortOrder(Qt::AscendingOrder), mCount(0), mAttributes()
   311     mSortOrder(Qt::AscendingOrder), mCount(0), mAttributes()
   294 {
   312 {
   295 }
   313 }
   296 
   314 
   304     const CaQueryPrivate &queryPrivate)
   322     const CaQueryPrivate &queryPrivate)
   305 {
   323 {
   306     /*m_q is not changed*/
   324     /*m_q is not changed*/
   307     mEntryRoles = queryPrivate.mEntryRoles;
   325     mEntryRoles = queryPrivate.mEntryRoles;
   308     mParentId = queryPrivate.mParentId;
   326     mParentId = queryPrivate.mParentId;
       
   327     mChildId = queryPrivate.mChildId;
   309     mEntryTypeNames = queryPrivate.mEntryTypeNames;
   328     mEntryTypeNames = queryPrivate.mEntryTypeNames;
   310     mFlagsOn = queryPrivate.mFlagsOn;
   329     mFlagsOn = queryPrivate.mFlagsOn;
   311     mFlagsOff = queryPrivate.mFlagsOff;
   330     mFlagsOff = queryPrivate.mFlagsOff;
   312     mSortAttribute = queryPrivate.mSortAttribute;
   331     mSortAttribute = queryPrivate.mSortAttribute;
   313     mSortOrder = queryPrivate.mSortOrder;
   332     mSortOrder = queryPrivate.mSortOrder;
   359 {
   378 {
   360     mParentId = id;
   379     mParentId = id;
   361 }
   380 }
   362 
   381 
   363 /*!
   382 /*!
       
   383  Returns child id.
       
   384  \retval child id.
       
   385  */
       
   386 int CaQueryPrivate::childId() const
       
   387 {
       
   388     return mChildId;
       
   389 }
       
   390 
       
   391 /*!
       
   392  Sets child id.
       
   393  \param id id of the child.
       
   394  */
       
   395 void CaQueryPrivate::setChildId(int id)
       
   396 {
       
   397     mChildId = id;
       
   398 }
       
   399 
       
   400 /*!
   364  Returns a list of entry type names.
   401  Returns a list of entry type names.
   365  \retval list of names of entry types.
   402  \retval list of names of entry types.
   366  */
   403  */
   367 QStringList CaQueryPrivate::entryTypeNames() const
   404 QStringList CaQueryPrivate::entryTypeNames() const
   368 {
   405 {
   506  */
   543  */
   507 void CaQueryPrivate::clear()
   544 void CaQueryPrivate::clear()
   508 {
   545 {
   509     mEntryRoles = ItemEntryRole | GroupEntryRole;
   546     mEntryRoles = ItemEntryRole | GroupEntryRole;
   510     mParentId = 0;
   547     mParentId = 0;
       
   548     mChildId = 0;
   511     mEntryTypeNames = QStringList();
   549     mEntryTypeNames = QStringList();
   512     mFlagsOn = EntryFlags();
   550     mFlagsOn = EntryFlags();
   513     mFlagsOff = EntryFlags();
   551     mFlagsOff = EntryFlags();
   514     mSortAttribute = DefaultSortAttribute;
   552     mSortAttribute = DefaultSortAttribute;
   515     mSortOrder = Qt::AscendingOrder;
   553     mSortOrder = Qt::AscendingOrder;