mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-21 05:44:29 -05:00
added storing Network Tab Position
added for Check files button to change text when checking files git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1353 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
aae4208470
commit
3bd022bea3
@ -77,6 +77,9 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
/* Create RshareSettings object */
|
||||
_settings = new RshareSettings();
|
||||
|
||||
connect( ui.connecttreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||
|
||||
/* create a single connect dialog */
|
||||
@ -160,6 +163,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
getNetworkStatus();
|
||||
updateNetworkStatus();
|
||||
//load();
|
||||
loadtabsettings();
|
||||
|
||||
|
||||
/* Hide platform specific features */
|
||||
@ -864,24 +868,44 @@ void NetworkDialog::updateNetworkStatus()
|
||||
ui.radio_netServer->setEnabled(false);
|
||||
}*/
|
||||
|
||||
void NetworkDialog::on_actionTabsright_activated()
|
||||
{
|
||||
ui.networkTab->setTabPosition(QTabWidget::East);
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabsnorth_activated()
|
||||
{
|
||||
_settings->beginGroup("NetworkDialog");
|
||||
|
||||
ui.networkTab->setTabPosition(QTabWidget::North);
|
||||
|
||||
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabssouth_activated()
|
||||
{
|
||||
_settings->beginGroup("NetworkDialog");
|
||||
|
||||
ui.networkTab->setTabPosition(QTabWidget::South);
|
||||
|
||||
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabswest_activated()
|
||||
{
|
||||
_settings->beginGroup("NetworkDialog");
|
||||
|
||||
ui.networkTab->setTabPosition(QTabWidget::West);
|
||||
|
||||
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabsright_activated()
|
||||
{
|
||||
_settings->beginGroup("NetworkDialog");
|
||||
|
||||
ui.networkTab->setTabPosition(QTabWidget::East);
|
||||
|
||||
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabsTriangular_activated()
|
||||
@ -895,3 +919,34 @@ void NetworkDialog::on_actionTabsRounded_activated()
|
||||
ui.networkTab->setTabShape(QTabWidget::Rounded);
|
||||
ui.tabBottom->setTabShape(QTabWidget::Rounded);
|
||||
}
|
||||
|
||||
void NetworkDialog::loadtabsettings()
|
||||
{
|
||||
_settings->beginGroup("NetworkDialog");
|
||||
|
||||
if(_settings->value("TabWidget_Position","0").toInt() == 0)
|
||||
{
|
||||
qDebug() << "Tab North";
|
||||
ui.networkTab->setTabPosition(QTabWidget::North);
|
||||
}
|
||||
|
||||
else if (_settings->value("TabWidget_Position","1").toInt() == 1)
|
||||
{
|
||||
qDebug() << "Tab South";
|
||||
ui.networkTab->setTabPosition(QTabWidget::South);
|
||||
}
|
||||
|
||||
else if (_settings->value("TabWidget_Position","2").toInt() ==2)
|
||||
{
|
||||
qDebug() << "Tab West";
|
||||
ui.networkTab->setTabPosition(QTabWidget::West);
|
||||
}
|
||||
|
||||
else if(_settings->value("TabWidget_Position","3").toInt() ==3)
|
||||
{
|
||||
qDebug() << "Tab East";
|
||||
ui.networkTab->setTabPosition(QTabWidget::East);
|
||||
}
|
||||
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
@ -26,8 +26,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QtGui>
|
||||
|
||||
|
||||
//#include <config/rsharesettings.h>
|
||||
#include "Preferences/rsharesettings.h"
|
||||
|
||||
#include "mainpage.h"
|
||||
#include "ui_NetworkDialog.h"
|
||||
@ -76,6 +75,8 @@ private slots:
|
||||
void getNetworkStatus();
|
||||
void updateNetworkStatus();
|
||||
|
||||
void loadtabsettings();
|
||||
|
||||
void on_actionTabsright_activated();
|
||||
void on_actionTabsnorth_activated();
|
||||
void on_actionTabssouth_activated();
|
||||
@ -86,9 +87,10 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
/** A RetroShare Settings object used for saving/loading settings */
|
||||
RshareSettings *_settings;
|
||||
|
||||
|
||||
QTreeWidgetItem *getCurrentNeighbour();
|
||||
QTreeWidgetItem *getCurrentNeighbour();
|
||||
|
||||
/** Define the popup menus for the Context menu */
|
||||
QMenu* contextMnu;
|
||||
|
@ -59,7 +59,7 @@
|
||||
#define IMAGE_DOWNLOAD ":/images/download16.png"
|
||||
#define IMAGE_PLAY ":/images/start.png"
|
||||
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
||||
#define IMAGE_HASH_DONE ":/images/friendsfolder24.png"
|
||||
#define IMAGE_HASH_DONE ":/images/accepted16.png"
|
||||
#define IMAGE_MSG ":/images/message-mail.png"
|
||||
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
||||
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
||||
@ -170,7 +170,7 @@ void SharedFilesDialog::checkUpdate()
|
||||
/* update */
|
||||
if (rsFiles->InDirectoryCheck())
|
||||
{
|
||||
//ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_BUSY));
|
||||
ui.checkButton->setText(tr("Checking..."));
|
||||
QMovie *movie = new QMovie(":/images/loader/16-loader.gif");
|
||||
ui.hashLabel->setMovie(movie);
|
||||
movie->start();
|
||||
@ -178,7 +178,7 @@ void SharedFilesDialog::checkUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
//movie->stop();
|
||||
ui.checkButton->setText(tr("Check files"));
|
||||
ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE));
|
||||
ui.hashLabel->setToolTip("") ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user