merged upstream/master
@ -30,6 +30,7 @@
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
#include "gui/Circles/CreateCircleDialog.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
@ -53,7 +54,7 @@ CreateCircleDialog::CreateCircleDialog()
|
||||
ui.setupUi(this);
|
||||
|
||||
/* Setup Queue */
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/icons/png/circles.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
|
||||
|
||||
// connect up the buttons.
|
||||
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
|
||||
|
@ -23,11 +23,12 @@
|
||||
#include <math.h>
|
||||
#include <QStylePainter>
|
||||
#include <QDebug>
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rstypes.h"
|
||||
#include "util/misc.h"
|
||||
#include "FileTransferInfoWidget.h"
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
// Variables to decide of display behaviour. All variables are expressed as a factor of font height
|
||||
//
|
||||
@ -49,10 +50,10 @@ FileTransferInfoWidget::FileTransferInfoWidget(QWidget * /*parent*/, Qt::WindowF
|
||||
|
||||
int S = 0.9*QFontMetricsF(font()).height();
|
||||
|
||||
downloadedPixmap = QPixmap(":/icons/tile_downloaded_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
downloadingPixmap = QPixmap(":/icons/tile_downloading_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
notDownloadPixmap = QPixmap(":/icons/tile_inactive_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
checkingPixmap = QPixmap(":/icons/tile_checking_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
downloadedPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_downloaded_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
downloadingPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_downloading_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
notDownloadPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_inactive_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
checkingPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_checking_48.png").scaledToHeight(S,Qt::SmoothTransformation);
|
||||
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
|
@ -43,8 +43,9 @@
|
||||
#include <retroshare/rsexpr.h>
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_START ":/images/download.png"
|
||||
#define IMAGE_REMOVE ":/images/delete.png"
|
||||
#define IMAGE_START ":/icons/png/download.png"
|
||||
#define IMAGE_SEARCHAGAIN ":/images/update.png"
|
||||
#define IMAGE_REMOVE ":/images/delete.png"
|
||||
#define IMAGE_REMOVEALL ":/images/deleteall.png"
|
||||
#define IMAGE_DIRECTORY ":/images/folder16.png"
|
||||
#define IMAGE_OPENFOLDER ":/images/folderopen.png"
|
||||
@ -670,14 +671,14 @@ void SearchDialog::searchSummaryWidgetCustomPopupMenu( QPoint /*point*/ )
|
||||
QMenu contextMnu(this);
|
||||
|
||||
QTreeWidgetItem* ci = ui.searchSummaryWidget->currentItem();
|
||||
QAction* action = contextMnu.addAction(tr("Search again"), this, SLOT(searchAgain()));
|
||||
QAction* action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SEARCHAGAIN),tr("Search again"), this, SLOT(searchAgain()));
|
||||
if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
contextMnu.addAction(QIcon(IMAGE_REMOVE), tr("Remove"), this, SLOT(searchRemove()));
|
||||
contextMnu.addAction(QIcon(IMAGE_REMOVE), tr("Remove All"), this, SLOT(searchRemoveAll()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVE), tr("Remove"), this, SLOT(searchRemove()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVEALL), tr("Remove All"), this, SLOT(searchRemoveAll()));
|
||||
contextMnu.addSeparator();
|
||||
action = contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copySearchLink()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copySearchLink()));
|
||||
if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "util/RsAction.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/rstime.h"
|
||||
#include "util/rsdir.h"
|
||||
|
||||
#include <retroshare/rsexpr.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
@ -55,7 +56,7 @@
|
||||
#include <set>
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_DOWNLOAD ":/images/download16.png"
|
||||
#define IMAGE_DOWNLOAD ":/icons/png/download.png"
|
||||
#define IMAGE_PLAY ":/images/start.png"
|
||||
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
||||
#define IMAGE_HASH_DONE ":/images/accepted16.png"
|
||||
@ -72,8 +73,9 @@
|
||||
#define IMAGE_COLLMODIF ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_COLLVIEW ":/images/find.png"
|
||||
#define IMAGE_COLLOPEN ":/icons/collections.png"
|
||||
#define IMAGE_EDITSHARE ":/images/edit_16.png"
|
||||
#define IMAGE_EDITSHARE ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_MYFILES ":/icons/svg/folders1.svg"
|
||||
#define IMAGE_UNSHAREEXTRA ":/images/button_cancel.png"
|
||||
|
||||
/*define viewType_CB value */
|
||||
#define VIEW_TYPE_TREE 0
|
||||
@ -232,7 +234,7 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
|
||||
sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this );
|
||||
connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
|
||||
|
||||
removeExtraFileAct = new QAction(QIcon(), tr( "Stop sharing this file" ), this );
|
||||
removeExtraFileAct = new QAction(QIcon(IMAGE_UNSHAREEXTRA), tr( "Stop sharing this file" ), this );
|
||||
connect( removeExtraFileAct , SIGNAL( triggered() ), this, SLOT( removeExtraFile() ) );
|
||||
|
||||
collCreateAct= new QAction(QIcon(IMAGE_COLLCREATE), tr("Create Collection..."), this) ;
|
||||
@ -266,7 +268,7 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent)
|
||||
openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ;
|
||||
connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ;
|
||||
|
||||
ui.titleBarPixmap->setPixmap(QPixmap(IMAGE_MYFILES)) ;
|
||||
ui.titleBarPixmap->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_MYFILES)) ;
|
||||
|
||||
ui.dirTreeView->setItemDelegateForColumn(COLUMN_FRIEND_ACCESS,new ShareFlagsItemDelegate()) ;
|
||||
}
|
||||
@ -498,7 +500,7 @@ void LocalSharedFilesDialog::checkUpdate()
|
||||
else
|
||||
{
|
||||
ui.checkButton->setText(tr("Check files"));
|
||||
ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE));
|
||||
ui.hashLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_HASH_DONE));
|
||||
ui.hashLabel->setToolTip("") ;
|
||||
}
|
||||
|
||||
@ -634,22 +636,31 @@ void SharedFilesDialog::copyLinks(const QModelIndexList& lst, bool remote,QList<
|
||||
|
||||
RetroShareLink link = RetroShareLink::createFileTree(dir_name,ft->mTotalSize,ft->mTotalFiles,QString::fromStdString(ft->toRadix64())) ;
|
||||
|
||||
if(link.valid())
|
||||
urls.push_back(link) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(details.hash.isNull())
|
||||
{
|
||||
has_unhashed_files = true;
|
||||
continue;
|
||||
}
|
||||
RetroShareLink link = RetroShareLink::createFile(QString::fromUtf8(details.name.c_str()), details.count, details.hash.toStdString().c_str());
|
||||
if (link.valid()) {
|
||||
urls.push_back(link) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(link.valid())
|
||||
urls.push_back(link) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(details.hash.isNull())
|
||||
{
|
||||
has_unhashed_files = true;
|
||||
continue;
|
||||
}
|
||||
QString name;
|
||||
if(details.type == DIR_TYPE_EXTRA_FILE)
|
||||
{
|
||||
std::string dir,file;
|
||||
RsDirUtil::splitDirFromFile(details.name,dir,file) ;
|
||||
name = QString::fromStdString(file);
|
||||
}
|
||||
else
|
||||
name = QString::fromUtf8(details.name.c_str());
|
||||
RetroShareLink link = RetroShareLink::createFile(name, details.count, details.hash.toStdString().c_str());
|
||||
if (link.valid()) {
|
||||
urls.push_back(link) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
|
||||
@ -875,8 +886,8 @@ void LocalSharedFilesDialog::openfolder()
|
||||
{
|
||||
std::cerr << "SharedFilesDialog::openfolder" << std::endl;
|
||||
|
||||
QModelIndexList qmil = getSelected();
|
||||
model->openSelected(qmil);
|
||||
QModelIndexList qmil = getSelected();
|
||||
model->openSelected(qmil, true);
|
||||
}
|
||||
|
||||
void SharedFilesDialog::preModDirectories(bool local)
|
||||
@ -1143,11 +1154,12 @@ void LocalSharedFilesDialog::spawnCustomPopupMenu( QPoint point )
|
||||
break;
|
||||
|
||||
case DIR_TYPE_EXTRA_FILE:
|
||||
contextMnu.addAction(openfileAct) ;
|
||||
contextMnu.addSeparator() ;//------------------------------------
|
||||
contextMnu.addAction(copylinkAct) ;
|
||||
contextMnu.addAction(sendlinkAct) ;
|
||||
contextMnu.addAction(removeExtraFileAct) ;
|
||||
contextMnu.addAction(openfileAct) ;
|
||||
contextMnu.addAction(openfolderAct) ;
|
||||
contextMnu.addSeparator() ;//------------------------------------
|
||||
contextMnu.addAction(copylinkAct) ;
|
||||
contextMnu.addAction(sendlinkAct) ;
|
||||
contextMnu.addAction(removeExtraFileAct) ;
|
||||
|
||||
break ;
|
||||
|
||||
|
@ -88,10 +88,6 @@
|
||||
<property name="text">
|
||||
<string>Configure shared directories</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "TorControl/TorManager.h"
|
||||
#include "util/misc.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
@ -132,7 +133,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
//ui.headerFrame->setHeaderImage(QPixmap(":/icons/svg/profile.svg"));
|
||||
//ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/svg/profile.svg"));
|
||||
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
||||
|
||||
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
|
||||
@ -432,9 +433,9 @@ void GenCertDialog::updateCheckLabels()
|
||||
}
|
||||
|
||||
if(mEntropyOk)
|
||||
ui.randomness_check_LB->setPixmap(QPixmap(IMAGE_GOOD)) ;
|
||||
ui.randomness_check_LB->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_GOOD)) ;
|
||||
else
|
||||
ui.randomness_check_LB->setPixmap(QPixmap(IMAGE_BAD)) ;
|
||||
ui.randomness_check_LB->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_BAD)) ;
|
||||
|
||||
setupState();
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "util/qtthreadsutils.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/common/UIStateHelper.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/msgs/MessageComposer.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
|
||||
@ -82,7 +83,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
|
||||
|
||||
Settings->loadWidgetInformation(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Person Details"));
|
||||
|
||||
//connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup()));
|
||||
|
@ -110,7 +110,7 @@
|
||||
#define RSID_FILTER_BANNED 0x0020
|
||||
#define RSID_FILTER_ALL 0xffff
|
||||
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_CREATE ":/icons/circle_new_128.png"
|
||||
#define IMAGE_INVITED ":/icons/bullet_yellow_128.png"
|
||||
#define IMAGE_MEMBER ":/icons/bullet_green_128.png"
|
||||
@ -255,7 +255,7 @@ IdDialog::IdDialog(QWidget *parent) : MainPage(parent), ui(new Ui::IdDialog)
|
||||
this, &IdDialog::chatIdentityItem );
|
||||
|
||||
|
||||
ui->avlabel_Circles->setPixmap(QPixmap(":/icons/png/circles.png"));
|
||||
ui->avlabel_Circles->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
|
||||
|
||||
ui->headerTextLabel_Circles->setText(tr("Circles"));
|
||||
|
||||
@ -459,7 +459,7 @@ void IdDialog::clearPerson()
|
||||
{
|
||||
QFontMetricsF f(ui->avLabel_Person->font()) ;
|
||||
|
||||
ui->avLabel_Person->setPixmap(QPixmap(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
|
||||
ui->avLabel_Person->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
|
||||
ui->headerTextLabel_Person->setText(tr("People"));
|
||||
|
||||
ui->inviteFrame->hide();
|
||||
@ -2174,7 +2174,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
||||
hbox->setSpacing(6);
|
||||
|
||||
QLabel *iconLabel = new QLabel(widget);
|
||||
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
iconLabel->setPixmap(pix);
|
||||
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
|
||||
hbox->addWidget(iconLabel);
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -47,7 +48,7 @@ IdEditDialog::IdEditDialog(QWidget *parent) :
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Create New Identity"));
|
||||
|
||||
/* Setup UI helper */
|
||||
@ -199,7 +200,7 @@ void IdEditDialog::setAvatar(const QPixmap &avatar)
|
||||
void IdEditDialog::setupExistingId(const RsGxsGroupId& keyId)
|
||||
{
|
||||
setWindowTitle(tr("Edit identity"));
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Edit identity"));
|
||||
|
||||
mStateHelper->setLoading(IDEDITDIALOG_LOADID, true);
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
#include "LogoBar.h"
|
||||
|
||||
#include <util/RetroStyleLabel.h>
|
||||
#include <util/MouseEventFilter.h>
|
||||
#include "util/RetroStyleLabel.h"
|
||||
#include "util/MouseEventFilter.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
|
||||
@ -42,11 +43,11 @@ void LogoBar::init() {
|
||||
//LogoButton
|
||||
_logoButton = new RetroStyleLabel(this);
|
||||
_logoButton->setPixmaps(
|
||||
QPixmap(":/images/logobar/rslogo2.png"), //Start
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/rslogo2.png"), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap(), //Fill
|
||||
|
||||
QPixmap(":/images/logobar/rslogo2.png"), //Start
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/rslogo2.png"), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap() //Fill
|
||||
);
|
||||
@ -59,11 +60,11 @@ void LogoBar::init() {
|
||||
FillLabel1->setPixmaps(
|
||||
QPixmap(), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap(":/images/logobar/logo_bar_fill.png"), //Fill
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png"), //Fill
|
||||
|
||||
QPixmap(), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap(":/images/logobar/logo_bar_fill.png") //Fill
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png") //Fill
|
||||
);
|
||||
|
||||
//FillLabel2
|
||||
@ -71,11 +72,11 @@ void LogoBar::init() {
|
||||
FillLabel2->setPixmaps(
|
||||
QPixmap(), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap(":/images/logobar/logo_bar_fill.png"), //Fill
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png"), //Fill
|
||||
|
||||
QPixmap(), //Start
|
||||
QPixmap(), //End
|
||||
QPixmap(":/images/logobar/logo_bar_fill.png") //Fill
|
||||
FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png") //Fill
|
||||
);
|
||||
|
||||
QGridLayout * layout = new QGridLayout(this);
|
||||
|
@ -146,8 +146,8 @@
|
||||
#define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png"
|
||||
#define IMAGE_OPTIONS ":/images/settings.png"
|
||||
#define IMAGE_UNFINISHED ":/images/underconstruction.png"
|
||||
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png"
|
||||
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png"
|
||||
#define IMAGE_MINIMIZE ":/icons/fullscreen.png"
|
||||
#define IMAGE_MAXIMIZE ":/icons/fullscreen-exit.png"
|
||||
|
||||
#define IMAGE_PLUGINS ":/images/extension_32.png"
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gui/Identity/IdDetailsDialog.h"
|
||||
#include "gui/Identity/IdDialog.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
@ -440,7 +441,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
|
||||
QMenu *mnu = contextMnu.addMenu(QIcon(":/icons/png/circles.png"),tr("Invite to Circle")) ;
|
||||
QMenu *mnu = contextMnu.addMenu(FilesDefs::getIconFromQtResourcePath(":/icons/png/circles.png"),tr("Invite to Circle")) ;
|
||||
|
||||
std::map<RsGxsGroupId, CircleWidget*>::iterator itCurs;
|
||||
for( itCurs =_ext_circles_widgets.begin(); itCurs != _ext_circles_widgets.end(); ++itCurs)
|
||||
@ -459,7 +460,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||
|
||||
if(own_identities.size() <= 1)
|
||||
{
|
||||
QAction *action = contextMnu.addAction(QIcon(":/images/chat_24.png"), tr("Chat with this person"), this, SLOT(chatIdentity()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"), tr("Chat with this person"), this, SLOT(chatIdentity()));
|
||||
|
||||
if(own_identities.empty())
|
||||
action->setEnabled(false) ;
|
||||
@ -468,7 +469,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMenu *mnu = contextMnu.addMenu(QIcon(":/icons/png/chats.png"),tr("Chat with this person as...")) ;
|
||||
QMenu *mnu = contextMnu.addMenu(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"),tr("Chat with this person as...")) ;
|
||||
|
||||
for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it)
|
||||
{
|
||||
@ -485,20 +486,20 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||
}
|
||||
}
|
||||
|
||||
QAction *actionsendmsg = contextMnu.addAction(QIcon(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMessage()));
|
||||
QAction *actionsendmsg = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMessage()));
|
||||
actionsendmsg->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||
|
||||
QAction *actionsendinvite = contextMnu.addAction(QIcon(":/icons/mail/write-mail.png"), tr("Send invite"), this, SLOT(sendInvite()));
|
||||
QAction *actionsendinvite = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send invite"), this, SLOT(sendInvite()));
|
||||
actionsendinvite->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
QAction *actionaddcontact = contextMnu.addAction(QIcon(""), tr("Add to Contacts"), this, SLOT(addtoContacts()));
|
||||
QAction *actionaddcontact = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(""), tr("Add to Contacts"), this, SLOT(addtoContacts()));
|
||||
actionaddcontact->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
QAction *actionDetails = contextMnu.addAction(QIcon(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails()));
|
||||
QAction *actionDetails = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails()));
|
||||
actionDetails->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
|
@ -31,7 +31,7 @@ AlbumDialog::AlbumDialog(const RsPhotoAlbum& album, TokenQueue* photoQueue, RsPh
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/kview_64.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/kview_64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Album"));
|
||||
|
||||
connect(ui->pushButton_PublishPhotos, SIGNAL(clicked()), this, SLOT(updateAlbumPhotos()));
|
||||
@ -69,7 +69,7 @@ void AlbumDialog::setUp()
|
||||
else
|
||||
{
|
||||
// display a default Album icon when album has no Thumbnail
|
||||
ui->label_thumbNail->setPixmap(QPixmap(":/images/album_default_128.png"));
|
||||
ui->label_thumbNail->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/album_default_128.png"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ void AlbumGroupDialog::initUi()
|
||||
|
||||
QPixmap AlbumGroupDialog::serviceImage()
|
||||
{
|
||||
return QPixmap(":/images/album_create_64.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png");
|
||||
}
|
||||
|
||||
void AlbumGroupDialog::prepareAlbumGroup(RsPhotoAlbum &group, const RsGroupMetaData &meta)
|
||||
@ -175,7 +175,7 @@ bool AlbumGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode
|
||||
setLogo(pixmap);
|
||||
}
|
||||
} else {
|
||||
setLogo(QPixmap(":/images/album_create_64.png"));
|
||||
setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png"));
|
||||
}
|
||||
|
||||
// Load additional data....
|
||||
|
@ -51,7 +51,7 @@ void AlbumItem::setUp()
|
||||
else
|
||||
{
|
||||
// display a default Album icon when album has no Thumbnail
|
||||
ui->label_Thumbnail->setPixmap(QPixmap(":/images/album_default_128.png"));
|
||||
ui->label_Thumbnail->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/album_default_128.png"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ PhotoItem::PhotoItem(PhotoShareItemHolder *holder, const QString& path, uint32_t
|
||||
|
||||
mPhotoDetails.mOrder = order;
|
||||
|
||||
QPixmap qtn = QPixmap(path);
|
||||
QPixmap qtn = FilesDefs::getPixmapFromQtResourcePath(path);
|
||||
mLowResImage = qtn.scaled(512,512, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
ui->label_Thumbnail->setPixmap(qtn.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <iostream>
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include <util/imageutil.h>
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/* View Page */
|
||||
#define VIEW_POST 1
|
||||
@ -56,7 +57,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||
connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/postedlinks.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/postedlinks.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Create a new Post"));
|
||||
|
||||
setAttribute ( Qt::WA_DeleteOnClose, true );
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "PostedGroupDialog.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <retroshare/rswiki.h>
|
||||
#include <iostream>
|
||||
@ -89,7 +90,7 @@ void PostedGroupDialog::initUi()
|
||||
|
||||
QPixmap PostedGroupDialog::serviceImage()
|
||||
{
|
||||
return QPixmap(":/icons/png/posted.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png");
|
||||
}
|
||||
|
||||
void PostedGroupDialog::preparePostedGroup(RsPostedGroup &group, const RsGroupMetaData &meta)
|
||||
@ -159,7 +160,7 @@ bool PostedGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mod
|
||||
|
||||
}
|
||||
else
|
||||
setLogo(QPixmap(":/icons/png/posted.png"));
|
||||
setLogo(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ void PostedItem::fill()
|
||||
ui->voteUpButton->setDisabled(true);
|
||||
ui->voteDownButton->setDisabled(true);
|
||||
|
||||
ui->thumbnailLabel->setPixmap( QPixmap(":/images/thumb-default.png"));
|
||||
ui->thumbnailLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png"));
|
||||
ui->fromLabel->setId(mPost.mMeta.mAuthorId);
|
||||
ui->titleLabel->setText(tr( "<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(mPost.mMeta.mAuthorId.toStdString()))) ;
|
||||
QDateTime qtime;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "PostedItem.h"
|
||||
#include "PostedCardView.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/common/UIStateHelper.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/HandleRichText.h"
|
||||
@ -406,7 +407,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
|
||||
if (group.mGroupImage.mData != NULL) {
|
||||
GxsIdDetails::loadPixmapFromData(group.mGroupImage.mData, group.mGroupImage.mSize, boardImage,GxsIdDetails::ORIGINAL);
|
||||
} else {
|
||||
boardImage = QPixmap(BOARD_DEFAULT_IMAGE);
|
||||
boardImage = FilesDefs::getPixmapFromQtResourcePath(BOARD_DEFAULT_IMAGE);
|
||||
}
|
||||
ui->logoLabel->setPixmap(boardImage);
|
||||
ui->namelabel->setText(QString::fromUtf8(group.mMeta.mGroupName.c_str()));
|
||||
|
@ -33,13 +33,14 @@
|
||||
#include <retroshare/rstypes.h>
|
||||
#include "settings/rsharesettings.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
QuickStartWizard::QuickStartWizard(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/rs_wizard.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/rs_wizard.png"));
|
||||
ui.headerFrame->setHeaderText("RetroShare");
|
||||
|
||||
ui.pagesWizard->setCurrentIndex(0);
|
||||
|
@ -521,7 +521,19 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
||||
case COLUMN_SIZE:
|
||||
return misc::friendlyUnit(details.count);
|
||||
case COLUMN_AGE:
|
||||
return (details.type == DIR_TYPE_FILE)?(misc::timeRelativeToNow(details.max_mtime)):QString();
|
||||
{
|
||||
if(details.type == DIR_TYPE_FILE)
|
||||
return misc::timeRelativeToNow(details.max_mtime);
|
||||
else if(details.type == DIR_TYPE_EXTRA_FILE)
|
||||
{
|
||||
FileInfo fi;
|
||||
if (rsFiles->FileDetails(details.hash, RS_FILE_HINTS_EXTRA , fi))
|
||||
return misc::timeRelativeToNow((rstime_t)fi.age-(30 * 3600 * 24)); // AFI_DEFAULT_PERIOD
|
||||
return QString();
|
||||
}
|
||||
else
|
||||
return QString();
|
||||
}
|
||||
case COLUMN_FRIEND_ACCESS:
|
||||
return QVariant();
|
||||
case COLUMN_WN_VISU_DIR:
|
||||
@ -1370,7 +1382,7 @@ void RetroshareDirModel::getFileInfoFromIndexList(const QModelIndexList& list, s
|
||||
* OLD RECOMMEND SYSTEM - DISABLED
|
||||
******/
|
||||
|
||||
void RetroshareDirModel::openSelected(const QModelIndexList &qmil)
|
||||
void RetroshareDirModel::openSelected(const QModelIndexList &qmil, bool openDir)
|
||||
{
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "RetroshareDirModel::openSelected()" << std::endl;
|
||||
@ -1393,12 +1405,15 @@ void RetroshareDirModel::openSelected(const QModelIndexList &qmil)
|
||||
|
||||
QDir dir(QString::fromUtf8((*it).path.c_str()));
|
||||
QString dest;
|
||||
if ((*it).type & DIR_TYPE_FILE || (*it).type & DIR_TYPE_EXTRA_FILE) {
|
||||
if ((*it).type & DIR_TYPE_FILE || (!openDir && (*it).type & DIR_TYPE_EXTRA_FILE)) {
|
||||
dest = dir.absoluteFilePath(QString::fromUtf8(it->name.c_str()));
|
||||
} else if ((*it).type & DIR_TYPE_DIR) {
|
||||
dest = dir.absolutePath();
|
||||
} else if (openDir) // extra
|
||||
{
|
||||
QDir d = QFileInfo(it->name.c_str()).absoluteDir();
|
||||
dest = d.absolutePath();
|
||||
}
|
||||
|
||||
std::cerr << "Opening this file: " << dest.toStdString() << std::endl ;
|
||||
|
||||
RsUrlHandler::openUrl(QUrl::fromLocalFile(dest));
|
||||
|
@ -82,7 +82,7 @@ class RetroshareDirModel : public QAbstractItemModel
|
||||
|
||||
int getType ( const QModelIndex & index ) const ;
|
||||
void getFileInfoFromIndexList(const QModelIndexList& list, std::list<DirDetails>& files_info) ;
|
||||
void openSelected(const QModelIndexList &list);
|
||||
void openSelected(const QModelIndexList &list, bool openDir = false);
|
||||
void getFilePaths(const QModelIndexList &list, std::list<std::string> &fullpaths);
|
||||
void getFilePath(const QModelIndex& index, std::string& fullpath);
|
||||
void changeAgeIndicator(uint32_t indicator) { ageIndicator = indicator; }
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "ServicePermissionDialog.h"
|
||||
#include "ui_ServicePermissionDialog.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
static ServicePermissionDialog *servicePermissionDialog = NULL;
|
||||
|
||||
@ -36,7 +37,7 @@ ServicePermissionDialog::ServicePermissionDialog() :
|
||||
|
||||
Settings->loadWidgetInformation(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/servicepermissions64.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/servicepermissions64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Service Permissions"));
|
||||
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(setPermissions()));
|
||||
|
@ -38,10 +38,11 @@
|
||||
#include "gui/notifyqt.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "util/misc.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_CANCEL ":/images/delete.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
|
||||
#define COLUMN_PATH 0
|
||||
#define COLUMN_VIRTUALNAME 1
|
||||
@ -57,7 +58,7 @@ ShareManager::ShareManager()
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/fileshare64.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/fileshare64.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Share Manager"));
|
||||
|
||||
isLoading = false;
|
||||
|
@ -409,7 +409,7 @@ void PulseAddDialog::addImage(const QString &path)
|
||||
std::cerr << "PulseAddDialog::addImage() loading image from: " << path.toStdString();
|
||||
std::cerr << std::endl;
|
||||
|
||||
QPixmap qtn = QPixmap(path);
|
||||
QPixmap qtn = FilesDefs::getPixmapFromQtResourcePath(path);
|
||||
if (qtn.isNull()) {
|
||||
std::cerr << "PulseAddDialog::addImage() Invalid Image";
|
||||
std::cerr << std::endl;
|
||||
|
@ -126,9 +126,9 @@ void PulseTopLevel::setReferenceString(QString ref)
|
||||
|
||||
// set ref icon
|
||||
if (mPulse->mPulseType & WIRE_PULSE_TYPE_REPUBLISH) {
|
||||
label_reficon->setPixmap(QPixmap(":/images/retweet.png"));
|
||||
label_reficon->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/retweet.png"));
|
||||
} else {
|
||||
label_reficon->setPixmap(QPixmap(":/images/reply.png"));
|
||||
label_reficon->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/reply.png"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void PulseViewGroup::setup()
|
||||
else
|
||||
{
|
||||
// default.
|
||||
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50);
|
||||
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
|
||||
label_headshot->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ void PulseDataItem::showPulse()
|
||||
if (!headshotOkay)
|
||||
{
|
||||
// default.
|
||||
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50);
|
||||
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
|
||||
setHeadshot(pixmap);
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ void PulseDataItem::showPulse()
|
||||
if (!headshotOkay)
|
||||
{
|
||||
// default.
|
||||
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50);
|
||||
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
|
||||
setHeadshot(pixmap); // QPixmap(":/icons/png/posted.png"));
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ void WireGroupDialog::initUi()
|
||||
|
||||
QPixmap WireGroupDialog::serviceImage()
|
||||
{
|
||||
return QPixmap(":/icons/wire-circle.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/icons/wire-circle.png");
|
||||
}
|
||||
|
||||
void WireGroupDialog::prepareWireGroup(RsWireGroup &group, const RsGroupMetaData &meta)
|
||||
@ -178,7 +178,7 @@ bool WireGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode
|
||||
setLogo(pixmap);
|
||||
}
|
||||
} else {
|
||||
setLogo(QPixmap(":/images/album_create_64.png"));
|
||||
setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -66,7 +66,7 @@ void WireGroupItem::setup()
|
||||
else
|
||||
{
|
||||
// default.
|
||||
QPixmap pixmap = QPixmap(":/icons/wire.png").scaled(32,32);
|
||||
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(32,32);
|
||||
label_headshot->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
#define IMAGE_FORUMAUTHD ":/images/konv_message2.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_WIKI ":/icons/png/wiki.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
|
||||
|
||||
/** Constructor */
|
||||
|
@ -414,7 +414,7 @@ void WikiEditDialog::setNewPage()
|
||||
ui.groupBox_History->hide();
|
||||
ui.pushButton_History->setText(tr("Show Edit History"));
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/addpage.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/addpage.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Create New Wiki Page"));
|
||||
setWindowTitle(tr("Create New Wiki Page"));
|
||||
|
||||
@ -569,7 +569,7 @@ void WikiEditDialog::setupData(const RsGxsGroupId &groupId, const RsGxsMessageId
|
||||
requestPage(msgId);
|
||||
}
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/editpage.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/editpage.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Edit Wiki Page"));
|
||||
setWindowTitle(tr("Edit Wiki Page"));
|
||||
|
||||
|
@ -154,7 +154,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
|
||||
{
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/icons/png/invite.png")) ;
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/invite.png")) ;
|
||||
inviteFriendsButton->setIcon(icon) ;
|
||||
inviteFriendsButton->setIconSize(icon_size);
|
||||
}
|
||||
@ -196,7 +196,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
|
||||
{
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/icons/png/leave.png")) ;
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/leave.png")) ;
|
||||
unsubscribeButton->setIcon(icon) ;
|
||||
unsubscribeButton->setIconSize(icon_size);
|
||||
}
|
||||
@ -994,7 +994,7 @@ void ChatLobbyDialog::setWindowed(bool windowed)
|
||||
mPCWindow->addDialog(this);
|
||||
|
||||
undockButton->setToolTip(tr("Redock to Main window"));
|
||||
icon.addPixmap(QPixmap(":/icons/png/dock.png")) ;
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/dock.png")) ;
|
||||
undockButton->setIcon(icon) ;
|
||||
undockButton->setIconSize(icon_size);
|
||||
}
|
||||
@ -1009,7 +1009,7 @@ void ChatLobbyDialog::setWindowed(bool windowed)
|
||||
chatLobbyPage->addChatPage(this);
|
||||
|
||||
undockButton->setToolTip(tr("Undock to a new window"));
|
||||
icon.addPixmap(QPixmap(":/icons/png/undock.png")) ;
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/undock.png")) ;
|
||||
undockButton->setIcon(icon) ;
|
||||
undockButton->setIconSize(icon_size);
|
||||
}
|
||||
|
@ -1863,7 +1863,7 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
|
||||
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
|
||||
{
|
||||
ui->typingLabel->setText(QString(statusMask).arg(trUtf8(statusString.toUtf8()))); // displays info for 5 secs.
|
||||
ui->typingPixmapLabel->setPixmap(QPixmap(":icons/png/typing.png") );
|
||||
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") );
|
||||
|
||||
if (statusString == "is typing...") {
|
||||
typing = true;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "ChatDialog.h"
|
||||
#include "gui/ChatLobbyWidget.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int privacyLevel, QWidget *parent) :
|
||||
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
|
||||
@ -40,7 +41,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int pr
|
||||
ui = new Ui::CreateLobbyDialog() ;
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/chat-lobbies.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/chat-lobbies.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Create Chat Room"));
|
||||
|
||||
RsGxsId default_identity ;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gui/gxs/GxsIdDetails.h>
|
||||
|
||||
#include "AvatarDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
|
||||
{
|
||||
@ -36,7 +37,7 @@ void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
|
||||
rsMsgs->getOwnAvatarData(data, size);
|
||||
|
||||
if (size == 0) {
|
||||
avatar = QPixmap(defaultImage);
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -53,7 +54,7 @@ bool AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
|
||||
/* get avatar */
|
||||
rsMsgs->getAvatarData(RsPeerId(sslId), data, size);
|
||||
if (size == 0) {
|
||||
avatar = QPixmap(defaultImage);
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -72,7 +73,7 @@ bool AvatarDefs::getAvatarFromGxsId(const RsGxsId& gxsId, QPixmap &avatar, const
|
||||
|
||||
if(!rsIdentity->getIdDetails(gxsId, details))
|
||||
{
|
||||
avatar = QPixmap(defaultImage);
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -107,7 +108,7 @@ bool AvatarDefs::getAvatarFromGpgId(const RsPgpId& gpgId, QPixmap &avatar, const
|
||||
}
|
||||
|
||||
if (size == 0) {
|
||||
avatar = QPixmap(defaultImage);
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "ui_AvatarDialog.h"
|
||||
#include "AvatarDefs.h"
|
||||
#include "util/misc.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/** Constructor */
|
||||
AvatarDialog::AvatarDialog(QWidget *parent) :
|
||||
@ -33,7 +34,7 @@ AvatarDialog::AvatarDialog(QWidget *parent) :
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/no_avatar_70.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/no_avatar_70.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Set your Avatar picture"));
|
||||
|
||||
connect(ui->avatarButton, SIGNAL(clicked(bool)), this, SLOT(changeAvatar()));
|
||||
|
@ -238,7 +238,7 @@ void Emoticons::showSmileyWidget(QWidget *parent, QWidget *button, const char *s
|
||||
QPushButton *button = new QPushButton("", tabGrpWidget);
|
||||
button->setIconSize(QSize(buttonWidth, buttonHeight));
|
||||
button->setFixedSize(QSize(buttonWidth, buttonHeight));
|
||||
button->setIcon(QPixmap(group.value(key)));
|
||||
button->setIcon(FilesDefs::getIconFromQtResourcePath(group.value(key)));
|
||||
button->setToolTip(key);
|
||||
button->setStyleSheet("QPushButton:hover {border: 3px solid #0099cc; border-radius: 3px;}");
|
||||
button->setFlat(true);
|
||||
@ -402,7 +402,7 @@ void Emoticons::showStickerWidget(QWidget *parent, QWidget *button, const char *
|
||||
button->setFixedSize(QSize(buttonWidth, buttonHeight));
|
||||
if(!iconcache.contains(fi.absoluteFilePath()))
|
||||
{
|
||||
iconcache.insert(fi.absoluteFilePath(), QPixmap(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio));
|
||||
iconcache.insert(fi.absoluteFilePath(), FilesDefs::getPixmapFromQtResourcePath(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio));
|
||||
}
|
||||
button->setIcon(iconcache[fi.absoluteFilePath()]);
|
||||
button->setToolTip(fi.fileName());
|
||||
|
@ -102,7 +102,7 @@ QPixmap FilesDefs::getPixmapFromQtResourcePath(const QString& resource_path)
|
||||
#ifdef DEBUG_FILESDEFS
|
||||
std::cerr << " Not in cache. Creating new one." << std::endl;
|
||||
#endif
|
||||
pixmap = QPixmap(resource_path);
|
||||
pixmap = QPixmap(resource_path);
|
||||
mPixmapCache[resource_path] = pixmap;
|
||||
}
|
||||
else
|
||||
|
@ -70,7 +70,7 @@
|
||||
#define IMAGE_CONNECT ":/images/connect_friend.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_GROUP16 ":/images/user/group16.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_REMOVE ":/images/delete.png"
|
||||
#define IMAGE_EXPAND ":/images/edit_add24.png"
|
||||
#define IMAGE_COLLAPSE ":/images/edit_remove24.png"
|
||||
@ -306,7 +306,7 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
|
||||
hbox->setSpacing(6);
|
||||
|
||||
QLabel *iconLabel = new QLabel(widget);
|
||||
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
iconLabel->setPixmap(pix);
|
||||
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
|
||||
hbox->addWidget(iconLabel);
|
||||
@ -1006,7 +1006,7 @@ void FriendList::insertPeers()
|
||||
sslItem->setHidden(false);
|
||||
gpg_connected = true;
|
||||
|
||||
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(bestRSState));
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(bestRSState));
|
||||
|
||||
connectStateString = StatusDefs::name(rsState);
|
||||
|
||||
@ -1024,9 +1024,9 @@ void FriendList::insertPeers()
|
||||
peerState = PEER_STATE_AVAILABLE;
|
||||
|
||||
if (sslDetail.connectState) {
|
||||
sslOverlayIcon = QPixmap(":/images/connect_creating.png");
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/connect_creating.png");
|
||||
} else {
|
||||
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_ONLINE));
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_ONLINE));
|
||||
}
|
||||
|
||||
connectStateString = StatusDefs::name(RS_STATUS_ONLINE);
|
||||
@ -1037,9 +1037,9 @@ void FriendList::insertPeers()
|
||||
peerState = PEER_STATE_OFFLINE;
|
||||
sslItem->setHidden(mHideUnconnected);
|
||||
if (sslDetail.connectState) {
|
||||
sslOverlayIcon = QPixmap(":/images/connect_creating.png");
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/connect_creating.png");
|
||||
} else {
|
||||
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
|
||||
}
|
||||
|
||||
connectStateString = StatusDefs::connectStateWithoutTransportTypeString(sslDetail);
|
||||
@ -1099,7 +1099,7 @@ void FriendList::insertPeers()
|
||||
|
||||
if (std::find(privateChatIds.begin(), privateChatIds.end(), sslDetail.id) != privateChatIds.end()) {
|
||||
// private chat is available
|
||||
sslOverlayIcon = QPixmap(":/images/chat.png");
|
||||
sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/chat.png");
|
||||
gpg_hasPrivateChat = true;
|
||||
}
|
||||
sslItem->setIcon(COLUMN_NAME, createAvatar(sslAvatar, sslOverlayIcon));
|
||||
@ -1138,7 +1138,7 @@ void FriendList::insertPeers()
|
||||
gpgFont = StatusDefs::font(bestRSState);
|
||||
|
||||
if (showInfoAtGpgItem) {
|
||||
gpgOverlayIcon = QPixmap(StatusDefs::imageStatus(bestRSState));
|
||||
gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(bestRSState));
|
||||
|
||||
if (mShowState) {
|
||||
gpgText = StatusDefs::name(bestRSState);
|
||||
@ -1164,7 +1164,7 @@ void FriendList::insertPeers()
|
||||
gpgText += tr("Available");
|
||||
}
|
||||
|
||||
gpgOverlayIcon = QPixmap(IMAGE_AVAILABLE);
|
||||
gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(IMAGE_AVAILABLE);
|
||||
}
|
||||
} else {
|
||||
bestPeerState = PEER_STATE_OFFLINE;
|
||||
@ -1178,15 +1178,15 @@ void FriendList::insertPeers()
|
||||
gpgText += StatusDefs::name(RS_STATUS_OFFLINE);
|
||||
}
|
||||
|
||||
gpgOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
|
||||
gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
|
||||
}
|
||||
}
|
||||
|
||||
if (gpg_hasPrivateChat) {
|
||||
gpgOverlayIcon = QPixmap(":/images/chat.png");
|
||||
gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/chat.png");
|
||||
}
|
||||
|
||||
gpgItem->setIcon(COLUMN_NAME, createAvatar(bestAvatar.isNull() ? QPixmap(AVATAR_DEFAULT_IMAGE) : bestAvatar, gpgOverlayIcon));
|
||||
gpgItem->setIcon(COLUMN_NAME, createAvatar(bestAvatar.isNull() ? FilesDefs::getPixmapFromQtResourcePath(AVATAR_DEFAULT_IMAGE) : bestAvatar, gpgOverlayIcon));
|
||||
|
||||
/* Create or get gpg label */
|
||||
ElidedLabel *gpgNameLabel = NULL;
|
||||
|
@ -65,8 +65,8 @@
|
||||
<string>Display</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/svg/design.svg</normaloff>:/icons/svg/design.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@ -147,6 +147,7 @@
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -69,7 +69,7 @@
|
||||
#define IMAGE_CONNECT ":/images/connect_friend.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_GROUP16 ":/images/user/group16.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_REMOVE ":/images/delete.png"
|
||||
#define IMAGE_EXPAND ":/images/edit_add24.png"
|
||||
#define IMAGE_COLLAPSE ":/images/edit_remove24.png"
|
||||
@ -307,7 +307,7 @@ void NewFriendList::headerContextMenuRequested(QPoint p)
|
||||
hbox->setSpacing(6);
|
||||
|
||||
QLabel *iconLabel = new QLabel(widget);
|
||||
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
iconLabel->setPixmap(pix);
|
||||
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
|
||||
hbox->addWidget(iconLabel);
|
||||
@ -534,7 +534,7 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
||||
hbox->setSpacing(6);
|
||||
|
||||
QLabel *iconLabel = new QLabel(widget);
|
||||
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
iconLabel->setPixmap(pix);
|
||||
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
|
||||
hbox->addWidget(iconLabel);
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "RSTextBrowser.h"
|
||||
#include "RSImageBlockWidget.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <retroshare/rsinit.h> //To get RsAccounts
|
||||
|
||||
@ -149,7 +150,7 @@ QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
|
||||
|
||||
QPixmap RSTextBrowser::getBlockedImage()
|
||||
{
|
||||
return QPixmap(":/images/imageblocked_24.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/images/imageblocked_24.png");
|
||||
}
|
||||
|
||||
void RSTextBrowser::setImageBlockWidget(RSImageBlockWidget *widget)
|
||||
|
@ -30,7 +30,10 @@ RSTreeView::RSTreeView(QWidget *parent) : QTreeView(parent)
|
||||
void RSTreeView::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
if(e->modifiers() == Qt::ControlModifier)
|
||||
{
|
||||
emit zoomRequested(e->delta() > 0);
|
||||
return;
|
||||
}
|
||||
else
|
||||
QTreeView::wheelEvent(e);
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <QWidgetAction>
|
||||
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
RSTreeWidget::RSTreeWidget(QWidget *parent) : QTreeWidget(parent)
|
||||
{
|
||||
@ -259,7 +260,7 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
|
||||
hbox->setSpacing(6);
|
||||
|
||||
QLabel *iconLabel = new QLabel(widget);
|
||||
QPixmap pix = QPixmap(":/images/settings.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/settings.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
|
||||
iconLabel->setPixmap(pix);
|
||||
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
|
||||
hbox->addWidget(iconLabel);
|
||||
|
@ -143,7 +143,7 @@ RsCollectionDialog::RsCollectionDialog(const QString& collectionFileName
|
||||
setWindowTitle(QString("%1 - %2").arg(windowTitle()).arg(QFileInfo(_fileName).completeBaseName()));
|
||||
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/icons/collections.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/collections.png"));
|
||||
|
||||
if(creation)
|
||||
{
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "util/misc.h"
|
||||
@ -84,7 +85,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
Settings->loadWidgetInformation(this);
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
|
||||
//ui.headerFrame->setHeaderText(tr("Friend node details"));
|
||||
|
||||
//ui._chat_CB->hide() ;
|
||||
|
@ -95,10 +95,10 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
||||
// setOption(HaveHelpButton, true);
|
||||
// connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
|
||||
|
||||
setPixmap(QWizard::LogoPixmap, QPixmap(":/icons/invite64.png"));
|
||||
setPixmap(QWizard::LogoPixmap, FilesDefs::getPixmapFromQtResourcePath(":/icons/invite64.png"));
|
||||
|
||||
// we have no good pictures for watermarks
|
||||
// setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/connectFriendWatermark.png"));
|
||||
// setPixmap(QWizard::WatermarkPixmap, FilesDefs::getPixmapFromQtResourcePath(":/images/connectFriendWatermark.png"));
|
||||
|
||||
/* register global fields */
|
||||
ui->ErrorMessagePage->registerField("errorMessage", ui->messageLabel, "text");
|
||||
@ -563,7 +563,7 @@ void ConnectFriendWizard::initializePage(int id)
|
||||
ui->_addIPToWhiteList_ComboBox_2->addItem("(Hidden node)") ;
|
||||
int S = QFontMetricsF(ui->ipEdit->font()).height() ;
|
||||
ui->ipEdit->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect");
|
||||
ui->ipLabel->setPixmap(QPixmap(":/images/anonymous_128_blue.png").scaledToHeight(S*2,Qt::SmoothTransformation));
|
||||
ui->ipLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/anonymous_128_blue.png").scaledToHeight(S*2,Qt::SmoothTransformation));
|
||||
ui->ipLabel->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect");
|
||||
}
|
||||
if(mIsShortInvite)
|
||||
@ -813,7 +813,7 @@ void ConnectFriendWizard::cleanFriendCert()
|
||||
std::string cert = ui->friendCertEdit->toPlainText().toUtf8().constData();
|
||||
|
||||
if (cert.empty()) {
|
||||
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png"));
|
||||
ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
|
||||
ui->friendCertCleanLabel->setToolTip("");
|
||||
ui->friendCertCleanLabel->setStyleSheet("");
|
||||
errorMsg = tr("");
|
||||
@ -837,7 +837,7 @@ void ConnectFriendWizard::cleanFriendCert()
|
||||
}
|
||||
errorMsg = tr("Valid certificate") + (mIsShortInvite?" (Short format)":" (plain format with profile key)");
|
||||
|
||||
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/accepted16.png"));
|
||||
ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/accepted16.png"));
|
||||
} else {
|
||||
if (error_code > 0) {
|
||||
switch (error_code) {
|
||||
@ -856,11 +856,11 @@ void ConnectFriendWizard::cleanFriendCert()
|
||||
ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}");
|
||||
}
|
||||
}
|
||||
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png"));
|
||||
ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
|
||||
}
|
||||
}
|
||||
|
||||
ui->friendCertCleanLabel->setPixmap(certValid ? QPixmap(":/images/accepted16.png") : QPixmap(":/images/delete.png"));
|
||||
ui->friendCertCleanLabel->setPixmap(certValid ? FilesDefs::getPixmapFromQtResourcePath(":/images/accepted16.png") : FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
|
||||
ui->friendCertCleanLabel->setToolTip(errorMsg);
|
||||
ui->friendCertCleanLabel->setText(errorMsg);
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <retroshare/rsdht.h>
|
||||
|
||||
#include "gui/common/StatusDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/* maintain one static dialog per SSL ID */
|
||||
|
||||
@ -56,7 +57,7 @@ ConnectProgressDialog::ConnectProgressDialog(const RsPeerId& id, QWidget *parent
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Connection Assistant"));
|
||||
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(stopAndClose()));
|
||||
|
@ -75,7 +75,7 @@ PGPKeyDialog::PGPKeyDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *p
|
||||
// ui._useOldFormat_CB->setEnabled(false) ;
|
||||
// }
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Retroshare profile"));
|
||||
|
||||
//ui._chat_CB->hide() ;
|
||||
|
@ -148,7 +148,7 @@ void GxsChannelGroupItem::fill()
|
||||
if (mGroup.mImage.mData != NULL) {
|
||||
QPixmap chanImage;
|
||||
GxsIdDetails::loadPixmapFromData(mGroup.mImage.mData, mGroup.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL);
|
||||
ui->logoLabel->setPixmap(QPixmap(chanImage));
|
||||
ui->logoLabel->setPixmap(chanImage);
|
||||
}
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
||||
|
@ -156,7 +156,7 @@ void GxsChannelPostItem::setup()
|
||||
// memory.
|
||||
|
||||
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png"));
|
||||
ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png"));
|
||||
//ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png"));
|
||||
ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
||||
ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
|
||||
ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
|
||||
@ -211,12 +211,12 @@ void GxsChannelPostItem::setup()
|
||||
|
||||
ui->downloadButton->hide();
|
||||
ui->playButton->hide();
|
||||
ui->warn_image_label->hide();
|
||||
ui->warning_label->hide();
|
||||
//ui->warn_image_label->hide();
|
||||
//ui->warning_label->hide();
|
||||
|
||||
ui->titleLabel->setMinimumWidth(100);
|
||||
//ui->subjectLabel->setMinimumWidth(100);
|
||||
ui->warning_label->setMinimumWidth(100);
|
||||
//ui->warning_label->setMinimumWidth(100);
|
||||
|
||||
ui->mainFrame->setProperty("new", false);
|
||||
ui->mainFrame->style()->unpolish(ui->mainFrame);
|
||||
@ -466,7 +466,7 @@ void GxsChannelPostItem::fill()
|
||||
ui->titleLabel->setText(title);
|
||||
|
||||
RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName());
|
||||
//ui->subjectLabel->setText(msgLink.toHtml());
|
||||
ui->subjectLabel->setText(msgLink.toHtml());
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
||||
{
|
||||
@ -489,12 +489,12 @@ void GxsChannelPostItem::fill()
|
||||
/* subject */
|
||||
ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
|
||||
|
||||
//uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
||||
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
||||
|
||||
// fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy
|
||||
//ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
|
||||
//ui->subjectLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), 2)) ;
|
||||
ui->subjectLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), 2)) ;
|
||||
|
||||
//QString score = QString::number(post.mTopScore);
|
||||
// scoreLabel->setText(score);
|
||||
@ -654,21 +654,21 @@ void GxsChannelPostItem::setReadStatus(bool isNew, bool isUnread)
|
||||
ui->mainFrame->style()->polish( ui->mainFrame);
|
||||
}
|
||||
|
||||
void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left)
|
||||
{
|
||||
int hours = (int)time_left/3600;
|
||||
int minutes = (time_left - hours*3600)%60;
|
||||
|
||||
ui->warning_label->setText(tr("Warning! You have less than %1 hours and %2 minute before this file is deleted Consider saving it.").arg(
|
||||
QString::number(hours)).arg(QString::number(minutes)));
|
||||
|
||||
QFont warnFont = ui->warning_label->font();
|
||||
warnFont.setBold(true);
|
||||
ui->warning_label->setFont(warnFont);
|
||||
|
||||
ui->warn_image_label->setVisible(true);
|
||||
ui->warning_label->setVisible(true);
|
||||
}
|
||||
// void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left)
|
||||
// {
|
||||
// int hours = (int)time_left/3600;
|
||||
// int minutes = (time_left - hours*3600)%60;
|
||||
//
|
||||
// ui->warning_label->setText(tr("Warning! You have less than %1 hours and %2 minute before this file is deleted Consider saving it.").arg(
|
||||
// QString::number(hours)).arg(QString::number(minutes)));
|
||||
//
|
||||
// QFont warnFont = ui->warning_label->font();
|
||||
// warnFont.setBold(true);
|
||||
// ui->warning_label->setFont(warnFont);
|
||||
//
|
||||
// ui->warn_image_label->setVisible(true);
|
||||
// ui->warning_label->setVisible(true);
|
||||
// }
|
||||
|
||||
void GxsChannelPostItem::updateItem()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
bool setGroup(const RsGxsChannelGroup& group, bool doFill = true);
|
||||
bool setPost(const RsGxsChannelPost& post, bool doFill = true);
|
||||
|
||||
void setFileCleanUpWarning(uint32_t time_left);
|
||||
//void setFileCleanUpWarning(uint32_t time_left);
|
||||
|
||||
QString getTitleLabel();
|
||||
QString getMsgLabel();
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>922</width>
|
||||
<height>187</height>
|
||||
<width>1092</width>
|
||||
<height>231</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gxsChannelPostItem_GLayout">
|
||||
@ -124,6 +124,16 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="subjectLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
@ -137,33 +147,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="subjectHLayout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="warningHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="warn_image_label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="warning_label">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||
<property name="topMargin">
|
||||
@ -486,21 +469,18 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>StyledElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledElidedLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">gui/common/ElidedLabel.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StyledElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledElidedLabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -159,9 +159,9 @@ void GxsForumGroupItem::fill()
|
||||
ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str()));
|
||||
|
||||
if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
|
||||
ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums.png"));
|
||||
ui->forumlogo_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
|
||||
} else {
|
||||
ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums-default.png"));
|
||||
ui->forumlogo_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums-default.png"));
|
||||
}
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
||||
|
@ -335,9 +335,9 @@ void GxsForumMsgItem::fill()
|
||||
}
|
||||
|
||||
if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
|
||||
ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums.png"));
|
||||
ui->iconLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
|
||||
} else {
|
||||
ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums-default.png"));
|
||||
ui->iconLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums-default.png"));
|
||||
}
|
||||
|
||||
if (!mIsHome) {
|
||||
|
@ -157,15 +157,15 @@ void PostedGroupItem::fill()
|
||||
GxsIdDetails::loadPixmapFromData(mGroup.mGroupImage.mData, mGroup.mGroupImage.mSize, postedImage,GxsIdDetails::ORIGINAL);
|
||||
ui->logoLabel->setPixmap(QPixmap(postedImage));
|
||||
} else {
|
||||
ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png"));
|
||||
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
|
||||
}
|
||||
|
||||
|
||||
//TODO - nice icon for subscribed group
|
||||
// if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
|
||||
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png"));
|
||||
// ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
|
||||
// } else {
|
||||
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png"));
|
||||
// ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
|
||||
// }
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "gui/common/GroupDefs.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -40,7 +41,7 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent)
|
||||
|
||||
mIsStandard = false;
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/add_group256.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/add_group256.png"));
|
||||
|
||||
mGroupId = groupId;
|
||||
|
||||
@ -68,7 +69,7 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent)
|
||||
}
|
||||
|
||||
setWindowTitle(tr("Edit Group"));
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/edit_group64.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/edit_group64.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Edit Group"));
|
||||
|
||||
ui.groupName->setDisabled(mIsStandard);
|
||||
|
@ -46,7 +46,7 @@
|
||||
#define IMAGE_INFO ":/images/info16.png"
|
||||
//#define IMAGE_GROUPAUTHD ":/images/konv_message2.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
#define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_SHARE ":/images/share-icon-16.png"
|
||||
#define IMAGE_TABNEW ":/images/tab-new.png"
|
||||
#define IMAGE_DELETE ":/images/delete.png"
|
||||
@ -146,7 +146,7 @@ void GxsGroupFrameDialog::initUi()
|
||||
{
|
||||
registerHelpButton(ui->helpButton, getHelpString(),pageName()) ;
|
||||
|
||||
ui->titleBarPixmap->setPixmap(QPixmap(icon(ICON_NAME)));
|
||||
ui->titleBarPixmap->setPixmap(FilesDefs::getPixmapFromQtResourcePath(icon(ICON_NAME)));
|
||||
ui->titleBarLabel->setText(text(TEXT_NAME));
|
||||
|
||||
/* Initialize group tree */
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <retroshare/rsposted.h>
|
||||
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grpType) :
|
||||
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mGrpId(grpId), mGrpType(grpType)
|
||||
@ -36,7 +37,7 @@ GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grp
|
||||
ui = new Ui::ShareKey();
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/agt_forum64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share"));
|
||||
|
||||
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey()));
|
||||
@ -76,14 +77,14 @@ void GroupShareKey::setTyp()
|
||||
if (!rsGxsChannels)
|
||||
return;
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/channels.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channels.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share channel publish permissions"));
|
||||
ui->sharekeyinfo_label->setText(tr("You can allow your friends to publish in your channel, or send the publish permissions to another Retroshare instance of yours. Select the friends which you want to be allowed to publish in this channel. Note: it is currently not possible to revoke channel publish permissions."));
|
||||
}
|
||||
else if(mGrpType == FORUM_KEY_SHARE)
|
||||
{
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/forums.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share forum admin permissions"));
|
||||
ui->sharekeyinfo_label->setText(tr("You can let your friends know about your forum by sharing it with them. Select the friends with which you want to share your forum."));
|
||||
|
||||
@ -93,7 +94,7 @@ void GroupShareKey::setTyp()
|
||||
if (!rsPosted)
|
||||
return;
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/posted.png"));
|
||||
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share board admin permissions"));
|
||||
ui->sharekeyinfo_label->setText(tr("You can allow your friends to edit the board. Select them in the list below. Note: it is not possible to revoke Board admin permissions."));
|
||||
|
||||
|
@ -161,7 +161,7 @@ QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
|
||||
if(mId.isNull())
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
else if( rsReputations->overallReputationLevel(mId) == RsReputationLevel::LOCALLY_NEGATIVE )
|
||||
pix = QPixmap(BANNED_IMAGE);
|
||||
pix = FilesDefs::getPixmapFromQtResourcePath(BANNED_IMAGE);
|
||||
else if ( mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(mAvatar.mData, mAvatar.mSize, pix,GxsIdDetails::LARGE) )
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId,GxsIdDetails::LARGE);
|
||||
|
||||
|
@ -87,7 +87,7 @@ void WikiGroupDialog::initUi()
|
||||
|
||||
QPixmap WikiGroupDialog::serviceImage()
|
||||
{
|
||||
return QPixmap(":/icons/png/wiki.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/wiki.png");
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
setupUi(this);
|
||||
Settings->loadWidgetInformation(this);
|
||||
|
||||
headerFrame->setHeaderImage(QPixmap(":/icons/png/channel.png"));
|
||||
headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channel.png"));
|
||||
|
||||
if(!existing_post.isNull())
|
||||
headerFrame->setHeaderText(tr("Edit Channel Post"));
|
||||
@ -72,13 +72,18 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
|
||||
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&)));
|
||||
connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&)));
|
||||
|
||||
connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail()));
|
||||
connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool)));
|
||||
connect(stackedWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenu(QPoint)));
|
||||
connect(generateCheckBox, SIGNAL(toggled(bool)), generateSpinBox, SLOT(setEnabled(bool)));
|
||||
connect(aspectRatio_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(changeAspectRatio(int)));
|
||||
connect(aspectRatio_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(changeAspectRatio(int)));
|
||||
|
||||
channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
||||
attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png"));
|
||||
addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png"));
|
||||
addfilepushButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-file.png"));
|
||||
|
||||
aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg"));
|
||||
aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg"));
|
||||
@ -106,6 +111,9 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
generateCheckBox->hide();
|
||||
generateSpinBox->hide();
|
||||
#endif
|
||||
|
||||
/* load settings */
|
||||
processSettings(true);
|
||||
}
|
||||
|
||||
CreateGxsChannelMsg::~CreateGxsChannelMsg()
|
||||
@ -114,6 +122,29 @@ CreateGxsChannelMsg::~CreateGxsChannelMsg()
|
||||
#ifdef CHANNELS_FRAME_CATCHER
|
||||
delete fCatcher;
|
||||
#endif
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::processSettings(bool load)
|
||||
{
|
||||
Settings->beginGroup(QString("CreateGxsChannelMsg"));
|
||||
|
||||
if (load) {
|
||||
// load settings
|
||||
|
||||
// state of Ratio combobox
|
||||
int index = Settings->value("aspectRatio_CB", 0).toInt();
|
||||
aspectRatio_CB->setCurrentIndex(index);
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of Ratio combobox
|
||||
Settings->setValue("aspectRatio_CB", aspectRatio_CB->currentIndex());
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::changeAspectRatio(int s)
|
||||
|
@ -72,6 +72,7 @@ private slots:
|
||||
void on_channelpostButton_clicked();
|
||||
void on_attachmentsButton_clicked();
|
||||
private:
|
||||
void processSettings(bool load);
|
||||
void loadChannelInfo();
|
||||
void loadOriginalChannelPostInfo();
|
||||
void saveChannelInfo(const RsGroupMetaData &group);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>881</width>
|
||||
<height>383</height>
|
||||
<height>328</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
@ -39,13 +39,6 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="HeaderFrame" name="headerFrame">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="mainFrame">
|
||||
<property name="frameShape">
|
||||
@ -64,6 +57,19 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="attachmentsButton">
|
||||
<property name="text">
|
||||
<string>Attachments</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="mouseTracking">
|
||||
@ -79,207 +85,188 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stackedWidgetPage1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="ChannelPostThumbnailView" name="preview_W" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="ChannelPostThumbnailView" name="preview_W" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="channelNameHLayout">
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="channelNameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel Post to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="channelName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="channelAttachLabel">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="channelNameHLayout">
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="channelNameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel Post to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="channelName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="channelAttachLabel">
|
||||
<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:'Ubuntu'; font-size:11pt; 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-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Attachments:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Use Drag and Drop / Add Files button, to Hash new files.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Copy/Paste RetroShare links from your shares</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addThumbnailButton">
|
||||
<property name="text">
|
||||
<string>Add Channel Thumbnail</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="aspectRatio_CB">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addThumbnailButton">
|
||||
<property name="text">
|
||||
<string>Add Channel Thumbnail</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/png/add-image.png</normaloff>:/icons/png/add-image.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="aspectRatio_CB">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1:1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3:4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16:9</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addfilepushButton">
|
||||
<property name="text">
|
||||
<string>Add File to Attach</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/png/add-file.png</normaloff>:/icons/png/add-file.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="text">
|
||||
<string>1:1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="subjectEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="text">
|
||||
<string>3:4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="text">
|
||||
<string>16:9</string>
|
||||
</property>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addfilepushButton">
|
||||
<property name="text">
|
||||
<string>Add File to Attach</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="RichTextEdit" name="RichTextEditWidget" native="true"/>
|
||||
<item row="3" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="subjectEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="RichTextEdit" name="RichTextEditWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -342,7 +329,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>84</width>
|
||||
<width>842</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -416,23 +403,6 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="channelpostButton">
|
||||
<property name="text">
|
||||
<string>Channel Post</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -446,14 +416,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="attachmentsButton">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="channelpostButton">
|
||||
<property name="text">
|
||||
<string>Attachments</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/png/attachements.png</normaloff>:/icons/png/attachements.png</iconset>
|
||||
<string>Channel Post</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@ -500,6 +466,13 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="HeaderFrame" name="headerFrame">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <QBuffer>
|
||||
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "GxsChannelGroupDialog.h"
|
||||
|
||||
#include <retroshare/rsgxschannels.h>
|
||||
@ -99,11 +100,9 @@ QPixmap GxsChannelGroupDialog::serviceImage()
|
||||
switch (mode())
|
||||
{
|
||||
case MODE_CREATE:
|
||||
return QPixmap(":/icons/png/channel.png");
|
||||
case MODE_SHOW:
|
||||
return QPixmap(":/icons/png/channel.png");
|
||||
case MODE_EDIT:
|
||||
return QPixmap(":/icons/png/channel.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channel.png");
|
||||
}
|
||||
|
||||
return QPixmap();
|
||||
|
@ -75,9 +75,10 @@ QColor SelectedColor = QRgb(0xff308dc7);
|
||||
#define COLUMN_SIZE_FONT_FACTOR_H 10
|
||||
|
||||
#define STAR_OVERLAY_IMAGE ":icons/star_overlay_128.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_COPYLINK ":icons/png/copy.png"
|
||||
#define IMAGE_GRID_VIEW ":icons/png/menu.png"
|
||||
#define IMAGE_DOWNLOAD ":icons/png/download.png"
|
||||
#define IMAGE_UNREAD ":icons/png/message.png"
|
||||
|
||||
Q_DECLARE_METATYPE(ChannelPostFileInfo)
|
||||
|
||||
@ -120,7 +121,11 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
|
||||
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
|
||||
|
||||
painter->fillRect( option.rect, option.backgroundBrush);
|
||||
// if(index.row() & 0x01)
|
||||
// painter->fillRect( option.rect, option.palette.alternateBase().color());
|
||||
// else
|
||||
painter->fillRect( option.rect, option.palette.base().color());
|
||||
|
||||
painter->restore();
|
||||
|
||||
if(mUseGrid || index.column()==0)
|
||||
@ -129,6 +134,7 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
|
||||
uint32_t flags = (mUseGrid)?(ChannelPostThumbnailView::FLAG_SHOW_TEXT | ChannelPostThumbnailView::FLAG_SCALE_FONT):0;
|
||||
ChannelPostThumbnailView w(post,flags);
|
||||
w.setBackgroundRole(QPalette::AlternateBase);
|
||||
w.setAspectRatio(mAspectRatio);
|
||||
w.updateGeometry();
|
||||
w.adjustSize();
|
||||
@ -138,7 +144,14 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
if((option.state & QStyle::State_Selected) && post.mMeta.mPublishTs > 0) // check if post is selected and is not empty (end of last row)
|
||||
pixmap.fill(SelectedColor); // I dont know how to grab the backgroud color for selected objects automatically.
|
||||
else
|
||||
pixmap.fill(QRgb(0x00ffffff)); // choose a fully transparent background
|
||||
{
|
||||
// we need to do the alternate color manually
|
||||
|
||||
//if(index.row() & 0x01)
|
||||
// pixmap.fill(option.palette.alternateBase().color());
|
||||
//else
|
||||
pixmap.fill(option.palette.base().color());
|
||||
}
|
||||
|
||||
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||
|
||||
@ -197,8 +210,11 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QDateTime::fromSecsSinceEpoch(post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate));
|
||||
y += font_height;
|
||||
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + QString::number(post.mSize) + " " + tr("bytes") + ")" );
|
||||
y += font_height;
|
||||
if(post.mCount > 0)
|
||||
{
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + QString::number(post.mSize) + " " + tr("bytes") + ")" );
|
||||
y += font_height;
|
||||
}
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
@ -284,8 +300,14 @@ void ChannelPostFilesDelegate::paint(QPainter * painter, const QStyleOptionViewI
|
||||
w.setFixedHeight(option.rect.height());
|
||||
|
||||
QPixmap pixmap(w.size());
|
||||
pixmap.fill(QRgb(0x00ffffff)); // choose a fully transparent background
|
||||
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||
|
||||
// apparently we need to do the alternate colors manually
|
||||
//if(index.row() & 0x01)
|
||||
// pixmap.fill(option.palette.alternateBase().color());
|
||||
//else
|
||||
pixmap.fill(option.palette.base().color());
|
||||
|
||||
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
|
||||
|
||||
painter->drawPixmap(option.rect.topLeft(),pixmap);
|
||||
}
|
||||
@ -334,6 +356,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
ui->showUnread_TB->setToolTip(tr("Show unread posts only"));
|
||||
connect(ui->showUnread_TB,SIGNAL(toggled(bool)),this,SLOT(switchOnlyUnread(bool)));
|
||||
|
||||
ui->postsTree->setAlternatingRowColors(false);
|
||||
ui->postsTree->setModel(mChannelPostsModel = new RsGxsChannelPostsModel());
|
||||
ui->postsTree->setItemDelegate(mChannelPostsDelegate = new ChannelPostDelegate());
|
||||
ui->postsTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // prevents bug on w10, since row size depends on widget width
|
||||
@ -350,6 +373,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
ui->channelPostFiles_TV->setPlaceholderText(tr("No files in this post, or no post selected"));
|
||||
ui->channelPostFiles_TV->setSortingEnabled(true);
|
||||
ui->channelPostFiles_TV->sortByColumn(0, Qt::AscendingOrder);
|
||||
ui->channelPostFiles_TV->setAlternatingRowColors(false);
|
||||
|
||||
ui->channelFiles_TV->setModel(mChannelFilesModel = new RsGxsChannelPostFilesModel());
|
||||
ui->channelFiles_TV->setItemDelegate(mFilesDelegate = new ChannelPostFilesDelegate());
|
||||
@ -417,8 +441,8 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
|
||||
/* Initialize subscribe button */
|
||||
QIcon icon;
|
||||
icon.addPixmap(QPixmap(":/images/redled.png"), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap(QPixmap(":/images/start.png"), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/redled.png"), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/start.png"), QIcon::Normal, QIcon::Off);
|
||||
mAutoDownloadAction = new QAction(icon, "", this);
|
||||
mAutoDownloadAction->setCheckable(true);
|
||||
connect(mAutoDownloadAction, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
|
||||
@ -492,12 +516,12 @@ void GxsChannelPostsWidgetWithModel::postContextMenu(const QPoint&)
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DOWNLOAD), tr("Download files"), this, SLOT(download()));
|
||||
|
||||
if(!IS_MSG_UNREAD(post.mMeta.mMsgStatus) && !IS_MSG_NEW(post.mMeta.mMsgStatus))
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Mark as unread"), this, SLOT(markMessageUnread()));
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_UNREAD), tr("Mark as unread"), this, SLOT(markMessageUnread()));
|
||||
}
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyMessageLink()));
|
||||
|
||||
if(IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags))
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/edit_16.png"), tr("Edit"), this, SLOT(editPost()));
|
||||
menu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png"), tr("Edit"), this, SLOT(editPost()));
|
||||
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
@ -893,15 +917,7 @@ void GxsChannelPostsWidgetWithModel::processSettings(bool load)
|
||||
Settings->beginGroup(QString("ChannelPostsWidget"));
|
||||
|
||||
if (load) {
|
||||
#ifdef TO_REMOVE
|
||||
// load settings
|
||||
|
||||
/* Filter */
|
||||
//ui->filterLineEdit->setCurrentFilter(Settings->value("filter", FILTER_TITLE).toInt());
|
||||
|
||||
/* View mode */
|
||||
//setViewMode(Settings->value("viewMode", VIEW_MODE_FEEDS).toInt());
|
||||
#endif
|
||||
// state of files tree
|
||||
channelpostfilesheader->restoreState(Settings->value("PostFilesTree").toByteArray());
|
||||
channelfilesheader->restoreState(Settings->value("FilesTree").toByteArray());
|
||||
@ -909,15 +925,6 @@ void GxsChannelPostsWidgetWithModel::processSettings(bool load)
|
||||
// state of splitter
|
||||
ui->splitter->restoreState(Settings->value("SplitterChannelPosts").toByteArray());
|
||||
} else {
|
||||
#ifdef TO_REMOVE
|
||||
// save settings
|
||||
|
||||
/* Filter */
|
||||
//Settings->setValue("filter", ui->filterLineEdit->currentFilter());
|
||||
|
||||
/* View mode */
|
||||
//Settings->setValue("viewMode", viewMode());
|
||||
#endif
|
||||
// state of files tree
|
||||
Settings->setValue("PostFilesTree", channelpostfilesheader->saveState());
|
||||
Settings->setValue("FilesTree", channelfilesheader->saveState());
|
||||
@ -945,7 +952,7 @@ void GxsChannelPostsWidgetWithModel::groupNameChanged(const QString &name)
|
||||
{
|
||||
// if (groupId().isNull()) {
|
||||
// ui->nameLabel->setText(tr("No Channel Selected"));
|
||||
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/channels.png"));
|
||||
// ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channels.png"));
|
||||
// } else {
|
||||
// ui->nameLabel->setText(name);
|
||||
// }
|
||||
@ -999,7 +1006,7 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
|
||||
if (group.mImage.mData != NULL) {
|
||||
GxsIdDetails::loadPixmapFromData(group.mImage.mData, group.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL);
|
||||
} else {
|
||||
chanImage = QPixmap(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE);
|
||||
chanImage = FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE);
|
||||
}
|
||||
if(group.mMeta.mGroupName.empty())
|
||||
ui->channelName_LB->setText(tr("[No name]"));
|
||||
@ -1105,47 +1112,6 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
|
||||
showPostDetails();
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
int GxsChannelPostsWidgetWithModel::viewMode()
|
||||
{
|
||||
if (ui->feedToolButton->isChecked()) {
|
||||
return VIEW_MODE_FEEDS;
|
||||
} else if (ui->fileToolButton->isChecked()) {
|
||||
return VIEW_MODE_FILES;
|
||||
}
|
||||
|
||||
/* Default */
|
||||
return VIEW_MODE_FEEDS;
|
||||
}
|
||||
#endif
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::setViewMode(int viewMode)
|
||||
{
|
||||
#ifdef TODO
|
||||
switch (viewMode) {
|
||||
case VIEW_MODE_FEEDS:
|
||||
ui->feedWidget->show();
|
||||
ui->fileWidget->hide();
|
||||
|
||||
ui->feedToolButton->setChecked(true);
|
||||
ui->fileToolButton->setChecked(false);
|
||||
|
||||
break;
|
||||
case VIEW_MODE_FILES:
|
||||
ui->feedWidget->hide();
|
||||
ui->fileWidget->show();
|
||||
|
||||
ui->feedToolButton->setChecked(false);
|
||||
ui->fileToolButton->setChecked(true);
|
||||
|
||||
break;
|
||||
default:
|
||||
setViewMode(VIEW_MODE_FEEDS);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::switchOnlyUnread(bool)
|
||||
{
|
||||
filterChanged(ui->filterLineEdit->text());
|
||||
@ -1159,150 +1125,6 @@ void GxsChannelPostsWidgetWithModel::filterChanged(QString s)
|
||||
mChannelFilesModel->setFilter(ql,count);
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
/*static*/ bool GxsChannelPostsWidgetWithModel::filterItem(FeedItem *feedItem, const QString &text, int filter)
|
||||
{
|
||||
GxsChannelPostItem *item = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
if (!item) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool bVisible = text.isEmpty();
|
||||
|
||||
if (!bVisible)
|
||||
{
|
||||
switch(filter)
|
||||
{
|
||||
case FILTER_TITLE:
|
||||
bVisible = item->getTitleLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_MSG:
|
||||
bVisible = item->getMsgLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_FILE_NAME:
|
||||
{
|
||||
std::list<SubFileItem *> fileItems = item->getFileItems();
|
||||
std::list<SubFileItem *>::iterator lit;
|
||||
for(lit = fileItems.begin(); lit != fileItems.end(); ++lit)
|
||||
{
|
||||
SubFileItem *fi = *lit;
|
||||
QString fileName = QString::fromUtf8(fi->FileName().c_str());
|
||||
bVisible = (bVisible || fileName.contains(text,Qt::CaseInsensitive));
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
bVisible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return bVisible;
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidget::createPostItemFromMetaData(const RsGxsMsgMetaData& meta,bool related)
|
||||
{
|
||||
GxsChannelPostItem *item = NULL;
|
||||
RsGxsChannelPost post;
|
||||
|
||||
if(!meta.mOrigMsgId.isNull())
|
||||
{
|
||||
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mOrigMsgId)) ;
|
||||
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
|
||||
if(item)
|
||||
{
|
||||
post = feedItem->post();
|
||||
ui->feedWidget->removeFeedItem(item) ;
|
||||
|
||||
post.mOlderVersions.insert(post.mMeta.mMsgId);
|
||||
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, post, true, false,post.mOlderVersions);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
|
||||
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (related)
|
||||
{
|
||||
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mMsgId)) ;
|
||||
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
}
|
||||
if (item)
|
||||
{
|
||||
item->setPost(post);
|
||||
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
|
||||
}
|
||||
else
|
||||
{
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, meta.mGroupId,meta.mMsgId, true, true);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
|
||||
}
|
||||
#ifdef TODO
|
||||
ui->fileWidget->addFiles(post, related);
|
||||
#endif
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidget::createPostItem(const RsGxsChannelPost& post, bool related)
|
||||
{
|
||||
GxsChannelPostItem *item = NULL;
|
||||
|
||||
const RsMsgMetaData& meta(post.mMeta);
|
||||
|
||||
if(!meta.mOrigMsgId.isNull())
|
||||
{
|
||||
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mOrigMsgId)) ;
|
||||
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
|
||||
if(item)
|
||||
{
|
||||
std::set<RsGxsMessageId> older_versions(item->olderVersions()); // we make a copy because the item will be deleted
|
||||
ui->feedWidget->removeFeedItem(item) ;
|
||||
|
||||
older_versions.insert(meta.mMsgId);
|
||||
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, mGroup.mMeta,meta.mMsgId, true, false,older_versions);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
|
||||
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (related)
|
||||
{
|
||||
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mMsgId)) ;
|
||||
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
}
|
||||
if (item)
|
||||
{
|
||||
item->setPost(post);
|
||||
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
|
||||
}
|
||||
else
|
||||
{
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, mGroup.mMeta,meta.mMsgId, true, true);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
|
||||
}
|
||||
|
||||
ui->fileWidget->addFiles(post, related);
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidget::fillThreadCreatePost(const QVariant &post, bool related, int current, int count)
|
||||
{
|
||||
/* show fill progress */
|
||||
if (count) {
|
||||
ui->progressBar->setValue(current * ui->progressBar->maximum() / count);
|
||||
}
|
||||
|
||||
if (!post.canConvert<RsGxsChannelPost>()) {
|
||||
return;
|
||||
}
|
||||
|
||||
createPostItem(post.value<RsGxsChannelPost>(), related);
|
||||
}
|
||||
#endif
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::blank()
|
||||
{
|
||||
ui->postButton->setEnabled(false);
|
||||
|
@ -147,7 +147,6 @@ private slots:
|
||||
void toggleAutoDownload();
|
||||
void subscribeGroup(bool subscribe);
|
||||
void filterChanged(QString);
|
||||
void setViewMode(int viewMode);
|
||||
void settingsChanged();
|
||||
void handlePostsTreeSizeChange(QSize s, bool force=false);
|
||||
void postChannelPostLoad();
|
||||
@ -172,8 +171,6 @@ private:
|
||||
void setAutoDownload(bool autoDl);
|
||||
static bool filterItem(FeedItem *feedItem, const QString &text, int filter);
|
||||
|
||||
int viewMode();
|
||||
|
||||
void insertChannelDetails(const RsGxsChannelGroup &group);
|
||||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
|
||||
|
@ -393,6 +393,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Click to view post. </p><p>Use Ctrl+mouse wheel </p><p>to zoom/unzoom.</p></body></html></string>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
@ -428,7 +431,7 @@ p, li { white-space: pre-wrap; }
|
||||
</font>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "gui/common/Emoticons.h"
|
||||
#include "gui/common/UIStateHelper.h"
|
||||
#include "gui/Identity/IdEditDialog.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/misc.h"
|
||||
@ -89,7 +90,7 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
||||
|
||||
ui.forumMessage->setPlaceholderText(tr ("Text"));
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/icons/png/forums.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
|
||||
ui.headerFrame->setHeaderText(text);
|
||||
|
||||
ui.generateSpinBox->setEnabled(false);
|
||||
|
@ -19,6 +19,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
#include "GxsForumGroupDialog.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <retroshare/rsgxsforums.h>
|
||||
#include <iostream>
|
||||
@ -96,7 +97,7 @@ void GxsForumGroupDialog::initUi()
|
||||
|
||||
QPixmap GxsForumGroupDialog::serviceImage()
|
||||
{
|
||||
return QPixmap(":/icons/png/forums.png");
|
||||
return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png");
|
||||
}
|
||||
|
||||
bool GxsForumGroupDialog::service_createGroup(RsGroupMetaData& meta)
|
||||
|
@ -62,7 +62,7 @@
|
||||
#define IMAGE_MESSAGE ":/icons/mail/compose.png"
|
||||
#define IMAGE_REPLY ":/icons/mail/reply.png"
|
||||
#define IMAGE_MESSAGEREPLY ":/icons/mail/write-mail.png"
|
||||
#define IMAGE_MESSAGEEDIT ":/images/edit_16.png"
|
||||
#define IMAGE_MESSAGEEDIT ":/icons/png/pencil-edit-button.png"
|
||||
#define IMAGE_MESSAGEREMOVE ":/images/mail_delete.png"
|
||||
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||
#define IMAGE_DOWNLOADALL ":/images/startall.png"
|
||||
|
@ -1,6 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/onion.png</file>
|
||||
<file>icons/svg/design.svg</file>
|
||||
<file>icons/svg/hidden.svg</file>
|
||||
<file>icons/svg/ratio-auto.svg</file>
|
||||
<file>icons/svg/ratio-1-1.svg</file>
|
||||
|
62
retroshare-gui/src/gui/icons/svg/design.svg
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<path style="fill:#8B8992;" d="M299.493,502h-90v-86h90V502z M239.493,482h30v-36h-30L239.493,482L239.493,482z"/>
|
||||
<polygon style="fill:#57555C;" points="255.993,446 269.493,446 269.493,482 255.993,482 255.993,502 299.493,502 299.493,416
|
||||
255.993,416 "/>
|
||||
<path style="fill:#9BC9FF;" d="M480.493,376h-449V136h449V376z"/>
|
||||
<rect x="255.99" y="136" style="fill:#009AE5;" width="224.5" height="240"/>
|
||||
<rect x="179.49" y="482" style="fill:#005ECE;" width="150" height="30"/>
|
||||
<path style="fill:#B87FD9;" d="M239.493,376h-90V171h90V376z"/>
|
||||
<path style="fill:#8034AD;" d="M239.493,376h-45V171h45V376z"/>
|
||||
<path style="fill:#8B8992;" d="M289.686,131H98.301L59.39,0h57.243c20.439,0,44.228,7.314,62.86,20.502V0h149.103L289.686,131z"/>
|
||||
<polygon style="fill:#57555C;" points="328.596,0 193.993,0 193.993,131 289.686,131 "/>
|
||||
<path style="fill:#E3CEF0;" d="M248.493,201h-108c-24.813,0-45-20.187-45-45v-55h198v55C293.493,180.813,273.306,201,248.493,201z"
|
||||
/>
|
||||
<path style="fill:#D5B4E8;" d="M194.493,101v100h54c24.813,0,45-20.187,45-45v-55H194.493z"/>
|
||||
<path style="fill:#E0E0E2;" d="M427.705,118.346c-9.131,0-18.141-2.394-26.261-7.082c-12.189-7.038-20.909-18.401-24.551-31.997
|
||||
c-3.643-13.595-1.774-27.795,5.264-39.984s18.401-20.908,31.997-24.551l50.898-13.638l13.637,50.898
|
||||
c3.643,13.595,1.774,27.795-5.264,39.984s-18.4,20.909-31.996,24.551C436.89,117.744,432.281,118.346,427.705,118.346z"/>
|
||||
<path style="fill:#ACABB1;" d="M478.688,51.992L465.051,1.094h-0.001l-63.606,110.169l0,0c8.12,4.688,17.13,7.083,26.261,7.082
|
||||
c4.577,0,9.185-0.602,13.724-1.818c13.595-3.643,24.958-12.362,31.996-24.551C480.462,79.787,482.331,65.587,478.688,51.992z"/>
|
||||
<path style="fill:#FFE477;" d="M280.915,410.025l-77.942-45l125-216.506l77.942,45L280.915,410.025z"/>
|
||||
<rect x="301.424" y="165.518" transform="matrix(-0.866 -0.5 0.5 -0.866 459.1859 704.0723)" style="fill:#FFA733;" width="44.999" height="249.995"/>
|
||||
<path style="fill:#FF9A00;" d="M402.462,226.167l-101.036-58.333l87.069-98.688l55.898,32.273L402.462,226.167z"/>
|
||||
<polygon style="fill:#E67500;" points="444.393,101.419 416.444,85.283 351.944,197 402.462,226.167 "/>
|
||||
<path style="fill:#005ECE;" d="M480.493,446h-449V346h449V446z"/>
|
||||
<g>
|
||||
<rect x="255.99" y="346" style="fill:#003F8A;" width="224.5" height="100"/>
|
||||
<rect x="254.49" y="482" style="fill:#003F8A;" width="75" height="30"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
@ -32,6 +32,7 @@
|
||||
#include "IMHistoryItemDelegate.h"
|
||||
#include "IMHistoryItemPainter.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include "rshare.h"
|
||||
#include <retroshare/rshistory.h>
|
||||
@ -96,7 +97,7 @@ ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit, QWidge
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png"));
|
||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/agt_forum64.png"));
|
||||
ui.headerFrame->setHeaderText(tr("Message History"));
|
||||
|
||||
m_chatId = chatId;
|
||||
|
@ -17,7 +17,6 @@
|
||||
<file>images/inbox_22.png</file>
|
||||
<file>images/blue_lock.png</file>
|
||||
<file>images/blue_lock_open.png</file>
|
||||
<file>images/edit_24.png</file>
|
||||
<file>images/streaming.png</file>
|
||||
<file>images/white-bubble-64.png</file>
|
||||
<file>images/orange-bubble-64.png</file>
|
||||
@ -49,7 +48,6 @@
|
||||
<file>images/dht16.png</file>
|
||||
<file>images/dht32.png</file>
|
||||
<file>images/edit-clear-history.png</file>
|
||||
<file>images/edit_16.png</file>
|
||||
<file>images/feedback_arrow.png</file>
|
||||
<file>images/feedback_arrow_hover.png</file>
|
||||
<file>images/firewall_24.png</file>
|
||||
@ -79,11 +77,7 @@
|
||||
<file>images/avatarstatus-bg-away-70.png</file>
|
||||
<file>images/avatarstatus-bg-busy-70.png</file>
|
||||
<file>images/avatarstatus-bg-offline-70.png</file>
|
||||
<file>images/configure.png</file>
|
||||
<file>images/copyrslink.png</file>
|
||||
<file>images/contacts24.png</file>
|
||||
<file>images/contactsclosed24.png</file>
|
||||
<file>images/connection.png</file>
|
||||
<file>images/Client0.png</file>
|
||||
<file>images/Client1.png</file>
|
||||
<file>images/Client2.png</file>
|
||||
@ -102,7 +96,6 @@
|
||||
<file>images/FileTypePicture.png</file>
|
||||
<file>images/FileTypeProgram.png</file>
|
||||
<file>images/FileTypeVideo.png</file>
|
||||
<file>images/fonts.png</file>
|
||||
<file>images/foldermail.png</file>
|
||||
<file>images/folderopen.png</file>
|
||||
<file>images/fileopen.png</file>
|
||||
@ -111,14 +104,11 @@
|
||||
<file>images/graph-notdownload.png</file>
|
||||
<file>images/graph-checking.png</file>
|
||||
<file>images/graph-blue.png</file>
|
||||
<file>images/add-share24.png</file>
|
||||
<file>images/avatar_background.png</file>
|
||||
<file>images/button_cancel.png</file>
|
||||
<file>images/chat.png</file>
|
||||
<file>images/chat_24.png</file>
|
||||
<file>images/cancel.png</file>
|
||||
<file>images/close-down.png</file>
|
||||
<file>images/close_normal.png</file>
|
||||
<file>images/copy.png</file>
|
||||
<file>images/delete.png</file>
|
||||
<file>images/deleteall.png</file>
|
||||
@ -128,13 +118,8 @@
|
||||
<file>images/diskSave.png</file>
|
||||
<file>images/document_save.png</file>
|
||||
<file>images/down.png</file>
|
||||
<file>images/down_24x24.png</file>
|
||||
<file>images/download.png</file>
|
||||
<file>images/download16.png</file>
|
||||
<file>images/edit_add24.png</file>
|
||||
<file>images/edit-bold.png</file>
|
||||
<file>images/edit-italic.png</file>
|
||||
<file>images/edit-underline.png</file>
|
||||
<file>images/edit_remove24.png</file>
|
||||
<file>images/disabled_plugin_48.png</file>
|
||||
<file>images/expand_frame.png</file>
|
||||
@ -224,7 +209,6 @@
|
||||
<file>images/ledoff1.png</file>
|
||||
<file>images/ledon1.png</file>
|
||||
<file>images/locale.png</file>
|
||||
<file>images/looknfeel.png</file>
|
||||
<file>images/logo/logo_16.png</file>
|
||||
<file>images/logo/logo_24.png</file>
|
||||
<file>images/logo/logo_24_0.png</file>
|
||||
@ -260,7 +244,6 @@
|
||||
<file>images/mute-off-16.png</file>
|
||||
<file>images/mute-on-16.png</file>
|
||||
<file>images/new-mail-alert.png</file>
|
||||
<file>images/newmsg.png</file>
|
||||
<file>images/no_avatar_70.png</file>
|
||||
<file>images/no_avatar_background.png</file>
|
||||
<file>images/openimage.png</file>
|
||||
@ -269,7 +252,6 @@
|
||||
<file>images/pasterslink.png</file>
|
||||
<file>images/package_games1.png</file>
|
||||
<file>images/pin32.png</file>
|
||||
<file>images/print24.png</file>
|
||||
<file>images/priorityauto.png</file>
|
||||
<file>images/priorityhigh.png</file>
|
||||
<file>images/prioritylow.png</file>
|
||||
@ -278,17 +260,10 @@
|
||||
<file>images/preview.png</file>
|
||||
<file>images/player_play.png</file>
|
||||
<file>images/quick_restart24.png</file>
|
||||
<file>images/quote_24.png</file>
|
||||
<file>images/redled.png</file>
|
||||
<file>images/greenled.png</file>
|
||||
<file>images/grayled.png</file>
|
||||
<file>images/yellowled.png</file>
|
||||
<file>images/rate-1.png</file>
|
||||
<file>images/rate-2.png</file>
|
||||
<file>images/rate-3.png</file>
|
||||
<file>images/rate-4.png</file>
|
||||
<file>images/rate-5.png</file>
|
||||
<file>images/rating.png</file>
|
||||
<file>images/records.png</file>
|
||||
<file>images/replymail-pressed.png</file>
|
||||
<file>images/replymail24.png</file>
|
||||
@ -320,7 +295,6 @@
|
||||
<file>images/tab-dock.png</file>
|
||||
<file>images/tab-undock.png</file>
|
||||
<file>images/tab-new.png</file>
|
||||
<file>images/tag24.png</file>
|
||||
<file>images/transferupdown.png</file>
|
||||
<file>images/tools_wizard.png</file>
|
||||
<file>images/uploads.png</file>
|
||||
@ -384,8 +358,6 @@
|
||||
<file>images/view_calendar_month.png</file>
|
||||
<file>images/view_calendar_list.png</file>
|
||||
<file>images/view_split_top_bottom.png</file>
|
||||
<file>images/window_fullscreen.png</file>
|
||||
<file>images/window_nofullscreen.png</file>
|
||||
<file>qss/chat/standard/private/info.xml</file>
|
||||
<file>qss/chat/standard/private/incoming.htm</file>
|
||||
<file>qss/chat/standard/private/outgoing.htm</file>
|
||||
@ -454,8 +426,6 @@
|
||||
<file>images/share-icon-16.png</file>
|
||||
<file>images/toasterEnable.png</file>
|
||||
<file>images/toasterDisable.png</file>
|
||||
<file>images/view-feeds.png</file>
|
||||
<file>images/view-files.png</file>
|
||||
<file>images/emblem-web.png</file>
|
||||
<file>images/rsmessenger48.png</file>
|
||||
<file>images/SmileyText.png</file>
|
||||
|
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 876 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |