mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
redesign SharedFiles, with splitted view for Remote and Local Dirs and added QFrame's for switch to different views.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1392 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
400ad9e0bd
commit
13eed1c932
@ -82,7 +82,10 @@ SharedFilesDialog::SharedFilesDialog(QWidget *parent)
|
||||
|
||||
connect(ui.checkButton, SIGNAL(clicked()), this, SLOT(forceCheck()));
|
||||
|
||||
//connect(ui.frameButton, SIGNAL(toggled(bool)), this, SLOT(showFrame(bool)));
|
||||
connect(ui.localButton, SIGNAL(toggled(bool)), this, SLOT(showFrame(bool)));
|
||||
connect(ui.remoteButton, SIGNAL(toggled(bool)), this, SLOT(showFrameRemote(bool)));
|
||||
connect(ui.splittedButton, SIGNAL(toggled(bool)), this, SLOT(showFrameSplitted(bool)));
|
||||
|
||||
|
||||
connect( ui.localDirTreeView, SIGNAL( customContextMenuRequested( QPoint ) ),
|
||||
this, SLOT( sharedDirTreeWidgetContextMenu( QPoint ) ) );
|
||||
@ -687,20 +690,46 @@ SharedFilesDialog::tryToAddNewAssotiation()
|
||||
|
||||
//============================================================================
|
||||
/**
|
||||
Toggles the Lokal TreeView on and off, changes toggle button text
|
||||
Toggles the Splitted, Remote and Local View on and off*/
|
||||
|
||||
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")));
|
||||
}
|
||||
}*/
|
||||
ui.localframe->setVisible(true);
|
||||
ui.remoteframe->setVisible(false);
|
||||
|
||||
ui.localButton->setChecked(true);
|
||||
|
||||
ui.remoteButton->setChecked(false);
|
||||
ui.splittedButton->setChecked(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void SharedFilesDialog::showFrameRemote(bool show)
|
||||
{
|
||||
if (show) {
|
||||
ui.remoteframe->setVisible(true);
|
||||
ui.localframe->setVisible(false);
|
||||
|
||||
ui.remoteButton->setChecked(true);
|
||||
ui.localButton->setChecked(false);
|
||||
ui.splittedButton->setChecked(false);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void SharedFilesDialog::showFrameSplitted(bool show)
|
||||
{
|
||||
if (show) {
|
||||
ui.remoteframe->setVisible(true);
|
||||
ui.localframe->setVisible(true);
|
||||
|
||||
ui.splittedButton->setChecked(true);
|
||||
|
||||
ui.localButton->setChecked(false);
|
||||
ui.remoteButton->setChecked(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,10 @@ private slots:
|
||||
void sendLinkTo();
|
||||
void sendremoteLinkTo();
|
||||
|
||||
//void showFrame(bool show);
|
||||
void showFrame(bool show);
|
||||
void showFrameRemote(bool show);
|
||||
void showFrameSplitted(bool show);
|
||||
|
||||
|
||||
|
||||
// void recommendfile();
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SharedFilesDialog</class>
|
||||
<widget class="QWidget" name="SharedFilesDialog">
|
||||
@ -5,12 +6,12 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>578</width>
|
||||
<height>433</height>
|
||||
<width>672</width>
|
||||
<height>384</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -487,45 +488,194 @@
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<property name="bottomMargin" >
|
||||
<number>3</number>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="4" >
|
||||
<widget class="QTabWidget" name="filestabWidget" >
|
||||
<property name="currentIndex" >
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>556</width>
|
||||
<height>355</height>
|
||||
</rect>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Friends Share</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/fileshare16.png</normaloff>:/images/fileshare16.png</iconset>
|
||||
</attribute>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<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:10pt; font-weight:600;">Files</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="images.qrc">:/images/fileshare16.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="splittedButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Splitted View</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/view_split_top_bottom.png</normaloff>:/images/view_split_top_bottom.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QPushButton" name="remoteButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Friends Folders</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/friendsfolder24.png</normaloff>:/images/friendsfolder24.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QPushButton" name="localButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>My Folders</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/folder16.png</normaloff>:/images/folder16.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="7">
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="remoteframe">
|
||||
<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>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeView" name="remoteDirTreeView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>4</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -555,33 +705,21 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>556</width>
|
||||
<height>347</height>
|
||||
</rect>
|
||||
<widget class="QFrame" name="localframe">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>My Shared Files</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/folder16.png</normaloff>:/images/folder16.png</iconset>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeView" name="localDirTreeView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -613,7 +751,7 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="downloadButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -639,7 +777,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<item row="2" column="2">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -652,14 +790,14 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<item row="2" column="3" colspan="3">
|
||||
<widget class="QPushButton" name="checkButton">
|
||||
<property name="text">
|
||||
<string>check files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<item row="2" column="6">
|
||||
<widget class="QLabel" name="hashLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -507,7 +507,7 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
@ -578,6 +578,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QTreeView" name="downloadList">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
@ -636,6 +637,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QTreeView" name="uploadsList">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -352,6 +352,7 @@
|
||||
<file>images/view_calendar_day.png</file>
|
||||
<file>images/view_calendar_week.png</file>
|
||||
<file>images/view_calendar_month.png</file>
|
||||
<file>images/view_split_top_bottom.png</file>
|
||||
<file>images/window_fullscreen.png</file>
|
||||
<file>images/window_nofullscreen.png</file>
|
||||
<file>layouts/default.ui</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/view_split_top_bottom.png
Normal file
BIN
retroshare-gui/src/gui/images/view_split_top_bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 422 B |
Loading…
Reference in New Issue
Block a user