equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include "btabstractdelegate.h" |
19 #include "btabstractdelegate.h" |
|
20 #include "btqtconstants.h" |
|
21 |
20 #include <btsettingmodel.h> |
22 #include <btsettingmodel.h> |
21 #include <btdevicemodel.h> |
23 #include <btdevicemodel.h> |
22 |
24 |
23 /*! |
25 /*! |
24 Constructor. |
26 Constructor. |
49 void BtAbstractDelegate::cancel() |
51 void BtAbstractDelegate::cancel() |
50 { |
52 { |
51 |
53 |
52 } |
54 } |
53 |
55 |
|
56 bool BtAbstractDelegate::isBtPowerOn() |
|
57 { |
|
58 QModelIndex powerIndex = getSettingModel()->index(BtSettingModel::PowerStateRow, 0); |
|
59 PowerStateQtValue powerState = (PowerStateQtValue)getSettingModel()->data(powerIndex, BtSettingModel::SettingValueRole).toInt(); |
|
60 |
|
61 return (BtPowerOn == powerState); |
|
62 } |
|
63 |
|
64 |
|
65 |