bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicesearchdialogwidget.h
changeset 47 9e2a905b887f
parent 42 b72428996822
child 57 5ebadcda06cb
equal deleted inserted replaced
45:b0aebde9b1fb 47:9e2a905b887f
    28 #include <qstandarditemmodel.h>
    28 #include <qstandarditemmodel.h>
    29 #include <hbradiobuttonlist.h>
    29 #include <hbradiobuttonlist.h>
    30 #include <hblistwidget.h>
    30 #include <hblistwidget.h>
    31 #include <hblabel.h>
    31 #include <hblabel.h>
    32 #include <hbaction.h>
    32 #include <hbaction.h>
       
    33 #include <hbselectiondialog.h>
       
    34 #include "btdevicedialogutils.h"
    33 
    35 
    34 
    36 
    35 struct device
    37 
       
    38 /*struct device
    36     {
    39     {
    37     QString mDeviceName;
    40     QString mDeviceName;
    38     QString mDeviceType;
    41     QString mDeviceType;
    39     int     mDeviceIdx;
    42     int     mDeviceIdx;
    40     };
    43     };*/
    41 
    44 
    42 
    45 
    43 class BTDeviceSearchDialogWidget : public QObject,
    46 class BTDeviceSearchDialogWidget : public QObject,
    44                                 public HbDeviceDialogInterface
    47                                 public HbDeviceDialogInterface
    45     {
    48     {
    65     void selectionDialogClosed(HbAction *action);
    68     void selectionDialogClosed(HbAction *action);
    66     void searchDialogClosed(); 
    69     void searchDialogClosed(); 
    67     
    70     
    68 private:
    71 private:
    69     bool constructDialog(const QVariantMap &parameters);
    72     bool constructDialog(const QVariantMap &parameters);
    70     void hideEvent(QHideEvent *event);
    73     
    71     void showEvent(QShowEvent *event);
    74 private:
    72     void appendToDeviceList(const QString deviceName);
    75     enum devTypeSelectionList {
    73     bool appendToDeviceTypeList(const QString deviceType);
    76         BtUiDevAudioDevice = 0,
    74     QIcon icon();
    77         BtUiDevComputer,
       
    78         BtUiDevInputDevice,
       
    79         BtUiDevPhone,
       
    80         BtUiDevOtherDevice
       
    81     };    
    75     
    82     
    76 signals:
    83 signals:
    77     void deviceDialogClosed();
    84     void deviceDialogClosed();
    78     void deviceDialogData(QVariantMap  data);
    85     void deviceDialogData(QVariantMap  data);
    79     
    86     
    84      * 
    91      * 
    85      * item model for content list view.
    92      * item model for content list view.
    86      */
    93      */
    87     
    94     
    88     QStandardItemModel* mContentItemModel;
    95     QStandardItemModel* mContentItemModel;
    89     HbDialog*           mViewByDialog;
    96     
    90     HbRadioButtonList*  mRbl;
    97     HbSelectionDialog *mQuery;
    91     QList<QString>      mDeviceTypeList;
    98 //    QList<QString>      mDeviceTypeList;
    92     QList<device>       mDeviceList;
    99     QStringList mDevTypeList;
       
   100 //    QList<device>       mDeviceList;
    93     HbListView*         mListView;
   101     HbListView*         mListView;
    94     HbLabel*            mSearchLabel; 
   102     HbLabel*            mSearchLabel; 
    95     HbLabel*            mSearchIconLabel;
   103     HbLabel*            mSearchIconLabel;
    96     HbLabel*            mSearchDoneLabel;
   104     HbLabel*            mSearchDoneLabel;
    97     bool                mViewByChosen;
   105 //    bool                mViewByChosen;
    98     QList<device>       mDeviceLstOfType;
   106 //    QList<device>       mDeviceLstOfType;
    99     int                 mDeviceLstIdx;
   107 //    int                 mDeviceLstIdx;
   100     int                 mSelectedType;
   108     int                 mSelectedDeviceType;
   101     int                 mDeviceDialogData;
   109 //    int                 mDeviceDialogData;
   102     HbDialog *mSearchDevicesDialog;
   110     HbDialog *mSearchDevicesDialog;
   103     HbAction *mStopRetryAction;
   111     HbAction *mStopRetryAction;
   104     HbAction *mViewByAction;
   112     HbAction *mShowAction;
       
   113     HbAction *mCancelAction;
   105 
   114 
   106     int mStopRetryFlag;
   115     int mStopRetryFlag;
       
   116     
       
   117     BtSendDataSource mData;
       
   118     BtSendDataSource mSelectedData;
   107     
   119     
   108     Q_DISABLE_COPY(BTDeviceSearchDialogWidget)
   120     Q_DISABLE_COPY(BTDeviceSearchDialogWidget)
   109     };
   121     };
   110 
   122 
   111 #endif /* BTDEVICESEARCHDIALOGWIDGET_H */
   123 #endif /* BTDEVICESEARCHDIALOGWIDGET_H */