equal
deleted
inserted
replaced
38 |
38 |
39 } |
39 } |
40 |
40 |
41 void BtCpUiSettingItem::onLaunchView() |
41 void BtCpUiSettingItem::onLaunchView() |
42 { |
42 { |
43 mModel = new BtuiModel(); |
43 mSettingModel = new BtSettingModel(this); |
|
44 mDeviceModel = new BtDeviceModel(this); |
44 |
45 |
45 mMainWindow = hbInstance->allMainWindows().first(); |
46 mMainWindow = hbInstance->allMainWindows().first(); |
46 |
47 |
47 mBtMainView = new BtCpUiMainView(*mModel); |
48 mBtMainView = new BtCpUiMainView(*mSettingModel, *mDeviceModel); |
48 |
49 |
49 mCpView = mMainWindow->currentView(); |
50 mCpView = mMainWindow->currentView(); |
50 |
51 |
51 mMainWindow->addView(mBtMainView); |
52 mMainWindow->addView(mBtMainView); |
52 mMainWindow->setCurrentView(mBtMainView); |
53 mMainWindow->setCurrentView(mBtMainView); |
57 |
58 |
58 void BtCpUiSettingItem::handleCloseView() |
59 void BtCpUiSettingItem::handleCloseView() |
59 { |
60 { |
60 mBtMainView->deactivateView(); |
61 mBtMainView->deactivateView(); |
61 mMainWindow->setCurrentView(mCpView); |
62 mMainWindow->setCurrentView(mCpView); |
62 delete mBtMainView; |
|
63 delete mModel; |
|
64 } |
63 } |
65 |
64 |
66 |
65 |
67 CpBaseSettingView *BtCpUiSettingItem::createSettingView() const |
66 CpBaseSettingView *BtCpUiSettingItem::createSettingView() const |
68 { |
67 { |