mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* added a Basic Library Dialog to ApplicationWindow
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@701 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dc73c346f1
commit
b522636e08
@ -63,6 +63,7 @@ HEADERS += rshare.h \
|
||||
gui/PhotoDialog.h \
|
||||
gui/PhotoShow.h \
|
||||
gui/LinksDialog.h \
|
||||
gui/LibraryDialog.h \
|
||||
gui/ForumsDialog.h \
|
||||
gui/forums/CreateForum.h \
|
||||
gui/forums/CreateForumMsg.h \
|
||||
@ -72,6 +73,7 @@ HEADERS += rshare.h \
|
||||
gui/SearchTreeWidget.h \
|
||||
gui/SearchDialog.h \
|
||||
gui/SharedFilesDialog.h \
|
||||
gui/ShareFilesDialog.h \
|
||||
gui/StatisticDialog.h \
|
||||
gui/HelpDialog.h \
|
||||
gui/LogoBar.h \
|
||||
@ -186,6 +188,7 @@ FORMS += gui/ChatDialog.ui \
|
||||
gui/PhotoDialog.ui \
|
||||
gui/PhotoShow.ui \
|
||||
gui/LinksDialog.ui \
|
||||
gui/LibraryDialog.ui \
|
||||
gui/ForumsDialog.ui \
|
||||
gui/forums/CreateForum.ui \
|
||||
gui/forums/CreateForumMsg.ui \
|
||||
@ -194,6 +197,7 @@ FORMS += gui/ChatDialog.ui \
|
||||
gui/PeersDialog.ui \
|
||||
gui/SearchDialog.ui \
|
||||
gui/SharedFilesDialog.ui \
|
||||
gui/ShareFilesDialog.ui \
|
||||
gui/StatisticDialog.ui \
|
||||
gui/MessagesDialog.ui \
|
||||
gui/help/browser/helpbrowser.ui \
|
||||
@ -272,6 +276,7 @@ SOURCES += main.cpp \
|
||||
gui/PhotoDialog.cpp \
|
||||
gui/PhotoShow.cpp \
|
||||
gui/LinksDialog.cpp \
|
||||
gui/LibraryDialog.cpp \
|
||||
gui/ForumsDialog.cpp \
|
||||
gui/forums/CreateForum.cpp \
|
||||
gui/forums/CreateForumMsg.cpp \
|
||||
@ -281,6 +286,7 @@ SOURCES += main.cpp \
|
||||
gui/SearchTreeWidget.cpp \
|
||||
gui/SearchDialog.cpp \
|
||||
gui/SharedFilesDialog.cpp \
|
||||
gui/ShareFilesDialog.cpp \
|
||||
gui/StatisticDialog.cpp \
|
||||
gui/MessagesDialog.cpp \
|
||||
gui/help/browser/helpbrowser.cpp \
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "TransferFeed.h"
|
||||
#include "MsgFeed.h"
|
||||
#include "ChannelFeed.h"
|
||||
#include "LibraryDialog.h"
|
||||
|
||||
|
||||
/* for smplayer */
|
||||
#include "smplayer.h"
|
||||
@ -84,6 +86,7 @@
|
||||
#define IMAGE_LINKS ":/images/ktorrent.png"
|
||||
#define IMAGE_MESSAGES ":/images/evolution.png"
|
||||
#define IMAGE_BLOGS ":/images/kblogger.png"
|
||||
#define IMAGE_LIBRARY ":/images/library.png"
|
||||
|
||||
|
||||
/* Keys for UI Preferences */
|
||||
@ -151,6 +154,10 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.stackPages->add(photoDialog = new PhotoDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_PHOTO), tr("Photo View"), grp));
|
||||
|
||||
LibraryDialog *libraryDialog = NULL;
|
||||
ui.stackPages->add(libraryDialog = new LibraryDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_LIBRARY), tr("Library"), grp));
|
||||
|
||||
CalDialog *calDialog = NULL;
|
||||
ui.stackPages->add(calDialog = new CalDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_CALENDAR), tr("Shared Calendars"), grp));
|
||||
|
134
retroshare-gui/src/gui/LibraryDialog.cpp
Normal file
134
retroshare-gui/src/gui/LibraryDialog.cpp
Normal file
@ -0,0 +1,134 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2008, defnax
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#include "rshare.h"
|
||||
#include "LibraryDialog.h"
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rspeers.h"
|
||||
#include "rsiface/rsfiles.h"
|
||||
#include "rsiface/RemoteDirModel.h"
|
||||
#include "ShareFilesDialog.h"
|
||||
|
||||
#include "util/RsAction.h"
|
||||
#include "msgs/ChanMsgDialog.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include <QtGui>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QMenu>
|
||||
#include <QCursor>
|
||||
#include <QPoint>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QHeaderView>
|
||||
#include <QTimer>
|
||||
#include <QMovie>
|
||||
#include <QLabel>
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_DOWNLOAD ":/images/download16.png"
|
||||
#define IMAGE_PLAY ":/images/start.png"
|
||||
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
||||
#define IMAGE_HASH_DONE ":/images/friendsfolder24.png"
|
||||
#define IMAGE_MSG ":/images/message-mail.png"
|
||||
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
||||
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
||||
#define IMAGE_PROGRESS ":/images/browse-looking.gif"
|
||||
#define IMAGE_LIBRARY ":/images/library.png"
|
||||
|
||||
|
||||
/** Constructor */
|
||||
LibraryDialog::LibraryDialog(QWidget *parent)
|
||||
: MainPage(parent)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
|
||||
PopulateList();
|
||||
|
||||
QDirModel * dmodel=new QDirModel(this);
|
||||
ui.organizertreeView->setModel(dmodel);
|
||||
ui.organizerListView->setModel(dmodel);
|
||||
ui.organizerListView->setSpacing(10);
|
||||
QDir DwnlFolder,ShrFolder;
|
||||
|
||||
|
||||
connect(ui.shareFiles_btn,SIGNAL(clicked()),this, SLOT(CallShareFilesBtn_library()));
|
||||
connect(ui.tileView_btn_library,SIGNAL(clicked()),this, SLOT(CallTileViewBtn_library()));
|
||||
connect(ui.showDetails_btn_library,SIGNAL(clicked()),this, SLOT(CallShowDetailsBtn_library()));
|
||||
connect(ui.createAlbum_btn_library,SIGNAL(clicked()),this, SLOT(CallCreateAlbumBtn_library()));
|
||||
connect(ui.deleteAlbum_btn_library,SIGNAL(clicked()),this, SLOT(CallDeleteAlbumBtn_library()));
|
||||
connect(ui.find_btn_library,SIGNAL(clicked()),this, SLOT(CallFindBtn_library()));
|
||||
|
||||
|
||||
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
||||
timer->start(1000);
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void LibraryDialog::PopulateList()
|
||||
{
|
||||
QDirModel *dirmodel=new QDirModel(this);
|
||||
ui.organizertreeView->setModel(dirmodel);
|
||||
QModelIndex cmodel=dirmodel->index(QDir::rootPath());
|
||||
ui.organizertreeView->setRootIndex(cmodel);
|
||||
}
|
||||
|
||||
|
||||
void LibraryDialog::CallShareFilesBtn_library()
|
||||
{
|
||||
ShareFilesDialog *sf=new ShareFilesDialog(this,0);
|
||||
sf->show();
|
||||
}
|
||||
|
||||
void LibraryDialog::CallTileViewBtn_library()
|
||||
{
|
||||
//QMessageBox::information(this, tr("RetroShare"),tr("Will be Introducing this .. soon- tilesView in Library"));
|
||||
}
|
||||
|
||||
void LibraryDialog::CallShowDetailsBtn_library()
|
||||
{
|
||||
//QMessageBox::information(this, tr("RetroShare"),tr("Will be Introducing this .. soon- showdetails in Library"));
|
||||
}
|
||||
|
||||
void LibraryDialog::CallCreateAlbumBtn_library()
|
||||
{
|
||||
//QMessageBox::information(this, tr("RetroShare"),tr("Will be Introducing this .. soon- Create Album in Library"));
|
||||
}
|
||||
|
||||
void LibraryDialog::CallDeleteAlbumBtn_library()
|
||||
{
|
||||
//QMessageBox::information(this, tr("RetroShare"),tr("Will be Introducing this .. soon- Delete Album in Library"));
|
||||
}
|
||||
|
||||
|
73
retroshare-gui/src/gui/LibraryDialog.h
Normal file
73
retroshare-gui/src/gui/LibraryDialog.h
Normal file
@ -0,0 +1,73 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2008, crypton
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#ifndef _SHAREDFILESDIALOG_H
|
||||
#define _SHAREDFILESDIALOG_H
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
//#include <config/rsharesettings.h>
|
||||
|
||||
#include "mainpage.h"
|
||||
#include "ui_LibraryDialog.h"
|
||||
|
||||
#include "rsiface/rstypes.h"
|
||||
#include "rsiface/RemoteDirModel.h"
|
||||
|
||||
class LibraryDialog : public MainPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
LibraryDialog(QWidget *parent = 0);
|
||||
/** Default Destructor */
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
void PopulateList();
|
||||
|
||||
void CallShareFilesBtn_library();
|
||||
void CallTileViewBtn_library();
|
||||
void CallShowDetailsBtn_library();
|
||||
void CallCreateAlbumBtn_library();
|
||||
void CallDeleteAlbumBtn_library();
|
||||
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::LibraryDialog ui;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
676
retroshare-gui/src/gui/LibraryDialog.ui
Normal file
676
retroshare-gui/src/gui/LibraryDialog.ui
Normal file
@ -0,0 +1,676 @@
|
||||
<ui version="4.0" >
|
||||
<class>LibraryDialog</class>
|
||||
<widget class="QWidget" name="LibraryDialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>629</width>
|
||||
<height>463</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette" >
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>208</red>
|
||||
<green>208</green>
|
||||
<blue>208</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>247</red>
|
||||
<green>247</green>
|
||||
<blue>247</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>139</red>
|
||||
<green>139</green>
|
||||
<blue>139</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>240</red>
|
||||
<green>240</green>
|
||||
<blue>240</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Highlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>128</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="HighlightedText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Link" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="LinkVisited" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>231</red>
|
||||
<green>231</green>
|
||||
<blue>231</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>208</red>
|
||||
<green>208</green>
|
||||
<blue>208</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>247</red>
|
||||
<green>247</green>
|
||||
<blue>247</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>139</red>
|
||||
<green>139</green>
|
||||
<blue>139</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>240</red>
|
||||
<green>240</green>
|
||||
<blue>240</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Highlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>192</red>
|
||||
<green>192</green>
|
||||
<blue>192</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="HighlightedText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Link" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="LinkVisited" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>231</red>
|
||||
<green>231</green>
|
||||
<blue>231</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>208</red>
|
||||
<green>208</green>
|
||||
<blue>208</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>247</red>
|
||||
<green>247</green>
|
||||
<blue>247</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>139</red>
|
||||
<green>139</green>
|
||||
<blue>139</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>104</red>
|
||||
<green>104</green>
|
||||
<blue>104</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>240</red>
|
||||
<green>240</green>
|
||||
<blue>240</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>240</red>
|
||||
<green>240</green>
|
||||
<blue>240</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Highlight" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>128</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="HighlightedText" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Link" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="LinkVisited" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase" >
|
||||
<brush brushstyle="SolidPattern" >
|
||||
<color alpha="255" >
|
||||
<red>231</red>
|
||||
<green>231</green>
|
||||
<blue>231</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="contextMenuPolicy" >
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox_5" >
|
||||
<property name="title" >
|
||||
<string>Library</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8" >
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" >background-color: rgb(253, 252, 248);</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Exploring My RetroShare Library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QPushButton" name="tileView_btn_library" >
|
||||
<property name="text" >
|
||||
<string>Tile view</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4" >
|
||||
<widget class="QPushButton" name="showDetails_btn_library" >
|
||||
<property name="text" >
|
||||
<string>Show Details</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4" >
|
||||
<widget class="QListView" name="organizerListView" >
|
||||
<property name="movement" >
|
||||
<enum>QListView::Free</enum>
|
||||
</property>
|
||||
<property name="viewMode" >
|
||||
<enum>QListView::IconMode</enum>
|
||||
</property>
|
||||
<property name="selectionRectVisible" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QPushButton" name="createAlbum_btn_library" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" />
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Create Album</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QPushButton" name="deleteAlbum_btn_library" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" />
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Delete Album</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<widget class="QLineEdit" name="findEditmain" />
|
||||
</item>
|
||||
<item row="2" column="4" >
|
||||
<widget class="QPushButton" name="find_btn_library" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" >pushButton_41:hover{ color : white;}</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Find</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="3" row="0" column="0" >
|
||||
<widget class="QTabWidget" name="tabWidget_2" >
|
||||
<property name="tabShape" >
|
||||
<enum>QTabWidget::Triangular</enum>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_13" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>226</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Folder</string>
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="formLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QComboBox" name="comboBox" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" >border-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>All File Types</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Application</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Archive</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_14" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>238</width>
|
||||
<height>390</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Organizer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_25" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QTreeView" name="organizertreeView" >
|
||||
<property name="font" >
|
||||
<font>
|
||||
<family>Utopia</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QPushButton" name="shareFiles_btn" >
|
||||
<property name="styleSheet" >
|
||||
<string notr="true" >border-color: rgb(0, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Share Files..</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc" />
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
116
retroshare-gui/src/gui/ShareFilesDialog.cpp
Normal file
116
retroshare-gui/src/gui/ShareFilesDialog.cpp
Normal file
@ -0,0 +1,116 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2008, defnax
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include "ShareFilesDialog.h"
|
||||
|
||||
#include <QLocale>
|
||||
//
|
||||
ShareFilesDialog::ShareFilesDialog( QWidget * parent, Qt::WFlags f)
|
||||
: QDialog(parent, f)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
connect(shareOk,SIGNAL(clicked()), this, SLOT(FilenameShared()));
|
||||
connect(addfile_Btn,SIGNAL(clicked()), this, SLOT(addfileBrowse()));
|
||||
connect(DownloadList,SIGNAL(currentRowChanged(int)), this, SLOT(currIndex(int)));
|
||||
connect(remfile_Btn,SIGNAL(clicked()), this, SLOT(remove_File()));
|
||||
connect(DownloadList,SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(filenametoShare(QListWidgetItem *)));
|
||||
}
|
||||
|
||||
void ShareFilesDialog::filenametoShare(QListWidgetItem *atname)
|
||||
{
|
||||
filnameList = atname->text();
|
||||
}
|
||||
|
||||
void ShareFilesDialog::FilenameShared()
|
||||
{
|
||||
QDir dir;
|
||||
QString finm = dir.currentPath();
|
||||
QString cpypathto =dir.currentPath();
|
||||
|
||||
finm.append("/DownLoad/");
|
||||
finm.append(filnameList);
|
||||
cpypathto.append("/SharedFolder/");
|
||||
cpypathto.append(filnameList);
|
||||
|
||||
QFile share;
|
||||
share.copy(finm,cpypathto);
|
||||
messageBoxOk("Added!");
|
||||
}
|
||||
void ShareFilesDialog::addfileBrowse()
|
||||
{
|
||||
QDir dir;
|
||||
int ind;
|
||||
QString pathseted =dir.currentPath();
|
||||
|
||||
pathseted.append("/DownLoad");
|
||||
|
||||
QString fileshare = QFileDialog::getOpenFileName(this, tr("Open File..."),pathseted, tr("All Files (*)"));
|
||||
QString slash="/";
|
||||
|
||||
ind=fileshare.lastIndexOf("/");
|
||||
filnameShared =fileshare.mid(ind+1,((fileshare.size())-ind));
|
||||
DownloadList->addItem(filnameShared);
|
||||
|
||||
}
|
||||
|
||||
void ShareFilesDialog::currIndex(int row)
|
||||
{
|
||||
|
||||
currrow=row;
|
||||
|
||||
}
|
||||
|
||||
void ShareFilesDialog::remove_File()
|
||||
{
|
||||
|
||||
QDir dir;
|
||||
QFile file;
|
||||
int ind;
|
||||
QString pathseted =dir.currentPath();
|
||||
QString path=dir.currentPath();
|
||||
path.append("/SharedFolder");
|
||||
QString fileshare = QFileDialog::getOpenFileName(this, tr("Open File..."),path, tr("All Files (*)"));
|
||||
ind=fileshare.lastIndexOf("/");
|
||||
filnameShared =fileshare.mid(ind+1,((fileshare.size())-ind));
|
||||
|
||||
pathseted.append("/SharedFolder/");
|
||||
pathseted.append(filnameShared);
|
||||
QString queryWrn;
|
||||
queryWrn.clear();
|
||||
queryWrn.append("Do You Want to Delete ? ");
|
||||
queryWrn.append(pathseted);
|
||||
|
||||
if ((QMessageBox::question(this, tr("Warning!"),queryWrn,QMessageBox::Ok|QMessageBox::No, QMessageBox::Ok))== QMessageBox::Ok)
|
||||
{
|
||||
file.remove(pathseted);
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
bool ShareFilesDialog::messageBoxOk(QString msg)
|
||||
{
|
||||
QMessageBox mb("files and itz names!",msg,QMessageBox::Information,QMessageBox::Ok,0,0);
|
||||
mb.setButtonText( QMessageBox::Ok, "OK" );
|
||||
mb.exec();
|
||||
return true;
|
||||
}
|
55
retroshare-gui/src/gui/ShareFilesDialog.h
Normal file
55
retroshare-gui/src/gui/ShareFilesDialog.h
Normal file
@ -0,0 +1,55 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2008, defnax
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#ifndef SHAREDFILE_DIALOGIMPL_H
|
||||
#define SHAREDFILE_DIALOGIMPL_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "ui_ShareFilesDialog.h"
|
||||
//
|
||||
class ShareFilesDialog: public QDialog, public Ui::ShareFilesDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ShareFilesDialog( QWidget * parent , Qt::WFlags f );
|
||||
int currrow;
|
||||
bool messageBoxOk(QString);
|
||||
QString filnameList;
|
||||
QString filnameShared;
|
||||
|
||||
private slots:
|
||||
|
||||
void FilenameShared();
|
||||
void addfileBrowse();
|
||||
void remove_File();
|
||||
void currIndex(int);
|
||||
void filenametoShare(QListWidgetItem *);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
90
retroshare-gui/src/gui/ShareFilesDialog.ui
Normal file
90
retroshare-gui/src/gui/ShareFilesDialog.ui
Normal file
@ -0,0 +1,90 @@
|
||||
<ui version="4.0" >
|
||||
<class>ShareFilesDialog</class>
|
||||
<widget class="QDialog" name="ShareFilesDialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>557</width>
|
||||
<height>315</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Shared Folder Manager</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>Shared Folder Manager:</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="QPushButton" name="addfile_Btn" >
|
||||
<property name="text" >
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="remfile_Btn" >
|
||||
<property name="text" >
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<spacer name="horizontalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="shareOk" >
|
||||
<property name="text" >
|
||||
<string>Ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
<widget class="QPushButton" name="pushButton_4" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5" >
|
||||
<widget class="QListWidget" name="DownloadList" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>pushButton_4</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>sharedFile_dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>495</x>
|
||||
<y>290</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>495</x>
|
||||
<y>319</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -176,6 +176,7 @@
|
||||
<file>images/ktorrent.png</file>
|
||||
<file>images/ktorrent32.png</file>
|
||||
<file>images/knewsticker24.png</file>
|
||||
<file>images/library.png</file>
|
||||
<file>images/loadcert16.png</file>
|
||||
<file>images/locale.png</file>
|
||||
<file>images/looknfeel.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/library.png
Normal file
BIN
retroshare-gui/src/gui/images/library.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue
Block a user