mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
-redesign the Compose New Message Dialog, again little bit more userfriendly.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@257 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
88ff3c8db7
commit
5c56857a99
@ -31,6 +31,8 @@
|
|||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <QHeaderView>
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
||||||
@ -65,7 +67,10 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
|||||||
|
|
||||||
/* hide the Tree +/- */
|
/* hide the Tree +/- */
|
||||||
ui.msgSendList -> setRootIsDecorated( false );
|
ui.msgSendList -> setRootIsDecorated( false );
|
||||||
|
ui.msgFileList -> setRootIsDecorated( false );
|
||||||
|
|
||||||
|
/* to hide the header */
|
||||||
|
//ui.msgSendList->header()->hide();
|
||||||
|
|
||||||
/* Hide platform specific features */
|
/* Hide platform specific features */
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
@ -122,7 +127,7 @@ void ChanMsgDialog::insertSendList()
|
|||||||
|
|
||||||
/* remove old items ??? */
|
/* remove old items ??? */
|
||||||
sendWidget->clear();
|
sendWidget->clear();
|
||||||
sendWidget->setColumnCount(6);
|
sendWidget->setColumnCount(1);
|
||||||
|
|
||||||
QList<QTreeWidgetItem *> items;
|
QList<QTreeWidgetItem *> items;
|
||||||
for(it = friends.begin(); it != friends.end(); it++)
|
for(it = friends.begin(); it != friends.end(); it++)
|
||||||
@ -141,18 +146,18 @@ void ChanMsgDialog::insertSendList()
|
|||||||
/* (0) Person */
|
/* (0) Person */
|
||||||
item -> setText(0, QString::fromStdString(it->second.name));
|
item -> setText(0, QString::fromStdString(it->second.name));
|
||||||
/* () Org */
|
/* () Org */
|
||||||
item -> setText(1, QString::fromStdString(it->second.org));
|
//item -> setText(1, QString::fromStdString(it->second.org));
|
||||||
/* () Location */
|
/* () Location */
|
||||||
item -> setText(2, QString::fromStdString(it->second.loc));
|
//item -> setText(2, QString::fromStdString(it->second.loc));
|
||||||
/* () Country */
|
/* () Country */
|
||||||
item -> setText(3, QString::fromStdString(it->second.country));
|
//item -> setText(3, QString::fromStdString(it->second.country));
|
||||||
{
|
/*{
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << it->second.id;
|
out << it->second.id;
|
||||||
item -> setText(4, QString::fromStdString(out.str()));
|
item -> setText(4, QString::fromStdString(out.str()));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
item -> setText(5, "Friend");
|
item -> setText(1, "Friend");
|
||||||
|
|
||||||
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||||
//item -> setCheckState(0, Qt::Checked);
|
//item -> setCheckState(0, Qt::Checked);
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>599</width>
|
<width>580</width>
|
||||||
<height>411</height>
|
<height>430</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy" >
|
<property name="contextMenuPolicy" >
|
||||||
@ -29,77 +29,42 @@
|
|||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QSplitter" name="splitter_2" >
|
<widget class="QSplitter" name="splitter_2" >
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QTreeWidget" name="msgSendList" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>5</hsizetype>
|
||||||
|
<vsizetype>7</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>4</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>160</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Send To:</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
<widget class="QSplitter" name="splitter" >
|
<widget class="QSplitter" name="splitter" >
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget" >
|
|
||||||
<layout class="QGridLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QLabel" name="label_14" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>0</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Send To:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2" >
|
|
||||||
<widget class="QTreeWidget" name="msgSendList" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>7</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>4</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text" >
|
|
||||||
<string>1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>421</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="layoutWidget" >
|
<widget class="QWidget" name="layoutWidget" >
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
@ -143,7 +108,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy>
|
||||||
<hsizetype>7</hsizetype>
|
<hsizetype>7</hsizetype>
|
||||||
<vsizetype>7</vsizetype>
|
<vsizetype>3</vsizetype>
|
||||||
<horstretch>4</horstretch>
|
<horstretch>4</horstretch>
|
||||||
<verstretch>4</verstretch>
|
<verstretch>4</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -155,58 +120,58 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
<widget class="QWidget" name="layoutWidget" >
|
||||||
<widget class="QWidget" name="layoutWidget" >
|
<layout class="QGridLayout" >
|
||||||
<layout class="QGridLayout" >
|
<property name="margin" >
|
||||||
<property name="margin" >
|
<number>0</number>
|
||||||
<number>0</number>
|
</property>
|
||||||
</property>
|
<property name="spacing" >
|
||||||
<property name="spacing" >
|
<number>6</number>
|
||||||
<number>6</number>
|
</property>
|
||||||
</property>
|
<item row="0" column="0" >
|
||||||
<item row="0" column="0" >
|
<widget class="QLabel" name="label_13" >
|
||||||
<widget class="QLabel" name="label_13" >
|
<property name="sizePolicy" >
|
||||||
<property name="sizePolicy" >
|
<sizepolicy>
|
||||||
<sizepolicy>
|
<hsizetype>0</hsizetype>
|
||||||
<hsizetype>0</hsizetype>
|
<vsizetype>0</vsizetype>
|
||||||
<vsizetype>0</vsizetype>
|
<horstretch>0</horstretch>
|
||||||
<horstretch>0</horstretch>
|
<verstretch>0</verstretch>
|
||||||
<verstretch>0</verstretch>
|
</sizepolicy>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Recommended Files</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QTreeWidget" name="msgFileList" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>7</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text" >
|
|
||||||
<string>1</string>
|
|
||||||
</property>
|
</property>
|
||||||
</column>
|
<property name="font" >
|
||||||
</widget>
|
<font>
|
||||||
</item>
|
<pointsize>10</pointsize>
|
||||||
</layout>
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Recommended Files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QTreeWidget" name="msgFileList" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>7</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text" >
|
||||||
|
<string>1</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -217,7 +182,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>599</width>
|
<width>580</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user