fixed items not editable and added again a splitter

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2302 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-13 22:13:13 +00:00
parent 5926c79822
commit 6c7ce4f3e2
2 changed files with 415 additions and 411 deletions

View File

@ -646,7 +646,6 @@ void MessagesDialog::insertMessages()
/* make a widget per friend */
//QModelIndex index;
QStandardItem *item0 = new QStandardItem();
QStandardItem *item1 = new QStandardItem();
QStandardItem *item2 = new QStandardItem();
@ -654,6 +653,13 @@ void MessagesDialog::insertMessages()
QStandardItem *item4 = new QStandardItem();
QStandardItem *item5 = new QStandardItem();
//set this false if you want to expand on double click
item0->setEditable(false);
item1->setEditable(false);
item2->setEditable(false);
item3->setEditable(false);
item4->setEditable(false);
/* So Text should be:
* (1) Msg / Broadcast
@ -672,19 +678,16 @@ void MessagesDialog::insertMessages()
qtime.setTime_t(it->ts);
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
item3 -> setText(timestamp);
//index = MessagesModel->index(c, 3);
//MessagesModel->setData(index, timestamp);
}
// From ....
{
item2 -> setText(QString::fromStdString(rsPeers->getPeerName(it->srcId)));
//index = MessagesModel->index(c, 2);
//MessagesModel->setData(index, QString::fromStdString(rsPeers->getPeerName(it->srcId)));
}
// Subject
item1 -> setText(QString::fromStdWString(it->title));
if ((it -> msgflags & RS_MSG_NEW) == RS_MSG_NEW)
{
QFont qf = item1->font();
@ -692,8 +695,6 @@ void MessagesDialog::insertMessages()
item1->setFont(qf);
}
//index = MessagesModel->index(c, 1);
//MessagesModel->setData(index, QString::fromStdWString(it->title));
// Change Message icon when Subject is Re: or Fwd:
QString text = QString::fromStdWString(it->title);

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>675</width>
<height>553</height>
<height>462</height>
</rect>
</property>
<property name="sizePolicy">
@ -505,8 +505,8 @@
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="verticalSpacing">
<layout class="QGridLayout" name="gridLayout_3">
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
@ -876,7 +876,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="1" column="0">
<widget class="QSplitter" name="splitter_2">
<widget class="QSplitter" name="splitter_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -963,9 +963,10 @@ p, li { white-space: pre-wrap; }
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout">
<item>
<widget class="QSplitter" name="msgSplitter_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeView" name="messagestreeView">
<property name="font">
<font>
@ -982,8 +983,9 @@ p, li { white-space: pre-wrap; }
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
@ -1265,7 +1267,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item>
<item row="1" column="0">
<widget class="QTextBrowser" name="msgText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -1278,7 +1280,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<item row="2" column="0">
<layout class="QHBoxLayout">
<item>
<layout class="QGridLayout">
@ -1368,6 +1370,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
</widget>
<widget class="QTreeWidget" name="msgList">
<property name="font">
<font>