mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 10:05:19 -04:00
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:
parent
5926c79822
commit
6c7ce4f3e2
2 changed files with 415 additions and 411 deletions
|
@ -645,8 +645,7 @@ 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));
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue