mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
Added new fixes from Phenom (AddFrameListeInsteadOfToolBar_v0.6_7360.patch)
Add an option for List item icon size. Save state for List Item and Option window. Make ListItem linked with Function pointer instead of SLOT char. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7361 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bcff888eb7
commit
995d63c979
10 changed files with 561 additions and 399 deletions
|
@ -235,6 +235,11 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
||||||
|
|
||||||
//ui->stackPages->setCurrentIndex(Settings->getLastPageInMainWindow());
|
//ui->stackPages->setCurrentIndex(Settings->getLastPageInMainWindow());
|
||||||
setNewPage(Settings->getLastPageInMainWindow());
|
setNewPage(Settings->getLastPageInMainWindow());
|
||||||
|
/* Load listWidget postion */
|
||||||
|
QByteArray geometry = Settings->valueFromGroup("MainWindow", "SplitterState", QByteArray()).toByteArray();
|
||||||
|
if (geometry.isEmpty() == false) {
|
||||||
|
ui->splitter->restoreState(geometry);
|
||||||
|
}
|
||||||
|
|
||||||
/** StatusBar section ********/
|
/** StatusBar section ********/
|
||||||
/* initialize combobox in status bar */
|
/* initialize combobox in status bar */
|
||||||
|
@ -304,6 +309,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
Settings->setLastPageInMainWindow(ui->stackPages->currentIndex());
|
Settings->setLastPageInMainWindow(ui->stackPages->currentIndex());
|
||||||
|
/* Save listWidget position */
|
||||||
|
Settings->setValueToGroup("MainWindow", "SplitterState", ui->splitter->saveState());
|
||||||
|
|
||||||
delete peerstatus;
|
delete peerstatus;
|
||||||
delete natstatus;
|
delete natstatus;
|
||||||
|
@ -463,15 +470,16 @@ void MainWindow::initStackedPage()
|
||||||
|
|
||||||
|
|
||||||
#ifdef UNFINISHED
|
#ifdef UNFINISHED
|
||||||
addAction(new QAction(QIcon(IMAGE_UNFINISHED), tr("Unfinished"), ui->toolBar), SLOT(showApplWindow()));
|
addAction(new QAction(QIcon(IMAGE_UNFINISHED), tr("Unfinished"), ui->toolBar), &MainWindow::showApplWindow, SLOT(showApplWindow()));
|
||||||
ui->toolBarAction->addSeparator();
|
ui->toolBarAction->addSeparator();
|
||||||
notify += applicationWindow->getNotify();
|
notify += applicationWindow->getNotify();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
addAction(new QAction(QIcon(IMAGE_ADDFRIEND), tr("Add"), ui->toolBarAction), SLOT(addFriend()));
|
/** Add icon on Action bar */
|
||||||
addAction(new QAction(QIcon(IMAGE_PREFERENCES), tr("Options"), ui->toolBarAction), SLOT(showSettings()));
|
addAction(new QAction(QIcon(IMAGE_ADDFRIEND), tr("Add"), ui->toolBarAction), &MainWindow::addFriend, SLOT(addFriend()));
|
||||||
addAction(new QAction(QIcon(IMAGE_ABOUT), tr("About"), ui->toolBarAction), SLOT(showabout()));
|
addAction(new QAction(QIcon(IMAGE_PREFERENCES), tr("Options"), ui->toolBarAction), &MainWindow::showSettings, SLOT(showSettings()));
|
||||||
addAction(new QAction(QIcon(IMAGE_QUIT), tr("Quit"), ui->toolBarAction), SLOT(doQuit()));
|
addAction(new QAction(QIcon(IMAGE_ABOUT), tr("About"), ui->toolBarAction), &MainWindow::showabout, SLOT(showabout()));
|
||||||
|
addAction(new QAction(QIcon(IMAGE_QUIT), tr("Quit"), ui->toolBarAction), &MainWindow::doQuit, SLOT(doQuit()));
|
||||||
|
|
||||||
QList<QPair<MainPage*, QPair<QAction*, QListWidgetItem*> > >::iterator notifyIt;
|
QList<QPair<MainPage*, QPair<QAction*, QListWidgetItem*> > >::iterator notifyIt;
|
||||||
for (notifyIt = notify.begin(); notifyIt != notify.end(); ++notifyIt) {
|
for (notifyIt = notify.begin(); notifyIt != notify.end(); ++notifyIt) {
|
||||||
|
@ -498,19 +506,22 @@ QAction *MainWindow::createPageAction(const QIcon &icon, const QString &text, QA
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adds the given action to the toolbar and hooks its triggered() signal to
|
/** Adds the given action to the toolbar and hooks its triggered() signal to
|
||||||
* the specified slot (if given). */
|
* the specified slot (if given).
|
||||||
void MainWindow::addAction(QAction *action, const char *slot)
|
* Have to pass function pointer and slot, because we can't make slot of function pointer */
|
||||||
|
void MainWindow::addAction(QAction *action, FunctionType actionFunction, const char *slot)
|
||||||
{
|
{
|
||||||
QFont font;
|
QFont font;
|
||||||
font = action->font();
|
font = action->font();
|
||||||
font.setPointSize(9);
|
font.setPointSize(9);
|
||||||
action->setFont(font);
|
action->setFont(font);
|
||||||
ui->toolBarAction->addAction(action);
|
ui->toolBarAction->addAction(action);
|
||||||
connect(action, SIGNAL(triggered()), this, slot);
|
if (slot) connect(action, SIGNAL(triggered()), this, slot);
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(action->icon(),action->text()) ;
|
QListWidgetItem *item = new QListWidgetItem(action->icon(),action->text()) ;
|
||||||
item->setData(Qt::UserRole,QString(slot));
|
item->setData(Qt::UserRole,QString(slot));
|
||||||
ui->listWidget->addItem(item) ;
|
ui->listWidget->addItem(item) ;
|
||||||
|
|
||||||
|
if (slot) _functionList[slot] = actionFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add the given page to the stackPage and list. */
|
/** Add the given page to the stackPage and list. */
|
||||||
|
@ -540,12 +551,9 @@ void MainWindow::setNewPage(int page)
|
||||||
ui->listWidget->setCurrentRow(page);
|
ui->listWidget->setCurrentRow(page);
|
||||||
} else {
|
} else {
|
||||||
QString procName = ui->listWidget->item(page)->data(Qt::UserRole).toString();
|
QString procName = ui->listWidget->item(page)->data(Qt::UserRole).toString();
|
||||||
#ifdef UNFINISHED
|
FunctionType function = _functionList[procName];
|
||||||
if (procName == SLOT(showApplWindow())) showApplWindow();
|
if (function) (this->*function)();
|
||||||
#endif
|
|
||||||
if (procName == SLOT(showSettings())) showSettings();
|
|
||||||
if (procName == SLOT(showabout())) showabout();
|
|
||||||
if (procName == SLOT(doQuit())) doQuit();
|
|
||||||
ui->listWidget->setCurrentRow(ui->stackPages->currentIndex());
|
ui->listWidget->setCurrentRow(ui->stackPages->currentIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1404,11 +1412,13 @@ void MainWindow::settingsChanged()
|
||||||
ui->listWidget->item(i)->setHidden(Settings->getActionButtonLoc());
|
ui->listWidget->item(i)->setHidden(Settings->getActionButtonLoc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int size = Settings->getToolButtonSize();
|
int toolSize = Settings->getToolButtonSize();
|
||||||
ui->toolBarPage->setToolButtonStyle(Settings->getToolButtonStyle());
|
ui->toolBarPage->setToolButtonStyle(Settings->getToolButtonStyle());
|
||||||
ui->toolBarPage->setIconSize(QSize(size,size));
|
ui->toolBarPage->setIconSize(QSize(toolSize,toolSize));
|
||||||
ui->toolBarAction->setToolButtonStyle(Settings->getToolButtonStyle());
|
ui->toolBarAction->setToolButtonStyle(Settings->getToolButtonStyle());
|
||||||
ui->toolBarAction->setIconSize(QSize(size,size));
|
ui->toolBarAction->setIconSize(QSize(toolSize,toolSize));
|
||||||
|
int itemSize = Settings->getListItemIconSize();
|
||||||
|
ui->listWidget->setIconSize(QSize(itemSize,itemSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::externalLinkActivated(const QUrl &url)
|
void MainWindow::externalLinkActivated(const QUrl &url)
|
||||||
|
|
|
@ -232,10 +232,13 @@ private:
|
||||||
/** A BandwidthGraph object which handles monitoring RetroShare bandwidth usage */
|
/** A BandwidthGraph object which handles monitoring RetroShare bandwidth usage */
|
||||||
BandwidthGraph* _bandwidthGraph;
|
BandwidthGraph* _bandwidthGraph;
|
||||||
|
|
||||||
|
typedef void (MainWindow::*FunctionType)();
|
||||||
|
|
||||||
/** Creates a new action for a Main page. */
|
/** Creates a new action for a Main page. */
|
||||||
QAction* createPageAction(const QIcon &icon, const QString &text, QActionGroup *group);
|
QAction* createPageAction(const QIcon &icon, const QString &text, QActionGroup *group);
|
||||||
/** Adds a new action to the toolbar. */
|
/** Adds a new action to the toolbar. */
|
||||||
void addAction(QAction *action, const char *slot = 0);
|
void addAction(QAction *action, FunctionType actionFunction, const char *slot = 0);
|
||||||
|
QMap<QString, FunctionType> _functionList;
|
||||||
|
|
||||||
QString nameAndLocation;
|
QString nameAndLocation;
|
||||||
|
|
||||||
|
|
|
@ -12,34 +12,20 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true">MainWindow</string>
|
<string notr="true">MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>571</width>
|
|
||||||
<height>421</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="handleWidth">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<widget class="QListWidget" name="listWidget">
|
<widget class="QListWidget" name="listWidget">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
|
|
|
@ -102,6 +102,21 @@ bool AppearancePage::save(QString &errmsg)
|
||||||
case 3:
|
case 3:
|
||||||
Settings->setToolButtonSize(32);
|
Settings->setToolButtonSize(32);
|
||||||
}
|
}
|
||||||
|
switch (ui.cmboListItemSize->currentIndex())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Settings->setListItemIconSize(8);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Settings->setListItemIconSize(16);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
default:
|
||||||
|
Settings->setListItemIconSize(24);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Settings->setListItemIconSize(32);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set to new style */
|
/* Set to new style */
|
||||||
Rshare::setStyle(ui.cmboStyle->currentText());
|
Rshare::setStyle(ui.cmboStyle->currentText());
|
||||||
|
@ -159,6 +174,21 @@ void AppearancePage::load()
|
||||||
case 32:
|
case 32:
|
||||||
ui.cmboTollButtonsSize->setCurrentIndex(3);
|
ui.cmboTollButtonsSize->setCurrentIndex(3);
|
||||||
}
|
}
|
||||||
|
switch (Settings->getListItemIconSize())
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
ui.cmboListItemSize->setCurrentIndex(0);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
ui.cmboListItemSize->setCurrentIndex(1);
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
default:
|
||||||
|
ui.cmboListItemSize->setCurrentIndex(2);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
ui.cmboListItemSize->setCurrentIndex(3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppearancePage::loadStyleSheet(int index)
|
void AppearancePage::loadStyleSheet(int index)
|
||||||
|
|
|
@ -20,190 +20,6 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QGroupBox" name="grpToolBar">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>75</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::NoContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Tool Bar</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_ToolBar">
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QFrame" name="frameAction">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rbtActionOnToolBar">
|
|
||||||
<property name="text">
|
|
||||||
<string>On Tool Bar</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rbtActionOnListItem">
|
|
||||||
<property name="text">
|
|
||||||
<string>On List Item</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QFrame" name="framePage">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="margin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rbtPageOnToolBar">
|
|
||||||
<property name="text">
|
|
||||||
<string>On Tool Bar</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rbtPageOnListItem">
|
|
||||||
<property name="text">
|
|
||||||
<string>On List Item</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelActionToolBar">
|
|
||||||
<property name="text">
|
|
||||||
<string>Where do you want to have the buttons for menu?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelPageToolBar">
|
|
||||||
<property name="text">
|
|
||||||
<string>Where do you want to have the buttons for the page?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="labelToolButtonStyle">
|
|
||||||
<property name="text">
|
|
||||||
<string>Choose the style of Tool Buttons.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Only</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Text Only</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Text Beside Icon</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Text Under Icon</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QComboBox" name="cmboTollButtonsSize">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 8x8</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 16x16</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 24x24</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Inon Size = 32x32</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>361</width>
|
|
||||||
<height>61</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="grpLanguage">
|
<widget class="QGroupBox" name="grpLanguage">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -261,44 +77,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="grpStyleSheet">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Style Sheet</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_StyleSheet">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QComboBox" name="cmboStyleSheet">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>215</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QGroupBox" name="grpStyle">
|
<widget class="QGroupBox" name="grpStyle">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -346,6 +124,286 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="grpStyleSheet">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>64</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Style Sheet</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_StyleSheet">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QComboBox" name="cmboStyleSheet">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>215</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>361</width>
|
||||||
|
<height>61</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QGroupBox" name="grpToolBar">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>228</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::NoContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Tool Bar</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_ToolBar">
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QFrame" name="frameAction">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="margin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbtActionOnToolBar">
|
||||||
|
<property name="text">
|
||||||
|
<string>On Tool Bar</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbtActionOnListItem">
|
||||||
|
<property name="text">
|
||||||
|
<string>On List Item</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelActionToolBar">
|
||||||
|
<property name="text">
|
||||||
|
<string>Where do you want to have the buttons for menu?</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QFrame" name="framePage">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbtPageOnToolBar">
|
||||||
|
<property name="text">
|
||||||
|
<string>On Tool Bar</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbtPageOnListItem">
|
||||||
|
<property name="text">
|
||||||
|
<string>On List Item</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="labelPageToolBar">
|
||||||
|
<property name="text">
|
||||||
|
<string>Where do you want to have the buttons for the page?</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QFrame" name="frameToolListStyle">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayoutToolListStyle">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Only</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Text Only</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Text Beside Icon</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Text Under Icon</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="labelToolButtonStyle">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Choose the style of Tool Buttons.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="labelListItemStyle">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Choose the style of List Items.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QComboBox" name="cmboTollButtonsSize">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 8x8</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 16x16</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 24x24</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Inon Size = 32x32</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="cmboListItemSize">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 8x8</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 16x16</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 24x24</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Inon Size = 32x32</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
|
@ -54,24 +54,32 @@ int RSettingsWin::lastPage = 0;
|
||||||
RSettingsWin::RSettingsWin(QWidget *parent)
|
RSettingsWin::RSettingsWin(QWidget *parent)
|
||||||
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
|
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
ui.setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
setModal(false);
|
setModal(false);
|
||||||
|
|
||||||
/* Initialize help browser */
|
/* Initialize help browser */
|
||||||
mHelpBrowser = new FloatingHelpBrowser(this, helpButton);
|
mHelpBrowser = new FloatingHelpBrowser(this, ui.helpButton);
|
||||||
|
|
||||||
initStackedWidget();
|
initStackedWidget();
|
||||||
|
|
||||||
connect(listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
|
/* Load window position */
|
||||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
|
QByteArray geometry = Settings->valueFromGroup("SettingDialog", "Geometry", QByteArray()).toByteArray();
|
||||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
if (geometry.isEmpty() == false) {
|
||||||
|
restoreGeometry(geometry);
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(ui.listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
|
||||||
|
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
|
||||||
|
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
|
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
RSettingsWin::~RSettingsWin()
|
RSettingsWin::~RSettingsWin()
|
||||||
{
|
{
|
||||||
lastPage = stackedWidget->currentIndex ();
|
/* Save window position */
|
||||||
|
Settings->setValueToGroup("SettingDialog", "Geometry", saveGeometry());
|
||||||
|
lastPage = ui.stackedWidget->currentIndex ();
|
||||||
_instance = NULL;
|
_instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,13 +112,13 @@ void RSettingsWin::dialogFinished(int result)
|
||||||
|
|
||||||
/*static*/ void RSettingsWin::postModDirectories(bool update_local)
|
/*static*/ void RSettingsWin::postModDirectories(bool update_local)
|
||||||
{
|
{
|
||||||
if (_instance == NULL || _instance->isHidden() || _instance->stackedWidget == NULL) {
|
if (_instance == NULL || _instance->isHidden() || _instance->ui.stackedWidget == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update_local) {
|
if (update_local) {
|
||||||
if (_instance->stackedWidget->currentIndex() == Directories) {
|
if (_instance->ui.stackedWidget->currentIndex() == Directories) {
|
||||||
ConfigPage *Page = dynamic_cast<ConfigPage *> (_instance->stackedWidget->currentWidget());
|
ConfigPage *Page = dynamic_cast<ConfigPage *> (_instance->ui.stackedWidget->currentWidget());
|
||||||
if (Page) {
|
if (Page) {
|
||||||
Page->load();
|
Page->load();
|
||||||
}
|
}
|
||||||
|
@ -121,8 +129,8 @@ void RSettingsWin::dialogFinished(int result)
|
||||||
void
|
void
|
||||||
RSettingsWin::initStackedWidget()
|
RSettingsWin::initStackedWidget()
|
||||||
{
|
{
|
||||||
stackedWidget->setCurrentIndex(-1);
|
ui.stackedWidget->setCurrentIndex(-1);
|
||||||
stackedWidget->removeWidget(stackedWidget->widget(0));
|
ui.stackedWidget->removeWidget(ui.stackedWidget->widget(0));
|
||||||
|
|
||||||
addPage(new GeneralPage(0));
|
addPage(new GeneralPage(0));
|
||||||
addPage(new ServerPage());
|
addPage(new ServerPage());
|
||||||
|
@ -157,16 +165,16 @@ RSettingsWin::initStackedWidget()
|
||||||
|
|
||||||
void RSettingsWin::addPage(ConfigPage *page)
|
void RSettingsWin::addPage(ConfigPage *page)
|
||||||
{
|
{
|
||||||
stackedWidget->addWidget(page) ;
|
ui.stackedWidget->addWidget(page) ;
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(QIcon(page->iconPixmap()),page->pageName()) ;
|
QListWidgetItem *item = new QListWidgetItem(QIcon(page->iconPixmap()),page->pageName()) ;
|
||||||
listWidget->addItem(item) ;
|
ui.listWidget->addItem(item) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RSettingsWin::setNewPage(int page)
|
RSettingsWin::setNewPage(int page)
|
||||||
{
|
{
|
||||||
ConfigPage *pagew = dynamic_cast<ConfigPage*>(stackedWidget->widget(page)) ;
|
ConfigPage *pagew = dynamic_cast<ConfigPage*>(ui.stackedWidget->widget(page)) ;
|
||||||
|
|
||||||
mHelpBrowser->hide();
|
mHelpBrowser->hide();
|
||||||
|
|
||||||
|
@ -176,11 +184,11 @@ RSettingsWin::setNewPage(int page)
|
||||||
mHelpBrowser->clear();
|
mHelpBrowser->clear();
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
pageName->setText(pagew->pageName());
|
ui.pageName->setText(pagew->pageName());
|
||||||
pageicon->setPixmap(pagew->iconPixmap()) ;
|
ui.pageicon->setPixmap(pagew->iconPixmap()) ;
|
||||||
|
|
||||||
stackedWidget->setCurrentIndex(page);
|
ui.stackedWidget->setCurrentIndex(page);
|
||||||
listWidget->setCurrentRow(page);
|
ui.listWidget->setCurrentRow(page);
|
||||||
|
|
||||||
mHelpBrowser->setHelpText(pagew->helpText());
|
mHelpBrowser->setHelpText(pagew->helpText());
|
||||||
}
|
}
|
||||||
|
@ -192,15 +200,15 @@ RSettingsWin::saveChanges()
|
||||||
QString errmsg;
|
QString errmsg;
|
||||||
|
|
||||||
/* Call each config page's save() method to save its data */
|
/* Call each config page's save() method to save its data */
|
||||||
int i, count = stackedWidget->count();
|
int i, count = ui.stackedWidget->count();
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
ConfigPage *page = dynamic_cast<ConfigPage *>(stackedWidget->widget(i));
|
ConfigPage *page = dynamic_cast<ConfigPage *>(ui.stackedWidget->widget(i));
|
||||||
if (page && page->wasLoaded()) {
|
if (page && page->wasLoaded()) {
|
||||||
if (!page->save(errmsg))
|
if (!page->save(errmsg))
|
||||||
{
|
{
|
||||||
/* Display the offending page */
|
/* Display the offending page */
|
||||||
stackedWidget->setCurrentWidget(page);
|
ui.stackedWidget->setCurrentWidget(page);
|
||||||
|
|
||||||
/* Show the user what went wrong */
|
/* Show the user what went wrong */
|
||||||
QMessageBox::warning(this,
|
QMessageBox::warning(this,
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
class FloatingHelpBrowser;
|
class FloatingHelpBrowser;
|
||||||
|
|
||||||
class RSettingsWin: public QDialog, private Ui::Settings
|
class RSettingsWin: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -61,6 +61,9 @@ private:
|
||||||
FloatingHelpBrowser *mHelpBrowser;
|
FloatingHelpBrowser *mHelpBrowser;
|
||||||
static RSettingsWin *_instance;
|
static RSettingsWin *_instance;
|
||||||
static int lastPage;
|
static int lastPage;
|
||||||
|
|
||||||
|
/* UI - from Designer */
|
||||||
|
Ui::Settings ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !RSETTINGSWIN_HPP_
|
#endif // !RSETTINGSWIN_HPP_
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#define SETTING_ACTIONBUTTONLOC "ActionButtonLocation"
|
#define SETTING_ACTIONBUTTONLOC "ActionButtonLocation"
|
||||||
#define SETTING_TOOLBUTTONSTYLE "ToolButtonStyle"
|
#define SETTING_TOOLBUTTONSTYLE "ToolButtonStyle"
|
||||||
#define SETTING_TOOLBUTTONSIZE "ToolButtonSize"
|
#define SETTING_TOOLBUTTONSIZE "ToolButtonSize"
|
||||||
|
#define SETTING_LISTITEMICONSIZE "ListItemIconSize"
|
||||||
|
|
||||||
#define SETTING_DATA_DIRECTORY "DataDirectory"
|
#define SETTING_DATA_DIRECTORY "DataDirectory"
|
||||||
#define SETTING_BWGRAPH_FILTER "StatisticDialog/BWLineFilter"
|
#define SETTING_BWGRAPH_FILTER "StatisticDialog/BWLineFilter"
|
||||||
|
@ -277,6 +278,45 @@ void RshareSettings::setToolButtonSize(int size)
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the list item icon's size.*/
|
||||||
|
int RshareSettings::getListItemIconSize()
|
||||||
|
{
|
||||||
|
int intValue=value(SETTING_LISTITEMICONSIZE, 24).toInt();
|
||||||
|
switch (intValue)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
return 8;
|
||||||
|
case 16:
|
||||||
|
return 16;
|
||||||
|
case 24:
|
||||||
|
default:
|
||||||
|
return 24;
|
||||||
|
case 32:
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets the list item icon's size.*/
|
||||||
|
void RshareSettings::setListItemIconSize(int size)
|
||||||
|
{
|
||||||
|
switch (size)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
setValue(SETTING_LISTITEMICONSIZE, 8);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
setValue(SETTING_LISTITEMICONSIZE, 16);
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
default:
|
||||||
|
setValue(SETTING_LISTITEMICONSIZE, 24);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
setValue(SETTING_LISTITEMICONSIZE, 32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static QString getKeyForLastDir(RshareSettings::enumLastDir type)
|
static QString getKeyForLastDir(RshareSettings::enumLastDir type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
@ -132,6 +132,11 @@ public:
|
||||||
/** Sets the tool button's size.*/
|
/** Sets the tool button's size.*/
|
||||||
void setToolButtonSize(int size);
|
void setToolButtonSize(int size);
|
||||||
|
|
||||||
|
/** Gets the list item icon's size.*/
|
||||||
|
int getListItemIconSize();
|
||||||
|
/** Sets the list item icon's size.*/
|
||||||
|
void setListItemIconSize(int size);
|
||||||
|
|
||||||
/** Returns true if RetroShare's main window should be visible when the
|
/** Returns true if RetroShare's main window should be visible when the
|
||||||
* application starts. */
|
* application starts. */
|
||||||
bool getStartMinimized();
|
bool getStartMinimized();
|
||||||
|
|
|
@ -3,88 +3,41 @@
|
||||||
<class>Settings</class>
|
<class>Settings</class>
|
||||||
<widget class="QDialog" name="Settings">
|
<widget class="QDialog" name="Settings">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>458</width>
|
<width>820</width>
|
||||||
<height>366</height>
|
<height>620</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/kcmsystem24.png</normaloff>:/images/kcmsystem24.png</iconset>
|
<normaloff>:/images/kcmsystem24.png</normaloff>:/images/kcmsystem24.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0" rowspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QListWidget" name="listWidget">
|
<layout class="QHBoxLayout">
|
||||||
<property name="minimumSize">
|
<property name="spacing">
|
||||||
<size>
|
<number>6</number>
|
||||||
<width>130</width>
|
</property>
|
||||||
<height>0</height>
|
<property name="margin">
|
||||||
</size>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<item>
|
||||||
<size>
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<width>130</width>
|
<property name="standardButtons">
|
||||||
<height>16777215</height>
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="alternatingRowColors">
|
</item>
|
||||||
<bool>false</bool>
|
</layout>
|
||||||
</property>
|
</item>
|
||||||
<property name="iconSize">
|
<item row="0" column="1">
|
||||||
<size>
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<width>24</width>
|
<item row="0" column="1">
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="textElideMode">
|
|
||||||
<enum>Qt::ElideMiddle</enum>
|
|
||||||
</property>
|
|
||||||
<property name="movement">
|
|
||||||
<enum>QListView::Static</enum>
|
|
||||||
</property>
|
|
||||||
<property name="flow">
|
|
||||||
<enum>QListView::TopToBottom</enum>
|
|
||||||
</property>
|
|
||||||
<property name="isWrapping" stdset="0">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="resizeMode">
|
|
||||||
<enum>QListView::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="layoutMode">
|
|
||||||
<enum>QListView::SinglePass</enum>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="gridSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="viewMode">
|
|
||||||
<enum>QListView::ListMode</enum>
|
|
||||||
</property>
|
|
||||||
<property name="modelColumn">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="uniformItemSizes">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="currentRow">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="pageName">
|
<widget class="QLabel" name="pageName">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||||
|
@ -140,43 +93,109 @@
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="0" column="0" rowspan="3">
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
<widget class="QListWidget" name="listWidget">
|
||||||
<property name="currentIndex">
|
<property name="minimumSize">
|
||||||
<number>0</number>
|
<size>
|
||||||
</property>
|
<width>130</width>
|
||||||
<widget class="QWidget" name="page_2"/>
|
<height>0</height>
|
||||||
</widget>
|
</size>
|
||||||
</item>
|
</property>
|
||||||
<item row="2" column="0" colspan="2">
|
<property name="maximumSize">
|
||||||
<widget class="Line" name="line">
|
<size>
|
||||||
<property name="orientation">
|
<width>130</width>
|
||||||
<enum>Qt::Horizontal</enum>
|
<height>16777215</height>
|
||||||
</property>
|
</size>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="alternatingRowColors">
|
||||||
<item row="3" column="0" colspan="2">
|
<bool>false</bool>
|
||||||
<layout class="QHBoxLayout">
|
</property>
|
||||||
<property name="spacing">
|
<property name="iconSize">
|
||||||
<number>6</number>
|
<size>
|
||||||
</property>
|
<width>24</width>
|
||||||
<property name="margin">
|
<height>24</height>
|
||||||
<number>0</number>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="textElideMode">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<enum>Qt::ElideMiddle</enum>
|
||||||
<property name="standardButtons">
|
</property>
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<property name="movement">
|
||||||
</property>
|
<enum>QListView::Static</enum>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="flow">
|
||||||
</layout>
|
<enum>QListView::TopToBottom</enum>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
<property name="isWrapping" stdset="0">
|
||||||
</widget>
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="resizeMode">
|
||||||
|
<enum>QListView::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="layoutMode">
|
||||||
|
<enum>QListView::SinglePass</enum>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="gridSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="viewMode">
|
||||||
|
<enum>QListView::ListMode</enum>
|
||||||
|
</property>
|
||||||
|
<property name="modelColumn">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="uniformItemSizes">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentRow">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>664</width>
|
||||||
|
<height>501</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="page"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue