source: SMSSender/src/ui/models/loadedaccountmodel.cpp @ 67:578192d6fe64

3.0
Last change on this file since 67:578192d6fe64 was 67:578192d6fe64, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
  • added synchttp
  • backup before removing these diamond interfaces...
File size: 622 bytes
Line 
1/*
2 * loadedaccountmodel.cpp
3 *
4 *  Created on: Feb 1, 2010
5 *      Author: saemy
6 */
7
8#include "loadedaccountmodel.h"
9
10#include "accounttreemodel.h"
11
12bool LoadedAccountModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const {
13    AccountTreeModel* srcModel = static_cast<AccountTreeModel*>(sourceModel());
14    const QModelIndex& idx     = srcModel->index(source_row, 0, source_parent);
15    if (idx.isValid()) {
16        IAccount* account          = srcModel->dataObject(idx);
17
18        return (account != NULL) && account->isInitialized() && account->isEnabled();
19    } else
20        return false;
21}
Note: See TracBrowser for help on using the repository browser.