smileslistmodel.cpp 585 B

1234567891011121314151617181920212223242526272829
  1. #include "smileslistmodel.h"
  2. SmilesListModel::SmilesListModel(QObject *parent) : ListModel(new SmilesItemModel, parent)
  3. {
  4. }
  5. void SmilesListModel::append( SmilesItemModel *item ) {
  6. this->appendRow( item );
  7. /*QString key = item->text();
  8. if( !(key.isEmpty() || key.isNull()) ) {
  9. bufOfSmiles[ item->text() ] = item->picture();
  10. }*/
  11. }
  12. /*void SmilesListModel::remove( int index ) {
  13. this->removeRow( index );
  14. }*/
  15. int SmilesListModel::count() {
  16. return this->rowCount();
  17. }
  18. void SmilesListModel::clearList()
  19. {
  20. this->clear();
  21. //bufOfSmiles.clear();
  22. }