2011-05-08 22:23:31 +02:00
|
|
|
#ifndef ADDRESSBOOKDIALOG_H
|
|
|
|
#define ADDRESSBOOKDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
2011-05-12 14:44:52 +02:00
|
|
|
namespace Ui {
|
|
|
|
class AddressBookDialog;
|
|
|
|
}
|
2011-05-13 15:58:27 +02:00
|
|
|
class AddressTableModel;
|
2011-05-12 14:44:52 +02:00
|
|
|
|
2011-05-13 22:00:27 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QTableView;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2011-05-08 22:23:31 +02:00
|
|
|
class AddressBookDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2011-05-12 14:44:52 +02:00
|
|
|
|
2011-05-08 22:23:31 +02:00
|
|
|
public:
|
|
|
|
explicit AddressBookDialog(QWidget *parent = 0);
|
2011-05-12 14:44:52 +02:00
|
|
|
~AddressBookDialog();
|
2011-05-08 22:23:31 +02:00
|
|
|
|
2011-05-12 14:44:52 +02:00
|
|
|
enum {
|
|
|
|
SendingTab = 0,
|
|
|
|
ReceivingTab = 1
|
|
|
|
} Tabs;
|
2011-05-08 22:23:31 +02:00
|
|
|
|
2011-05-13 15:58:27 +02:00
|
|
|
void setModel(AddressTableModel *model);
|
2011-05-12 14:44:52 +02:00
|
|
|
void setTab(int tab);
|
2011-05-13 22:00:27 +02:00
|
|
|
const QString &getReturnValue() const { return returnValue; }
|
2011-05-12 14:44:52 +02:00
|
|
|
private:
|
|
|
|
Ui::AddressBookDialog *ui;
|
2011-05-13 15:58:27 +02:00
|
|
|
AddressTableModel *model;
|
2011-05-13 22:00:27 +02:00
|
|
|
QString returnValue;
|
|
|
|
|
|
|
|
QTableView *getCurrentTable();
|
2011-05-12 17:55:24 +02:00
|
|
|
|
|
|
|
private slots:
|
2011-05-13 22:00:27 +02:00
|
|
|
void on_buttonBox_accepted();
|
|
|
|
void on_deleteButton_clicked();
|
|
|
|
void on_tabWidget_currentChanged(int index);
|
2011-05-12 17:55:24 +02:00
|
|
|
void on_newAddressButton_clicked();
|
|
|
|
void on_editButton_clicked();
|
|
|
|
void on_copyToClipboard_clicked();
|
2011-05-08 22:23:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADDRESSBOOKDIALOG_H
|