mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-27 07:41:08 -04:00
-added new Preferences Dialog for Appearance
-moved some Settings from General to Appearance ( Language, Style, stylesheet -added checkbox for Start RetroShare with System start in GeneralDialog -moved Rsharesettings to Preferences folder to find bether -added new RSettings source -clean uped some old code stuff in MainWindow which is not more needed -replaced in MainWindow PreferencesWindows open function with new one. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@684 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4e43cb2f09
commit
c84f34e916
28 changed files with 1779 additions and 490 deletions
120
retroshare-gui/src/gui/Preferences/rsharesettings.h
Normal file
120
retroshare-gui/src/gui/Preferences/rsharesettings.h
Normal file
|
@ -0,0 +1,120 @@
|
|||
/****************************************************************
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2006-2007, crypton
|
||||
* Copyright (c) 2006, Matt Edman, Justin Hipple
|
||||
*
|
||||
* 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 _RSHARESETTINGS_H
|
||||
#define _RSHARESETTINGS_H
|
||||
|
||||
#include <QHash>
|
||||
#include <QSettings>
|
||||
|
||||
#include <gui/linetypes.h>
|
||||
#include "rsettings.h"
|
||||
|
||||
|
||||
//Forward declaration.
|
||||
class QWidget;
|
||||
class QTableWidget;
|
||||
class QToolBar;
|
||||
class QMainWindow;
|
||||
|
||||
/** Handles saving and restoring RShares's settings, such as the
|
||||
* location of Tor, the control port, etc.
|
||||
*
|
||||
* NOTE: Qt 4.1 documentation states that constructing a QSettings object is
|
||||
* "very fast", so we shouldn't need to create a global instance of this
|
||||
* class.
|
||||
*/
|
||||
class RshareSettings : public RSettings
|
||||
{
|
||||
|
||||
public:
|
||||
/** Default constructor. */
|
||||
RshareSettings();
|
||||
|
||||
/** Gets the currently preferred language code for RShare. */
|
||||
QString getLanguageCode();
|
||||
/** Saves the preferred language code. */
|
||||
void setLanguageCode(QString languageCode);
|
||||
|
||||
/** Gets the interface style key (e.g., "windows", "motif", etc.) */
|
||||
QString getInterfaceStyle();
|
||||
/** Sets the interface style key. */
|
||||
void setInterfaceStyle(QString styleKey);
|
||||
|
||||
/** Sets the stylesheet */
|
||||
void setSheetName(QString sheet);
|
||||
/** Gets the stylesheet */
|
||||
QString getSheetName();
|
||||
|
||||
/** Returns true if RetroShare's main window should be visible when the
|
||||
* application starts. */
|
||||
bool showMainWindowAtStart();
|
||||
/** Sets whether to show Vidalia's main window when the application starts. */
|
||||
void setShowMainWindowAtStart(bool show);
|
||||
|
||||
/** Returns true if RetroShare should start on system boot. */
|
||||
bool runRetroshareOnBoot();
|
||||
/** Set whether to run RetroShare on system boot. */
|
||||
void setRunRetroshareOnBoot(bool run);
|
||||
|
||||
|
||||
/* Get the destination log file. */
|
||||
QString getLogFile();
|
||||
/** Set the destination log file. */
|
||||
void setLogFile(QString file);
|
||||
|
||||
/* Get the bandwidth graph line filter. */
|
||||
uint getBWGraphFilter();
|
||||
/** Set the bandwidth graph line filter. */
|
||||
void setBWGraphFilter(uint line, bool status);
|
||||
|
||||
/** Set the bandwidth graph opacity setting. */
|
||||
int getBWGraphOpacity();
|
||||
/** Set the bandwidth graph opacity settings. */
|
||||
void setBWGraphOpacity(int value);
|
||||
|
||||
/** Gets whether the bandwidth graph is always on top. */
|
||||
bool getBWGraphAlwaysOnTop();
|
||||
/** Sets whether the bandwidth graph is always on top. */
|
||||
void setBWGraphAlwaysOnTop(bool alwaysOnTop);
|
||||
|
||||
|
||||
//! Save placement, state and size information of a window.
|
||||
void saveWidgetInformation(QWidget *widget);
|
||||
|
||||
//! Load placement, state and size information of a window.
|
||||
void loadWidgetInformation(QWidget *widget);
|
||||
|
||||
//! Method overload. Save window and toolbar information.
|
||||
void saveWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
|
||||
//! Method overload. Restore window and toolbar information.
|
||||
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue