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
@ -76,6 +76,9 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
|||||||
{
|
{
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
/* Create RshareSettings object */
|
||||||
|
_settings = new RshareSettings();
|
||||||
|
|
||||||
connect( ui.connecttreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) );
|
connect( ui.connecttreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||||
|
|
||||||
@ -160,6 +163,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
|||||||
getNetworkStatus();
|
getNetworkStatus();
|
||||||
updateNetworkStatus();
|
updateNetworkStatus();
|
||||||
//load();
|
//load();
|
||||||
|
loadtabsettings();
|
||||||
|
|
||||||
|
|
||||||
/* Hide platform specific features */
|
/* Hide platform specific features */
|
||||||
@ -864,24 +868,44 @@ void NetworkDialog::updateNetworkStatus()
|
|||||||
ui.radio_netServer->setEnabled(false);
|
ui.radio_netServer->setEnabled(false);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void NetworkDialog::on_actionTabsright_activated()
|
|
||||||
{
|
|
||||||
ui.networkTab->setTabPosition(QTabWidget::East);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkDialog::on_actionTabsnorth_activated()
|
void NetworkDialog::on_actionTabsnorth_activated()
|
||||||
{
|
{
|
||||||
|
_settings->beginGroup("NetworkDialog");
|
||||||
|
|
||||||
ui.networkTab->setTabPosition(QTabWidget::North);
|
ui.networkTab->setTabPosition(QTabWidget::North);
|
||||||
|
|
||||||
|
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||||
|
_settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkDialog::on_actionTabssouth_activated()
|
void NetworkDialog::on_actionTabssouth_activated()
|
||||||
{
|
{
|
||||||
|
_settings->beginGroup("NetworkDialog");
|
||||||
|
|
||||||
ui.networkTab->setTabPosition(QTabWidget::South);
|
ui.networkTab->setTabPosition(QTabWidget::South);
|
||||||
|
|
||||||
|
_settings->setValue("TabWidget_Position",ui.networkTab->tabPosition());
|
||||||
|
_settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkDialog::on_actionTabswest_activated()
|
void NetworkDialog::on_actionTabswest_activated()
|
||||||
{
|
{
|
||||||
|
_settings->beginGroup("NetworkDialog");
|
||||||
|
|
||||||
ui.networkTab->setTabPosition(QTabWidget::West);
|
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()
|
void NetworkDialog::on_actionTabsTriangular_activated()
|
||||||
@ -895,3 +919,34 @@ void NetworkDialog::on_actionTabsRounded_activated()
|
|||||||
ui.networkTab->setTabShape(QTabWidget::Rounded);
|
ui.networkTab->setTabShape(QTabWidget::Rounded);
|
||||||
ui.tabBottom->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 <QFileDialog>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
|
#include "Preferences/rsharesettings.h"
|
||||||
//#include <config/rsharesettings.h>
|
|
||||||
|
|
||||||
#include "mainpage.h"
|
#include "mainpage.h"
|
||||||
#include "ui_NetworkDialog.h"
|
#include "ui_NetworkDialog.h"
|
||||||
@ -76,6 +75,8 @@ private slots:
|
|||||||
void getNetworkStatus();
|
void getNetworkStatus();
|
||||||
void updateNetworkStatus();
|
void updateNetworkStatus();
|
||||||
|
|
||||||
|
void loadtabsettings();
|
||||||
|
|
||||||
void on_actionTabsright_activated();
|
void on_actionTabsright_activated();
|
||||||
void on_actionTabsnorth_activated();
|
void on_actionTabsnorth_activated();
|
||||||
void on_actionTabssouth_activated();
|
void on_actionTabssouth_activated();
|
||||||
@ -86,9 +87,10 @@ private slots:
|
|||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/** A RetroShare Settings object used for saving/loading settings */
|
||||||
|
RshareSettings *_settings;
|
||||||
|
|
||||||
|
QTreeWidgetItem *getCurrentNeighbour();
|
||||||
QTreeWidgetItem *getCurrentNeighbour();
|
|
||||||
|
|
||||||
/** Define the popup menus for the Context menu */
|
/** Define the popup menus for the Context menu */
|
||||||
QMenu* contextMnu;
|
QMenu* contextMnu;
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
#define IMAGE_DOWNLOAD ":/images/download16.png"
|
#define IMAGE_DOWNLOAD ":/images/download16.png"
|
||||||
#define IMAGE_PLAY ":/images/start.png"
|
#define IMAGE_PLAY ":/images/start.png"
|
||||||
#define IMAGE_HASH_BUSY ":/images/settings.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_MSG ":/images/message-mail.png"
|
||||||
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
||||||
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
||||||
@ -170,7 +170,7 @@ void SharedFilesDialog::checkUpdate()
|
|||||||
/* update */
|
/* update */
|
||||||
if (rsFiles->InDirectoryCheck())
|
if (rsFiles->InDirectoryCheck())
|
||||||
{
|
{
|
||||||
//ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_BUSY));
|
ui.checkButton->setText(tr("Checking..."));
|
||||||
QMovie *movie = new QMovie(":/images/loader/16-loader.gif");
|
QMovie *movie = new QMovie(":/images/loader/16-loader.gif");
|
||||||
ui.hashLabel->setMovie(movie);
|
ui.hashLabel->setMovie(movie);
|
||||||
movie->start();
|
movie->start();
|
||||||
@ -178,7 +178,7 @@ void SharedFilesDialog::checkUpdate()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//movie->stop();
|
ui.checkButton->setText(tr("Check files"));
|
||||||
ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE));
|
ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE));
|
||||||
ui.hashLabel->setToolTip("") ;
|
ui.hashLabel->setToolTip("") ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user