add options dialog, spawn dialogs at the right place
This commit is contained in:
parent
af94377667
commit
8812ce7b27
5 changed files with 58 additions and 7 deletions
|
@ -8,6 +8,8 @@
|
||||||
#include "AddressBookDialog.h"
|
#include "AddressBookDialog.h"
|
||||||
#include "SettingsDialog.h"
|
#include "SettingsDialog.h"
|
||||||
#include "SendCoinsDialog.h"
|
#include "SendCoinsDialog.h"
|
||||||
|
#include "OptionsDialog.h"
|
||||||
|
#include "AboutDialog.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
@ -166,34 +168,54 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
|
||||||
connect(options, SIGNAL(triggered()), this, SLOT(optionsClicked()));
|
connect(options, SIGNAL(triggered()), this, SLOT(optionsClicked()));
|
||||||
connect(button_new, SIGNAL(triggered()), this, SLOT(newAddressClicked()));
|
connect(button_new, SIGNAL(triggered()), this, SLOT(newAddressClicked()));
|
||||||
connect(button_clipboard, SIGNAL(triggered()), this, SLOT(copyClipboardClicked()));
|
connect(button_clipboard, SIGNAL(triggered()), this, SLOT(copyClipboardClicked()));
|
||||||
|
connect(about, SIGNAL(triggered()), this, SLOT(aboutClicked()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::sendcoinsClicked()
|
void BitcoinGUI::sendcoinsClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "Send coins clicked";
|
qDebug() << "Send coins clicked";
|
||||||
|
SendCoinsDialog dlg;
|
||||||
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::addressbookClicked()
|
void BitcoinGUI::addressbookClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "Address book clicked";
|
qDebug() << "Address book clicked";
|
||||||
}
|
AddressBookDialog dlg;
|
||||||
|
/* TODO: Set tab to "Sending" */
|
||||||
void BitcoinGUI::optionsClicked()
|
dlg.exec();
|
||||||
{
|
|
||||||
qDebug() << "Options clicked";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::receivingAddressesClicked()
|
void BitcoinGUI::receivingAddressesClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "Receiving addresses clicked";
|
qDebug() << "Receiving addresses clicked";
|
||||||
|
AddressBookDialog dlg;
|
||||||
|
/* TODO: Set tab to "Receiving" */
|
||||||
|
dlg.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BitcoinGUI::optionsClicked()
|
||||||
|
{
|
||||||
|
qDebug() << "Options clicked";
|
||||||
|
OptionsDialog dlg;
|
||||||
|
dlg.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BitcoinGUI::aboutClicked()
|
||||||
|
{
|
||||||
|
qDebug() << "About clicked";
|
||||||
|
AboutDialog dlg;
|
||||||
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::newAddressClicked()
|
void BitcoinGUI::newAddressClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "New address clicked";
|
qDebug() << "New address clicked";
|
||||||
|
/* TODO: generate new address */
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::copyClipboardClicked()
|
void BitcoinGUI::copyClipboardClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "Copy to clipboard";
|
qDebug() << "Copy to clipboard";
|
||||||
|
/* TODO: copy to clipboard */
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ private slots:
|
||||||
void addressbookClicked();
|
void addressbookClicked();
|
||||||
void optionsClicked();
|
void optionsClicked();
|
||||||
void receivingAddressesClicked();
|
void receivingAddressesClicked();
|
||||||
|
void aboutClicked();
|
||||||
|
|
||||||
void newAddressClicked();
|
void newAddressClicked();
|
||||||
void copyClipboardClicked();
|
void copyClipboardClicked();
|
||||||
};
|
};
|
||||||
|
|
7
OptionsDialog.cpp
Normal file
7
OptionsDialog.cpp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "OptionsDialog.h"
|
||||||
|
/* TODO example: http://doc.trolltech.com/4.7/dialogs-configdialog-configdialog-cpp.html */
|
||||||
|
|
||||||
|
OptionsDialog::OptionsDialog(QWidget *parent) :
|
||||||
|
QDialog(parent)
|
||||||
|
{
|
||||||
|
}
|
18
OptionsDialog.h
Normal file
18
OptionsDialog.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef OPTIONSDIALOG_H
|
||||||
|
#define OPTIONSDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
class OptionsDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit OptionsDialog(QWidget *parent = 0);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // OPTIONSDIALOG_H
|
|
@ -14,14 +14,16 @@ HEADERS += BitcoinGUI.h \
|
||||||
SettingsDialog.h \
|
SettingsDialog.h \
|
||||||
AddressBookDialog.h \
|
AddressBookDialog.h \
|
||||||
AboutDialog.h \
|
AboutDialog.h \
|
||||||
AddressTableModel.h
|
AddressTableModel.h \
|
||||||
|
OptionsDialog.h
|
||||||
SOURCES += bitcoin.cpp BitcoinGUI.cpp \
|
SOURCES += bitcoin.cpp BitcoinGUI.cpp \
|
||||||
TransactionTableModel.cpp \
|
TransactionTableModel.cpp \
|
||||||
SendCoinsDialog.cpp \
|
SendCoinsDialog.cpp \
|
||||||
SettingsDialog.cpp \
|
SettingsDialog.cpp \
|
||||||
AddressBookDialog.cpp \
|
AddressBookDialog.cpp \
|
||||||
AboutDialog.cpp \
|
AboutDialog.cpp \
|
||||||
AddressTableModel.cpp
|
AddressTableModel.cpp \
|
||||||
|
OptionsDialog.cpp
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
bitcoin.qrc
|
bitcoin.qrc
|
||||||
|
|
Loading…
Reference in a new issue