change orange color
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
ChatItem::ChatItem() {}
|
||||
|
||||
ChatItem::ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations)
|
||||
ChatItem::ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool notarize)
|
||||
{
|
||||
_timestamp = timestamp;
|
||||
_address = address;
|
||||
@@ -17,9 +17,10 @@ ChatItem::ChatItem(long timestamp, QString address, QString contact, QString mem
|
||||
_txid = txid;
|
||||
_confirmations = confirmations;
|
||||
_outgoing = false;
|
||||
_notarize = notarize;
|
||||
}
|
||||
|
||||
ChatItem::ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool outgoing)
|
||||
ChatItem::ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool outgoing, bool notarize)
|
||||
{
|
||||
_timestamp = timestamp;
|
||||
_address = address;
|
||||
@@ -31,6 +32,7 @@ ChatItem::ChatItem(long timestamp, QString address, QString contact, QString mem
|
||||
_txid = txid;
|
||||
_confirmations = confirmations;
|
||||
_outgoing = outgoing;
|
||||
_notarize = notarize;
|
||||
}
|
||||
|
||||
long ChatItem::getTimestamp()
|
||||
@@ -81,6 +83,11 @@ bool ChatItem::isOutgoing()
|
||||
return _outgoing;
|
||||
}
|
||||
|
||||
bool ChatItem::isNotarized()
|
||||
{
|
||||
return _notarize;
|
||||
}
|
||||
|
||||
void ChatItem::setTimestamp(long timestamp)
|
||||
{
|
||||
_timestamp = timestamp;
|
||||
@@ -128,6 +135,10 @@ void ChatItem::toggleOutgo()
|
||||
{
|
||||
_outgoing = true;
|
||||
}
|
||||
void ChatItem::notarized()
|
||||
{
|
||||
_notarize = false;
|
||||
}
|
||||
|
||||
|
||||
QString ChatItem::toChatLine()
|
||||
@@ -136,14 +147,25 @@ QString ChatItem::toChatLine()
|
||||
QString lock;
|
||||
myDateTime.setTime_t(_timestamp);
|
||||
|
||||
if (_confirmations == 0){
|
||||
if (_notarize == true)
|
||||
|
||||
{
|
||||
|
||||
lock = "<b> <img src=':/icons/res/lock_orange.png'><b>";
|
||||
|
||||
}else{
|
||||
|
||||
lock = "<b> <img src=':/icons/res/unlocked.png'><b>";
|
||||
}else{
|
||||
}
|
||||
if ((_confirmations > 0) && (_notarize == false))
|
||||
|
||||
{
|
||||
|
||||
lock = "<b> <img src=':/icons/res/lock_green.png'><b>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
qDebug()<<_notarize;
|
||||
QString line = QString("<small>") + myDateTime.toString("dd.MM.yyyy hh:mm");
|
||||
line += QString(lock) + QString("</small>");
|
||||
line += QString("<p>") + _memo.toHtmlEscaped() + QString("</p>");
|
||||
|
||||
@@ -20,11 +20,12 @@ class ChatItem
|
||||
QString _txid;
|
||||
int _confirmations;
|
||||
bool _outgoing = false;
|
||||
bool _notarize = false;
|
||||
|
||||
public:
|
||||
ChatItem();
|
||||
ChatItem(long timestamp, QString address, QString contact, QString memo,QString requestZaddr, QString type, QString cid, QString txid, int confirmations);
|
||||
ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool outgoing);
|
||||
ChatItem(long timestamp, QString address, QString contact, QString memo,QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool notarize);
|
||||
ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, int confirmations, bool outgoing, bool notarize);
|
||||
long getTimestamp();
|
||||
QString getAddress();
|
||||
QString getContact();
|
||||
@@ -35,6 +36,7 @@ class ChatItem
|
||||
QString getTxid();
|
||||
int getConfirmations();
|
||||
bool isOutgoing();
|
||||
bool isNotarized();
|
||||
void setTimestamp(long timestamp);
|
||||
void setAddress(QString address);
|
||||
void setContact(QString contact);
|
||||
@@ -45,6 +47,7 @@ class ChatItem
|
||||
void setTxid(QString txid);
|
||||
void setConfirmations(int confirmations);
|
||||
void toggleOutgo();
|
||||
void notarized();
|
||||
QString toChatLine();
|
||||
json toJson();
|
||||
~ChatItem();
|
||||
|
||||
Reference in New Issue
Block a user