logsui/tsrc/logsengineapitester/src/logsengineapitester.cpp
changeset 14 f27aebe284bb
parent 0 4a5361db8937
equal deleted inserted replaced
11:64a47b97e1e1 14:f27aebe284bb
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <QDebug>
    18 #include <QDebug>
    19 #include <HbListView.h>
    19 #include <hblistview.h>
    20 #include <HbMenu.h>
    20 #include <hbmenu.h>
    21 #include <HbAction.h>
    21 #include <hbaction.h>
    22 #include <HbLabel.h>
    22 #include <hblabel.h>
    23 #include <HbMessageBox.h>
    23 #include <hbmessagebox.h>
    24 #include <QGraphicsLinearLayout>
    24 #include <QGraphicsLinearLayout>
    25 #include <logsmodel.h>
    25 #include <logsmodel.h>
    26 #include <logsevent.h>
    26 #include <logsevent.h>
    27 #include <logscustomfilter.h>
    27 #include <logscustomfilter.h>
    28 #include <centralrepository.h>
    28 #include <centralrepository.h>
   206     qDebug() << "LogsApiTest::updateMissedCallsLabel <-";
   206     qDebug() << "LogsApiTest::updateMissedCallsLabel <-";
   207 }
   207 }
   208 
   208 
   209 void TestView::markingCompleted(int err)
   209 void TestView::markingCompleted(int err)
   210 {
   210 {
   211      HbMessageBox box(HbMessageBox::MessageTypeInformation);
   211      HbMessageBox::information( QString("Marking completed, err:%1").arg(err) );
   212      box.setText( QString("Marking completed, err:%1").arg(err) );
       
   213      box.exec();
       
   214 }
   212 }
   215 
   213 
   216 void TestView::clearingCompleted(int err)
   214 void TestView::clearingCompleted(int err)
   217 {
   215 {
   218      HbMessageBox box(HbMessageBox::MessageTypeInformation);
   216     HbMessageBox::information( QString("Clearing completed, err:%1").arg(err) );
   219      box.setText( QString("Clearing completed, err:%1").arg(err) );
       
   220      box.exec();
       
   221 }
   217 }
   222 
   218 
   223 TestModel::TestModel(QAbstractItemModel& logsModel) : mLogsModel(logsModel)
   219 TestModel::TestModel(QAbstractItemModel& logsModel) : mLogsModel(logsModel)
   224 {
   220 {
   225     readEvents();
   221     readEvents();
   235 TestModel::~TestModel()
   231 TestModel::~TestModel()
   236 {
   232 {
   237 }
   233 }
   238 int TestModel::rowCount(const QModelIndex &parent) const
   234 int TestModel::rowCount(const QModelIndex &parent) const
   239 {
   235 {
       
   236     Q_UNUSED(parent);
   240     return mEvents.count();
   237     return mEvents.count();
   241 }
   238 }
   242 QVariant TestModel::data(const QModelIndex &index, int role) const
   239 QVariant TestModel::data(const QModelIndex &index, int role) const
   243 {
   240 {
   244     if ( role == Qt::DisplayRole && index.row() >= 0 && index.row() < mEvents.count() ){
   241     if ( role == Qt::DisplayRole && index.row() >= 0 && index.row() < mEvents.count() ){