coincontroldialog.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
  2. #ifndef COINCONTROLDIALOG_H
  3. #define COINCONTROLDIALOG_H
  4. #include <QAbstractButton>
  5. #include <QAction>
  6. #include <QDialog>
  7. #include <QList>
  8. #include <QMenu>
  9. #include <QPoint>
  10. #include <QString>
  11. #include <QTreeWidgetItem>
  12. namespace Ui {
  13. class CoinControlDialog;
  14. }
  15. class WalletModel;
  16. class CCoinControl;
  17. class CoinControlDialog : public QDialog
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit CoinControlDialog(QWidget *parent = 0);
  22. ~CoinControlDialog();
  23. void setModel(WalletModel *model);
  24. // static because also called from sendcoinsdialog
  25. static void updateLabels(WalletModel*, QDialog*);
  26. static QString getPriorityLabel(double);
  27. static QList<qint64> payAmounts;
  28. static CCoinControl *coinControl;
  29. private:
  30. Ui::CoinControlDialog *ui;
  31. WalletModel *model;
  32. int sortColumn;
  33. Qt::SortOrder sortOrder;
  34. QMenu *contextMenu;
  35. QTreeWidgetItem *contextMenuItem;
  36. QAction *copyTransactionHashAction;
  37. QString strPad(QString, int, QString);
  38. void sortView(int, Qt::SortOrder);
  39. void updateView();
  40. enum
  41. {
  42. COLUMN_CHECKBOX,
  43. COLUMN_AMOUNT,
  44. COLUMN_LABEL,
  45. COLUMN_ADDRESS,
  46. COLUMN_DATE,
  47. COLUMN_CONFIRMATIONS,
  48. COLUMN_PRIORITY,
  49. COLUMN_TXHASH,
  50. COLUMN_VOUT_INDEX,
  51. COLUMN_AMOUNT_INT64,
  52. COLUMN_PRIORITY_INT64
  53. };
  54. private slots:
  55. void showMenu(const QPoint &);
  56. void copyAmount();
  57. void copyLabel();
  58. void copyAddress();
  59. void copyTransactionHash();
  60. void clipboardQuantity();
  61. void clipboardAmount();
  62. void clipboardFee();
  63. void clipboardAfterFee();
  64. void clipboardBytes();
  65. void clipboardPriority();
  66. void clipboardLowOutput();
  67. void clipboardChange();
  68. void radioTreeMode(bool);
  69. void radioListMode(bool);
  70. void viewItemChanged(QTreeWidgetItem*, int);
  71. void headerSectionClicked(int);
  72. void buttonBoxClicked(QAbstractButton*);
  73. void buttonSelectAllClicked();
  74. };
  75. #endif // COINCONTROLDIALOG_H