File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -764,6 +764,19 @@ QString NetworkToQString(Network net)
764
764
assert (false );
765
765
}
766
766
767
+ QString ConnectionTypeToQString (ConnectionType conn_type)
768
+ {
769
+ switch (conn_type) {
770
+ case ConnectionType::INBOUND: return QObject::tr (" Inbound" );
771
+ case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr (" Outbound Full Relay" );
772
+ case ConnectionType::BLOCK_RELAY: return QObject::tr (" Outbound Block Relay" );
773
+ case ConnectionType::MANUAL: return QObject::tr (" Outbound Manual" );
774
+ case ConnectionType::FEELER: return QObject::tr (" Outbound Feeler" );
775
+ case ConnectionType::ADDR_FETCH: return QObject::tr (" Outbound Address Fetch" );
776
+ } // no default case, so the compiler can warn about missing cases
777
+ assert (false );
778
+ }
779
+
767
780
QString formatDurationStr (int secs)
768
781
{
769
782
QStringList strList;
Original file line number Diff line number Diff line change 7
7
8
8
#include < amount.h>
9
9
#include < fs.h>
10
+ #include < net.h>
10
11
#include < netaddress.h>
11
12
12
13
#include < QEvent>
13
14
#include < QHeaderView>
14
15
#include < QItemDelegate>
16
+ #include < QLabel>
15
17
#include < QMessageBox>
16
18
#include < QObject>
17
19
#include < QProgressBar>
18
20
#include < QString>
19
21
#include < QTableView>
20
- #include < QLabel>
21
22
22
23
class QValidatedLineEdit ;
23
24
class SendCoinsRecipient ;
@@ -228,6 +229,9 @@ namespace GUIUtil
228
229
/* * Convert enum Network to QString */
229
230
QString NetworkToQString (Network net);
230
231
232
+ /* * Convert enum ConnectionType to QString */
233
+ QString ConnectionTypeToQString (ConnectionType conn_type);
234
+
231
235
/* * Convert seconds into a QString with days, hours, mins, secs */
232
236
QString formatDurationStr (int secs);
233
237
You can’t perform that action at this time.
0 commit comments