update zlib_compress.pro, add "reset factory settings" button to
settings menu
This commit is contained in:
@@ -53,6 +53,7 @@
|
|||||||
<file>emblem-important-64.png</file>
|
<file>emblem-important-64.png</file>
|
||||||
<file>dialog-information.png</file>
|
<file>dialog-information.png</file>
|
||||||
<file>view-statistics.png</file>
|
<file>view-statistics.png</file>
|
||||||
|
<file>document-revert.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/cflags">
|
<qresource prefix="/cflags">
|
||||||
<file>cflags/ad.png</file>
|
<file>cflags/ad.png</file>
|
||||||
|
|||||||
@@ -120,6 +120,15 @@
|
|||||||
<normaloff>:/gfx/utilities-log-viewer.png</normaloff>:/gfx/utilities-log-viewer.png</iconset>
|
<normaloff>:/gfx/utilities-log-viewer.png</normaloff>:/gfx/utilities-log-viewer.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Factory Settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/document-revert.png</normaloff>:/gfx/document-revert.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -3612,6 +3621,108 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_9">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_22">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="label_44">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Factory Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>269</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_9">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_resetSettings">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset all settings to default ...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_10">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<spacer name="verticalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>269</width>
|
||||||
|
<height>292</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line_10">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
|
|||||||
connect( pushButton_Opponent9Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile9()) );
|
connect( pushButton_Opponent9Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile9()) );
|
||||||
connect( pushButton_editManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callManualBlindsOrderDialog()) );
|
connect( pushButton_editManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callManualBlindsOrderDialog()) );
|
||||||
connect( pushButton_netEditManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callNetManualBlindsOrderDialog()) );
|
connect( pushButton_netEditManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callNetManualBlindsOrderDialog()) );
|
||||||
|
connect( pushButton_resetSettings, SIGNAL(clicked()), this, SLOT(resetSettings()));
|
||||||
|
|
||||||
connect( checkBox_UseInternetGamePassword, SIGNAL( toggled(bool) ), this, SLOT( clearInternetGamePassword(bool)) );
|
connect( checkBox_UseInternetGamePassword, SIGNAL( toggled(bool) ), this, SLOT( clearInternetGamePassword(bool)) );
|
||||||
|
|
||||||
@@ -1366,3 +1367,15 @@ void settingsDialogImpl::showLogFilePreview()
|
|||||||
cursor.movePosition(QTextCursor::Start);
|
cursor.movePosition(QTextCursor::Start);
|
||||||
textBrowser_logPreview->setTextCursor(cursor);
|
textBrowser_logPreview->setTextCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void settingsDialogImpl::resetSettings()
|
||||||
|
{
|
||||||
|
int ret = QMessageBox::warning(this, tr("PokerTH - Settings"),
|
||||||
|
tr("Attention: this will delete all your personal settings!\n"
|
||||||
|
"Do you really want to reset factory settings?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
|
if(ret == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
//TODO delete config.xml and directly close PokerTH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ public slots:
|
|||||||
void exportLogToTxt();
|
void exportLogToTxt();
|
||||||
void saveLogFileAs();
|
void saveLogFileAs();
|
||||||
void showLogFilePreview();
|
void showLogFilePreview();
|
||||||
|
void resetSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
+10
-2
@@ -15,6 +15,7 @@ TARGET = bin/zlib_compress
|
|||||||
MOC_DIR = mocs
|
MOC_DIR = mocs
|
||||||
OBJECTS_DIR = obj
|
OBJECTS_DIR = obj
|
||||||
DEFINES += PREFIX=\"$${PREFIX}\"
|
DEFINES += PREFIX=\"$${PREFIX}\"
|
||||||
|
DEFINES += BOOST_FILESYSTEM_DEPRECATED
|
||||||
QT -= core gui
|
QT -= core gui
|
||||||
|
|
||||||
INCLUDEPATH += . \
|
INCLUDEPATH += . \
|
||||||
@@ -50,6 +51,7 @@ unix : !mac {
|
|||||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
||||||
BOOST_FS = boost_filesystem boost_filesystem-mt
|
BOOST_FS = boost_filesystem boost_filesystem-mt
|
||||||
BOOST_IOSTREAMS = boost_iostreams boost_iostreams-mt
|
BOOST_IOSTREAMS = boost_iostreams boost_iostreams-mt
|
||||||
|
BOOST_SYSTEM = boost_system boost_system-mt
|
||||||
|
|
||||||
for(dir, LIB_DIRS) {
|
for(dir, LIB_DIRS) {
|
||||||
exists($$dir) {
|
exists($$dir) {
|
||||||
@@ -65,10 +67,16 @@ unix : !mac {
|
|||||||
BOOST_IOSTREAMS = -l$$lib
|
BOOST_IOSTREAMS = -l$$lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(lib, BOOST_SYSTEM) {
|
||||||
|
exists($${dir}/lib$${lib}.so*) {
|
||||||
|
message("Found $$lib")
|
||||||
|
BOOST_SYSTEM = -l$$lib
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BOOST_LIBS = $$BOOST_FS $$BOOST_IOSTREAMS
|
BOOST_LIBS = $$BOOST_FS $$BOOST_IOSTREAMS $$BOOST_SYSTEM
|
||||||
!count(BOOST_LIBS, 2) {
|
!count(BOOST_LIBS, 3) {
|
||||||
error("could not locate required library: \
|
error("could not locate required library: \
|
||||||
libboost (version >= 1.34.1) --> http://www.boost.org/")
|
libboost (version >= 1.34.1) --> http://www.boost.org/")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user