Community driven twister-core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

#ifndef ADDRESSBOOKDIALOG_H
#define ADDRESSBOOKDIALOG_H
#include <QDialog>
namespace Ui {
class AddressBookDialog;
}
class AddressTableModel;
14 years ago
QT_BEGIN_NAMESPACE
class QTableView;
QT_END_NAMESPACE
class AddressBookDialog : public QDialog
{
Q_OBJECT
public:
enum Tabs {
SendingTab = 0,
ReceivingTab = 1
};
enum Mode {
ForSending, // Pick address for sending
ForEditing // Open address book for editing
};
explicit AddressBookDialog(Mode mode, QWidget *parent = 0);
~AddressBookDialog();
void setModel(AddressTableModel *model);
void setTab(int tab);
14 years ago
const QString &getReturnValue() const { return returnValue; }
private:
Ui::AddressBookDialog *ui;
AddressTableModel *model;
14 years ago
QString returnValue;
QTableView *getCurrentTable();
14 years ago
private slots:
14 years ago
void on_buttonBox_accepted();
void on_deleteButton_clicked();
void on_tabWidget_currentChanged(int index);
14 years ago
void on_newAddressButton_clicked();
void on_editButton_clicked();
void on_copyToClipboard_clicked();
};
#endif // ADDRESSBOOKDIALOG_H