* Added Formating support for Create Forum Messages

* set correct WindowsTitle for Create Channel

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@843 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-11-27 00:01:46 +00:00
parent 1eab434f2d
commit d56d3e57f9
5 changed files with 711 additions and 138 deletions

View file

@ -50,7 +50,7 @@
#define IMAGE_DOWNLOAD ":/images/start.png"
#define IMAGE_DOWNLOADALL ":/images/startall.png"
/* Images for TreeWidget */
/* Images for TreeWidget */
#define IMAGE_FOLDER ":/images/folder16.png"
#define IMAGE_FOLDERGREEN ":/images/folder_green.png"
#define IMAGE_FOLDERRED ":/images/folder_red.png"
@ -65,7 +65,7 @@
/** Constructor */
ForumsDialog::ForumsDialog(QWidget *parent)
ForumsDialog::ForumsDialog(QWidget *parent)
: MainPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
@ -94,72 +94,19 @@ ForumsDialog::ForumsDialog(QWidget *parent)
timer->start(1000);
#if 0
connect( ui.msgWidget, SIGNAL( itemClicked ( QTreeWidgetItem *, int) ), this, SLOT( updateMessages ( QTreeWidgetItem *, int) ) );
connect( ui.listWidget, SIGNAL( currentRowChanged ( int) ), this, SLOT( changeBox ( int) ) );
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(newmessage()));
connect(ui.removemessageButton, SIGNAL(clicked()), this, SLOT(removemessage()));
//connect(ui.printbutton, SIGNAL(clicked()), this, SLOT(print()));
//connect(ui.actionPrint, SIGNAL(triggered()), this, SLOT(print()));
//connect(ui.actionPrintPreview, SIGNAL(triggered()), this, SLOT(printpreview()));
connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(getallrecommended()));
mCurrCertId = "";
mCurrMsgId = "";
/* hide the Tree +/- */
ui.msgList->setRootIsDecorated( false );
ui.msgWidget->setRootIsDecorated( false );
/* Set header resize modes and initial section sizes */
QHeaderView * msgwheader = ui.msgWidget->header () ;
msgwheader->setResizeMode (0, QHeaderView::Custom);
msgwheader->setResizeMode (3, QHeaderView::Interactive);
msgwheader->resizeSection ( 0, 24 );
msgwheader->resizeSection ( 2, 250 );
msgwheader->resizeSection ( 3, 140 );
/* Set header resize modes and initial section sizes */
QHeaderView * msglheader = ui.msgList->header () ;
msglheader->setResizeMode (0, QHeaderView::Interactive);
msglheader->setResizeMode (1, QHeaderView::Interactive);
msglheader->setResizeMode (2, QHeaderView::Interactive);
msglheader->setResizeMode (3, QHeaderView::Interactive);
msglheader->resizeSection ( 0, 200 );
msglheader->resizeSection ( 1, 100 );
msglheader->resizeSection ( 2, 100 );
msglheader->resizeSection ( 3, 200 );
ui.newmessageButton->setIcon(QIcon(QString(":/images/folder-draft24-pressed.png")));
ui.replymessageButton->setIcon(QIcon(QString(":/images/replymail-pressed.png")));
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
/*Disabled Reply Button */
ui.replymessageButton->setEnabled(false);
QMenu * printmenu = new QMenu();
printmenu->addAction(ui.actionPrint);
printmenu->addAction(ui.actionPrintPreview);
ui.printbutton->setMenu(printmenu);
#endif
/* Set header resize modes and initial section sizes */
QHeaderView * ftheader = ui.forumTreeWidget->header () ;
/* Set header resize modes and initial section sizes */
QHeaderView * ftheader = ui.forumTreeWidget->header () ;
ftheader->setResizeMode (0, QHeaderView::Interactive);
ftheader->resizeSection ( 0, 170 );
/* Set header resize modes and initial section sizes */
QHeaderView * ttheader = ui.threadTreeWidget->header () ;
ttheader->setResizeMode (0, QHeaderView::Interactive);
QHeaderView * ttheader = ui.threadTreeWidget->header () ;
ttheader->setResizeMode (0, QHeaderView::Interactive);
ttheader->resizeSection ( 0, 170 );
ttheader->resizeSection ( 1, 170 );
@ -230,7 +177,7 @@ void ForumsDialog::newmessage()
/* window will destroy itself! */
}
void ForumsDialog::replytomessage()
void ForumsDialog::replytomessage()
{
/* put msg on msgBoard, and switch to it. */
@ -276,7 +223,7 @@ void ForumsDialog::togglefileview()
newSizeList.push_back(totalSize);
newSizeList.push_back(0);
ui.expandButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
ui.expandButton->setToolTip("Expand");
ui.expandButton->setToolTip("Expand");
}
else
{
@ -285,8 +232,8 @@ void ForumsDialog::togglefileview()
int nMsgSize = (totalSize / 2);
newSizeList.push_back(nlistSize);
newSizeList.push_back(nMsgSize);
ui.expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
ui.expandButton->setToolTip("Hide");
ui.expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
ui.expandButton->setToolTip("Hide");
}
ui.msgSplitter->setSizes(newSizeList);