mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
tried to fix gui layout
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5768 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ccd08df35d
commit
b616b2cabd
@ -48,16 +48,15 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
|
|||||||
|
|
||||||
ui.okButton->setEnabled(false);
|
ui.okButton->setEnabled(false);
|
||||||
|
|
||||||
QHBoxLayout *hbox = new QHBoxLayout ;
|
QVBoxLayout *hbox = new QVBoxLayout(ui.shareflags_GB) ;
|
||||||
ui.shareflags_GB->setLayout(hbox) ;
|
|
||||||
|
|
||||||
groupselectionbox = new GroupSelectionBox(ui.shareflags_GB) ;
|
groupselectionbox = new GroupSelectionBox(ui.shareflags_GB);
|
||||||
groupflagsbox = new GroupFlagsWidget(ui.shareflags_GB) ;
|
// groupflagsbox = new GroupFlagsWidget(ui.shareflags_GB) ;
|
||||||
|
|
||||||
|
// hbox->addWidget(groupflagsbox) ;
|
||||||
hbox->addWidget(groupselectionbox) ;
|
hbox->addWidget(groupselectionbox) ;
|
||||||
hbox->addWidget(groupflagsbox) ;
|
|
||||||
|
|
||||||
update() ;
|
ui.shareflags_GB->setLayout(hbox) ;
|
||||||
|
|
||||||
if (!filename.empty())
|
if (!filename.empty())
|
||||||
{
|
{
|
||||||
@ -76,7 +75,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
|
|||||||
ui.browseButton->setDisabled(true);
|
ui.browseButton->setDisabled(true);
|
||||||
ui.virtualpath_lineEdit->setText(QString::fromUtf8(it->virtualname.c_str()));
|
ui.virtualpath_lineEdit->setText(QString::fromUtf8(it->virtualname.c_str()));
|
||||||
|
|
||||||
groupflagsbox->setFlags(it->shareflags) ;
|
// groupflagsbox->setFlags(it->shareflags) ;
|
||||||
groupselectionbox->setSelectedGroups(it->parent_groups) ;
|
groupselectionbox->setSelectedGroups(it->parent_groups) ;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -104,7 +103,7 @@ void ShareDialog::addDirectory()
|
|||||||
SharedDirInfo sdi ;
|
SharedDirInfo sdi ;
|
||||||
sdi.filename = ui.localpath_lineEdit->text().toUtf8().constData();
|
sdi.filename = ui.localpath_lineEdit->text().toUtf8().constData();
|
||||||
sdi.virtualname = ui.virtualpath_lineEdit->text().toUtf8().constData();
|
sdi.virtualname = ui.virtualpath_lineEdit->text().toUtf8().constData();
|
||||||
sdi.shareflags = groupflagsbox->flags() ;
|
// sdi.shareflags = groupflagsbox->flags() ;
|
||||||
sdi.parent_groups = groupselectionbox->selectedGroups() ;
|
sdi.parent_groups = groupselectionbox->selectedGroups() ;
|
||||||
|
|
||||||
if (ui.localpath_lineEdit->isEnabled())
|
if (ui.localpath_lineEdit->isEnabled())
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Share Flags</string>
|
<string>Share Flags</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5"/>
|
<layout class="QVBoxLayout" name="verticalLayout"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QWidget>
|
#include <QFrame>
|
||||||
#include <retroshare/rsflags.h>
|
#include <retroshare/rsflags.h>
|
||||||
|
|
||||||
class GroupFlagsWidget: public QWidget
|
class GroupFlagsWidget: public QWidget
|
||||||
|
@ -13,6 +13,7 @@ GroupSelectionBox::GroupSelectionBox(QWidget *parent)
|
|||||||
|
|
||||||
for(std::list<RsGroupInfo>::const_iterator it(lst.begin());it!=lst.end();++it)
|
for(std::list<RsGroupInfo>::const_iterator it(lst.begin());it!=lst.end();++it)
|
||||||
addItem(QString::fromStdString(it->id)) ;
|
addItem(QString::fromStdString(it->id)) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<std::string> GroupSelectionBox::selectedGroups() const
|
std::list<std::string> GroupSelectionBox::selectedGroups() const
|
||||||
|
Loading…
Reference in New Issue
Block a user