added menu for Display

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2061 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-17 02:27:32 +00:00
parent 59e44e2fbe
commit ff8d011ac7
3 changed files with 156 additions and 4 deletions

View File

@ -127,11 +127,9 @@ PeersDialog::PeersDialog(QWidget *parent)
headerItem->setTextAlignment(1, Qt::AlignLeft | Qt::AlignVCenter);
headerItem->setTextAlignment(2, Qt::AlignHCenter | Qt::AlignVCenter);
loadtabsettings();
loadEmoticonsgroupchat();
connect(ui.lineEdit, SIGNAL(textChanged ( ) ), this, SLOT(checkChat( ) ));
connect(ui.Sendbtn, SIGNAL(clicked()), this, SLOT(sendMsg()));
connect(ui.emoticonBtn, SIGNAL(clicked()), this, SLOT(smileyWidgetgroupchat()));
@ -188,6 +186,17 @@ PeersDialog::PeersDialog(QWidget *parent)
ui.menupushButton->setMenu(menu);
QMenu *lookmenu = new QMenu();
lookmenu->addAction(ui.actionSet_Tabs_Right);
lookmenu->addAction(ui.actionSet_Tabs_Left);
lookmenu->addAction(ui.actionSet_Tabs_North);
lookmenu->addAction(ui.actionSet_Tabs_South);
lookmenu->addSeparator();
lookmenu->addAction(ui.actionSet_Tabs_Triangular);
lookmenu->addAction(ui.actionSet_Tabs_Rounded);
ui.lookpushButton->setMenu(lookmenu);
updateAvatar();
loadmypersonalstatus();
@ -1421,3 +1430,84 @@ void PeersDialog::statusmessage()
static StatusMessage *statusmsgdialog = new StatusMessage();
statusmsgdialog->show();
}
void PeersDialog::on_actionSet_Tabs_North_activated()
{
_settings->beginGroup("PeersDialog");
ui.peertabWidget->setTabPosition(QTabWidget::North);
_settings->setValue("TabWidget_Position",ui.peertabWidget->tabPosition());
_settings->endGroup();
}
void PeersDialog::on_actionSet_Tabs_South_activated()
{
_settings->beginGroup("PeersDialog");
ui.peertabWidget->setTabPosition(QTabWidget::South);
_settings->setValue("TabWidget_Position",ui.peertabWidget->tabPosition());
_settings->endGroup();
}
void PeersDialog::on_actionSet_Tabs_Left_activated()
{
_settings->beginGroup("PeersDialog");
ui.peertabWidget->setTabPosition(QTabWidget::West);
_settings->setValue("TabWidget_Position",ui.peertabWidget->tabPosition());
_settings->endGroup();
}
void PeersDialog::on_actionSet_Tabs_Right_activated()
{
_settings->beginGroup("PeersDialog");
ui.peertabWidget->setTabPosition(QTabWidget::East);
_settings->setValue("TabWidget_Position",ui.peertabWidget->tabPosition());
_settings->endGroup();
}
void PeersDialog::on_actionSet_Tabs_Triangular_activated()
{
ui.peertabWidget->setTabShape(QTabWidget::Triangular);
}
void PeersDialog::on_actionSet_Tabs_Rounded_activated()
{
ui.peertabWidget->setTabShape(QTabWidget::Rounded);
}
void PeersDialog::loadtabsettings()
{
_settings->beginGroup("PeersDialog");
if(_settings->value("TabWidget_Position","0").toInt() == 0)
{
qDebug() << "Tab North";
ui.peertabWidget->setTabPosition(QTabWidget::North);
}
else if (_settings->value("TabWidget_Position","1").toInt() == 1)
{
qDebug() << "Tab South";
ui.peertabWidget->setTabPosition(QTabWidget::South);
}
else if (_settings->value("TabWidget_Position","2").toInt() ==2)
{
qDebug() << "Tab West";
ui.peertabWidget->setTabPosition(QTabWidget::West);
}
else if(_settings->value("TabWidget_Position","3").toInt() ==3)
{
qDebug() << "Tab East";
ui.peertabWidget->setTabPosition(QTabWidget::East);
}
_settings->endGroup();
}

View File

@ -128,7 +128,15 @@ class PeersDialog : public RsAutoUpdatePage
void on_actionCreate_New_Channel_activated();
void loadmypersonalstatus();
void loadtabsettings();
void on_actionSet_Tabs_Right_activated();
void on_actionSet_Tabs_North_activated();
void on_actionSet_Tabs_South_activated();
void on_actionSet_Tabs_Left_activated();
void on_actionSet_Tabs_Triangular_activated();
void on_actionSet_Tabs_Rounded_activated();
signals:
void friendsUpdated() ;

View File

@ -557,7 +557,7 @@ p, li { white-space: pre-wrap; }
</property>
</spacer>
</item>
<item row="0" column="2">
<item row="0" column="3">
<widget class="QPushButton" name="menupushButton">
<property name="toolTip">
<string>Add</string>
@ -598,6 +598,30 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="lookpushButton">
<property name="styleSheet">
<string notr="true">QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: bottom right;
}
QPushButton:hover {
border: 1px solid #CCCCCC;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1201,6 +1225,36 @@ background: white;}</string>
<string>Set your Personal Message</string>
</property>
</action>
<action name="actionSet_Tabs_Right">
<property name="text">
<string>Set Tabs Right</string>
</property>
</action>
<action name="actionSet_Tabs_Left">
<property name="text">
<string>Set Tabs Left</string>
</property>
</action>
<action name="actionSet_Tabs_North">
<property name="text">
<string>Set Tabs North</string>
</property>
</action>
<action name="actionSet_Tabs_South">
<property name="text">
<string>Set Tabs South</string>
</property>
</action>
<action name="actionSet_Tabs_Triangular">
<property name="text">
<string>Set Tabs Triangular</string>
</property>
</action>
<action name="actionSet_Tabs_Rounded">
<property name="text">
<string>Set Tabs Rounded</string>
</property>
</action>
</widget>
<resources>
<include location="images.qrc"/>