added circle edit functionality to People tab

This commit is contained in:
csoler 2015-09-06 18:19:51 -04:00
parent a1ce7f2d6f
commit 08be890339
5 changed files with 119 additions and 144 deletions

View File

@ -62,8 +62,8 @@ CirclesDialog::CirclesDialog(QWidget *parent)
mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.pushButton_editCircle);
mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.treeWidget_membership, UISTATE_ACTIVE_ENABLED);
mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.treeWidget_friends, UISTATE_ACTIVE_ENABLED);
mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.treeWidget_category, UISTATE_ACTIVE_ENABLED);
// mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.treeWidget_friends, UISTATE_ACTIVE_ENABLED);
// mStateHelper->addWidget(CIRCLESDIALOG_GROUPMETA, ui.treeWidget_category, UISTATE_ACTIVE_ENABLED);
mStateHelper->setWidgetEnabled(ui.pushButton_editCircle, false);
@ -74,8 +74,8 @@ CirclesDialog::CirclesDialog(QWidget *parent)
connect(ui.todoPushButton, SIGNAL(clicked()), this, SLOT(todo()));
connect(ui.treeWidget_membership, SIGNAL(itemSelectionChanged()), this, SLOT(circle_selected()));
connect(ui.treeWidget_friends, SIGNAL(itemSelectionChanged()), this, SLOT(friend_selected()));
connect(ui.treeWidget_category, SIGNAL(itemSelectionChanged()), this, SLOT(category_selected()));
// connect(ui.treeWidget_friends, SIGNAL(itemSelectionChanged()), this, SLOT(friend_selected()));
// connect(ui.treeWidget_category, SIGNAL(itemSelectionChanged()), this, SLOT(category_selected()));
/* Setup TokenQueue */
mCircleQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
@ -84,8 +84,8 @@ CirclesDialog::CirclesDialog(QWidget *parent)
QHeaderView * membership_header = ui.treeWidget_membership->header () ;
membership_header->resizeSection ( CIRCLEGROUP_CIRCLE_COL_GROUPNAME, 200 );
QHeaderView * friends_header = ui.treeWidget_friends->header () ;
friends_header->resizeSection ( CIRCLEGROUP_FRIEND_COL_NAME, 200 );
// QHeaderView * friends_header = ui.treeWidget_friends->header () ;
// friends_header->resizeSection ( CIRCLEGROUP_FRIEND_COL_NAME, 200 );
}
@ -154,6 +154,7 @@ void CirclesDialog::reloadAll()
rsPeers->getGPGAcceptedList(friend_pgpIds);
rsPeers->getGPGAllList(all_pgpIds);
#ifdef SUSPENDED_CODE
/* clear tree */
ui.treeWidget_friends->clear();
@ -198,6 +199,7 @@ void CirclesDialog::reloadAll()
fofItem->addChild(item);
}
}
#endif
}
void set_item_background(QTreeWidgetItem *item, uint32_t type)

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>746</width>
<width>920</width>
<height>568</height>
</rect>
</property>
@ -14,16 +14,7 @@
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -35,16 +26,7 @@
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>

View File

@ -136,7 +136,6 @@ IdDialog::IdDialog(QWidget *parent) :
/* Connect signals */
connect(ui->toolButton_NewId, SIGNAL(clicked()), this, SLOT(addIdentity()));
connect(ui->todoPushButton, SIGNAL(clicked()), this, SLOT(todo()));
connect(ui->removeIdentity, SIGNAL(triggered()), this, SLOT(removeIdentity()));
connect(ui->editIdentity, SIGNAL(triggered()), this, SLOT(editIdentity()));
@ -151,7 +150,9 @@ IdDialog::IdDialog(QWidget *parent) :
connect(ui->messageButton, SIGNAL(clicked()), this, SLOT(sendMsg()));
#ifdef UNFINISHED_CODE
ui->avlabel->setPixmap(QPixmap(":/images/user/friends64.png"));
#endif
ui->headerTextLabel->setText(tr("People"));
/* Initialize splitter */
@ -198,7 +199,7 @@ IdDialog::IdDialog(QWidget *parent) :
// Hiding RepList until that part is finished.
//ui->treeWidget_RepList->setVisible(false);
ui->toolButton_Reputation->setVisible(false);
#ifndef UNFINISHED
#ifdef UNFINISHED_CODE
ui->todoPushButton->hide() ;
#endif
@ -595,7 +596,9 @@ void IdDialog::insertIdDetails(uint32_t token)
#ifdef ID_DEBUG
std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl;
#endif
#ifdef UNFINISHED_CODE
ui->avlabel->setPixmap(pixmap);
#endif
ui->avatarLabel->setPixmap(pixmap);
if (data.mPgpKnown)

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>826</width>
<height>752</height>
<width>1226</width>
<height>919</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,10 +19,7 @@
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="margin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="sizePolicy">
@ -86,13 +83,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="todoPushButton">
<property name="text">
<string>Todo</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="helpButton">
<property name="focusPolicy">
@ -210,92 +200,13 @@
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget1">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QFrame" name="headerFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="horizontalSpacing">
<number>12</number>
</property>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="avlabel">
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="2" colspan="2">
<widget class="StyledElidedLabel" name="headerTextLabel">
<property name="text">
<string>People</string>
</property>
</widget>
</item>
<item row="0" column="3" rowspan="2">
<widget class="QToolButton" name="messageButton">
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolTip">
<string>Send message</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/mail-message-new.png</normaloff>:/images/mail-message-new.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="detailsGroupBox">
<property name="title">
@ -449,6 +360,41 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="messageButton">
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolTip">
<string>Send message</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/mail-message-new.png</normaloff>:/images/mail-message-new.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
@ -649,18 +595,63 @@
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Circles</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTreeWidget" name="treeWidget_membership">
<property name="sortingEnabled">
<bool>true</bool>
</property>
</spacer>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>IDs</string>
</property>
</column>
<item>
<property name="text">
<string>Public Circles</string>
</property>
</item>
<item>
<property name="text">
<string>Personal Circles</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="pushButton_editCircle">
<property name="text">
<string>Edit Circle</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_extCircle">
<property name="text">
<string>Create External Circle</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
@ -702,16 +693,16 @@
</action>
</widget>
<customwidgets>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget>
<class>RSTreeWidget</class>
<extends>QTreeWidget</extends>
@ -724,7 +715,6 @@
</customwidget>
</customwidgets>
<tabstops>
<tabstop>todoPushButton</tabstop>
<tabstop>idTreeWidget</tabstop>
<tabstop>lineEdit_Nickname</tabstop>
<tabstop>lineEdit_KeyId</tabstop>

View File

@ -91,10 +91,8 @@ void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info)
_scene->clear();
_scene->addPixmap(QPixmap::fromImage(image.scaled(ui->graphicsView->width(),ui->graphicsView->height())));
emit imageUpdated();
}//if (_avatar != image)
}//if (!_havePGPDetail)
//}//if (_group_info != gxs_group_info)
}
}
}
void IdentityWidget::updateData(const RsPeerDetails &pgp_details)