Added a headerframee icon for Create Album

Added a close button

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5865 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-11-21 13:41:10 +00:00
parent 96b0d4a372
commit b18a95ac9b
8 changed files with 182 additions and 26 deletions

View File

@ -383,6 +383,7 @@ HEADERS += rshare.h \
gui/common/LineEditClear.h \ gui/common/LineEditClear.h \
gui/common/DropLineEdit.h \ gui/common/DropLineEdit.h \
gui/common/LinkTextBrowser.h \ gui/common/LinkTextBrowser.h \
gui/common/HeaderFrame.h \
gui/style/RSStyle.h \ gui/style/RSStyle.h \
gui/style/StyleDialog.h \ gui/style/StyleDialog.h \
gui/MessagesDialog.h \ gui/MessagesDialog.h \
@ -521,6 +522,7 @@ FORMS += gui/StartDialog.ui \
gui/common/FriendSelectionWidget.ui \ gui/common/FriendSelectionWidget.ui \
gui/common/HashBox.ui \ gui/common/HashBox.ui \
gui/common/RsCollectionDialog.ui \ gui/common/RsCollectionDialog.ui \
gui/common/HeaderFrame.ui \
gui/style/StyleDialog.ui \ gui/style/StyleDialog.ui \
gui/dht/DhtWindow.ui \ gui/dht/DhtWindow.ui \
gui/bwctrl/BwCtrlWindow.ui \ gui/bwctrl/BwCtrlWindow.ui \
@ -641,6 +643,7 @@ SOURCES += main.cpp \
gui/common/LineEditClear.cpp \ gui/common/LineEditClear.cpp \
gui/common/DropLineEdit.cpp \ gui/common/DropLineEdit.cpp \
gui/common/LinkTextBrowser.cpp \ gui/common/LinkTextBrowser.cpp \
gui/common/HeaderFrame.cpp \
gui/style/RSStyle.cpp \ gui/style/RSStyle.cpp \
gui/style/StyleDialog.cpp \ gui/style/StyleDialog.cpp \
gui/settings/rsharesettings.cpp \ gui/settings/rsharesettings.cpp \

View File

@ -12,8 +12,12 @@ AlbumCreateDialog::AlbumCreateDialog(TokenQueue *photoQueue, RsPhotoV2 *rs_photo
{ {
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/images/album_create_64.png"));
ui->headerFrame->setHeaderText(tr("Create Album"));
connect(ui->publishButton, SIGNAL(clicked()), this, SLOT(publishAlbum())); connect(ui->publishButton, SIGNAL(clicked()), this, SLOT(publishAlbum()));
connect(ui->AlbumThumbNail, SIGNAL(clicked()), this, SLOT(addAlbumThumbnail())); connect(ui->AlbumThumbNail, SIGNAL(clicked()), this, SLOT(addAlbumThumbnail()));
} }
AlbumCreateDialog::~AlbumCreateDialog() AlbumCreateDialog::~AlbumCreateDialog()

View File

@ -24,7 +24,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="headerFrame"> <widget class="HeaderFrame" name="headerFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -42,42 +42,28 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="3"> <item row="0" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0" colspan="2"> <item row="0" column="0">
<widget class="QLabel" name="label_Headline">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Album Details</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_18"> <widget class="QLabel" name="label_18">
<property name="text"> <property name="text">
<string>Album Name:</string> <string>Album Name:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_Title_2"/> <widget class="QLineEdit" name="lineEdit_Title_2"/>
</item> </item>
<item row="2" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_19"> <widget class="QLabel" name="label_19">
<property name="text"> <property name="text">
<string>Category:</string> <string>Category:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="comboBox_Category_2"> <widget class="QComboBox" name="comboBox_Category_2">
<item> <item>
<property name="text"> <property name="text">
@ -150,14 +136,14 @@ border-radius: 10px;
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="1" column="0" colspan="4">
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="3"> <item row="2" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="captionLabel"> <widget class="QLabel" name="captionLabel">
@ -201,7 +187,7 @@ border-radius: 10px;
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="3" column="0" colspan="4">
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -308,7 +294,7 @@ border-radius: 10px;
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="1" colspan="2"> <item row="4" column="1" colspan="3">
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -334,18 +320,33 @@ border-radius: 10px;
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="5" column="2"> <item row="5" column="3">
<widget class="QPushButton" name="publishButton"> <widget class="QPushButton" name="publishButton">
<property name="text"> <property name="text">
<string>Publish Album</string> <string>Publish Album</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel</set>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>

View File

@ -4,5 +4,6 @@
<file>images/kview_24.png</file> <file>images/kview_24.png</file>
<file>images/album_subscribe.png</file> <file>images/album_subscribe.png</file>
<file>images/album_unsubscribe.png</file> <file>images/album_unsubscribe.png</file>
<file>images/album_create_64.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,24 @@
#include "HeaderFrame.h"
#include "ui_HeaderFrame.h"
HeaderFrame::HeaderFrame(QWidget *parent) :
QFrame(parent),
ui(new Ui::HeaderFrame)
{
ui->setupUi(this);
}
HeaderFrame::~HeaderFrame()
{
delete ui;
}
void HeaderFrame::setHeaderText(const QString &headerText)
{
ui->headerLabel->setText(headerText);
}
void HeaderFrame::setHeaderImage(const QPixmap &headerImage)
{
ui->headerImage->setPixmap(headerImage);
}

View File

@ -0,0 +1,25 @@
#ifndef HEADERFRAME_H
#define HEADERFRAME_H
#include <QFrame>
namespace Ui {
class HeaderFrame;
}
class HeaderFrame : public QFrame
{
Q_OBJECT
public:
HeaderFrame(QWidget *parent = 0);
~HeaderFrame();
void setHeaderText(const QString &headerText);
void setHeaderImage(const QPixmap &headerImage);
private:
Ui::HeaderFrame *ui;
};
#endif // HEADERFRAME_H

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HeaderFrame</class>
<widget class="QFrame" name="HeaderFrame">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>86</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>76</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>76</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>12</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="headerImage">
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="headerLabel">
<property name="font">
<font>
<pointsize>18</pointsize>
</font>
</property>
<property name="text">
<string notr="true">Header text</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="line">
<property name="frameShape">
<enum>QFrame::HLine</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>