PRCYCoin  2.0.0.7rc1
P2P Digital Currency
blockexplorer.h
Go to the documentation of this file.
1 #ifndef BLOCKEXPLORER_H
2 #define BLOCKEXPLORER_H
3 
4 #include <QMainWindow>
5 
6 #include "base58.h"
7 #include "uint256.h"
8 #undef loop
9 
10 namespace Ui
11 {
12 class BlockExplorer;
13 }
14 
15 
16 class CBlockIndex;
17 class CTransaction;
18 class CBlockTreeDB;
19 
20 std::string getexplorerBlockHash(int64_t);
21 const CBlockIndex* getexplorerBlockIndex(int64_t);
22 CTxOut getPrevOut(const COutPoint& out);
23 void getNextIn(const COutPoint* Out, uint256* Hash, unsigned int n);
24 
25 class BlockExplorer : public QMainWindow
26 {
27  Q_OBJECT
28 
29 public:
30  explicit BlockExplorer(QWidget* parent = 0);
32 
33 protected:
34  void keyPressEvent(QKeyEvent* event);
35  void showEvent(QShowEvent*);
36 
37 private Q_SLOTS:
38  void onSearch();
39  void goTo(const QString& query);
40  void back();
41  void forward();
42 
43 private:
44  Ui::BlockExplorer* ui;
47  QStringList m_History;
48 
49  void setBlock(CBlockIndex* pBlock);
50  bool switchTo(const QString& query);
51  void setContent(const std::string& content);
52  void updateNavButtons();
53 };
54 
55 #endif // BLOCKEXPLORER_H
getPrevOut
CTxOut getPrevOut(const COutPoint &out)
Definition: blockexplorer.cpp:154
BlockExplorer::showEvent
void showEvent(QShowEvent *)
Definition: blockexplorer.cpp:408
BlockExplorer::m_NeverShown
bool m_NeverShown
Definition: blockexplorer.h:45
BlockExplorer::forward
void forward()
Definition: blockexplorer.cpp:515
uint256.h
getexplorerBlockIndex
const CBlockIndex * getexplorerBlockIndex(int64_t)
Definition: blockexplorer.cpp:167
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:269
BlockExplorer::~BlockExplorer
~BlockExplorer()
Definition: blockexplorer.cpp:390
BlockExplorer::BlockExplorer
BlockExplorer(QWidget *parent=0)
Definition: blockexplorer.cpp:375
BlockExplorer::m_History
QStringList m_History
Definition: blockexplorer.h:47
CTxOut
An output of a transaction.
Definition: transaction.h:164
BlockExplorer::switchTo
bool switchTo(const QString &query)
Definition: blockexplorer.cpp:428
getexplorerBlockHash
std::string getexplorerBlockHash(int64_t)
Definition: blockexplorer.cpp:174
BlockExplorer::setBlock
void setBlock(CBlockIndex *pBlock)
Definition: blockexplorer.cpp:491
CBlockTreeDB
Access to the block database (blocks/index/)
Definition: txdb.h:74
uint256
256-bit unsigned big integer.
Definition: uint256.h:38
BlockExplorer::setContent
void setContent(const std::string &content)
Definition: blockexplorer.cpp:496
BlockExplorer::back
void back()
Definition: blockexplorer.cpp:504
BlockExplorer::goTo
void goTo(const QString &query)
Definition: blockexplorer.cpp:474
BlockExplorer::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: blockexplorer.cpp:395
BlockExplorer
Definition: blockexplorer.h:25
Ui
Definition: 2faconfirmdialog.h:7
BlockExplorer::onSearch
void onSearch()
Definition: blockexplorer.cpp:486
BlockExplorer::updateNavButtons
void updateNavButtons()
Definition: blockexplorer.cpp:526
base58.h
COutPoint
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:36
Hash
std::string Hash(std::string input)
Compute the 256-bit hash of a std::string.
Definition: hash.h:122
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:162
getNextIn
void getNextIn(const COutPoint *Out, uint256 *Hash, unsigned int n)
BlockExplorer::m_HistoryIndex
int m_HistoryIndex
Definition: blockexplorer.h:46
BlockExplorer::ui
Ui::BlockExplorer * ui
Definition: blockexplorer.h:44