finally fixed layout. Bloody Qt

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5769 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-03 14:30:04 +00:00
parent b616b2cabd
commit 1762c7a842
2 changed files with 89 additions and 69 deletions

View File

@ -48,12 +48,12 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
ui.okButton->setEnabled(false); ui.okButton->setEnabled(false);
QVBoxLayout *hbox = new QVBoxLayout(ui.shareflags_GB) ; QHBoxLayout *hbox = new QHBoxLayout(ui.shareflags_GB) ;
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(groupflagsbox) ;
hbox->addWidget(groupselectionbox) ; hbox->addWidget(groupselectionbox) ;
ui.shareflags_GB->setLayout(hbox) ; ui.shareflags_GB->setLayout(hbox) ;
@ -75,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;
@ -103,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())

View File

@ -35,6 +35,9 @@
<property name="lineWidth"> <property name="lineWidth">
<number>1</number> <number>1</number>
</property> </property>
<zorder>groupBox</zorder>
<zorder>frame_2</zorder>
<zorder>groupBox</zorder>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@ -45,17 +48,14 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="topMargin"> <item>
<number>6</number>
</property>
<item row="0" column="0" colspan="6">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>Share Folder</string> <string>Share Folder</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item row="0" column="0"> <item>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
@ -108,67 +108,87 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0">
<widget class="QGroupBox" name="shareflags_GB">
<property name="title">
<string>Share Flags</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout"/>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item>
<widget class="QPushButton" name="okButton"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="minimumSize"> <item>
<size> <widget class="QGroupBox" name="shareflags_GB">
<width>0</width> <property name="title">
<height>0</height> <string>Share Flags</string>
</size> </property>
</property> </widget>
<property name="maximumSize"> </item>
<size> <item>
<width>200</width> <spacer name="horizontalSpacer">
<height>200</height> <property name="orientation">
</size> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="text"> <property name="sizeHint" stdset="0">
<string>OK</string> <size>
</property> <width>40</width>
<property name="iconSize"> <height>20</height>
<size> </size>
<width>16</width> </property>
<height>16</height> </spacer>
</size> </item>
</property> </layout>
<property name="checkable">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="1" column="3"> <item>
<spacer> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="orientation"> <item>
<enum>Qt::Horizontal</enum> <widget class="QPushButton" name="okButton">
</property> <property name="minimumSize">
<property name="sizeHint" stdset="0"> <size>
<size> <width>0</width>
<width>191</width> <height>0</height>
<height>20</height> </size>
</size> </property>
</property> <property name="maximumSize">
</spacer> <size>
</item> <width>200</width>
<item row="1" column="2"> <height>200</height>
<widget class="QPushButton" name="closeButton"> </size>
<property name="text"> </property>
<string>Cancel</string> <property name="text">
</property> <string>OK</string>
</widget> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>191</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>