mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
added QFrame for can hide Lokal Directories
-fixed not streach last section, stretch root. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@669 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3cdb34ed02
commit
239c29ba6d
3 changed files with 201 additions and 120 deletions
|
@ -64,8 +64,9 @@ SharedFilesDialog::SharedFilesDialog(QWidget *parent)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
connect(ui.checkButton, SIGNAL(clicked()), this, SLOT(forceCheck()));
|
connect(ui.checkButton, SIGNAL(clicked()), this, SLOT(forceCheck()));
|
||||||
|
|
||||||
|
connect(ui.frameButton, SIGNAL(toggled(bool)), this, SLOT(showFrame(bool)));
|
||||||
|
|
||||||
connect( ui.localDirTreeView, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( shareddirtreeWidgetCostumPopupMenu( QPoint ) ) );
|
connect( ui.localDirTreeView, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( shareddirtreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||||
|
|
||||||
|
@ -113,12 +114,19 @@ SharedFilesDialog::SharedFilesDialog(QWidget *parent)
|
||||||
r_header->setResizeMode (0, QHeaderView::Interactive);
|
r_header->setResizeMode (0, QHeaderView::Interactive);
|
||||||
r_header->setResizeMode (1, QHeaderView::Interactive);
|
r_header->setResizeMode (1, QHeaderView::Interactive);
|
||||||
r_header->setResizeMode (2, QHeaderView::Interactive);
|
r_header->setResizeMode (2, QHeaderView::Interactive);
|
||||||
r_header->setResizeMode (3, QHeaderView::Interactive);
|
r_header->setResizeMode (3, QHeaderView::Interactive);
|
||||||
|
|
||||||
|
r_header->setStretchLastSection(false);
|
||||||
|
r_header->setResizeMode(0, QHeaderView::Stretch);
|
||||||
|
|
||||||
r_header->resizeSection ( 0, 210 );
|
r_header->resizeSection ( 0, 210 );
|
||||||
r_header->resizeSection ( 1, 100 );
|
r_header->resizeSection ( 1, 100 );
|
||||||
r_header->resizeSection ( 2, 100 );
|
r_header->resizeSection ( 2, 100 );
|
||||||
r_header->resizeSection ( 3, 100 );
|
r_header->resizeSection ( 3, 100 );
|
||||||
|
|
||||||
|
l_header->setHighlightSections(false);
|
||||||
|
r_header->setHighlightSections(false);
|
||||||
|
|
||||||
|
|
||||||
/* Set Multi Selection */
|
/* Set Multi Selection */
|
||||||
ui.remoteDirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
ui.remoteDirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
|
@ -439,3 +447,20 @@ void SharedFilesDialog::shareddirtreeWidgetCostumPopupMenu( QPoint point )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Toggles the Lokal TreeView on and off, changes toggle button text
|
||||||
|
*/
|
||||||
|
void SharedFilesDialog::showFrame(bool show)
|
||||||
|
{
|
||||||
|
if (show) {
|
||||||
|
ui.frame->setVisible(true);
|
||||||
|
ui.frameButton->setChecked(true);
|
||||||
|
ui.frameButton->setToolTip(tr("Hide Lokal Direrectories"));
|
||||||
|
ui.frameButton->setIcon(QIcon(tr(":images/hide_toolbox_frame.png")));
|
||||||
|
} else {
|
||||||
|
ui.frame->setVisible(false);
|
||||||
|
ui.frameButton->setChecked(false);
|
||||||
|
ui.frameButton->setToolTip(tr("Show Lokal Directories"));
|
||||||
|
ui.frameButton->setIcon(QIcon(tr(":images/show_toolbox_frame.png")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -56,7 +56,10 @@ private slots:
|
||||||
void shareddirtreeWidgetCostumPopupMenu( QPoint point );
|
void shareddirtreeWidgetCostumPopupMenu( QPoint point );
|
||||||
|
|
||||||
void downloadRemoteSelected();
|
void downloadRemoteSelected();
|
||||||
// void addMsgRemoteSelected();
|
// void addMsgRemoteSelected();
|
||||||
|
|
||||||
|
void showFrame(bool show);
|
||||||
|
|
||||||
|
|
||||||
// void recommendfile();
|
// void recommendfile();
|
||||||
void playselectedfiles();
|
void playselectedfiles();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>445</width>
|
<width>548</width>
|
||||||
<height>401</height>
|
<height>401</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -498,143 +498,196 @@
|
||||||
<property name="contextMenuPolicy" >
|
<property name="contextMenuPolicy" >
|
||||||
<enum>Qt::NoContextMenu</enum>
|
<enum>Qt::NoContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" name="gridLayout_2" >
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" colspan="2" >
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="spacing" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<property name="margin" >
|
||||||
<layout class="QGridLayout" >
|
<number>0</number>
|
||||||
<property name="margin" >
|
</property>
|
||||||
<number>0</number>
|
<property name="spacing" >
|
||||||
</property>
|
<number>6</number>
|
||||||
<property name="spacing" >
|
</property>
|
||||||
<number>6</number>
|
<item row="0" column="0" >
|
||||||
</property>
|
<widget class="QLabel" name="label" >
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QLabel" name="label" >
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap" >
|
|
||||||
<pixmap resource="images.qrc" >:/images/fileshare16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QLabel" name="label_2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Files</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0" >
|
|
||||||
<size>
|
|
||||||
<width>271</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="checkButton" >
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>check files</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap" >
|
||||||
|
<pixmap resource="images.qrc" >:/images/fileshare16.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" >
|
||||||
<widget class="QLabel" name="hashLabel" >
|
<widget class="QLabel" name="label_2" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Files</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="splitter" >
|
<spacer>
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QTreeView" name="localDirTreeView" >
|
<property name="sizeHint" stdset="0" >
|
||||||
<property name="sizePolicy" >
|
<size>
|
||||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
<width>271</width>
|
||||||
<horstretch>0</horstretch>
|
<height>20</height>
|
||||||
<verstretch>0</verstretch>
|
</size>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
</spacer>
|
||||||
<property name="contextMenuPolicy" >
|
</item>
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
<item>
|
||||||
</property>
|
<widget class="QPushButton" name="checkButton" >
|
||||||
<property name="acceptDrops" >
|
<property name="text" >
|
||||||
<bool>false</bool>
|
<string>check files</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="dragEnabled" >
|
</widget>
|
||||||
<bool>true</bool>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<property name="dragDropMode" >
|
<widget class="QLabel" name="hashLabel" >
|
||||||
<enum>QAbstractItemView::DragOnly</enum>
|
<property name="text" >
|
||||||
</property>
|
<string/>
|
||||||
<property name="alternatingRowColors" >
|
</property>
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode" >
|
|
||||||
<enum>QAbstractItemView::ContiguousSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QTreeView" name="remoteDirTreeView" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
|
||||||
<horstretch>4</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy" >
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="dragEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="dragDropMode" >
|
|
||||||
<enum>QAbstractItemView::DragOnly</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<layout class="QGridLayout" name="_2" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QPushButton" name="frameButton" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>14</width>
|
||||||
|
<height>31</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>14</width>
|
||||||
|
<height>31</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>31</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0" >
|
||||||
|
<size>
|
||||||
|
<width>14</width>
|
||||||
|
<height>321</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QSplitter" name="splitter" >
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="handleWidth" >
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QFrame" name="frame" >
|
||||||
|
<property name="frameShape" >
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow" >
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QTreeView" name="localDirTreeView" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy" >
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="acceptDrops" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="dragEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="dragDropMode" >
|
||||||
|
<enum>QAbstractItemView::DragOnly</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode" >
|
||||||
|
<enum>QAbstractItemView::ContiguousSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QTreeView" name="remoteDirTreeView" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
|
<horstretch>4</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy" >
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="dragEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="dragDropMode" >
|
||||||
|
<enum>QAbstractItemView::DragOnly</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue