qtmobility/examples/sensors/sensor_explorer/explorer.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 5 453da2cfceef
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    42 #ifndef EXPLORER_H
    42 #ifndef EXPLORER_H
    43 #define EXPLORER_H
    43 #define EXPLORER_H
    44 
    44 
    45 #include <QMainWindow>
    45 #include <QMainWindow>
    46 #include <ui_explorer.h>
    46 #include <ui_explorer.h>
       
    47 #include <qsensor.h>
    47 
    48 
    48 class Explorer : public QMainWindow, public Ui::Explorer
    49 QTM_USE_NAMESPACE
       
    50 
       
    51 class Explorer : public QMainWindow, public QSensorFilter
    49 {
    52 {
    50     Q_OBJECT
    53     Q_OBJECT
    51 public:
    54 public:
    52     Explorer(QWidget *parent = 0);
    55     Explorer(QWidget *parent = 0);
    53     ~Explorer();
    56     ~Explorer();
    54 
    57 
       
    58     bool filter(QSensorReading *reading);
       
    59 
    55 private slots:
    60 private slots:
    56     void loadSensors();
    61     void loadSensors();
    57     void loadReading();
    62     void on_sensors_currentItemChanged();
       
    63     void on_sensorprops_itemChanged(QTableWidgetItem *item);
       
    64     void on_start_clicked();
       
    65     void on_stop_clicked();
       
    66     void sensor_changed();
       
    67     void adjustSizes();
       
    68     void loadSensorProperties();
    58 
    69 
    59 private:
    70 private:
    60     void showEvent(QShowEvent *event);
    71     void showEvent(QShowEvent *event);
       
    72     void resizeEvent(QResizeEvent *event);
    61 
    73 
    62     void clearReading();
    74     void clearReading();
    63     void adjustReadingColumns();
    75     void loadReading();
    64     bool eventFilter(QObject *obj, QEvent *event);
    76     void clearSensorProperties();
       
    77     void adjustTableColumns(QTableWidget *table);
       
    78     void resizeSensors();
       
    79 
       
    80     Ui::Explorer ui;
       
    81     QSensor *m_sensor;
       
    82     bool ignoreItemChanged;
    65 };
    83 };
    66 
    84 
    67 #endif
    85 #endif
    68 
    86