mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-24 17:53:13 -05:00
improved circles GUI logic
This commit is contained in:
parent
9b92f66c61
commit
cba4795911
3 changed files with 54 additions and 16 deletions
|
|
@ -87,6 +87,10 @@ CreateCircleDialog::CreateCircleDialog()
|
|||
QObject::connect(ui.radioButton_ListAllPGP, SIGNAL(toggled(bool)), this, SLOT(updateCircleGUI())) ;
|
||||
QObject::connect(ui.radioButton_ListKnownPGP, SIGNAL(toggled(bool)), this, SLOT(updateCircleGUI())) ;
|
||||
|
||||
QObject::connect(ui.radioButton_Public, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||
QObject::connect(ui.radioButton_Self, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||
QObject::connect(ui.radioButton_Restricted, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||
|
||||
mIsExistingCircle = false;
|
||||
mIsExternalCircle = true;
|
||||
mClearList = true;
|
||||
|
|
@ -135,6 +139,28 @@ void CreateCircleDialog::editNewId(bool isExternal)
|
|||
/* enable stuff that might be locked */
|
||||
}
|
||||
|
||||
void CreateCircleDialog::updateCircleType(bool b)
|
||||
{
|
||||
if(!b)
|
||||
return ; // no need to change when b<-false
|
||||
|
||||
if(ui.radioButton_Self->isChecked())
|
||||
setupForPersonalCircle() ;
|
||||
else
|
||||
setupForExternalCircle() ;
|
||||
|
||||
if(ui.radioButton_Restricted->isChecked())
|
||||
{
|
||||
ui.circleComboBox->setEnabled(true) ;
|
||||
ui.circleComboBox->show() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.circleComboBox->setEnabled(false) ;
|
||||
ui.circleComboBox->hide() ;
|
||||
}
|
||||
}
|
||||
|
||||
void CreateCircleDialog::setupForPersonalCircle()
|
||||
{
|
||||
mIsExternalCircle = false;
|
||||
|
|
@ -143,7 +169,7 @@ void CreateCircleDialog::setupForPersonalCircle()
|
|||
|
||||
ui.groupBox_title->setTitle(tr("Circle Details"));
|
||||
ui.frame_PgpTypes->hide();
|
||||
ui.frame_Distribution->hide();
|
||||
//ui.frame_Distribution->hide();
|
||||
ui.idChooserLabel->hide();
|
||||
ui.idChooser->hide();
|
||||
//ui.toolButton_NewId->hide();
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@ public:
|
|||
void addCircle(const RsGxsCircleDetails &cirDetails);
|
||||
|
||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
|
||||
|
||||
private slots:
|
||||
void addMember();
|
||||
void removeMember();
|
||||
|
||||
void updateCircleType(bool b);
|
||||
void selectedId(QTreeWidgetItem*, QTreeWidgetItem*);
|
||||
void selectedMember(QTreeWidgetItem*, QTreeWidgetItem*);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue