update the mainwindow icons for wiki/photo share

* update the mainwindow icons  for wiki/photo share
* get work the id combobox for album creation
This commit is contained in:
defnax 2020-02-12 18:05:00 +01:00
parent 48e8dc5c8c
commit 2bd3e32d4a
10 changed files with 102 additions and 20 deletions

View File

@ -19,6 +19,7 @@
*******************************************************************************/
#include <QBuffer>
#include <QMessageBox>
#include "AlbumCreateDialog.h"
#include "ui_AlbumCreateDialog.h"
@ -37,7 +38,7 @@ AlbumCreateDialog::AlbumCreateDialog(TokenQueue *photoQueue, RsPhoto *rs_photo,
#if QT_VERSION >= 0x040700
ui->lineEdit_Title_2->setPlaceholderText(tr("Untitle Album"));
ui->lineEdit_Title->setPlaceholderText(tr("Untitle Album"));
ui->lineEdit_Caption_2->setPlaceholderText(tr("Say something about this album..."));
//ui->textEdit_Description->setPlaceholderText(tr("Say something about this album...")) ;
ui->lineEdit_Where->setPlaceholderText(tr("Where were these taken?"));
@ -55,7 +56,8 @@ AlbumCreateDialog::AlbumCreateDialog(TokenQueue *photoQueue, RsPhoto *rs_photo,
mPhotoDrop = ui->scrollAreaWidgetContents;
mPhotoDrop->setPhotoItemHolder(this);
/* fill in the available OwnIds for sharing */
ui->IdChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
}
AlbumCreateDialog::~AlbumCreateDialog()
@ -72,12 +74,30 @@ void AlbumCreateDialog::publishAlbum()
// get fields for album to publish, publish and then exit dialog
RsPhotoAlbum album;
RsGxsId authorId;
switch (ui->IdChooser->getChosenId(authorId)) {
case GxsIdChooser::KnowId:
case GxsIdChooser::UnKnowId:
break;
case GxsIdChooser::NoId:
case GxsIdChooser::None:
default:
std::cerr << "AlbumCreateDialog::publishAlbum() ERROR GETTING AuthorId!, Post Failed";
std::cerr << std::endl;
QMessageBox::warning(this, tr("RetroShare"),tr("Please create or choose a Signing Id first"), QMessageBox::Ok, QMessageBox::Ok);
return;
}
album.mMeta.mGroupName = ui->lineEdit_Title->text().toStdString();
album.mCategory = ui->comboBox_Category->currentText().toStdString();
album.mCaption = ui->lineEdit_Caption_2->text().toStdString();
album.mPhotographer = ui->lineEdit_Photographer->text().toStdString();
album.mMeta.mGroupName = ui->lineEdit_Title_2->text().toStdString();
album.mDescription = ui->textEdit_Description->toPlainText().toStdString();
album.mWhere = ui->lineEdit_Where->text().toStdString();
album.mPhotographer = ui->lineEdit_Photographer->text().toStdString();
album.mMeta.mAuthorId = authorId;
getAlbumThumbnail(album.mThumbnail);

View File

@ -17,7 +17,16 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
@ -46,7 +55,16 @@
<enum>QFrame::NoFrame</enum>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
@ -54,7 +72,16 @@
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="0" column="0">
@ -65,7 +92,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_Title_2"/>
<widget class="QLineEdit" name="lineEdit_Title"/>
</item>
<item row="0" column="2" rowspan="2">
<widget class="QToolButton" name="AlbumThumbNail">
@ -110,7 +137,7 @@ border-radius: 10px;
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBox_Category_2">
<widget class="QComboBox" name="comboBox_Category">
<item>
<property name="text">
<string>Animals</string>
@ -354,18 +381,13 @@ border-radius: 10px;
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<widget class="GxsIdChooser" name="IdChooser">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Publish with Identity</string>
</property>
</item>
</widget>
</item>
</layout>
@ -431,8 +453,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<height>458</height>
<width>61</width>
<height>18</height>
</rect>
</property>
<property name="styleSheet">
@ -451,7 +473,16 @@ p, li { white-space: pre-wrap; }
<item row="2" column="0">
<widget class="QFrame" name="frame">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
@ -513,6 +544,11 @@ p, li { white-space: pre-wrap; }
<header>gui/PhotoShare/PhotoDrop.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -76,7 +76,7 @@ PhotoShare::PhotoShare(QWidget *parent)
connect( ui.toolButton_ViewAlbum, SIGNAL(clicked()), this, SLOT(OpenAlbumDialog()));
connect( ui.toolButton_SlideShow, SIGNAL(clicked()), this, SLOT(OpenSlideShow()));
connect( ui.toolButton_subscribe, SIGNAL(clicked()), this, SLOT(subscribeToAlbum()));
connect(ui.toolButton_ViewPhoto, SIGNAL(clicked()), this, SLOT(OpenPhotoDialog()));
connect( ui.toolButton_ViewPhoto, SIGNAL(clicked()), this, SLOT(OpenPhotoDialog()));
connect( ui.pushButton_YourAlbums, SIGNAL(clicked()), this, SLOT(updateAlbums()));
connect( ui.pushButton_SharedAlbums, SIGNAL(clicked()), this, SLOT(updateAlbums()));

View File

@ -39,7 +39,7 @@
#include "util/TokenQueue.h"
#include "PhotoShareItemHolder.h"
#define IMAGE_PHOTO ":/images/lphoto.png"
#define IMAGE_PHOTO ":/icons/png/photo.png"
namespace Ui {
class PhotoShare;

View File

@ -32,7 +32,7 @@
#include <map>
#define IMAGE_WIKI ":/images/wikibook_32.png"
#define IMAGE_WIKI ":/icons/png/wiki.png"
class WikiAddDialog;
class WikiEditDialog;

View File

@ -287,9 +287,11 @@
<file>icons/png/newsfeed2.png</file>
<file>icons/png/postedlinks.png</file>
<file>icons/png/people2.png</file>
<file>icons/png/photo.png</file>
<file>icons/png/bandwidth.png</file>
<file>icons/png/options2.png</file>
<file>icons/png/exit2.png</file>
<file>icons/png/wiki.png</file>
<file>icons/svg/addstickers.svg</file>
<file>icons/png/addstickers.png</file>
<file>icons/textedit/bold.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 477.867 477.867" style="enable-background:new 0 0 477.867 477.867;" xml:space="preserve" width="512px" height="512px"><g transform="matrix(0.922745 0 0 0.922745 18.4589 18.4589)"><g>
<g>
<path d="M426.667,68.267H51.2c-28.277,0-51.2,22.923-51.2,51.2V358.4c0,28.277,22.923,51.2,51.2,51.2h375.467 c28.277,0,51.2-22.923,51.2-51.2V119.467C477.867,91.19,454.944,68.267,426.667,68.267z M443.733,266.001L336.333,158.601 c-6.664-6.663-17.468-6.663-24.132,0L170.667,300.134l-56.201-56.201c-6.664-6.663-17.468-6.663-24.132,0l-56.201,56.201V119.467 c0-9.426,7.641-17.067,17.067-17.067h375.467c9.426,0,17.067,7.641,17.067,17.067V266.001z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/>
</g>
</g><g>
<g>
<circle cx="153.6" cy="187.733" r="51.2" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/>
</g>
</g></g> </svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="512px" height="512px" class=""><g transform="matrix(0.895338 0 0 0.895338 26.7934 26.7934)"><g>
<g>
<path d="M467,0H361v120h151V45C512,20.186,491.814,0,467,0z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/>
</g>
</g><g>
<g>
<path d="M45,0C20.186,0,0,20.186,0,45v75h331V0H45z M106,90H76c-8.291,0-15-6.709-15-15s6.709-15,15-15h30c8.291,0,15,6.709,15,15 S114.291,90,106,90z M196,90h-30c-8.291,0-15-6.709-15-15s6.709-15,15-15h30c8.291,0,15,6.709,15,15S204.291,90,196,90z M286,90 h-30c-8.291,0-15-6.709-15-15s6.709-15,15-15h30c8.291,0,15,6.709,15,15S294.291,90,286,90z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/>
</g>
</g><g>
<g>
<path d="M0,150v317c0,24.814,20.186,45,45,45h422c24.814,0,45-20.186,45-45V150H0z M406,240h-19.195l-56.581,170.746 C328.188,416.869,322.46,421,316,421c-6.46,0-12.188-4.131-14.224-10.254L256,272.432l-45.776,138.314 c-4.072,12.246-24.375,12.246-28.447,0L125.195,240H106c-8.291,0-15-6.709-15-15s6.709-15,15-15h60c8.291,0,15,6.709,15,15 s-6.709,15-15,15h-9.194L196,358.568L235.194,240H226c-8.291,0-15-6.709-15-15s6.709-15,15-15h60c8.291,0,15,6.709,15,15 s-6.709,15-15,15h-9.194L316,358.568L355.194,240H346c-8.291,0-15-6.709-15-15s6.709-15,15-15h60c8.291,0,15,6.709,15,15 S414.291,240,406,240z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/>
</g>
</g></g> </svg>

After

Width:  |  Height:  |  Size: 1.6 KiB