fixed declarations and actions

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@404 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-03-23 02:21:17 +00:00
parent 351559becd
commit 9652da42b4
3 changed files with 45 additions and 15 deletions

View File

@ -58,16 +58,16 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
connect(ui.sendButton, SIGNAL(clicked( ) ), this, SLOT(sendChat( ) )); connect(ui.sendButton, SIGNAL(clicked( ) ), this, SLOT(sendChat( ) ));
connect(ui.colorButton, SIGNAL(clicked()), this, SLOT(setColor())); connect(ui.colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
connect(ui.fontButton, SIGNAL(clicked()), this, SLOT(setFont())); //connect(ui.fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui.textboldButton, SIGNAL(triggered()), this, SLOT(insertBold())); connect(ui.textboldButton, SIGNAL(clicked()), this, SLOT(insertBold()));
connect(ui.textunderlineButton, SIGNAL(triggered()), this, SLOT(insertUnderline())); connect(ui.textunderlineButton, SIGNAL(clicked()), this, SLOT(insertUnderline()));
connect(ui.textitalicButton, SIGNAL(triggered()), this, SLOT(insertItalic())); connect(ui.textitalicButton, SIGNAL(clicked()), this, SLOT(insertItalic()));
//connect(ui.actionBold, SIGNAL(triggered()), this, SLOT(insertBold())); connect(ui.actionBold, SIGNAL(triggered()), this, SLOT(insertBold()));
//connect(ui.actionItalic, SIGNAL(triggered()), this, SLOT(insertItalic())); connect(ui.actionItalic, SIGNAL(triggered()), this, SLOT(insertItalic()));
//connect(ui.actionStrike, SIGNAL(triggered()), this, SLOT(insertStrike())); connect(ui.actionUnderline, SIGNAL(triggered()), this, SLOT(insertUnderline()));
//connect(ui.actionUnderline, SIGNAL(triggered()), this, SLOT(insertUnderline())); connect(ui.actionStrike, SIGNAL(triggered()), this, SLOT(insertStrike()));
// Create the status bar // Create the status bar
std::ostringstream statusstr; std::ostringstream statusstr;
@ -87,9 +87,17 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
ui.textitalicButton->setIcon(QIcon(QString(":/images/edit-italic.png"))); ui.textitalicButton->setIcon(QIcon(QString(":/images/edit-italic.png")));
ui.fontButton->setIcon(QIcon(QString(":/images/fonts.png"))); ui.fontButton->setIcon(QIcon(QString(":/images/fonts.png")));
//QMenu * fontmenu = new QMenu(); ui.actionBold->setIcon(QIcon(":/images/edit-bold.png"));
//fontmenu->addAction(actionBold); ui.actionUnderline->setIcon(QIcon(":/images/edit-underline.png"));
//ui.fontButton->setMenu(fontmenu); ui.actionItalic->setIcon(QIcon(":/images/edit-italic.png"));
//ui.actionStrike->setIcon(QIcon(":/exit.png"));
QMenu * fontmenu = new QMenu();
fontmenu->addAction(ui.actionBold);
fontmenu->addAction(ui.actionUnderline);
fontmenu->addAction(ui.actionItalic);
fontmenu->addAction(ui.actionStrike);
ui.fontButton->setMenu(fontmenu);
} }

View File

@ -50,16 +50,17 @@ public:
void updateChat(); void updateChat();
void addChatMsg(ChatInfo *ci); void addChatMsg(ChatInfo *ci);
public slots:
/** Overloaded QWidget.show */
void show();
void insertBold(); void insertBold();
void insertItalic(); void insertItalic();
void insertUnderline(); void insertUnderline();
void insertStrike(); void insertStrike();
void insertAutour(QString leftTruc,QString rightTruc); void insertAutour(QString leftTruc,QString rightTruc);
public slots:
/** Overloaded QWidget.show */
void show();
protected: protected:
void closeEvent (QCloseEvent * event); void closeEvent (QCloseEvent * event);
@ -72,6 +73,7 @@ private slots:
void sendChat(); void sendChat();
private: private:

View File

@ -378,6 +378,26 @@ border-image: url(:/images/mystatus_bg.png);
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
</widget> </widget>
<action name="actionBold" >
<property name="text" >
<string>Bold</string>
</property>
</action>
<action name="actionItalic" >
<property name="text" >
<string>Italic</string>
</property>
</action>
<action name="actionUnderline" >
<property name="text" >
<string>Underline</string>
</property>
</action>
<action name="actionStrike" >
<property name="text" >
<string>Strike</string>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>