mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 06:59:27 -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 <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QHeaderView>
|
||||
|
||||
|
||||
/** Constructor */
|
||||
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 +/- */
|
||||
ui.msgSendList -> setRootIsDecorated( false );
|
||||
|
||||
ui.msgFileList -> setRootIsDecorated( false );
|
||||
|
||||
/* to hide the header */
|
||||
//ui.msgSendList->header()->hide();
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
@ -122,7 +127,7 @@ void ChanMsgDialog::insertSendList()
|
||||
|
||||
/* remove old items ??? */
|
||||
sendWidget->clear();
|
||||
sendWidget->setColumnCount(6);
|
||||
sendWidget->setColumnCount(1);
|
||||
|
||||
QList<QTreeWidgetItem *> items;
|
||||
for(it = friends.begin(); it != friends.end(); it++)
|
||||
@ -141,18 +146,18 @@ void ChanMsgDialog::insertSendList()
|
||||
/* (0) Person */
|
||||
item -> setText(0, QString::fromStdString(it->second.name));
|
||||
/* () Org */
|
||||
item -> setText(1, QString::fromStdString(it->second.org));
|
||||
//item -> setText(1, QString::fromStdString(it->second.org));
|
||||
/* () Location */
|
||||
item -> setText(2, QString::fromStdString(it->second.loc));
|
||||
//item -> setText(2, QString::fromStdString(it->second.loc));
|
||||
/* () Country */
|
||||
item -> setText(3, QString::fromStdString(it->second.country));
|
||||
{
|
||||
//item -> setText(3, QString::fromStdString(it->second.country));
|
||||
/*{
|
||||
std::ostringstream out;
|
||||
out << it->second.id;
|
||||
item -> setText(4, QString::fromStdString(out.str()));
|
||||
}
|
||||
}*/
|
||||
|
||||
item -> setText(5, "Friend");
|
||||
item -> setText(1, "Friend");
|
||||
|
||||
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||
//item -> setCheckState(0, Qt::Checked);
|
||||
|
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>599</width>
|
||||
<height>411</height>
|
||||
<width>580</width>
|
||||
<height>430</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy" >
|
||||
@ -29,77 +29,42 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QSplitter" name="splitter_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</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" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</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" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
@ -143,7 +108,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<vsizetype>3</vsizetype>
|
||||
<horstretch>4</horstretch>
|
||||
<verstretch>4</verstretch>
|
||||
</sizepolicy>
|
||||
@ -155,58 +120,58 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<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_13" >
|
||||
<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>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>
|
||||
<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_13" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<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>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
@ -217,7 +182,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>599</width>
|
||||
<width>580</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user