Seafood/mainwindow.h
author John Kern <johnk@symbian.org>
Wed, 12 May 2010 09:44:30 -0700
changeset 17 cad8819de653
parent 14 a16afe3df8c9
permissions -rwxr-xr-x
adding preliminary code; very much a work in progress; it is too difficult to work on the file system any longer
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     1
#ifndef MAINWINDOW_H
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     2
#define MAINWINDOW_H
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     4
#include <QMainWindow>
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     5
10
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
     6
class Fishes;
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
     7
class QStackedWidget;
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     8
class QTabWidget;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
     9
class QListWidget;
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    10
class QWebView;
10
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    11
class QSqlQueryModel;
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    12
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    13
namespace Ui {
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    14
    class MainWindow;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    15
}
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    16
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    17
class MainWindow : public QMainWindow {
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    18
    Q_OBJECT
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
public:
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    20
    explicit MainWindow(QWidget *parent = 0);
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    21
    ~MainWindow();
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    22
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    23
    enum {EListPage = 0,
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    24
          EEcoPage,
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    25
          ENutritionPage};
10
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    26
    enum ListIndex {EBestList =0, EOkList, EWorstList};
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    27
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    28
    void createMenus();
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    29
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    30
public slots:
14
a16afe3df8c9 get nutrition information from db
John Kern <johnk@symbian.org>
parents: 10
diff changeset
    31
    QString currentlySelectedItem();
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    32
    void displayVersion();
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    33
    void displayEcoDetails();
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    34
    void displayList();
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    35
    void displayNutrition();
10
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    36
    void setCurrentList(int l);
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    37
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    38
protected:
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    39
    void changeEvent(QEvent *e);
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    40
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    41
private:
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    42
    Ui::MainWindow *ui;
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    43
    QStackedWidget *stackedWidget;
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    44
    QTabWidget *tabWidget;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    45
    QListWidget *bestList;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    46
    QListWidget *okList;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    47
    QListWidget *worstList;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    48
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    49
    QWebView *ecoDetails;
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    50
10
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    51
    QSqlQueryModel *model;
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    52
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    53
    ListIndex index; // which list is currently displayed in tab widget
79eeacfd15ff implement eco details with webview
User@User-PC.domain_not_set.invalid
parents: 7
diff changeset
    54
    Fishes *fishDb;
7
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    55
    QAction *ecoAction;
John Kern <johnk@symbian.org>
parents: 3
diff changeset
    56
    QAction *fishesAction;
3
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    57
    QAction *nuAction;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    58
    QAction *verAction;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    59
    QAction *exitAction;
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    60
};
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    61
e6d1a78b6db9 wip - start of an example for my forthcoming presentation
John Kern <johnk@symbian.org>
parents:
diff changeset
    62
#endif // MAINWINDOW_H