mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-01 02:46:20 -05:00
GUI modifications to incorporate RecognTags.
- Enable EditDialog for own Ids. - Addition, parsing and removal of Tags in IdEditDialog. - Display of Tags (only text) in GxsId Label/Chooser/TreewidgetItem .. TODO: - Add icon sets for RecognTags. - display of Tags as Icons. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs_finale@6855 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc58861447
commit
2ce92da8ad
@ -473,8 +473,7 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||||||
mStateHelper->setWidgetEnabled(ui.pushButton_Reputation, false);
|
mStateHelper->setWidgetEnabled(ui.pushButton_Reputation, false);
|
||||||
// No Delete Ids yet!
|
// No Delete Ids yet!
|
||||||
mStateHelper->setWidgetEnabled(ui.pushButton_Delete, /*true*/ false);
|
mStateHelper->setWidgetEnabled(ui.pushButton_Delete, /*true*/ false);
|
||||||
// No Editing Ids yet!
|
mStateHelper->setWidgetEnabled(ui.pushButton_EditId, true);
|
||||||
mStateHelper->setWidgetEnabled(ui.pushButton_EditId, /*true*/ false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -61,10 +61,19 @@ IdEditDialog::IdEditDialog(QWidget *parent)
|
|||||||
/* Connect signals */
|
/* Connect signals */
|
||||||
connect(ui.radioButton_GpgId, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
|
connect(ui.radioButton_GpgId, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
|
||||||
connect(ui.radioButton_Pseudo, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
|
connect(ui.radioButton_Pseudo, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
|
||||||
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(updateId()));
|
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(submit()));
|
||||||
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
|
|
||||||
|
connect(ui.plainTextEdit_Tag, SIGNAL(textChanged()), this, SLOT(checkNewTag()));
|
||||||
|
connect(ui.pushButton_Tag, SIGNAL(clicked(bool)), this, SLOT(addRecognTag()));
|
||||||
|
connect(ui.toolButton_Tag1, SIGNAL(clicked(bool)), this, SLOT(rmTag1()));
|
||||||
|
connect(ui.toolButton_Tag2, SIGNAL(clicked(bool)), this, SLOT(rmTag2()));
|
||||||
|
connect(ui.toolButton_Tag3, SIGNAL(clicked(bool)), this, SLOT(rmTag3()));
|
||||||
|
connect(ui.toolButton_Tag4, SIGNAL(clicked(bool)), this, SLOT(rmTag4()));
|
||||||
|
connect(ui.toolButton_Tag5, SIGNAL(clicked(bool)), this, SLOT(rmTag5()));
|
||||||
|
|
||||||
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||||
|
ui.pushButton_Tag->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdEditDialog::setupNewId(bool pseudo)
|
void IdEditDialog::setupNewId(bool pseudo)
|
||||||
@ -89,6 +98,10 @@ void IdEditDialog::setupNewId(bool pseudo)
|
|||||||
|
|
||||||
// force - incase it wasn't triggered.
|
// force - incase it wasn't triggered.
|
||||||
idTypeToggled(true);
|
idTypeToggled(true);
|
||||||
|
|
||||||
|
ui.frame_Tags->setHidden(true);
|
||||||
|
ui.radioButton_GpgId->setEnabled(true);
|
||||||
|
ui.radioButton_Pseudo->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdEditDialog::idTypeToggled(bool checked)
|
void IdEditDialog::idTypeToggled(bool checked)
|
||||||
@ -144,7 +157,6 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
mStateHelper->setLoading(IDEDITDIALOG_LOADID, false);
|
mStateHelper->setLoading(IDEDITDIALOG_LOADID, false);
|
||||||
|
|
||||||
/* get details from libretroshare */
|
/* get details from libretroshare */
|
||||||
RsGxsIdGroup data;
|
|
||||||
std::vector<RsGxsIdGroup> datavector;
|
std::vector<RsGxsIdGroup> datavector;
|
||||||
if (!rsIdentity->getGroupData(token, datavector))
|
if (!rsIdentity->getGroupData(token, datavector))
|
||||||
{
|
{
|
||||||
@ -166,9 +178,9 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = datavector[0];
|
mEditGroup = datavector[0];
|
||||||
|
|
||||||
bool realid = (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID);
|
bool realid = (mEditGroup.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID);
|
||||||
|
|
||||||
if (realid)
|
if (realid)
|
||||||
{
|
{
|
||||||
@ -178,25 +190,28 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
{
|
{
|
||||||
ui.radioButton_Pseudo->setChecked(true);
|
ui.radioButton_Pseudo->setChecked(true);
|
||||||
}
|
}
|
||||||
|
// these are not editable for existing Id.
|
||||||
|
ui.radioButton_GpgId->setEnabled(false);
|
||||||
|
ui.radioButton_Pseudo->setEnabled(false);
|
||||||
|
|
||||||
// DOES THIS TRIGGER ALREADY???
|
// DOES THIS TRIGGER ALREADY???
|
||||||
// force - incase it wasn't triggered.
|
// force - incase it wasn't triggered.
|
||||||
idTypeToggled(true);
|
idTypeToggled(true);
|
||||||
|
|
||||||
ui.lineEdit_Nickname->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str()));
|
ui.lineEdit_Nickname->setText(QString::fromUtf8(mEditGroup.mMeta.mGroupName.c_str()));
|
||||||
ui.lineEdit_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId));
|
ui.lineEdit_KeyId->setText(QString::fromStdString(mEditGroup.mMeta.mGroupId));
|
||||||
|
|
||||||
if (realid)
|
if (realid)
|
||||||
{
|
{
|
||||||
ui.lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash));
|
ui.lineEdit_GpgHash->setText(QString::fromStdString(mEditGroup.mPgpIdHash));
|
||||||
|
|
||||||
if (data.mPgpKnown)
|
if (mEditGroup.mPgpKnown)
|
||||||
{
|
{
|
||||||
RsPeerDetails details;
|
RsPeerDetails details;
|
||||||
rsPeers->getGPGDetails(data.mPgpId, details);
|
rsPeers->getGPGDetails(mEditGroup.mPgpId, details);
|
||||||
ui.lineEdit_GpgName->setText(QString::fromUtf8(details.name.c_str()));
|
ui.lineEdit_GpgName->setText(QString::fromUtf8(details.name.c_str()));
|
||||||
|
|
||||||
ui.lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId));
|
ui.lineEdit_GpgId->setText(QString::fromStdString(mEditGroup.mPgpId));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -210,53 +225,209 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
|||||||
ui.lineEdit_GpgId->setText(tr("N/A"));
|
ui.lineEdit_GpgId->setText(tr("N/A"));
|
||||||
ui.lineEdit_GpgName->setText(tr("N/A"));
|
ui.lineEdit_GpgName->setText(tr("N/A"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RecognTags.
|
||||||
|
ui.frame_Tags->setHidden(false);
|
||||||
|
|
||||||
|
loadRecognTags();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdEditDialog::updateId()
|
#define MAX_RECOGN_TAGS 5
|
||||||
|
|
||||||
|
void IdEditDialog::checkNewTag()
|
||||||
{
|
{
|
||||||
RsGxsIdGroup rid;
|
std::string tag = ui.plainTextEdit_Tag->toPlainText().toStdString();
|
||||||
// Must set, Nickname, KeyId(if existing), mIdType, GpgId.
|
std::string id = ui.lineEdit_KeyId->text().toStdString();
|
||||||
|
std::string name = ui.lineEdit_Nickname->text().toUtf8().data();
|
||||||
|
|
||||||
rid.mMeta.mGroupName = ui.lineEdit_Nickname->text().toUtf8().constData();
|
QString desc;
|
||||||
|
bool ok = tagDetails(id, name, tag, desc);
|
||||||
|
ui.label_TagCheck->setText(desc);
|
||||||
|
|
||||||
if (rid.mMeta.mGroupName.size() < 2)
|
if (mEditGroup.mRecognTags.size() >= MAX_RECOGN_TAGS)
|
||||||
{
|
{
|
||||||
std::cerr << "IdEditDialog::updateId() Nickname too short";
|
ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui.pushButton_Tag->setEnabled(ok);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::addRecognTag()
|
||||||
|
{
|
||||||
|
std::string tag = ui.plainTextEdit_Tag->toPlainText().toStdString();
|
||||||
|
if (mEditGroup.mRecognTags.size() >= MAX_RECOGN_TAGS)
|
||||||
|
{
|
||||||
|
std::cerr << "IdEditDialog::addRecognTag() Too many Tags, delete one first";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
mEditGroup.mRecognTags.push_back(tag);
|
||||||
|
loadRecognTags();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag1()
|
||||||
|
{
|
||||||
|
rmTag(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag2()
|
||||||
|
{
|
||||||
|
rmTag(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag3()
|
||||||
|
{
|
||||||
|
rmTag(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag4()
|
||||||
|
{
|
||||||
|
rmTag(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag5()
|
||||||
|
{
|
||||||
|
rmTag(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::rmTag(int idx)
|
||||||
|
{
|
||||||
|
std::list<std::string>::iterator it;
|
||||||
|
int i = 0;
|
||||||
|
for(it = mEditGroup.mRecognTags.begin(); it != mEditGroup.mRecognTags.end() && (idx < i); it++, i++) ;
|
||||||
|
|
||||||
|
if (it != mEditGroup.mRecognTags.end())
|
||||||
|
{
|
||||||
|
mEditGroup.mRecognTags.erase(it);
|
||||||
|
}
|
||||||
|
loadRecognTags();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IdEditDialog::tagDetails(const std::string &id, const std::string &name, const std::string &tag, QString &desc)
|
||||||
|
{
|
||||||
|
if (tag.empty())
|
||||||
|
{
|
||||||
|
desc += "Empty Tag";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* extract details for each tag */
|
||||||
|
RsRecognTagDetails tagDetails;
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
if (rsIdentity->parseRecognTag(id, name, tag, tagDetails))
|
||||||
|
{
|
||||||
|
desc += QString::number(tagDetails.tag_class);
|
||||||
|
desc += ":";
|
||||||
|
desc += QString::number(tagDetails.tag_type);
|
||||||
|
|
||||||
|
if (tagDetails.is_valid)
|
||||||
|
{
|
||||||
|
ok = true;
|
||||||
|
desc += " Valid";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
desc += " Invalid";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tagDetails.is_pending)
|
||||||
|
{
|
||||||
|
ok = true;
|
||||||
|
desc += " Pending";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
desc += "Unparseable";
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void IdEditDialog::loadRecognTags()
|
||||||
|
{
|
||||||
|
std::cerr << "IdEditDialog::loadRecognTags()";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
|
||||||
|
// delete existing items.
|
||||||
|
ui.label_Tag1->setHidden(true);
|
||||||
|
ui.label_Tag2->setHidden(true);
|
||||||
|
ui.label_Tag3->setHidden(true);
|
||||||
|
ui.label_Tag4->setHidden(true);
|
||||||
|
ui.label_Tag5->setHidden(true);
|
||||||
|
ui.toolButton_Tag1->setHidden(true);
|
||||||
|
ui.toolButton_Tag2->setHidden(true);
|
||||||
|
ui.toolButton_Tag3->setHidden(true);
|
||||||
|
ui.toolButton_Tag4->setHidden(true);
|
||||||
|
ui.toolButton_Tag5->setHidden(true);
|
||||||
|
ui.plainTextEdit_Tag->setPlainText("");
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
std::list<std::string>::const_iterator it;
|
||||||
|
for(it = mEditGroup.mRecognTags.begin(); it != mEditGroup.mRecognTags.end(); it++, i++)
|
||||||
|
{
|
||||||
|
QString recognTag;
|
||||||
|
tagDetails(mEditGroup.mMeta.mGroupId, mEditGroup.mMeta.mGroupName, *it, recognTag);
|
||||||
|
|
||||||
|
switch(i)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 0:
|
||||||
|
ui.label_Tag1->setText(recognTag);
|
||||||
|
ui.label_Tag1->setHidden(false);
|
||||||
|
ui.toolButton_Tag1->setHidden(false);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ui.label_Tag2->setText(recognTag);
|
||||||
|
ui.label_Tag2->setHidden(false);
|
||||||
|
ui.toolButton_Tag2->setHidden(false);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ui.label_Tag3->setText(recognTag);
|
||||||
|
ui.label_Tag3->setHidden(false);
|
||||||
|
ui.toolButton_Tag3->setHidden(false);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ui.label_Tag4->setText(recognTag);
|
||||||
|
ui.label_Tag4->setHidden(false);
|
||||||
|
ui.toolButton_Tag4->setHidden(false);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ui.label_Tag5->setText(recognTag);
|
||||||
|
ui.label_Tag5->setHidden(false);
|
||||||
|
ui.toolButton_Tag5->setHidden(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::submit()
|
||||||
|
{
|
||||||
|
if (mIsNew)
|
||||||
|
{
|
||||||
|
createId();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
updateId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void IdEditDialog::createId()
|
||||||
|
{
|
||||||
|
std::string groupname = ui.lineEdit_Nickname->text().toUtf8().constData();
|
||||||
|
|
||||||
|
if (groupname.size() < 2)
|
||||||
|
{
|
||||||
|
std::cerr << "IdEditDialog::createId() Nickname too short";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//rid.mIdType = RSID_RELATION_YOURSELF;
|
|
||||||
if (mIsNew)
|
|
||||||
{
|
|
||||||
rid.mMeta.mGroupId = "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rid.mMeta.mGroupId = ui.lineEdit_KeyId->text().toStdString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ui.radioButton_GpgId->isChecked())
|
|
||||||
{
|
|
||||||
//rid.mIdType |= RSID_TYPE_REALID;
|
|
||||||
|
|
||||||
//rid.mGpgId = ui.lineEdit_GpgId->text().toStdString();
|
|
||||||
rid.mPgpIdHash = ui.lineEdit_GpgHash->text().toStdString();
|
|
||||||
//rid.mGpgName = ui.lineEdit_GpgName->text().toUtf8().constData();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//rid.mIdType |= RSID_TYPE_PSEUDONYM;
|
|
||||||
|
|
||||||
//rid.mGpgId = "";
|
|
||||||
rid.mPgpIdHash = "";
|
|
||||||
//rid.mGpgName = "";
|
|
||||||
//rid.mGpgEmail = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Can only create Identities for the moment!
|
|
||||||
RsIdentityParameters params;
|
RsIdentityParameters params;
|
||||||
params.nickname = rid.mMeta.mGroupName;
|
params.nickname = groupname;
|
||||||
params.isPgpLinked = (ui.radioButton_GpgId->isChecked());
|
params.isPgpLinked = (ui.radioButton_GpgId->isChecked());
|
||||||
|
|
||||||
uint32_t dummyToken = 0;
|
uint32_t dummyToken = 0;
|
||||||
@ -265,6 +436,30 @@ void IdEditDialog::updateId()
|
|||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void IdEditDialog::updateId()
|
||||||
|
{
|
||||||
|
/* submit updated details */
|
||||||
|
std::string groupname = ui.lineEdit_Nickname->text().toUtf8().constData();
|
||||||
|
|
||||||
|
if (groupname.size() < 2)
|
||||||
|
{
|
||||||
|
std::cerr << "IdEditDialog::updateId() Nickname too short";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mEditGroup.mMeta.mGroupName = groupname;
|
||||||
|
|
||||||
|
uint32_t dummyToken = 0;
|
||||||
|
rsIdentity->updateIdentity(dummyToken, mEditGroup);
|
||||||
|
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void IdEditDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &req)
|
void IdEditDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &req)
|
||||||
{
|
{
|
||||||
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
|
#include <retroshare/rsidentity.h>
|
||||||
|
|
||||||
class UIStateHelper;
|
class UIStateHelper;
|
||||||
|
|
||||||
@ -46,16 +47,33 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void idTypeToggled(bool checked);
|
void idTypeToggled(bool checked);
|
||||||
void updateId();
|
void submit();
|
||||||
|
|
||||||
|
void addRecognTag();
|
||||||
|
void checkNewTag();
|
||||||
|
void rmTag1();
|
||||||
|
void rmTag2();
|
||||||
|
void rmTag3();
|
||||||
|
void rmTag4();
|
||||||
|
void rmTag5();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void createId();
|
||||||
|
void updateId();
|
||||||
void updateIdType(bool pseudo);
|
void updateIdType(bool pseudo);
|
||||||
void loadExistingId(uint32_t token);
|
void loadExistingId(uint32_t token);
|
||||||
|
|
||||||
|
void loadRecognTags();
|
||||||
|
// extract details.
|
||||||
|
bool tagDetails(const std::string &id, const std::string &name, const std::string &tag, QString &desc);
|
||||||
|
void rmTag(int idx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Ui::IdEditDialog ui;
|
Ui::IdEditDialog ui;
|
||||||
bool mIsNew;
|
bool mIsNew;
|
||||||
UIStateHelper *mStateHelper;
|
UIStateHelper *mStateHelper;
|
||||||
|
|
||||||
|
RsGxsIdGroup mEditGroup;
|
||||||
|
|
||||||
TokenQueue *mIdQueue;
|
TokenQueue *mIdQueue;
|
||||||
};
|
};
|
||||||
|
@ -6,147 +6,233 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>557</width>
|
<width>510</width>
|
||||||
<height>179</height>
|
<height>595</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="frameShape">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="frameShadow">
|
||||||
<widget class="QLabel" name="label">
|
<enum>QFrame::Raised</enum>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Nickname</string>
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
</property>
|
<item row="0" column="0" colspan="2">
|
||||||
</widget>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
</item>
|
<item>
|
||||||
<item row="0" column="1">
|
<widget class="QRadioButton" name="radioButton_GpgId">
|
||||||
<widget class="QLineEdit" name="lineEdit_Nickname"/>
|
<property name="text">
|
||||||
</item>
|
<string>PGP Associated ID</string>
|
||||||
<item row="1" column="0">
|
</property>
|
||||||
<widget class="QLabel" name="label_4">
|
</widget>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>Key ID</string>
|
<item>
|
||||||
</property>
|
<widget class="QRadioButton" name="radioButton_Pseudo">
|
||||||
</widget>
|
<property name="text">
|
||||||
</item>
|
<string>Pseudonym</string>
|
||||||
<item row="1" column="1">
|
</property>
|
||||||
<widget class="QLineEdit" name="lineEdit_KeyId">
|
</widget>
|
||||||
<property name="readOnly">
|
</item>
|
||||||
<bool>true</bool>
|
</layout>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="1" column="0">
|
||||||
</item>
|
<widget class="QLabel" name="label">
|
||||||
<item row="2" column="0">
|
<property name="text">
|
||||||
<widget class="QLabel" name="label_2">
|
<string>Nickname</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>PGP Hash</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="1" column="1">
|
||||||
</item>
|
<widget class="QLineEdit" name="lineEdit_Nickname"/>
|
||||||
<item row="2" column="1">
|
</item>
|
||||||
<widget class="QLineEdit" name="lineEdit_GpgHash">
|
<item row="2" column="0">
|
||||||
<property name="readOnly">
|
<widget class="QLabel" name="label_4">
|
||||||
<bool>true</bool>
|
<property name="text">
|
||||||
</property>
|
<string>Key ID</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="3" column="0">
|
</item>
|
||||||
<widget class="QLabel" name="label_6">
|
<item row="2" column="1">
|
||||||
<property name="text">
|
<widget class="QLineEdit" name="lineEdit_KeyId">
|
||||||
<string>PGP Id</string>
|
<property name="readOnly">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="3" column="1">
|
</item>
|
||||||
<widget class="QLineEdit" name="lineEdit_GpgId">
|
<item row="3" column="0">
|
||||||
<property name="readOnly">
|
<widget class="QLabel" name="label_2">
|
||||||
<bool>true</bool>
|
<property name="text">
|
||||||
</property>
|
<string>PGP Hash</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="4" column="0">
|
</item>
|
||||||
<widget class="QLabel" name="label_3">
|
<item row="3" column="1">
|
||||||
<property name="text">
|
<widget class="QLineEdit" name="lineEdit_GpgHash">
|
||||||
<string>PGP Name</string>
|
<property name="readOnly">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="4" column="1">
|
</item>
|
||||||
<widget class="QLineEdit" name="lineEdit_GpgName">
|
<item row="4" column="0">
|
||||||
<property name="readOnly">
|
<widget class="QLabel" name="label_6">
|
||||||
<bool>true</bool>
|
<property name="text">
|
||||||
</property>
|
<string>PGP Id</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="5" column="1">
|
</item>
|
||||||
<spacer name="verticalSpacer_2">
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_GpgId">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>PGP Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_GpgName">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_Tags">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_Tag1">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButton_Tag1">
|
||||||
|
<property name="text">
|
||||||
|
<string>RM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_Tag2">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButton_Tag2">
|
||||||
|
<property name="text">
|
||||||
|
<string>RM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_Tag3">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButton_Tag3">
|
||||||
|
<property name="text">
|
||||||
|
<string>RM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_Tag4">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButton_Tag4">
|
||||||
|
<property name="text">
|
||||||
|
<string>RM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_Tag5">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButton_Tag5">
|
||||||
|
<property name="text">
|
||||||
|
<string>RM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QPlainTextEdit" name="plainTextEdit_Tag"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_TagCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QPushButton" name="pushButton_Tag">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>328</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<item>
|
<property name="standardButtons">
|
||||||
<widget class="QRadioButton" name="radioButton_GpgId">
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>PGP Associated ID</string>
|
</widget>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButton_Pseudo">
|
|
||||||
<property name="text">
|
|
||||||
<string>Pseudonym</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>lineEdit_Nickname</tabstop>
|
|
||||||
<tabstop>lineEdit_KeyId</tabstop>
|
|
||||||
<tabstop>lineEdit_GpgHash</tabstop>
|
|
||||||
<tabstop>lineEdit_GpgId</tabstop>
|
|
||||||
<tabstop>lineEdit_GpgName</tabstop>
|
|
||||||
<tabstop>radioButton_GpgId</tabstop>
|
<tabstop>radioButton_GpgId</tabstop>
|
||||||
<tabstop>radioButton_Pseudo</tabstop>
|
<tabstop>radioButton_Pseudo</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
|
@ -67,6 +67,17 @@ bool GxsIdChooser::MakeIdDesc(const RsGxsId &id, QString &desc)
|
|||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
desc = QString::fromUtf8(details.mNickname.c_str());
|
desc = QString::fromUtf8(details.mNickname.c_str());
|
||||||
|
|
||||||
|
std::list<RsRecognTag>::iterator it;
|
||||||
|
for(it = details.mRecognTags.begin(); it != details.mRecognTags.end(); it++)
|
||||||
|
{
|
||||||
|
desc += " (";
|
||||||
|
desc += QString::number(it->tag_class);
|
||||||
|
desc += ":";
|
||||||
|
desc += QString::number(it->tag_type);
|
||||||
|
desc += ")";
|
||||||
|
}
|
||||||
|
|
||||||
if (details.mPgpLinked)
|
if (details.mPgpLinked)
|
||||||
{
|
{
|
||||||
desc += " (PGP) [";
|
desc += " (PGP) [";
|
||||||
|
@ -71,6 +71,16 @@ static bool MakeIdDesc(const RsGxsId &id, QString &str)
|
|||||||
|
|
||||||
str = QString::fromUtf8(details.mNickname.c_str());
|
str = QString::fromUtf8(details.mNickname.c_str());
|
||||||
|
|
||||||
|
std::list<RsRecognTag>::iterator it;
|
||||||
|
for(it = details.mRecognTags.begin(); it != details.mRecognTags.end(); it++)
|
||||||
|
{
|
||||||
|
str += " (";
|
||||||
|
str += QString::number(it->tag_class);
|
||||||
|
str += ":";
|
||||||
|
str += QString::number(it->tag_type);
|
||||||
|
str += ")";
|
||||||
|
}
|
||||||
|
|
||||||
bool addCode = true;
|
bool addCode = true;
|
||||||
if (details.mPgpLinked)
|
if (details.mPgpLinked)
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,17 @@ static bool MakeIdDesc(const RsGxsId &id, QString &str)
|
|||||||
|
|
||||||
str = QString::fromUtf8(details.mNickname.c_str());
|
str = QString::fromUtf8(details.mNickname.c_str());
|
||||||
|
|
||||||
|
std::list<RsRecognTag>::iterator it;
|
||||||
|
for(it = details.mRecognTags.begin(); it != details.mRecognTags.end(); it++)
|
||||||
|
{
|
||||||
|
str += " (";
|
||||||
|
str += QString::number(it->tag_class);
|
||||||
|
str += ":";
|
||||||
|
str += QString::number(it->tag_type);
|
||||||
|
str += ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool addCode = true;
|
bool addCode = true;
|
||||||
if (details.mPgpLinked)
|
if (details.mPgpLinked)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@ CONFIG += qt gui uic qrc resources uitools idle bitdht
|
|||||||
|
|
||||||
# Below is for GXS services.
|
# Below is for GXS services.
|
||||||
# Should be disabled for releases.
|
# Should be disabled for releases.
|
||||||
#CONFIG += gxs debug
|
CONFIG += gxs debug
|
||||||
|
|
||||||
gxs {
|
gxs {
|
||||||
|
|
||||||
@ -193,7 +193,10 @@ macx {
|
|||||||
|
|
||||||
gxs {
|
gxs {
|
||||||
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
LIBS += -lsqlite3
|
LIBS += ../../../lib/libsqlcipher.a
|
||||||
|
#LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
|
||||||
|
#LIBS += -lsqlite3
|
||||||
|
#LIBS += -lsqlcipher
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user