summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/qutlook/addressview.h
blob: afb8767117a54bc8ad796213da0486ddfe46ed24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (C) 2015 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef ADDRESSVIEW_H
#define ADDRESSVIEW_H

#include <QWidget>

class AddressBookModel;
QT_BEGIN_NAMESPACE
class QLineEdit;
class QModelIndex;
class QPushButton;
class QTreeView;
QT_END_NAMESPACE

//! [0]
class AddressView : public QWidget
{
    Q_OBJECT

public:
    explicit AddressView(QWidget *parent = nullptr);

protected slots:
    void addEntry();
    void changeEntry();
    void itemSelected(const QModelIndex &index);

    void updateOutlook();

protected:
    AddressBookModel *model;

    QTreeView *m_treeView;
    QPushButton *m_addButton;
    QPushButton *m_changeButton;
    QLineEdit *m_firstName;
    QLineEdit *m_lastName;
    QLineEdit *m_address;
    QLineEdit *m_email;
};
//! [0]

#endif // ADDRESSVIEW_H