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

View File

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

View File

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

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>826</width> <width>1226</width>
<height>752</height> <height>919</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -19,10 +19,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_7">
<property name="margin">
<number>0</number>
</property>
<item> <item>
<widget class="QFrame" name="titleBarFrame"> <widget class="QFrame" name="titleBarFrame">
<property name="sizePolicy"> <property name="sizePolicy">
@ -86,13 +83,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QPushButton" name="todoPushButton">
<property name="text">
<string>Todo</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QToolButton" name="helpButton"> <widget class="QToolButton" name="helpButton">
<property name="focusPolicy"> <property name="focusPolicy">
@ -210,90 +200,11 @@
</column> </column>
</widget> </widget>
</item> </item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget1">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QFrame" name="headerFrame"> <widget class="StyledElidedLabel" name="headerTextLabel">
<property name="frameShape"> <property name="text">
<enum>QFrame::StyledPanel</enum> <string>People</string>
</property> </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> </widget>
</item> </item>
<item> <item>
@ -449,6 +360,41 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
@ -649,18 +595,63 @@
</item> </item>
</layout> </layout>
</item> </item>
</layout>
</widget>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
<spacer name="verticalSpacer"> <widget class="QGroupBox" name="groupBox_2">
<property name="orientation"> <property name="title">
<enum>Qt::Vertical</enum> <string>Circles</string>
</property> </property>
<property name="sizeHint" stdset="0"> <layout class="QVBoxLayout" name="verticalLayout_4">
<size> <item>
<width>20</width> <widget class="QTreeWidget" name="treeWidget_membership">
<height>40</height> <property name="sortingEnabled">
</size> <bool>true</bool>
</property> </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> </item>
</layout> </layout>
</widget> </widget>
@ -702,16 +693,16 @@
</action> </action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>StyledLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/common/StyledLabel.h</header>
</customwidget> </customwidget>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>RSTreeWidget</class> <class>RSTreeWidget</class>
<extends>QTreeWidget</extends> <extends>QTreeWidget</extends>
@ -724,7 +715,6 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>todoPushButton</tabstop>
<tabstop>idTreeWidget</tabstop> <tabstop>idTreeWidget</tabstop>
<tabstop>lineEdit_Nickname</tabstop> <tabstop>lineEdit_Nickname</tabstop>
<tabstop>lineEdit_KeyId</tabstop> <tabstop>lineEdit_KeyId</tabstop>

View File

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