Skip to content

Commit 3f126ce

Browse files
committed
dashboard inherit from correct abstract class now + uri dialog fix in send screen.
1 parent f44878d commit 3f126ce

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

src/qt/pivx/dashboardwidget.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333
#include "moc_dashboardwidget.cpp"
3434

3535
DashboardWidget::DashboardWidget(PIVXGUI* _window, QWidget *parent) :
36-
QWidget(parent),
37-
ui(new Ui::DashboardWidget),
38-
window(_window)
36+
PWidget(_window, parent),
37+
ui(new Ui::DashboardWidget)
3938
{
4039
ui->setupUi(this);
4140

@@ -276,12 +275,15 @@ void DashboardWidget::changeChartColors(){
276275
*/
277276
}
278277

279-
void DashboardWidget::setWalletModel(WalletModel* model){
280-
walletModel = model;
281-
if (model && model->getOptionsModel()) {
282-
txModel = model->getTransactionTableModel();
278+
void DashboardWidget::loadWalletModel(){
279+
if (walletModel && walletModel->getOptionsModel()) {
280+
txModel = walletModel->getTransactionTableModel();
283281
// Set up transaction list
284282
filter = new TransactionFilterProxy();
283+
filter->setDynamicSortFilter(true);
284+
filter->setSortCaseSensitivity(Qt::CaseInsensitive);
285+
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
286+
285287
filter->setSourceModel(txModel);
286288
filter->sort(TransactionTableModel::Date, Qt::DescendingOrder);
287289
txHolder->setFilter(filter);
@@ -301,7 +303,7 @@ void DashboardWidget::setWalletModel(WalletModel* model){
301303
}
302304

303305
void DashboardWidget::openFAQ(){
304-
window->showHide(true);
306+
showHideOp(true);
305307
SettingsFaqWidget* dialog = new SettingsFaqWidget(window);
306308
openDialogWithOpaqueBackgroundFullScreen(dialog, window);
307309
}

src/qt/pivx/dashboardwidget.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef DASHBOARDWIDGET_H
22
#define DASHBOARDWIDGET_H
33

4+
#include "qt/pivx/pwidget.h"
45
#include "qt/pivx/furabstractlistitemdelegate.h"
56
#include "qt/pivx/furlistrow.h"
67
#include "transactiontablemodel.h"
@@ -45,15 +46,15 @@ QT_BEGIN_NAMESPACE
4546
class QModelIndex;
4647
QT_END_NAMESPACE
4748

48-
class DashboardWidget : public QWidget
49+
class DashboardWidget : public PWidget
4950
{
5051
Q_OBJECT
5152

5253
public:
5354
explicit DashboardWidget(PIVXGUI* _window, QWidget *parent = nullptr);
5455
~DashboardWidget();
5556

56-
void setWalletModel(WalletModel *model);
57+
void loadWalletModel() override ;
5758
void loadChart();
5859
private slots:
5960
void handleTransactionClicked(const QModelIndex &index);
@@ -67,13 +68,10 @@ private slots:
6768
void openFAQ();
6869
private:
6970
Ui::DashboardWidget *ui;
70-
PIVXGUI* window;
7171
// Painter delegate
7272
FurAbstractListItemDelegate* txViewDelegate;
7373
TransactionFilterProxy* filter;
7474
TxViewHolder* txHolder;
75-
// Model
76-
WalletModel* walletModel;
7775
TransactionTableModel* txModel;
7876
int nDisplayUnit = -1;
7977

src/qt/pivx/navmenuwidget.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <QFile>
44
#include "qt/pivx/PIVXGUI.h"
55
#include "qt/pivx/qtutils.h"
6+
#include "clientversion.h"
67

78
NavMenuWidget::NavMenuWidget(PIVXGUI *mainWindow, QWidget *parent) :
89
QWidget(parent),
@@ -18,7 +19,7 @@ NavMenuWidget::NavMenuWidget(PIVXGUI *mainWindow, QWidget *parent) :
1819
ui->imgLogo->setProperty("cssClass", "img-nav-logo");
1920

2021
// App version
21-
ui->labelVersion->setText("v 1.0.0");
22+
ui->labelVersion->setText("v 4.0.0");//QString(tr("v %1")).arg(QString::fromStdString(FormatFullVersion())));
2223
ui->labelVersion->setProperty("cssClass", "text-title-white");
2324

2425
// Buttons

src/qt/pivx/send.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ void SendWidget::onChangeAddressClicked(){
558558

559559
void SendWidget::onOpenUriClicked(){
560560
showHideOp(true);
561-
OpenURIDialog *dlg = new OpenURIDialog(this);
561+
OpenURIDialog *dlg = new OpenURIDialog(window);
562562
if (openDialogWithOpaqueBackgroundY(dlg, window, 3, 5)) {
563563
emit receivedURI(dlg->getURI());
564564
}

0 commit comments

Comments
 (0)