mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added SoundDialog for Preferences which uses QSound supports wav files, where can set wav files.
Added SoundManager for the events, at the moment there is no connect for a event to use it. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1386 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5335509028
commit
8a1ae827b9
@ -1,4 +1,4 @@
|
|||||||
CONFIG += qt gui uic qrc resources uitools release # pluginmgr debug
|
CONFIG += qt gui uic qrc resources uitools debug # pluginmgr release
|
||||||
QT += network xml script
|
QT += network xml script
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = RetroShare
|
TARGET = RetroShare
|
||||||
@ -75,7 +75,7 @@ LIBS += -L"../../../../lib" -lretroshare -lminiupnpc -lssl -lcrypto
|
|||||||
|
|
||||||
# ###########################################
|
# ###########################################
|
||||||
|
|
||||||
LIBS += -lz -lgpgme
|
LIBS += -lz #-lgpgme
|
||||||
LIBS += -lQtUiTools
|
LIBS += -lQtUiTools
|
||||||
|
|
||||||
DEPENDPATH += . \
|
DEPENDPATH += . \
|
||||||
@ -139,6 +139,7 @@ HEADERS += rshare.h \
|
|||||||
gui/SharedFilesDialog.h \
|
gui/SharedFilesDialog.h \
|
||||||
gui/ShareManager.h \
|
gui/ShareManager.h \
|
||||||
gui/StatisticDialog.h \
|
gui/StatisticDialog.h \
|
||||||
|
gui/SoundManager.h \
|
||||||
gui/HelpDialog.h \
|
gui/HelpDialog.h \
|
||||||
gui/LogoBar.h \
|
gui/LogoBar.h \
|
||||||
gui/xprogressbar.h \
|
gui/xprogressbar.h \
|
||||||
@ -191,6 +192,7 @@ HEADERS += rshare.h \
|
|||||||
gui/Preferences/rsettings.h \
|
gui/Preferences/rsettings.h \
|
||||||
gui/Preferences/FileAssotiationsDialog.h \
|
gui/Preferences/FileAssotiationsDialog.h \
|
||||||
gui/Preferences/AddFileAssotiationDialog.h \
|
gui/Preferences/AddFileAssotiationDialog.h \
|
||||||
|
gui/Preferences/SoundDialog.h \
|
||||||
gui/toaster/MessageToaster.h \
|
gui/toaster/MessageToaster.h \
|
||||||
gui/toaster/OnlineToaster.h \
|
gui/toaster/OnlineToaster.h \
|
||||||
gui/toaster/ChatToaster.h \
|
gui/toaster/ChatToaster.h \
|
||||||
@ -290,6 +292,7 @@ FORMS += gui/BlogDialog.ui \
|
|||||||
gui/Preferences/PreferencesWindow.ui \
|
gui/Preferences/PreferencesWindow.ui \
|
||||||
gui/Preferences/ServerDialog.ui \
|
gui/Preferences/ServerDialog.ui \
|
||||||
gui/Preferences/NotifyDialog.ui \
|
gui/Preferences/NotifyDialog.ui \
|
||||||
|
gui/Preferences/SoundDialog.ui \
|
||||||
gui/Preferences/ConfirmQuitDialog.ui \
|
gui/Preferences/ConfirmQuitDialog.ui \
|
||||||
gui/toaster/CallToaster.ui \
|
gui/toaster/CallToaster.ui \
|
||||||
gui/toaster/ChatToaster.ui \
|
gui/toaster/ChatToaster.ui \
|
||||||
@ -355,6 +358,7 @@ SOURCES += main.cpp \
|
|||||||
gui/SharedFilesDialog.cpp \
|
gui/SharedFilesDialog.cpp \
|
||||||
gui/ShareManager.cpp \
|
gui/ShareManager.cpp \
|
||||||
gui/StatisticDialog.cpp \
|
gui/StatisticDialog.cpp \
|
||||||
|
gui/SoundManager.cpp \
|
||||||
gui/MessagesDialog.cpp \
|
gui/MessagesDialog.cpp \
|
||||||
gui/MessagesPopupDialog.cpp \
|
gui/MessagesPopupDialog.cpp \
|
||||||
gui/im_history/IMHistoryKeeper.cpp \
|
gui/im_history/IMHistoryKeeper.cpp \
|
||||||
@ -401,6 +405,7 @@ SOURCES += main.cpp \
|
|||||||
gui/Preferences/rsettings.cpp \
|
gui/Preferences/rsettings.cpp \
|
||||||
gui/Preferences/FileAssotiationsDialog.cpp \
|
gui/Preferences/FileAssotiationsDialog.cpp \
|
||||||
gui/Preferences/AddFileAssotiationDialog.cpp \
|
gui/Preferences/AddFileAssotiationDialog.cpp \
|
||||||
|
gui/Preferences/SoundDialog.cpp \
|
||||||
gui/common/vmessagebox.cpp \
|
gui/common/vmessagebox.cpp \
|
||||||
gui/common/rwindow.cpp \
|
gui/common/rwindow.cpp \
|
||||||
gui/common/html.cpp \
|
gui/common/html.cpp \
|
||||||
|
@ -39,8 +39,8 @@ GeneralDialog::GeneralDialog(QWidget *parent)
|
|||||||
/* Hide platform specific features */
|
/* Hide platform specific features */
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_WS_WIN
|
||||||
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
|
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
|
||||||
ui.autologincheckBox->setEnabled(false) ;
|
//ui.autologincheckBox->setEnabled(false) ;
|
||||||
ui.autologincheckBox->setChecked(false) ;
|
//ui.autologincheckBox->setChecked(false) ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<ui version="4.0" >
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
<class>GeneralDialog</class>
|
<class>GeneralDialog</class>
|
||||||
<widget class="QWidget" name="GeneralDialog" >
|
<widget class="QWidget" name="GeneralDialog">
|
||||||
<property name="geometry" >
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
@ -9,162 +10,162 @@
|
|||||||
<height>267</height>
|
<height>267</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>64</height>
|
<height>64</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="palette" >
|
<property name="palette">
|
||||||
<palette>
|
<palette>
|
||||||
<active>
|
<active>
|
||||||
<colorrole role="WindowText" >
|
<colorrole role="WindowText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>208</red>
|
<red>208</red>
|
||||||
<green>208</green>
|
<green>208</green>
|
||||||
<blue>208</blue>
|
<blue>208</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Light" >
|
<colorrole role="Light">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Midlight" >
|
<colorrole role="Midlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>247</red>
|
<red>247</red>
|
||||||
<green>247</green>
|
<green>247</green>
|
||||||
<blue>247</blue>
|
<blue>247</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Dark" >
|
<colorrole role="Dark">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Mid" >
|
<colorrole role="Mid">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>139</red>
|
<red>139</red>
|
||||||
<green>139</green>
|
<green>139</green>
|
||||||
<blue>139</blue>
|
<blue>139</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Text" >
|
<colorrole role="Text">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="BrightText" >
|
<colorrole role="BrightText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Base" >
|
<colorrole role="Base">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Window" >
|
<colorrole role="Window">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>240</red>
|
<red>240</red>
|
||||||
<green>240</green>
|
<green>240</green>
|
||||||
<blue>240</blue>
|
<blue>240</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Shadow" >
|
<colorrole role="Shadow">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Highlight" >
|
<colorrole role="Highlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>128</blue>
|
<blue>128</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="HighlightedText" >
|
<colorrole role="HighlightedText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Link" >
|
<colorrole role="Link">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="LinkVisited" >
|
<colorrole role="LinkVisited">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="AlternateBase" >
|
<colorrole role="AlternateBase">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>231</red>
|
<red>231</red>
|
||||||
<green>231</green>
|
<green>231</green>
|
||||||
<blue>231</blue>
|
<blue>231</blue>
|
||||||
@ -173,153 +174,153 @@
|
|||||||
</colorrole>
|
</colorrole>
|
||||||
</active>
|
</active>
|
||||||
<inactive>
|
<inactive>
|
||||||
<colorrole role="WindowText" >
|
<colorrole role="WindowText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>208</red>
|
<red>208</red>
|
||||||
<green>208</green>
|
<green>208</green>
|
||||||
<blue>208</blue>
|
<blue>208</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Light" >
|
<colorrole role="Light">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Midlight" >
|
<colorrole role="Midlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>247</red>
|
<red>247</red>
|
||||||
<green>247</green>
|
<green>247</green>
|
||||||
<blue>247</blue>
|
<blue>247</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Dark" >
|
<colorrole role="Dark">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Mid" >
|
<colorrole role="Mid">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>139</red>
|
<red>139</red>
|
||||||
<green>139</green>
|
<green>139</green>
|
||||||
<blue>139</blue>
|
<blue>139</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Text" >
|
<colorrole role="Text">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="BrightText" >
|
<colorrole role="BrightText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Base" >
|
<colorrole role="Base">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Window" >
|
<colorrole role="Window">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>240</red>
|
<red>240</red>
|
||||||
<green>240</green>
|
<green>240</green>
|
||||||
<blue>240</blue>
|
<blue>240</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Shadow" >
|
<colorrole role="Shadow">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Highlight" >
|
<colorrole role="Highlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>192</red>
|
<red>192</red>
|
||||||
<green>192</green>
|
<green>192</green>
|
||||||
<blue>192</blue>
|
<blue>192</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="HighlightedText" >
|
<colorrole role="HighlightedText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Link" >
|
<colorrole role="Link">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="LinkVisited" >
|
<colorrole role="LinkVisited">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="AlternateBase" >
|
<colorrole role="AlternateBase">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>231</red>
|
<red>231</red>
|
||||||
<green>231</green>
|
<green>231</green>
|
||||||
<blue>231</blue>
|
<blue>231</blue>
|
||||||
@ -328,153 +329,153 @@
|
|||||||
</colorrole>
|
</colorrole>
|
||||||
</inactive>
|
</inactive>
|
||||||
<disabled>
|
<disabled>
|
||||||
<colorrole role="WindowText" >
|
<colorrole role="WindowText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>208</red>
|
<red>208</red>
|
||||||
<green>208</green>
|
<green>208</green>
|
||||||
<blue>208</blue>
|
<blue>208</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Light" >
|
<colorrole role="Light">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Midlight" >
|
<colorrole role="Midlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>247</red>
|
<red>247</red>
|
||||||
<green>247</green>
|
<green>247</green>
|
||||||
<blue>247</blue>
|
<blue>247</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Dark" >
|
<colorrole role="Dark">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Mid" >
|
<colorrole role="Mid">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>139</red>
|
<red>139</red>
|
||||||
<green>139</green>
|
<green>139</green>
|
||||||
<blue>139</blue>
|
<blue>139</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Text" >
|
<colorrole role="Text">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="BrightText" >
|
<colorrole role="BrightText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>104</red>
|
<red>104</red>
|
||||||
<green>104</green>
|
<green>104</green>
|
||||||
<blue>104</blue>
|
<blue>104</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Base" >
|
<colorrole role="Base">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>240</red>
|
<red>240</red>
|
||||||
<green>240</green>
|
<green>240</green>
|
||||||
<blue>240</blue>
|
<blue>240</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Window" >
|
<colorrole role="Window">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>240</red>
|
<red>240</red>
|
||||||
<green>240</green>
|
<green>240</green>
|
||||||
<blue>240</blue>
|
<blue>240</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Shadow" >
|
<colorrole role="Shadow">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>0</blue>
|
<blue>0</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Highlight" >
|
<colorrole role="Highlight">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>128</blue>
|
<blue>128</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="HighlightedText" >
|
<colorrole role="HighlightedText">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>255</green>
|
<green>255</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="Link" >
|
<colorrole role="Link">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>0</red>
|
<red>0</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="LinkVisited" >
|
<colorrole role="LinkVisited">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>255</red>
|
<red>255</red>
|
||||||
<green>0</green>
|
<green>0</green>
|
||||||
<blue>255</blue>
|
<blue>255</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
<colorrole role="AlternateBase" >
|
<colorrole role="AlternateBase">
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern">
|
||||||
<color alpha="255" >
|
<color alpha="255">
|
||||||
<red>231</red>
|
<red>231</red>
|
||||||
<green>231</green>
|
<green>231</green>
|
||||||
<blue>231</blue>
|
<blue>231</blue>
|
||||||
@ -484,7 +485,7 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font" >
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Arial</family>
|
<family>Arial</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
@ -495,79 +496,41 @@
|
|||||||
<strikeout>false</strikeout>
|
<strikeout>false</strikeout>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy" >
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::NoContextMenu</enum>
|
<enum>Qt::NoContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<property name="leftMargin" >
|
<property name="margin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin" >
|
<property name="spacing">
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing" >
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalSpacing" >
|
<item row="0" column="0">
|
||||||
<number>0</number>
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
</property>
|
<property name="minimumSize">
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QGroupBox" name="grpLogin" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>48</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title" >
|
|
||||||
<string>Login</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QCheckBox" name="autologincheckBox" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>18</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Auto Login</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QGroupBox" name="groupBox_2" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title" >
|
<property name="title">
|
||||||
<string>Startup</string>
|
<string>Startup</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" >
|
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>Start RetroShare when my system starts</string>
|
<string>Start RetroShare when my system starts</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="checkStartMinimized" >
|
<widget class="QCheckBox" name="checkStartMinimized">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>Start minimized</string>
|
<string>Start minimized</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked" >
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -575,12 +538,12 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="1" column="0">
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>401</width>
|
<width>401</width>
|
||||||
<height>91</height>
|
<height>91</height>
|
||||||
@ -591,7 +554,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc" />
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#define IMAGE_APPEARRANCE ":/images/looknfeel.png"
|
#define IMAGE_APPEARRANCE ":/images/looknfeel.png"
|
||||||
#define IMAGE_FILE_ASSOTIATIONS ":/images/filetype-association.png"
|
#define IMAGE_FILE_ASSOTIATIONS ":/images/filetype-association.png"
|
||||||
#define IMAGE_NOTIFY ":/images/status_unknown.png"
|
#define IMAGE_NOTIFY ":/images/status_unknown.png"
|
||||||
|
#define IMAGE_SOUND ":/images/sound.png"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +76,11 @@ PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
|
|||||||
ui.stackPages->add(new FileAssotiationsDialog(ui.stackPages),
|
ui.stackPages->add(new FileAssotiationsDialog(ui.stackPages),
|
||||||
createPageAction(QIcon(IMAGE_FILE_ASSOTIATIONS),
|
createPageAction(QIcon(IMAGE_FILE_ASSOTIATIONS),
|
||||||
tr("File Associations"), grp));
|
tr("File Associations"), grp));
|
||||||
|
#ifdef RS_RELEASE_VERSION
|
||||||
|
#else
|
||||||
|
ui.stackPages->add(new SoundDialog(ui.stackPages),
|
||||||
|
createPageAction(QIcon(IMAGE_SOUND), tr("Sound"), grp));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*foreach (ConfigPage *page, ui.stackPages->pages()) {
|
/*foreach (ConfigPage *page, ui.stackPages->pages()) {
|
||||||
@ -94,7 +99,6 @@ PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
|
|||||||
|
|
||||||
/* Select the first action */
|
/* Select the first action */
|
||||||
grp->actions()[0]->setChecked(true);
|
grp->actions()[0]->setChecked(true);
|
||||||
// setFixedSize(QSize(480, 450));
|
|
||||||
|
|
||||||
connect(ui.okButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
|
connect(ui.okButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
|
||||||
connect(ui.cancelprefButton, SIGNAL(clicked( bool )), this, SLOT( cancelpreferences()) );
|
connect(ui.cancelprefButton, SIGNAL(clicked( bool )), this, SLOT( cancelpreferences()) );
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "AppearanceDialog.h"
|
#include "AppearanceDialog.h"
|
||||||
#include "NotifyDialog.h"
|
#include "NotifyDialog.h"
|
||||||
#include "FileAssotiationsDialog.h"
|
#include "FileAssotiationsDialog.h"
|
||||||
|
#include "SoundDialog.h"
|
||||||
#include "gui/help/browser/helpbrowser.h"
|
#include "gui/help/browser/helpbrowser.h"
|
||||||
#include <gui/common/rwindow.h>
|
#include <gui/common/rwindow.h>
|
||||||
|
|
||||||
@ -51,7 +52,8 @@ public:
|
|||||||
Appearance, /** Appearance page. */
|
Appearance, /** Appearance page. */
|
||||||
Notify, /** Notify page. */
|
Notify, /** Notify page. */
|
||||||
Security, /** Security page. */
|
Security, /** Security page. */
|
||||||
FileAssotiations /** File assotiations page. */
|
FileAssotiations, /** File assotiations page. */
|
||||||
|
Sound /** Sound page. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Default Constructor */
|
/** Default Constructor */
|
||||||
|
@ -275,10 +275,10 @@ void ServerDialog::toggleUPnP()
|
|||||||
//ui.discComboBox->setEnabled(true);
|
//ui.discComboBox->setEnabled(true);
|
||||||
ui.discComboBox->setEnabled(false);
|
ui.discComboBox->setEnabled(false);
|
||||||
|
|
||||||
ui.localAddress->setEnabled(false);
|
ui.localAddress->setReadOnly (true);
|
||||||
ui.localPort -> setEnabled(true);
|
ui.localPort -> setEnabled (true);
|
||||||
ui.extAddress -> setEnabled(false);
|
ui.extAddress -> setReadOnly (true);
|
||||||
ui.extPort -> setEnabled(true);
|
ui.extPort -> setEnabled (true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
174
retroshare-gui/src/gui/Preferences/SoundDialog.cpp
Normal file
174
retroshare-gui/src/gui/Preferences/SoundDialog.cpp
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 - 2009 RetroShare Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include <rshare.h>
|
||||||
|
#include "SoundDialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
/** Constructor */
|
||||||
|
SoundDialog::SoundDialog(QWidget *parent)
|
||||||
|
: ConfigPage(parent)
|
||||||
|
{
|
||||||
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
/* Create RshareSettings object */
|
||||||
|
_settings = new RshareSettings();
|
||||||
|
|
||||||
|
connect(ui.cmd_openFile, SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile()));
|
||||||
|
connect(ui.cmd_openFile_2,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile2()));
|
||||||
|
connect(ui.cmd_openFile_3,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile3()));
|
||||||
|
connect(ui.cmd_openFile_4,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile4()));
|
||||||
|
connect(ui.cmd_openFile_5,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile5()));
|
||||||
|
connect(ui.cmd_openFile_6,SIGNAL(clicked(bool) ),this,SLOT(on_cmd_openFile6()));
|
||||||
|
|
||||||
|
/* Hide platform specific features */
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Saves the changes on this page */
|
||||||
|
bool
|
||||||
|
SoundDialog::save(QString &errmsg)
|
||||||
|
{
|
||||||
|
_settings->beginGroup("Sound");
|
||||||
|
_settings->beginGroup("Enable");
|
||||||
|
_settings->setValue("User_go_Online",ui.checkBoxSound->isChecked());
|
||||||
|
_settings->setValue("User_go_Offline",ui.checkBoxSound_2->isChecked());
|
||||||
|
_settings->setValue("FileSend_Finished",ui.checkBoxSound_3->isChecked());
|
||||||
|
_settings->setValue("FileRecive_Incoming",ui.checkBoxSound_4->isChecked());
|
||||||
|
_settings->setValue("FileRecive_Finished",ui.checkBoxSound_5->isChecked());
|
||||||
|
_settings->setValue("NewChatMessage",ui.checkBoxSound_6->isChecked());
|
||||||
|
_settings->endGroup();
|
||||||
|
_settings->beginGroup("SoundFilePath");
|
||||||
|
_settings->setValue("User_go_Online",ui.txt_SoundFile->text());
|
||||||
|
_settings->setValue("User_go_Offline",ui.txt_SoundFile2->text());
|
||||||
|
_settings->setValue("FileSend_Finished",ui.txt_SoundFile3->text());
|
||||||
|
_settings->setValue("FileRecive_Incoming",ui.txt_SoundFile4->text());
|
||||||
|
_settings->setValue("FileRecive_Finished",ui.txt_SoundFile5->text());
|
||||||
|
_settings->setValue("NewChatMessage",ui.txt_SoundFile6->text());
|
||||||
|
_settings->endGroup();
|
||||||
|
_settings->endGroup();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Loads the settings for this page */
|
||||||
|
void
|
||||||
|
SoundDialog::load()
|
||||||
|
{
|
||||||
|
_settings->beginGroup("Sound");
|
||||||
|
_settings->beginGroup("SoundFilePath");
|
||||||
|
ui.txt_SoundFile->setText(_settings->value("User_go_Online","").toString());
|
||||||
|
ui.txt_SoundFile2->setText(_settings->value("User_go_Offline","").toString());
|
||||||
|
ui.txt_SoundFile3->setText(_settings->value("FileSend_Finished","").toString());
|
||||||
|
ui.txt_SoundFile4->setText(_settings->value("FileRecive_Incoming","").toString());
|
||||||
|
ui.txt_SoundFile5->setText(_settings->value("FileRecive_Finished","").toString());
|
||||||
|
ui.txt_SoundFile6->setText(_settings->value("NewChatMessage","").toString());
|
||||||
|
|
||||||
|
if(!ui.txt_SoundFile->text().isEmpty())ui.checkBoxSound->setEnabled(true);
|
||||||
|
if(!ui.txt_SoundFile2->text().isEmpty())ui.checkBoxSound_2->setEnabled(true);
|
||||||
|
if(!ui.txt_SoundFile3->text().isEmpty())ui.checkBoxSound_3->setEnabled(true);
|
||||||
|
if(!ui.txt_SoundFile4->text().isEmpty())ui.checkBoxSound_4->setEnabled(true);
|
||||||
|
if(!ui.txt_SoundFile5->text().isEmpty())ui.checkBoxSound_5->setEnabled(true);
|
||||||
|
if(!ui.txt_SoundFile6->text().isEmpty())ui.checkBoxSound_6->setEnabled(true);
|
||||||
|
|
||||||
|
_settings->endGroup();
|
||||||
|
|
||||||
|
_settings->beginGroup("Enable");
|
||||||
|
ui.checkBoxSound->setChecked(_settings->value("User_go_Online",false).toBool());
|
||||||
|
ui.checkBoxSound_2->setChecked(_settings->value("User_go_Offline",false).toBool());
|
||||||
|
ui.checkBoxSound_3->setChecked(_settings->value("FileSend_Finished",false).toBool());
|
||||||
|
ui.checkBoxSound_4->setChecked(_settings->value("FileRecive_Incoming",false).toBool());
|
||||||
|
ui.checkBoxSound_5->setChecked(_settings->value("FileRecive_Finished",false).toBool());
|
||||||
|
ui.checkBoxSound_6->setChecked(_settings->value("NewChatMessage",false).toBool());
|
||||||
|
_settings->endGroup();
|
||||||
|
_settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundDialog::on_cmd_openFile()
|
||||||
|
{
|
||||||
|
|
||||||
|
ui.txt_SoundFile->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile->text().isEmpty()){
|
||||||
|
ui.checkBoxSound->setChecked(false);
|
||||||
|
ui.checkBoxSound->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundDialog::on_cmd_openFile2()
|
||||||
|
{
|
||||||
|
ui.txt_SoundFile2->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile2->text().isEmpty()){
|
||||||
|
ui.checkBoxSound_2->setChecked(false);
|
||||||
|
ui.checkBoxSound_2->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound_2->setEnabled(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
void SoundDialog::on_cmd_openFile3()
|
||||||
|
{
|
||||||
|
ui.txt_SoundFile3->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile3->text().isEmpty()){
|
||||||
|
ui.checkBoxSound_3->setChecked(false);
|
||||||
|
ui.checkBoxSound_3->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound_3->setEnabled(true);
|
||||||
|
}
|
||||||
|
void SoundDialog::on_cmd_openFile4()
|
||||||
|
{
|
||||||
|
ui.txt_SoundFile4->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile4->text().isEmpty()){
|
||||||
|
ui.checkBoxSound_4->setChecked(false);
|
||||||
|
ui.checkBoxSound_4->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound_4->setEnabled(true);
|
||||||
|
}
|
||||||
|
void SoundDialog::on_cmd_openFile5()
|
||||||
|
{
|
||||||
|
ui.txt_SoundFile5->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile5->text().isEmpty()){
|
||||||
|
ui.checkBoxSound_5->setChecked(false);
|
||||||
|
ui.checkBoxSound_5->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound_5->setEnabled(true);
|
||||||
|
}
|
||||||
|
void SoundDialog::on_cmd_openFile6()
|
||||||
|
{
|
||||||
|
ui.txt_SoundFile6->setText(QFileDialog::getOpenFileName(this,"Open File", ".", "wav (*.wav)"));
|
||||||
|
if(ui.txt_SoundFile6->text().isEmpty()){
|
||||||
|
ui.checkBoxSound_6->setChecked(false);
|
||||||
|
ui.checkBoxSound_6->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui.checkBoxSound_6->setEnabled(true);
|
||||||
|
|
||||||
|
}
|
64
retroshare-gui/src/gui/Preferences/SoundDialog.h
Normal file
64
retroshare-gui/src/gui/Preferences/SoundDialog.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 - 2009 RetroShare Team
|
||||||
|
*
|
||||||
|
* 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 _SOUNDDIALOG_H
|
||||||
|
#define _SOUNDDIALOG_H
|
||||||
|
|
||||||
|
#include <QFileDialog>
|
||||||
|
|
||||||
|
#include <gui/Preferences/rsharesettings.h>
|
||||||
|
|
||||||
|
#include "configpage.h"
|
||||||
|
#include "ui_SoundDialog.h"
|
||||||
|
|
||||||
|
class SoundDialog : public ConfigPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/** Default Constructor */
|
||||||
|
SoundDialog(QWidget *parent = 0);
|
||||||
|
/** Default Destructor */
|
||||||
|
|
||||||
|
/** Saves the changes on this page */
|
||||||
|
bool save(QString &errmsg);
|
||||||
|
/** Loads the settings for this page */
|
||||||
|
void load();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
void on_cmd_openFile();
|
||||||
|
void on_cmd_openFile2();
|
||||||
|
void on_cmd_openFile3();
|
||||||
|
void on_cmd_openFile4();
|
||||||
|
void on_cmd_openFile5();
|
||||||
|
void on_cmd_openFile6();
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** A RshareSettings object used for saving/loading settings */
|
||||||
|
RshareSettings* _settings;
|
||||||
|
|
||||||
|
/** Qt Designer generated object */
|
||||||
|
Ui::SoundDialog ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
814
retroshare-gui/src/gui/Preferences/SoundDialog.ui
Normal file
814
retroshare-gui/src/gui/Preferences/SoundDialog.ui
Normal file
@ -0,0 +1,814 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>SoundDialog</class>
|
||||||
|
<widget class="QWidget" name="SoundDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>468</width>
|
||||||
|
<height>407</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="palette">
|
||||||
|
<palette>
|
||||||
|
<active>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>208</red>
|
||||||
|
<green>208</green>
|
||||||
|
<blue>208</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>247</red>
|
||||||
|
<green>247</green>
|
||||||
|
<blue>247</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>139</red>
|
||||||
|
<green>139</green>
|
||||||
|
<blue>139</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Highlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>128</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Link">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="LinkVisited">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>231</red>
|
||||||
|
<green>231</green>
|
||||||
|
<blue>231</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>208</red>
|
||||||
|
<green>208</green>
|
||||||
|
<blue>208</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>247</red>
|
||||||
|
<green>247</green>
|
||||||
|
<blue>247</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>139</red>
|
||||||
|
<green>139</green>
|
||||||
|
<blue>139</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Highlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>192</red>
|
||||||
|
<green>192</green>
|
||||||
|
<blue>192</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Link">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="LinkVisited">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>231</red>
|
||||||
|
<green>231</green>
|
||||||
|
<blue>231</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>208</red>
|
||||||
|
<green>208</green>
|
||||||
|
<blue>208</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Light">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Midlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>247</red>
|
||||||
|
<green>247</green>
|
||||||
|
<blue>247</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Dark">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Mid">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>139</red>
|
||||||
|
<green>139</green>
|
||||||
|
<blue>139</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>104</red>
|
||||||
|
<green>104</green>
|
||||||
|
<blue>104</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Shadow">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Highlight">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>128</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Link">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="LinkVisited">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>231</red>
|
||||||
|
<green>231</green>
|
||||||
|
<blue>231</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Arial</family>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<strikeout>false</strikeout>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::NoContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_11">
|
||||||
|
<property name="title">
|
||||||
|
<string>Sound Events</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QGroupBox" name="groupBox_12">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>421</width>
|
||||||
|
<height>81</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>User</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>go Online</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>go Offline</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>421</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>FileSend</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile3">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound_3">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Finished</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_14">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>160</y>
|
||||||
|
<width>421</width>
|
||||||
|
<height>91</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>FileRecive</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound_4">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Incoming</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile4">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile_4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile_5">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound_5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Finished</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_15">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>260</y>
|
||||||
|
<width>421</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Chatmessage</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="cmd_openFile_6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>380</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>31</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxSound_6">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="txt_SoundFile6">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
104
retroshare-gui/src/gui/SoundManager.cpp
Normal file
104
retroshare-gui/src/gui/SoundManager.cpp
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 - 2009 RetroShare Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
****************************************************************/
|
||||||
|
#include "SoundManager.h"
|
||||||
|
|
||||||
|
SoundManager::SoundManager()
|
||||||
|
{
|
||||||
|
/* Create RshareSettings object */
|
||||||
|
_settings = new RshareSettings();
|
||||||
|
|
||||||
|
isMute=false;
|
||||||
|
reInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundManager::doMute(bool t)
|
||||||
|
{
|
||||||
|
isMute=t;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundManager::event_User_go_Online()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
|
||||||
|
if(enable_eventUser_go_Online)
|
||||||
|
QSound::play(SoundFileUser_go_Online);
|
||||||
|
}
|
||||||
|
void SoundManager::event_User_go_Offline()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
if(enable_eventUser_go_Offline)
|
||||||
|
QSound::play(SoundFileUser_go_Offline);
|
||||||
|
}
|
||||||
|
void SoundManager::event_FileSend_Finished()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
if(enable_eventFileSend_Finished)
|
||||||
|
QSound::play(SoundFileFileSend_Finished);
|
||||||
|
}
|
||||||
|
void SoundManager::event_FileRecive_Incoming()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
if(enable_eventFileRecive_Incoming)
|
||||||
|
QSound::play(SoundFileFileRecive_Incoming);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundManager::event_FileRecive_Finished()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
if(enable_eventFileRecive_Finished)
|
||||||
|
QSound::play(SoundFileFileRecive_Finished);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SoundManager::event_NewChatMessage()
|
||||||
|
{
|
||||||
|
if(isMute==true) return;
|
||||||
|
if(enable_eventNewChatMessage)
|
||||||
|
{
|
||||||
|
QSound::play(SoundFileNewChatMessage);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundManager::reInit()
|
||||||
|
{
|
||||||
|
_settings->beginGroup("Sound");
|
||||||
|
_settings->beginGroup("Enable");
|
||||||
|
enable_eventUser_go_Online = _settings->value("User_go_Online",false).toBool();
|
||||||
|
enable_eventUser_go_Offline = _settings->value("User_go_Offline",false).toBool();
|
||||||
|
enable_eventFileSend_Finished = _settings->value("FileSend_Finished",false).toBool();
|
||||||
|
enable_eventFileRecive_Incoming = _settings->value("FileRecive_Incoming",false).toBool();
|
||||||
|
enable_eventFileRecive_Finished = _settings->value("FileRecive_Finished",false).toBool();
|
||||||
|
enable_eventNewChatMessage = _settings->value("NewChatMessage",false).toBool();
|
||||||
|
_settings->endGroup();
|
||||||
|
|
||||||
|
_settings->beginGroup("SoundFilePath");
|
||||||
|
SoundFileUser_go_Online = _settings->value("User_go_Online","").toString();
|
||||||
|
SoundFileUser_go_Offline =_settings->value("User_go_Offline","").toString();
|
||||||
|
SoundFileFileSend_Finished = _settings->value("FileSend_Finished","").toString();
|
||||||
|
SoundFileFileRecive_Incoming = _settings->value("FileRecive_Incoming","").toString();
|
||||||
|
SoundFileFileRecive_Finished = _settings->value("FileRecive_Finished","").toString();
|
||||||
|
SoundFileNewChatMessage = _settings->value("NewChatMessage","").toString();
|
||||||
|
_settings->endGroup();
|
||||||
|
_settings->endGroup();
|
||||||
|
delete _settings;
|
||||||
|
}
|
||||||
|
|
67
retroshare-gui/src/gui/SoundManager.h
Normal file
67
retroshare-gui/src/gui/SoundManager.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/****************************************************************
|
||||||
|
* RetroShare is distributed under the following license:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006, 2007 crypton
|
||||||
|
*
|
||||||
|
* 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 SOUND_MANAGER_H
|
||||||
|
#define SOUND_MANAGER_H
|
||||||
|
|
||||||
|
#include <QSound>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QtGui>
|
||||||
|
|
||||||
|
#include <gui/Preferences/rsharesettings.h>
|
||||||
|
|
||||||
|
|
||||||
|
class SoundManager :public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SoundManager();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void doMute(bool t);
|
||||||
|
void event_User_go_Online();
|
||||||
|
void event_User_go_Offline();
|
||||||
|
void event_FileSend_Finished();
|
||||||
|
void event_FileRecive_Incoming();
|
||||||
|
void event_FileRecive_Finished();
|
||||||
|
void event_NewChatMessage();
|
||||||
|
void reInit();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool isMute;
|
||||||
|
QString SoundFileUser_go_Online;
|
||||||
|
QString SoundFileUser_go_Offline;
|
||||||
|
QString SoundFileFileSend_Finished;
|
||||||
|
QString SoundFileFileRecive_Incoming;
|
||||||
|
QString SoundFileFileRecive_Finished;
|
||||||
|
QString SoundFileNewChatMessage;
|
||||||
|
|
||||||
|
bool enable_eventUser_go_Online;
|
||||||
|
bool enable_eventUser_go_Offline;
|
||||||
|
bool enable_eventFileSend_Finished;
|
||||||
|
bool enable_eventFileRecive_Incoming;
|
||||||
|
bool enable_eventFileRecive_Finished;
|
||||||
|
bool enable_eventNewChatMessage;
|
||||||
|
|
||||||
|
/** A RshareSettings object used for saving/loading settings */
|
||||||
|
RshareSettings* _settings;
|
||||||
|
};
|
||||||
|
#endif
|
@ -296,6 +296,7 @@
|
|||||||
<file>images/status_unknown.png</file>
|
<file>images/status_unknown.png</file>
|
||||||
<file>images/startall.png</file>
|
<file>images/startall.png</file>
|
||||||
<file>images/server_24x24.png</file>
|
<file>images/server_24x24.png</file>
|
||||||
|
<file>images/sound.png</file>
|
||||||
<file>images/transferupdown.png</file>
|
<file>images/transferupdown.png</file>
|
||||||
<file>images/typing.png</file>
|
<file>images/typing.png</file>
|
||||||
<file>images/uploads.png</file>
|
<file>images/uploads.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/images/sound.png
Normal file
BIN
retroshare-gui/src/gui/images/sound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
retroshare-gui/src/gui/images/sound_off.png
Normal file
BIN
retroshare-gui/src/gui/images/sound_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
retroshare-gui/src/sounds/File.wav
Normal file
BIN
retroshare-gui/src/sounds/File.wav
Normal file
Binary file not shown.
BIN
retroshare-gui/src/sounds/Notify.wav
Normal file
BIN
retroshare-gui/src/sounds/Notify.wav
Normal file
Binary file not shown.
BIN
retroshare-gui/src/sounds/Startup.wav
Normal file
BIN
retroshare-gui/src/sounds/Startup.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user