logsui/logsapp/src/logscomponentrepository.cpp
changeset 25 76a2435edfd4
parent 24 0ba2181d7c28
equal deleted inserted replaced
24:0ba2181d7c28 25:76a2435edfd4
    19 #include "logsrecentcallsview.h"
    19 #include "logsrecentcallsview.h"
    20 #include "logsmatchesview.h"
    20 #include "logsmatchesview.h"
    21 #include "logsdetailsview.h"
    21 #include "logsdetailsview.h"
    22 #include "logslogger.h"
    22 #include "logslogger.h"
    23 #include "logsmodel.h"
    23 #include "logsmodel.h"
       
    24 #include "logsabstractviewmanager.h"
    24 
    25 
    25 //SYSTEM
    26 //SYSTEM
    26 #include <QObject>
    27 #include <QObject>
    27 #include <dialpad.h>
    28 #include <dialpad.h>
       
    29 #include <dialpadkeyhandler.h>
    28 #include <hbtoolbar.h>
    30 #include <hbtoolbar.h>
    29 
    31 
    30 // -----------------------------------------------------------------------------
    32 // -----------------------------------------------------------------------------
    31 // 
    33 // 
    32 // -----------------------------------------------------------------------------
    34 // -----------------------------------------------------------------------------
    35     : HbDocumentLoader(),
    37     : HbDocumentLoader(),
    36       mViewManager(viewManager),
    38       mViewManager(viewManager),
    37       mRecentCallsView(0),
    39       mRecentCallsView(0),
    38       mDetailsView(0),
    40       mDetailsView(0),
    39       mMatchesView(0),
    41       mMatchesView(0),
    40       mDialpad(0)
    42       mDialpad(0),
       
    43       mDialpadKeyHandler(0)
    41 {
    44 {
    42     mModel = new LogsModel();
    45     mModel = new LogsModel();
    43 }
    46 }
    44 // -----------------------------------------------------------------------------
    47 // -----------------------------------------------------------------------------
    45 // 
    48 // 
    50     LOGS_QDEBUG( "logs [UI] -> LogsComponentRepository::~LogsComponentRepository()" );
    53     LOGS_QDEBUG( "logs [UI] -> LogsComponentRepository::~LogsComponentRepository()" );
    51 
    54 
    52     mRecentViewComponents.clear();
    55     mRecentViewComponents.clear();
    53     mDetailsViewComponents.clear();
    56     mDetailsViewComponents.clear();
    54     mMatchesViewComponents.clear();
    57     mMatchesViewComponents.clear();
       
    58     delete mDialpadKeyHandler;
    55     delete mDialpad;
    59     delete mDialpad;
    56     delete mModel;
    60     delete mModel;
    57     
    61     
    58     LOGS_QDEBUG( "logs [UI] <- LogsComponentRepository::~LogsComponentRepository()" );
    62     LOGS_QDEBUG( "logs [UI] <- LogsComponentRepository::~LogsComponentRepository()" );
    59 }
    63 }
   157 // -----------------------------------------------------------------------------
   161 // -----------------------------------------------------------------------------
   158 //
   162 //
   159 Dialpad* LogsComponentRepository::dialpad()
   163 Dialpad* LogsComponentRepository::dialpad()
   160 {
   164 {
   161     if ( !mDialpad ) {
   165     if ( !mDialpad ) {
   162         mDialpad = new Dialpad;
   166         mDialpad = new Dialpad(mViewManager.mainWindow());
       
   167         mDialpadKeyHandler = 
       
   168             new DialpadKeyHandler(mDialpad, mViewManager.mainWindow());
   163     }
   169     }
   164     return mDialpad;
   170     return mDialpad;
   165 }
   171 }
   166 
   172 
   167 // -----------------------------------------------------------------------------
   173 // -----------------------------------------------------------------------------