mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-19 21:04:32 -05:00
Enabled save() function in SubFileItems.
Improved Channel Menu Item: added Icon and popularity. Reduced most of the margins in Channel Feed. updated libretroshare interface files. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@845 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f5fa2f9a68
commit
99c038a4db
@ -53,6 +53,9 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||
/*************** Setup Left Hand Side (List of Channels) ****************/
|
||||
|
||||
mGroupLayout = new QVBoxLayout;
|
||||
mGroupLayout->setSpacing(0);
|
||||
mGroupLayout->setMargin(0);
|
||||
mGroupLayout->setContentsMargins(0,0,0,0);
|
||||
|
||||
mGroupOwn = new ChanGroupItem("Own Channels");
|
||||
mGroupSub = new ChanGroupItem("Subscribed Channels");
|
||||
@ -80,12 +83,17 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||
layout2->addWidget(scrollArea);
|
||||
layout2->setSpacing(0);
|
||||
layout2->setMargin(0);
|
||||
layout2->setContentsMargins(0,0,0,0);
|
||||
|
||||
|
||||
chanFrame->setLayout(layout2);
|
||||
|
||||
/*************** Setup Left Hand Side (List of Channels) ****************/
|
||||
|
||||
mMsgLayout = new QVBoxLayout;
|
||||
mMsgLayout->setSpacing(0);
|
||||
mMsgLayout->setMargin(0);
|
||||
mMsgLayout->setContentsMargins(0,0,0,0);
|
||||
|
||||
QWidget *middleWidget2 = new QWidget();
|
||||
middleWidget2->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
|
||||
@ -101,6 +109,8 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||
layout3->addWidget(scrollArea2);
|
||||
layout3->setSpacing(0);
|
||||
layout3->setMargin(0);
|
||||
layout3->setContentsMargins(0,0,0,0);
|
||||
|
||||
|
||||
msgFrame->setLayout(layout3);
|
||||
|
||||
|
@ -98,11 +98,17 @@ LibraryDialog::LibraryDialog(QWidget *parent)
|
||||
void LibraryDialog::PopulateList()
|
||||
{
|
||||
QDir DwnlFolder,ShrFolder,retroshareLib,treePath;
|
||||
|
||||
#if 0
|
||||
retroshareLib.mkdir("RetroShare Library");
|
||||
DwnlFolder.mkdir("RetroShare Library/Download");
|
||||
ShrFolder.mkdir("RetroShare Library/SharedFolder");
|
||||
LibShared=treePath.currentPath();
|
||||
LibShared.append("/RetroShare Library");
|
||||
#else
|
||||
LibShared=treePath.currentPath();
|
||||
#endif
|
||||
|
||||
QDirModel * dmodel=new QDirModel;
|
||||
ui.organizertreeView->setModel(dmodel);
|
||||
ui.organizertreeView->setRootIndex(dmodel->index(LibShared));
|
||||
|
@ -61,6 +61,10 @@ void ChanMenuItem::updateItemStatic()
|
||||
{
|
||||
titleLabel->setText(QString::fromStdWString(ci.channelName));
|
||||
descLabel->setText(QString::fromStdWString(ci.channelDesc));
|
||||
pop_lcd->display((int) ci.pop);
|
||||
/* TODO */
|
||||
fetches_lcd->display(9999);
|
||||
avail_lcd->display(9999);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -77,6 +81,7 @@ void ChanMenuItem::updateItem()
|
||||
std::cerr << "ChanMenuItem::updateItem()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>290</width>
|
||||
<height>226</height>
|
||||
<width>216</width>
|
||||
<height>367</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -39,7 +39,10 @@
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -52,130 +55,242 @@
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QPushButton" name="expandButton" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>14</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Expand</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLabel" name="titleLabel" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Connected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>341</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="expandFrame" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QPushButton" name="expandButton" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>14</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Expand</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Connected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>341</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="expandFrame" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="pixmap" >
|
||||
<pixmap/>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Popularity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLCDNumber" name="pop_lcd" />
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Fetches:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLCDNumber" name="fetches_lcd" />
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Available:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLCDNumber" name="avail_lcd" />
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="chanIcon" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap" >
|
||||
<pixmap resource="../images.qrc" >:/images/friendsfolder24.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="descLabel" >
|
||||
@ -201,9 +316,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -558,6 +558,28 @@ void SubFileItem::save()
|
||||
std::cerr << "SubFileItem::save()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
if (mType == SFI_TYPE_CHANNEL)
|
||||
{
|
||||
/* only enable these function for Channels. */
|
||||
|
||||
/* find out where they want to save it */
|
||||
QString startpath = "";
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Save Channel File"),
|
||||
startpath,
|
||||
QFileDialog::ShowDirsOnly
|
||||
| QFileDialog::DontResolveSymlinks);
|
||||
|
||||
std::string destpath = dir.toStdString();
|
||||
|
||||
if (destpath != "")
|
||||
{
|
||||
rsFiles->ExtraFileMove(mFileName, mFileHash, mFileSize, destpath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,6 +119,9 @@ virtual bool ExtraFileRemove(std::string hash, uint32_t flags) = 0;
|
||||
virtual bool ExtraFileHash(std::string localpath,
|
||||
uint32_t period, uint32_t flags) = 0;
|
||||
virtual bool ExtraFileStatus(std::string localpath, FileInfo &info) = 0;
|
||||
virtual bool ExtraFileMove(std::string fname, std::string hash, uint64_t size,
|
||||
std::string destpath) = 0;
|
||||
|
||||
|
||||
|
||||
/***
|
||||
|
Loading…
Reference in New Issue
Block a user