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

View File

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