From b616b2cabd3d39f1e0711957f25b2202a5d64b89 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 3 Nov 2012 14:15:03 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/ShareDialog.cpp | 15 +++++++-------- retroshare-gui/src/gui/ShareDialog.ui | 2 +- retroshare-gui/src/gui/common/GroupFlagsWidget.h | 2 +- .../src/gui/common/GroupSelectionBox.cpp | 1 + 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/retroshare-gui/src/gui/ShareDialog.cpp b/retroshare-gui/src/gui/ShareDialog.cpp index 3ab34823b..c3b13a580 100644 --- a/retroshare-gui/src/gui/ShareDialog.cpp +++ b/retroshare-gui/src/gui/ShareDialog.cpp @@ -48,16 +48,15 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags ui.okButton->setEnabled(false); - QHBoxLayout *hbox = new QHBoxLayout ; - ui.shareflags_GB->setLayout(hbox) ; + QVBoxLayout *hbox = new QVBoxLayout(ui.shareflags_GB) ; - groupselectionbox = new GroupSelectionBox(ui.shareflags_GB) ; - groupflagsbox = new GroupFlagsWidget(ui.shareflags_GB) ; + groupselectionbox = new GroupSelectionBox(ui.shareflags_GB); +// groupflagsbox = new GroupFlagsWidget(ui.shareflags_GB) ; +// hbox->addWidget(groupflagsbox) ; hbox->addWidget(groupselectionbox) ; - hbox->addWidget(groupflagsbox) ; - update() ; + ui.shareflags_GB->setLayout(hbox) ; if (!filename.empty()) { @@ -76,7 +75,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags ui.browseButton->setDisabled(true); ui.virtualpath_lineEdit->setText(QString::fromUtf8(it->virtualname.c_str())); - groupflagsbox->setFlags(it->shareflags) ; + // groupflagsbox->setFlags(it->shareflags) ; groupselectionbox->setSelectedGroups(it->parent_groups) ; break; @@ -104,7 +103,7 @@ void ShareDialog::addDirectory() SharedDirInfo sdi ; sdi.filename = ui.localpath_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() ; if (ui.localpath_lineEdit->isEnabled()) diff --git a/retroshare-gui/src/gui/ShareDialog.ui b/retroshare-gui/src/gui/ShareDialog.ui index 492c8a2f0..73d32109f 100644 --- a/retroshare-gui/src/gui/ShareDialog.ui +++ b/retroshare-gui/src/gui/ShareDialog.ui @@ -113,7 +113,7 @@ Share Flags - + diff --git a/retroshare-gui/src/gui/common/GroupFlagsWidget.h b/retroshare-gui/src/gui/common/GroupFlagsWidget.h index d7d991ca8..df28faf69 100644 --- a/retroshare-gui/src/gui/common/GroupFlagsWidget.h +++ b/retroshare-gui/src/gui/common/GroupFlagsWidget.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include class GroupFlagsWidget: public QWidget diff --git a/retroshare-gui/src/gui/common/GroupSelectionBox.cpp b/retroshare-gui/src/gui/common/GroupSelectionBox.cpp index 443a255eb..a7bcdab8b 100644 --- a/retroshare-gui/src/gui/common/GroupSelectionBox.cpp +++ b/retroshare-gui/src/gui/common/GroupSelectionBox.cpp @@ -13,6 +13,7 @@ GroupSelectionBox::GroupSelectionBox(QWidget *parent) for(std::list::const_iterator it(lst.begin());it!=lst.end();++it) addItem(QString::fromStdString(it->id)) ; + } std::list GroupSelectionBox::selectedGroups() const