From 6cb925016a3f72be6190da56bd88ceb4b7d22f27 Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 25 Jan 2010 14:03:38 +0000 Subject: [PATCH] little improvements for Compose Messsage, added Blockquote,Increase font size,Decrease font size,text font to code style Buttons added when reply to a message set TextCursor to End. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2123 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/RetroShare.pro | 4 +- retroshare-gui/src/gui/images.qrc | 6 + .../src/gui/images/hi48-app-kblogger.png | Bin 0 -> 2396 bytes .../src/gui/images/hi64-app-kblogger.png | Bin 0 -> 3351 bytes .../images/textedit/format_font_size_less.png | Bin 0 -> 980 bytes .../images/textedit/format_font_size_more.png | Bin 0 -> 966 bytes .../hi22-action-format-text-blockquote.png | Bin 0 -> 850 bytes .../textedit/hi22-action-format-text-code.png | Bin 0 -> 3547 bytes .../src/gui/msgs/ChanCreateDialog.cpp | 73 -- .../src/gui/msgs/ChanCreateDialog.h | 57 -- .../src/gui/msgs/ChanCreateDialog.ui | 662 ------------------ retroshare-gui/src/gui/msgs/ChanMsgDialog.cpp | 244 ++++--- retroshare-gui/src/gui/msgs/ChanMsgDialog.h | 45 +- retroshare-gui/src/gui/msgs/ChanMsgDialog.ui | 571 ++++++++++----- retroshare-gui/src/gui/msgs/textformat.h | 64 ++ 15 files changed, 634 insertions(+), 1092 deletions(-) create mode 100644 retroshare-gui/src/gui/images/hi48-app-kblogger.png create mode 100644 retroshare-gui/src/gui/images/hi64-app-kblogger.png create mode 100644 retroshare-gui/src/gui/images/textedit/format_font_size_less.png create mode 100644 retroshare-gui/src/gui/images/textedit/format_font_size_more.png create mode 100644 retroshare-gui/src/gui/images/textedit/hi22-action-format-text-blockquote.png create mode 100644 retroshare-gui/src/gui/images/textedit/hi22-action-format-text-code.png delete mode 100644 retroshare-gui/src/gui/msgs/ChanCreateDialog.cpp delete mode 100644 retroshare-gui/src/gui/msgs/ChanCreateDialog.h delete mode 100644 retroshare-gui/src/gui/msgs/ChanCreateDialog.ui create mode 100644 retroshare-gui/src/gui/msgs/textformat.h diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index d335316ab..e435cd57f 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -193,7 +193,7 @@ HEADERS += rshare.h \ gui/connect/ConnectDialog.h \ gui/connect/ConfCertDialog.h \ gui/msgs/ChanMsgDialog.h \ - gui/msgs/ChanCreateDialog.h \ + gui/msgs/textformat.h \ gui/images/retroshare_win.rc.h \ gui/settings/rsharesettings.h \ gui/settings/rsettings.h \ @@ -279,7 +279,6 @@ FORMS += gui/StartDialog.ui \ gui/connect/ConnectDialog.ui \ gui/connect/ConfCertDialog.ui \ gui/msgs/ChanMsgDialog.ui \ - gui/msgs/ChanCreateDialog.ui \ gui/toaster/CallToaster.ui \ gui/toaster/ChatToaster.ui \ gui/toaster/MessageToaster.ui \ @@ -375,7 +374,6 @@ SOURCES += main.cpp \ gui/connect/ConnectDialog.cpp \ gui/connect/ConfCertDialog.cpp \ gui/msgs/ChanMsgDialog.cpp \ - gui/msgs/ChanCreateDialog.cpp \ gui/common/vmessagebox.cpp \ gui/common/rwindow.cpp \ gui/common/html.cpp \ diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index 09e782185..281e028df 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -223,6 +223,8 @@ images/kalarm.png images/kbackgammon.png images/kblogger.png + images/hi48-app-kblogger.png + images/hi64-app-kblogger.png images/kcmsystem24.png images/kdmconfig.png images/konsole.png @@ -360,6 +362,10 @@ images/textedit/filesave.png images/textedit/zoomin.png images/textedit/zoomout.png + images/textedit/format_font_size_more.png + images/textedit/format_font_size_less.png + images/textedit/hi22-action-format-text-blockquote.png + images/textedit/hi22-action-format-text-code.png images/toaster/chat.png images/toaster/hangup.png images/toaster/pickup.png diff --git a/retroshare-gui/src/gui/images/hi48-app-kblogger.png b/retroshare-gui/src/gui/images/hi48-app-kblogger.png new file mode 100644 index 0000000000000000000000000000000000000000..da691264bb28b936f0e47bdb1adefb15a4d640d8 GIT binary patch literal 2396 zcmZ8jYgAL$5YSQZ5=RuITTAjm@@ zC=US(K0#_VDz{?g5ef39RDpdKmVThk*d9yPMvPVgV+Z1OTfj zTLS*4nqeG?a&?0ds#Yi3L78Z$LT0S3xjw=-n>M^wDC`U7M)AUl%H82K}JJTFyf& zK=V28UjWLziAg29S-e)GjZq)YXgQIn0Q)_{!L|43_!AGf&oO2!yDZs#&R!qqwcnzM zM4Ego#m_~LNw_Y64HVtdJS7iY55h3Jb*HDECOKb;+xY_3v`rRvh%OroDSGlp#G2hE zIQsHJ+Gtvmlu|V7F*%D%Ra($=PrvXDk?;Um-3avjcjOpryHOlxNj^8tFf}= zF`;bhO>0<{U9YxAg2pJ1q6<}Kgbz{>PlXQraAx?OQKlE#H)nM~t(1QQdN~<`XtBRaQ@$vx7g@3AGgbw*f7G{Pj|;=cQbh-(Ie`a)o;Z0>?zmm zRl^1U82<{95$VIwTr|WMNGh%G_<)s31IZB@*(r{#c6~7piAy8sb(&%&@-`?WgbC@p zu0lh%+aSs$lgr^Kc^o+C@TSwhEEgzeLsb`du>}UMPD^~S4vnBe$X?NIIHK$GS_ znrE9i2UgB27sjS!11fUvqsnyw)#u!8_8Q!VrWQz1p{y5Yw@+pB98-x`i*S?tnyVlm&= zL8Ve<>bc(;po@!(xVMzTaCCOg-Dny+_4CPM?!q0S>?hOBP1EMG)F$jT|0PPHZ(6lT zG;uSA|A*$WX$cI2q+58SjOqcm)|$S!);AN4cUhr~7?uT++UKtaL}52*6vdK3(ak}{ z#Ked_Qzq$q_U>iq4Xd@vnc-TfuC5Mxm@<{1Gpu^cZ~YKTnyHIzQy)utWb4$QH}Z2e z<*fwmWc%Sv9W@Sh%-*#%`q!>g)Mn-THrB-+YZf3GrDbVFN?FaekEA;>?E^q?Ftx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nl3&F} z00099NklXCY#6Y@HBJPSwkt%2qe__p{y0zF4T)1#2 z{s}^G;ns~bRRmEGp{TW%E((&i5_IDto1zgUjFOqedGluOoqNx5;Ty3?tS+(;Ja86w z^PO|P^L^)%h~Owf;fUhD2b`?0uOr3?01y#~2#5$G0%pGLO+*hEV_pa$Y>3D%04SxP zlmat@hyVau>%Z@Ky4WO1P_0%mJ3D)JX=&+=Mx*f<5&Z%5kExh;tCYHjh^iq3gb;L^ zrpo|4Gyi0*JvN=_j=&;<7$cNYi&>VvwXm>ovr?%%T^72pR;w*`yWJZhgyZw`^IvCK z_NG$m1T+7Y<3DkmD5aJ=oz7a8Wv5%M){JuwBBBAHR;xWkMD>2Ze^W&AdcA&cyWM_$ zFc_@u?d^Tq@Aof=$X5UY03^(O+!%AJ*=(+*Y5J74Ry*ggv$J#c;Nal=WHR|20Iao- zI_FRn#g_N}v+eEebM1C}Eltzqxw*M>X_~&+>-E0K^L!)5xRo@U&9_^v)^pWr731-E zxVyW1K7{bTbM6}v3FXG`GRBn+yn^|S4Ed$rT)tTY;p zmHqwwO9?YqopWGjjK^bm?|qDM1R!Xw5n}`qEhwe#9}EWHh7i7=N{X2sGZ)Ue$#^^_ z5kUw6BBGN#&tEBu;^9iAvTCh;VrFLMHShha&bdq8`wbDfm?X(k2*Hj8q<`~5GSa~DM9dZLuN6+*ZbLingCipPyHFIOs+)5e%HN~tr$;qXZ! zda#`4dTEO1t+gL$t>L}Thr{6~-urim=o$d8wfqh_oAV&`T+W^r8 Vz2sR - -#include -#include -#include -#include -#include -#include - -/** Constructor */ -ChanCreateDialog::ChanCreateDialog(QWidget *parent, Qt::WFlags flags) -: QMainWindow(parent, flags) -{ - /* Invoke the Qt Designer generated object setup routine */ - ui.setupUi(this); - - // connect up the buttons. - connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelChan( ) ) ); - connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createChan( ) ) ); - - setFixedSize(QSize(392, 167)); - - /* Hide platform specific features */ -#ifdef Q_WS_WIN - -#endif -} - - -void ChanCreateDialog::newChan() -{ - /* clear all */ -} - -void ChanCreateDialog::createChan() -{ - hide(); - return; -} - - -void ChanCreateDialog::cancelChan() -{ - hide(); - return; -} - diff --git a/retroshare-gui/src/gui/msgs/ChanCreateDialog.h b/retroshare-gui/src/gui/msgs/ChanCreateDialog.h deleted file mode 100644 index 541fda51b..000000000 --- a/retroshare-gui/src/gui/msgs/ChanCreateDialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************** - * RShare is distributed under the following license: - * - * Copyright (C) 2006, crypton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - ****************************************************************/ - - -#ifndef _CHAN_CREATE_DIALOG_H -#define _CHAN_CREATE_DIALOG_H - -#include - -//#include - -#include "ui_ChanCreateDialog.h" - -class ChanCreateDialog : public QMainWindow -{ - Q_OBJECT - -public: - /** Default Constructor */ - - ChanCreateDialog(QWidget *parent = 0, Qt::WFlags flags = 0); - /** Default Destructor */ - -void newChan(); /* cleanup */ - -private slots: - - /* actions to take.... */ -void createChan(); -void cancelChan(); - -private: - - /** Qt Designer generated object */ - Ui::ChanCreateDialog ui; -}; - -#endif - diff --git a/retroshare-gui/src/gui/msgs/ChanCreateDialog.ui b/retroshare-gui/src/gui/msgs/ChanCreateDialog.ui deleted file mode 100644 index fe5145d5d..000000000 --- a/retroshare-gui/src/gui/msgs/ChanCreateDialog.ui +++ /dev/null @@ -1,662 +0,0 @@ - - ChanCreateDialog - - - - 0 - 0 - 392 - 167 - - - - - 7 - 7 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 192 - 192 - 192 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 104 - 104 - 104 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 104 - 104 - 104 - - - - - - - 255 - 255 - 255 - - - - - - - 104 - 104 - 104 - - - - - - - 240 - 240 - 240 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - Arial - 8 - 50 - false - false - false - false - - - - Qt::NoContextMenu - - - Create a new Broadcast Channel - - - - - - - - 10 - 0 - 391 - 31 - - - - - 12 - 75 - true - - - - Create A New Broadcast Channel - - - - - - 0 - 20 - 401 - 151 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 10 - 20 - 101 - 23 - - - - - 10 - 75 - true - - - - Channel Name: - - - - - - 10 - 50 - 41 - 23 - - - - - 10 - 75 - true - - - - Type: - - - - - - 120 - 20 - 261 - 23 - - - - - - - 150 - 110 - 111 - 26 - - - - Cancel Channel - - - - - - 270 - 110 - 111 - 26 - - - - Create Channel - - - true - - - - - - 120 - 50 - 271 - 23 - - - - Public Channel (Signed) - - - - - - 120 - 70 - 271 - 23 - - - - Private Channel (Encrypted) - - - - - - channelName - publicButton - privateButton - cancelButton - createButton - - - - - - diff --git a/retroshare-gui/src/gui/msgs/ChanMsgDialog.cpp b/retroshare-gui/src/gui/msgs/ChanMsgDialog.cpp index ca9d8437c..fe1fb79fa 100644 --- a/retroshare-gui/src/gui/msgs/ChanMsgDialog.cpp +++ b/retroshare-gui/src/gui/msgs/ChanMsgDialog.cpp @@ -28,7 +28,7 @@ #include #include "gui/feeds/AttachFileItem.h" - +#include "textformat.h" #include "util/misc.h" #include @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -61,38 +62,40 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags) : mIsMsg(msg), QMainWindow(parent, flags), mCheckAttachment(true) { - /* Invoke the Qt Designer generated object setup routine */ - ui.setupUi(this); + /* Invoke the Qt Designer generated object setup routine */ + ui.setupUi(this); - setupFileActions(); - setupEditActions(); - setupViewActions(); - setupInsertActions(); + setupFileActions(); + setupEditActions(); + setupViewActions(); + setupInsertActions(); - RshareSettings config; - config.loadWidgetInformation(this); + RshareSettings config; + config.loadWidgetInformation(this); - setAttribute ( Qt::WA_DeleteOnClose, true ); + setAttribute ( Qt::WA_DeleteOnClose, true ); + + // connect up the buttons. + connect( ui.actionSend, SIGNAL( triggered (bool)), this, SLOT( sendMessage( ) ) ); + //connect( ui.actionReply, SIGNAL( triggered (bool)), this, SLOT( replyMessage( ) ) ); + connect(ui.boldbtn, SIGNAL(clicked()), this, SLOT(textBold())); + connect(ui.underlinebtn, SIGNAL(clicked()), this, SLOT(textUnderline())); + connect(ui.italicbtn, SIGNAL(clicked()), this, SLOT(textItalic())); + connect(ui.colorbtn, SIGNAL(clicked()), this, SLOT(textColor())); + connect(ui.imagebtn, SIGNAL(clicked()), this, SLOT(addImage())); + //connect(ui.linkbtn, SIGNAL(clicked()), this, SLOT(insertLink())); + connect(ui.actionContactsView, SIGNAL(triggered()), this, SLOT(toggleContacts())); + connect(ui.actionSaveas, SIGNAL(triggered()), this, SLOT(fileSaveAs())); + connect(ui.actionAttach, SIGNAL(triggered()), this, SLOT(attachFile())); - //connect( ui.channelstreeView, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( channelstreeViewCostumPopupMenu( QPoint ) ) ); - // - - // connect up the buttons. - connect( ui.actionSend, SIGNAL( triggered (bool)), this, SLOT( sendMessage( ) ) ); - //connect( ui.actionReply, SIGNAL( triggered (bool)), this, SLOT( replyMessage( ) ) ); - connect(ui.boldbtn, SIGNAL(clicked()), this, SLOT(textBold())); - connect(ui.underlinebtn, SIGNAL(clicked()), this, SLOT(textUnderline())); - connect(ui.italicbtn, SIGNAL(clicked()), this, SLOT(textItalic())); - connect(ui.colorbtn, SIGNAL(clicked()), this, SLOT(textColor())); - connect(ui.imagebtn, SIGNAL(clicked()), this, SLOT(addImage())); - //connect(ui.linkbtn, SIGNAL(clicked()), this, SLOT(insertLink())); - connect(ui.actionContactsView, SIGNAL(triggered()), this, SLOT(toggleContacts())); - connect(ui.actionSaveas, SIGNAL(triggered()), this, SLOT(fileSaveAs())); - connect(ui.actionAttach, SIGNAL(triggered()), this, SLOT(attachFile())); + connect(ui.sizeincreaseButton, SIGNAL (clicked()), this, SLOT (fontSizeIncrease())); + connect(ui.sizedecreaseButton, SIGNAL (clicked()), this, SLOT (fontSizeDecrease())); + connect(ui.blockquoteButton, SIGNAL (clicked()), this, SLOT (blockQuote())); + connect(ui.codeButton, SIGNAL (clicked()), this, SLOT (toggleCode())); - connect(ui.msgText, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)), + connect(ui.msgText, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)), this, SLOT(currentCharFormatChanged(const QTextCharFormat &))); - connect(ui.msgText, SIGNAL(cursorPositionChanged()), + connect(ui.msgText, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged())); connect(ui.msgText->document(), SIGNAL(modificationChanged(bool)), @@ -124,27 +127,27 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags) connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged())); - /* if Msg */ - if (mIsMsg) - { - connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), - this, SLOT(togglePersonItem( QTreeWidgetItem *, int ) )); - } - else - { - connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), - this, SLOT(toggleChannelItem( QTreeWidgetItem *, int ) )); - } + /* if Msg */ + if (mIsMsg) + { + connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), + this, SLOT(togglePersonItem( QTreeWidgetItem *, int ) )); + } + else + { + connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), + this, SLOT(toggleChannelItem( QTreeWidgetItem *, int ) )); + } - connect(ui.msgFileList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), - this, SLOT(toggleRecommendItem( QTreeWidgetItem *, int ) )); + connect(ui.msgFileList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ), + this, SLOT(toggleRecommendItem( QTreeWidgetItem *, int ) )); - /* hide the Tree +/- */ - ui.msgSendList -> setRootIsDecorated( false ); - ui.msgFileList -> setRootIsDecorated( false ); + /* hide the Tree +/- */ + ui.msgSendList -> setRootIsDecorated( false ); + ui.msgFileList -> setRootIsDecorated( false ); - /* to hide the header */ - //ui.msgSendList->header()->hide(); + /* to hide the header */ + //ui.msgSendList->header()->hide(); QActionGroup *grp = new QActionGroup(this); connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(textAlign(QAction *))); @@ -182,19 +185,7 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags) connect(ui.comboSize, SIGNAL(activated(const QString &)),this, SLOT(textSize(const QString &))); ui.comboSize->setCurrentIndex(ui.comboSize->findText(QString::number(QApplication::font().pointSize()))); - ui.boldbtn->setIcon(QIcon(QString(":/images/textedit/textbold.png"))); - ui.underlinebtn->setIcon(QIcon(QString(":/images/textedit/textunder.png"))); - ui.italicbtn->setIcon(QIcon(QString(":/images/textedit/textitalic.png"))); - ui.textalignmentbtn->setIcon(QIcon(QString(":/images/textedit/textcenter.png"))); - ui.imagebtn->setIcon(QIcon(QString(":/images/lphoto24.png"))); - ui.actionContactsView->setIcon(QIcon(":/images/contacts24.png")); - ui.actionSaveas->setIcon(QIcon(":/images/save24.png")); - - /* ToolTips */ - ui.actionSend->setStatusTip(tr("Send this message now")); - ui.actionContactsView->setStatusTip(tr("Toggle Contacts View")); - ui.actionSaveas->setStatusTip(tr("Save this message")); - + ui.textalignmentbtn->setIcon(QIcon(QString(":/images/textedit/textcenter.png"))); QMenu * alignmentmenu = new QMenu(); alignmentmenu->addAction(actionAlignLeft); @@ -217,6 +208,9 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags) _smheader->resizeSection ( 2, 60 ); _smheader->resizeSection ( 3, 220 ); _smheader->resizeSection ( 4, 10 ); + + QPalette palette = QApplication::palette(); + codeBackground = palette.color( QPalette::Active, QPalette::Midlight ); /* Hide platform specific features */ @@ -225,26 +219,6 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags) #endif } - -void ChanMsgDialog::channelstreeViewCostumPopupMenu( QPoint point ) -{ - - QMenu contextMnu( this ); - QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier ); - - deletechannelAct = new QAction( tr( "Delete Channel" ), this ); - connect( deletechannelAct , SIGNAL( triggered() ), this, SLOT( deletechannel() ) ); - - createchannelmsgAct = new QAction( tr( "Create Channel MSG" ), this ); - connect( createchannelmsgAct , SIGNAL( triggered() ), this, SLOT( createchannelmsg() ) ); - - - contextMnu.clear(); - contextMnu.addAction( deletechannelAct); - contextMnu.addAction( createchannelmsgAct); - contextMnu.exec( mevent->globalPos() ); -} - void ChanMsgDialog::closeEvent (QCloseEvent * event) { //=== uncheck all repecient's boxes ======= @@ -278,21 +252,6 @@ void ChanMsgDialog::closeEvent (QCloseEvent * event) } -void ChanMsgDialog::deletechannel() -{ - - -} - - -void ChanMsgDialog::createchannelmsg() -{ - - -} - - - void ChanMsgDialog::insertSendList() { if (!rsPeers) @@ -525,6 +484,12 @@ void ChanMsgDialog::insertPastedText(std::string msg) msg.replace(i,1,std::string("\n
> ")) ; ui.msgText->setHtml(QString("")+QString::fromStdString(std::string("> ") + msg)+"

") ; + + ui.msgText->setFocus( Qt::OtherFocusReason ); + + QTextCursor c = ui.msgText->textCursor(); + c.movePosition(QTextCursor::End); + ui.msgText->setTextCursor(c); } void ChanMsgDialog::insertForwardPastedText(std::string msg) @@ -534,16 +499,29 @@ void ChanMsgDialog::insertForwardPastedText(std::string msg) msg.replace(i,1,std::string("\n
> ")) ; ui.msgText->setHtml(QString("
")+QString::fromStdString(std::string("") + msg)+"

") ; + + ui.msgText->setFocus( Qt::OtherFocusReason ); + + QTextCursor c = ui.msgText->textCursor(); + c.movePosition(QTextCursor::End); + ui.msgText->setTextCursor(c); } void ChanMsgDialog::insertMsgText(std::string msg) { ui.msgText->setText(QString::fromStdString(msg)); + + ui.msgText->setFocus( Qt::OtherFocusReason ); + + QTextCursor c = ui.msgText->textCursor(); + c.movePosition(QTextCursor::End); + ui.msgText->setTextCursor(c); } void ChanMsgDialog::insertHtmlText(std::string msg) { ui.msgText->setHtml(QString(" ") ) + QString::fromStdString(std::string(msg)) + "") ; + } @@ -992,14 +970,6 @@ void ChanMsgDialog::filePrint() #endif } -/*void TextEdit::filePrintPreview() -{ - PrintPreview *preview = new PrintPreview(textEdit->document(), this); - preview->setWindowModality(Qt::WindowModal); - preview->setAttribute(Qt::WA_DeleteOnClose); - preview->show(); -}*/ - void ChanMsgDialog::filePrintPdf() { #ifndef QT_NO_PRINTER @@ -1101,6 +1071,76 @@ void ChanMsgDialog::Create_New_Image_Tag( const QString urlremoteorlocal ) //} } +void ChanMsgDialog::fontSizeIncrease() +{ + if ( !( ui.msgText->textCursor().blockFormat().hasProperty( TextFormat::HtmlHeading ) && + ui.msgText->textCursor().blockFormat().intProperty( TextFormat::HtmlHeading ) ) ) { + QTextCharFormat format; + int idx = ui.msgText->currentCharFormat().intProperty( QTextFormat::FontSizeAdjustment ); + if ( idx < 3 ) { + format.setProperty( QTextFormat::FontSizeAdjustment, QVariant( ++idx ) ); + ui.msgText->textCursor().mergeCharFormat( format ); + } + } + ui.msgText->setFocus( Qt::OtherFocusReason ); +} + +void ChanMsgDialog::fontSizeDecrease() +{ + if ( !( ui.msgText->textCursor().blockFormat().hasProperty( TextFormat::HtmlHeading ) && + ui.msgText->textCursor().blockFormat().intProperty( TextFormat::HtmlHeading ) ) ) { + QTextCharFormat format; + int idx = ui.msgText->currentCharFormat().intProperty( QTextFormat::FontSizeAdjustment ); + if ( idx > -1 ) { + format.setProperty( QTextFormat::FontSizeAdjustment, QVariant( --idx ) ); + ui.msgText->textCursor().mergeCharFormat( format ); + } + } + ui.msgText->setFocus( Qt::OtherFocusReason ); +} + +void ChanMsgDialog::blockQuote() +{ + QTextBlockFormat blockFormat = ui.msgText->textCursor().blockFormat(); + QTextBlockFormat f; + + if ( blockFormat.hasProperty( TextFormat::IsBlockQuote ) && + blockFormat.boolProperty( TextFormat::IsBlockQuote ) ) { + f.setProperty( TextFormat::IsBlockQuote, QVariant( false ) ); + f.setLeftMargin( 0 ); + f.setRightMargin( 0 ); + } else { + f.setProperty( TextFormat::IsBlockQuote, QVariant( true ) ); + f.setLeftMargin( 40 ); + f.setRightMargin( 40 ); + } + ui.msgText->textCursor().mergeBlockFormat( f ); +} + +void ChanMsgDialog::toggleCode() +{ + static QString preFontFamily; + + QTextCharFormat charFormat = ui.msgText->currentCharFormat(); + QTextCharFormat f; + + if ( charFormat.hasProperty( TextFormat::HasCodeStyle ) && + charFormat.boolProperty( TextFormat::HasCodeStyle ) ) { + f.setProperty( TextFormat::HasCodeStyle, QVariant( false ) ); + f.setBackground( defaultCharFormat.background() ); + f.setFontFamily( preFontFamily ); + ui.msgText->textCursor().mergeCharFormat( f ); + + } else { + preFontFamily = ui.msgText->fontFamily(); + f.setProperty( TextFormat::HasCodeStyle, QVariant( true ) ); + f.setBackground( codeBackground ); + f.setFontFamily( "Dejavu Sans Mono" ); + ui.msgText->textCursor().mergeCharFormat( f ); + } + ui.msgText->setFocus( Qt::OtherFocusReason ); +} + void ChanMsgDialog::attachFile() { // select a file @@ -1178,6 +1218,8 @@ void ChanMsgDialog::fileHashingFinished(AttachFileItem* file) { } ui.msgText->setHtml(QString::fromStdWString(message)); + ui.msgText->setFocus( Qt::OtherFocusReason ); + } diff --git a/retroshare-gui/src/gui/msgs/ChanMsgDialog.h b/retroshare-gui/src/gui/msgs/ChanMsgDialog.h index fab4c6f28..0b78b8761 100644 --- a/retroshare-gui/src/gui/msgs/ChanMsgDialog.h +++ b/retroshare-gui/src/gui/msgs/ChanMsgDialog.h @@ -48,39 +48,32 @@ public: ChanMsgDialog(bool isMsg, QWidget *parent = 0, Qt::WFlags flags = 0); /** Default Destructor */ -void newMsg(); + void newMsg(); /* worker fns */ -void insertSendList(); /* for Msgs */ -void insertChannelSendList(); /* for Channels */ -void insertFileList(const std::list&); /* for Both */ -void insertTitleText(std::string title); -void insertPastedText(std::string msg) ; -void insertForwardPastedText(std::string msg); -void insertHtmlText(std::string msg); -void insertMsgText(std::string msg); -void addRecipient(std::string id) ; -void Create_New_Image_Tag( const QString urlremoteorlocal ); + void insertSendList(); /* for Msgs */ + void insertChannelSendList(); /* for Channels */ + void insertFileList(const std::list&); /* for Both */ + void insertTitleText(std::string title); + void insertPastedText(std::string msg) ; + void insertForwardPastedText(std::string msg); + void insertHtmlText(std::string msg); + void insertMsgText(std::string msg); + void addRecipient(std::string id) ; + void Create_New_Image_Tag( const QString urlremoteorlocal ); QSettings setter; public slots: /* actions to take.... */ -void sendMessage(); -void cancelMessage(); -void addImage(); + void sendMessage(); + void cancelMessage(); + void addImage(); protected: void closeEvent (QCloseEvent * event); private slots: - - /** Create the context popup menu and it's submenus */ - void channelstreeViewCostumPopupMenu( QPoint point ); - - /** Defines the context menu functions*/ - void deletechannel(); - void createchannelmsg(); /* toggle Contacts DockWidget */ void toggleContacts(); @@ -119,7 +112,12 @@ private slots: void addAttachment(std::string); void checkAttachmentReady(); - + void fontSizeIncrease(); + void fontSizeDecrease(); + void blockQuote(); + void toggleCode(); + + private: void setTextColor(const QColor& col) ; void setupFileActions(); @@ -160,6 +158,9 @@ private: QString fileName; QString nametomake; + QColor codeBackground; + QTextCharFormat defaultCharFormat; + QHash autoLinkDictionary; QHash autoLinkTitleDictionary; QHash autoLinkTargetDictionary; diff --git a/retroshare-gui/src/gui/msgs/ChanMsgDialog.ui b/retroshare-gui/src/gui/msgs/ChanMsgDialog.ui index 4d644cc77..28dd98e41 100644 --- a/retroshare-gui/src/gui/msgs/ChanMsgDialog.ui +++ b/retroshare-gui/src/gui/msgs/ChanMsgDialog.ui @@ -6,7 +6,7 @@ 0 0 - 770 + 874 528 @@ -20,9 +20,13 @@ :/images/folder-draft.png:/images/folder-draft.png + + QToolBar#toolBar{background-image: url(:/images/connect/connectFriendBanner.png)} + + - - + + Qt::Horizontal @@ -101,7 +105,10 @@ Qt::Vertical - + + + 2 + @@ -130,175 +137,374 @@ - - - - - - - - - - - Font size - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Bold - - - - - - true - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Underline - - - - - - true - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Italic - - - - - - true - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Color - - - - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Alignment - - - - - - - - - - Qt::Horizontal - - - - 20 - 24 - - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Add a Image - - - - - - - + + + QFrame#frame{ +background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, +stop:0 #FEFEFE, stop:1 #E8E8E8); + +border: 1px solid #CCCCCC;} + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 6 + + + + + + + + + + + + + + 45 + 16777215 + + + + Font size + + + + + + + Qt::Horizontal + + + + 20 + 24 + + + + + + + + Blockquote + + + + + + + :/images/textedit/hi22-action-format-text-blockquote.png:/images/textedit/hi22-action-format-text-blockquote.png + + + + 24 + 24 + + + + true + + + + + + + + 1677 + 1677 + + + + Increase font size + + + + + + + :/images/textedit/format_font_size_less.png:/images/textedit/format_font_size_less.png + + + + 24 + 24 + + + + true + + + + + + + + 167 + 167 + + + + Decrease font size + + + + + + + :/images/textedit/format_font_size_more.png:/images/textedit/format_font_size_more.png + + + + 24 + 24 + + + + true + + + + + + + + 0 + 0 + + + + + 1677 + 1677 + + + + Bold + + + + + + + :/images/textedit/textbold.png:/images/textedit/textbold.png + + + + 24 + 24 + + + + true + + + true + + + + + + + + 0 + 0 + + + + + 167 + 167 + + + + Underline + + + + + + + :/images/textedit/textunder.png:/images/textedit/textunder.png + + + + 24 + 24 + + + + true + + + true + + + + + + + + 0 + 0 + + + + + 167 + 167 + + + + Italic + + + + + + + :/images/textedit/textitalic.png:/images/textedit/textitalic.png + + + + 24 + 24 + + + + true + + + true + + + + + + + + 0 + 0 + + + + + 167 + 167 + + + + Select Color + + + + + + true + + + + + + + + 0 + 0 + + + + + 167 + 167 + + + + Alignment + + + + + + + 24 + 24 + + + + QToolButton::MenuButtonPopup + + + true + + + + + + + + 0 + 0 + + + + + 167 + 167 + + + + Add a Image + + + + + + + :/images/add_image24.png:/images/add_image24.png + + + + 24 + 24 + + + + true + + + + + + + Sets text font to code style + + + + + + + :/images/textedit/hi22-action-format-text-code.png:/images/textedit/hi22-action-format-text-code.png + + + + 22 + 22 + + + + true + + + + + + + @@ -391,7 +597,7 @@ 0 0 - 770 + 874 21 @@ -430,6 +636,9 @@ Send + + Send this message now + @@ -441,14 +650,28 @@ + + + :/images/contacts24.png:/images/contacts24.png + Contacts + + Toggle Contacts View + + + + :/images/save24.png:/images/save24.png + Save + + Save this message + diff --git a/retroshare-gui/src/gui/msgs/textformat.h b/retroshare-gui/src/gui/msgs/textformat.h new file mode 100644 index 000000000..dcc55035b --- /dev/null +++ b/retroshare-gui/src/gui/msgs/textformat.h @@ -0,0 +1,64 @@ +/*************************************************************************** + * This file is distributed under the following license: * + * Copyright (c) 2006-2010 RetroShare Team * + * Copyright (C) 2008-2009 Mehrdad Momeny * + * Copyright (C) 2008-2009 Golnaz Nilieh * + * * + * It is a modified version of "bilbotextformat.h", which was part * + * of the Bilbo Blogger. It has been customized for * + * use in RetroShare, at January 2010. * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef TEXTFORMAT_H +#define TEXTFORMAT_H + +#include + +/** + * Adds some textformat attributes which don't exist in QTextFormat class. + * this class may be removed in future, if all editor related staff be ordered as a lib. + * + @author Mehrdad Momeny + @author Golnaz Nilieh +*/ +// class TextCharFormat : public QTextCharFormat + +class TextFormat +{ +public: + + enum Property { + /// Anchor properties + AnchorTitle = 0x100010, + AnchorTarget = 0x100011, + + /// Image properties + ImageTitle = 0x100020, + ImageAlternateText = 0x100021, + + HasCodeStyle = 0x100030, + + /// Block Properties + HtmlHeading = 0x100040, //zero if block is not in heading format, 1 for Heading 1, and so on. + IsBlockQuote = 0x100041, + + IsHtmlTagSign = 0x100042, + }; + +}; + +#endif