mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Reworked/fixed some settings.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
42e579a294
commit
d355e8dd88
@ -87,9 +87,11 @@ PostedListWidget::~PostedListWidget()
|
||||
{
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
delete(ui);
|
||||
}
|
||||
|
||||
void PostedListWidget::processSettings(bool load)
|
||||
void PostedListWidget::processSettings(bool /*load*/)
|
||||
{
|
||||
// Settings->beginGroup(QString("PostedListWidget"));
|
||||
//
|
||||
|
@ -53,7 +53,7 @@ private:
|
||||
/* GxsGroupFrameDialog */
|
||||
virtual QString text(TextType type);
|
||||
virtual QString icon(IconType type);
|
||||
virtual QString settingsGroupName() { return "GxsChannelDialog"; }
|
||||
virtual QString settingsGroupName() { return "ChannelDialog"; }
|
||||
virtual GxsGroupDialog *createNewGroupDialog(TokenQueue *tokenQueue);
|
||||
virtual GxsGroupDialog *createGroupDialog(TokenQueue *tokenQueue, RsTokenService *tokenService, GxsGroupDialog::Mode mode, RsGxsGroupId groupId);
|
||||
virtual int shareKeyType();
|
||||
|
@ -107,12 +107,14 @@ GxsChannelPostsWidget::~GxsChannelPostsWidget()
|
||||
processSettings(false);
|
||||
|
||||
delete(mAutoDownloadAction);
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidget::processSettings(bool load)
|
||||
void GxsChannelPostsWidget::processSettings(bool /*load*/)
|
||||
{
|
||||
mInProcessSettings = true;
|
||||
// Settings->beginGroup(QString("GxsChannelDialog"));
|
||||
// Settings->beginGroup(QString("ChannelPostsWidget"));
|
||||
//
|
||||
// if (load) {
|
||||
// // load settings
|
||||
|
@ -210,6 +210,9 @@ GxsForumThreadWidget::~GxsForumThreadWidget()
|
||||
mFillThread = NULL;
|
||||
}
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
delete ui;
|
||||
|
||||
// delete(mTimer);
|
||||
@ -223,7 +226,7 @@ void GxsForumThreadWidget::processSettings(bool load)
|
||||
|
||||
QHeaderView *header = ui->threadTreeWidget->header();
|
||||
|
||||
Settings->beginGroup(QString("GxsForumsDialog"));
|
||||
Settings->beginGroup(QString("ForumThreadWidget"));
|
||||
|
||||
if (load) {
|
||||
// load settings
|
||||
@ -449,7 +452,7 @@ bool GxsForumThreadWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
void GxsForumThreadWidget::togglethreadview()
|
||||
{
|
||||
// save state of button
|
||||
Settings->setValueToGroup("GxsForumsDialog", "expandButton", ui->expandButton->isChecked());
|
||||
Settings->setValueToGroup("ForumThreadWidget", "expandButton", ui->expandButton->isChecked());
|
||||
|
||||
togglethreadview_internal();
|
||||
}
|
||||
@ -873,7 +876,7 @@ void GxsForumThreadWidget::insertThreads()
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
/* get the current Forum */
|
||||
std::cerr << "GxsForumsDialog::insertThreads()" << std::endl;
|
||||
std::cerr << "GxsForumThreadWidget::insertThreads()" << std::endl;
|
||||
#endif
|
||||
|
||||
if (mFillThread) {
|
||||
@ -905,7 +908,7 @@ void GxsForumThreadWidget::insertThreads()
|
||||
mLastForumID.clear();
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumsDialog::insertThreads() Current Thread Invalid" << std::endl;
|
||||
std::cerr << "GxsForumThreadWidget::insertThreads() Current Thread Invalid" << std::endl;
|
||||
#endif
|
||||
|
||||
return;
|
||||
@ -927,7 +930,7 @@ void GxsForumThreadWidget::insertForumThreads(const RsGxsForumGroup &group)
|
||||
mStateHelper->setActive(TOKEN_TYPE_CURRENTFORUM, true);
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumsDialog::insertThreads() Start filling Forum threads" << std::endl;
|
||||
std::cerr << "GxsForumThreadWidget::insertThreads() Start filling Forum threads" << std::endl;
|
||||
#endif
|
||||
|
||||
// create fill thread
|
||||
@ -978,7 +981,7 @@ void GxsForumThreadWidget::insertForumThreads(const RsGxsForumGroup &group)
|
||||
void GxsForumThreadWidget::fillThreads(QList<QTreeWidgetItem *> &threadList, bool expandNewMessages, QList<QTreeWidgetItem*> &itemToExpand)
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumsDialog::fillThreads()" << std::endl;
|
||||
std::cerr << "GxsForumThreadWidget::fillThreads()" << std::endl;
|
||||
#endif
|
||||
|
||||
int index = 0;
|
||||
@ -1050,7 +1053,7 @@ void GxsForumThreadWidget::fillThreads(QList<QTreeWidgetItem *> &threadList, boo
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumsDialog::fillThreads() done" << std::endl;
|
||||
std::cerr << "GxsForumThreadWidget::fillThreads() done" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1192,7 +1195,7 @@ void GxsForumThreadWidget::insertPostData(const RsGxsForumMsg &msg)
|
||||
|
||||
if ((msg.mMeta.mGroupId != mForumId) || (msg.mMeta.mMsgId != mThreadId))
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::insertPostData() Ignoring Invalid Data....";
|
||||
std::cerr << "GxsForumThreadWidget::insertPostData() Ignoring Invalid Data....";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\t CurrForumId: " << mForumId << " != msg.GroupId: " << msg.mMeta.mGroupId;
|
||||
std::cerr << std::endl;
|
||||
@ -1333,13 +1336,13 @@ void GxsForumThreadWidget::nextUnreadMessage()
|
||||
|
||||
// TODO
|
||||
#if 0
|
||||
void GxsForumsDialog::removemessage()
|
||||
void GxsForumThreadWidget::removemessage()
|
||||
{
|
||||
//std::cerr << "GxsForumsDialog::removemessage()" << std::endl;
|
||||
//std::cerr << "GxsForumThreadWidget::removemessage()" << std::endl;
|
||||
std::string cid, mid;
|
||||
if (!getCurrentMsg(cid, mid))
|
||||
{
|
||||
//std::cerr << "GxsForumsDialog::removemessage()";
|
||||
//std::cerr << "GxsForumThreadWidget::removemessage()";
|
||||
//std::cerr << " No Message selected" << std::endl;
|
||||
return;
|
||||
}
|
||||
@ -1569,14 +1572,14 @@ static QString buildReplyHeader(const RsMsgMetaData &meta)
|
||||
link.createMessage(meta.mAuthorId, "");
|
||||
QString from = link.toHtml();
|
||||
|
||||
QString header = QString("<span>-----%1-----").arg(QApplication::translate("GxsForumsDialog", "Original Message"));
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("GxsForumsDialog", "From"), from);
|
||||
QString header = QString("<span>-----%1-----").arg(QApplication::translate("GxsForumThreadWidget", "Original Message"));
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("GxsForumThreadWidget", "From"), from);
|
||||
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("GxsForumsDialog", "Sent"), DateTime::formatLongDateTime(meta.mPublishTs));
|
||||
header += QString("<font size='3'><strong>%1: </strong>%2</font></span><br>").arg(QApplication::translate("GxsForumsDialog", "Subject"), QString::fromUtf8(meta.mMsgName.c_str()));
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("GxsForumThreadWidget", "Sent"), DateTime::formatLongDateTime(meta.mPublishTs));
|
||||
header += QString("<font size='3'><strong>%1: </strong>%2</font></span><br>").arg(QApplication::translate("GxsForumThreadWidget", "Subject"), QString::fromUtf8(meta.mMsgName.c_str()));
|
||||
header += "<br>";
|
||||
|
||||
header += QApplication::translate("GxsForumsDialog", "On %1, %2 wrote:").arg(DateTime::formatDateTime(meta.mPublishTs), from);
|
||||
header += QApplication::translate("GxsForumThreadWidget", "On %1, %2 wrote:").arg(DateTime::formatDateTime(meta.mPublishTs), from);
|
||||
|
||||
return header;
|
||||
}
|
||||
@ -1597,7 +1600,7 @@ void GxsForumThreadWidget::replyMessageData(const RsGxsForumMsg &msg)
|
||||
{
|
||||
if ((msg.mMeta.mGroupId != mForumId) || (msg.mMeta.mMsgId != mThreadId))
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::replyMessageData() ERROR Message Ids have changed!";
|
||||
std::cerr << "GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
@ -1628,7 +1631,7 @@ void GxsForumThreadWidget::changedViewBox()
|
||||
}
|
||||
|
||||
// save index
|
||||
Settings->setValueToGroup("GxsForumsDialog", "viewBox", ui->viewBox->currentIndex());
|
||||
Settings->setValueToGroup("ForumThreadWidget", "viewBox", ui->viewBox->currentIndex());
|
||||
|
||||
ui->threadTreeWidget->clear();
|
||||
|
||||
@ -1649,7 +1652,7 @@ void GxsForumThreadWidget::filterColumnChanged(int column)
|
||||
}
|
||||
|
||||
// save index
|
||||
Settings->setValueToGroup("GxsForumsDialog", "filterColumn", column);
|
||||
Settings->setValueToGroup("ForumThreadWidget", "filterColumn", column);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::filterItems(const QString& text)
|
||||
@ -1708,7 +1711,7 @@ void GxsForumThreadWidget::requestGroup_CurrentForum()
|
||||
std::list<RsGxsGroupId> grpIds;
|
||||
grpIds.push_back(mForumId);
|
||||
|
||||
std::cerr << "GxsForumsDialog::requestGroup_CurrentForum(" << mForumId << ")";
|
||||
std::cerr << "GxsForumThreadWidget::requestGroup_CurrentForum(" << mForumId << ")";
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
@ -1717,7 +1720,7 @@ void GxsForumThreadWidget::requestGroup_CurrentForum()
|
||||
|
||||
void GxsForumThreadWidget::loadGroup_CurrentForum(const uint32_t &token)
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadGroup_CurrentForum()";
|
||||
std::cerr << "GxsForumThreadWidget::loadGroup_CurrentForum()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::vector<RsGxsForumGroup> groups;
|
||||
@ -1729,7 +1732,7 @@ void GxsForumThreadWidget::loadGroup_CurrentForum(const uint32_t &token)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadGroupSummary_CurrentForum() ERROR Invalid Number of Groups...";
|
||||
std::cerr << "GxsForumThreadWidget::loadGroupSummary_CurrentForum() ERROR Invalid Number of Groups...";
|
||||
std::cerr << std::endl;
|
||||
|
||||
mStateHelper->setLoading(TOKEN_TYPE_CURRENTFORUM, false);
|
||||
@ -1753,7 +1756,7 @@ void GxsForumThreadWidget::requestMsgData_InsertPost(const RsGxsGrpMsgIdPair &ms
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_RELATED_DATA;
|
||||
|
||||
std::cerr << "GxsForumsDialog::requestMsgData_InsertPost(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << "GxsForumThreadWidget::requestMsgData_InsertPost(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::vector<RsGxsGrpMsgIdPair> msgIds;
|
||||
@ -1767,7 +1770,7 @@ void GxsForumThreadWidget::requestMsgData_InsertPost(const RsGxsGrpMsgIdPair &ms
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
std::cerr << "GxsForumsDialog::requestMsgData_InsertPost(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << "GxsForumThreadWidget::requestMsgData_InsertPost(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << std::endl;
|
||||
|
||||
GxsMsgReq msgIds;
|
||||
@ -1783,13 +1786,13 @@ void GxsForumThreadWidget::loadMsgData_InsertPost(const uint32_t &token)
|
||||
{
|
||||
mStateHelper->setLoading(TOKEN_TYPE_INSERT_POST, false);
|
||||
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_InsertPost()";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_InsertPost()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::vector<RsGxsForumMsg> msgs;
|
||||
if (rsGxsForums->getMsgData(token, msgs)) {
|
||||
if (msgs.size() != 1) {
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_InsertPost() ERROR Wrong number of answers";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_InsertPost() ERROR Wrong number of answers";
|
||||
std::cerr << std::endl;
|
||||
mStateHelper->setActive(TOKEN_TYPE_INSERT_POST, false);
|
||||
mStateHelper->clear(TOKEN_TYPE_INSERT_POST);
|
||||
@ -1797,7 +1800,7 @@ void GxsForumThreadWidget::loadMsgData_InsertPost(const uint32_t &token)
|
||||
}
|
||||
insertPostData(msgs[0]);
|
||||
} else {
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_InsertPost() ERROR Missing Message Data...";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_InsertPost() ERROR Missing Message Data...";
|
||||
std::cerr << std::endl;
|
||||
|
||||
mStateHelper->setActive(TOKEN_TYPE_INSERT_POST, false);
|
||||
@ -1813,7 +1816,7 @@ void GxsForumThreadWidget::requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
std::cerr << "GxsForumsDialog::requestMsgData_ReplyMessage(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << "GxsForumThreadWidget::requestMsgData_ReplyMessage(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << std::endl;
|
||||
|
||||
GxsMsgReq msgIds;
|
||||
@ -1826,7 +1829,7 @@ void GxsForumThreadWidget::requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &
|
||||
|
||||
void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_ReplyMessage()";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::vector<RsGxsForumMsg> msgs;
|
||||
@ -1834,7 +1837,7 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
||||
{
|
||||
if (msgs.size() != 1)
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_ReplyMessage() ERROR Wrong number of answers";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Wrong number of answers";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
@ -1843,7 +1846,7 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadMsgData_ReplyMessage() ERROR Missing Message Data...";
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Missing Message Data...";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
}
|
||||
@ -1853,7 +1856,7 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
||||
|
||||
void GxsForumThreadWidget::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
{
|
||||
std::cerr << "GxsForumsDialog::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << "GxsForumThreadWidget::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << std::endl;
|
||||
|
||||
if (queue == mThreadQueue)
|
||||
@ -1874,7 +1877,7 @@ void GxsForumThreadWidget::loadRequest(const TokenQueue *queue, const TokenReque
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << "GxsForumsDialog::loadRequest() ERROR: INVALID TYPE";
|
||||
std::cerr << "GxsForumThreadWidget::loadRequest() ERROR: INVALID TYPE";
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ private:
|
||||
/* GxsGroupFrameDialog */
|
||||
virtual QString text(TextType type);
|
||||
virtual QString icon(IconType type);
|
||||
virtual QString settingsGroupName() { return "GxsForumsDialog"; }
|
||||
virtual QString settingsGroupName() { return "ForumsDialog"; }
|
||||
virtual GxsGroupDialog *createNewGroupDialog(TokenQueue *tokenQueue);
|
||||
virtual GxsGroupDialog *createGroupDialog(TokenQueue *tokenQueue, RsTokenService *tokenService, GxsGroupDialog::Mode mode, RsGxsGroupId groupId);
|
||||
virtual int shareKeyType();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,6 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#ifndef _RSHARESETTINGS_H
|
||||
#define _RSHARESETTINGS_H
|
||||
|
||||
@ -60,7 +59,6 @@
|
||||
|
||||
//Forward declaration.
|
||||
class QWidget;
|
||||
class QTableWidget;
|
||||
class QToolBar;
|
||||
class QMainWindow;
|
||||
|
||||
@ -90,151 +88,151 @@ public:
|
||||
class RshareSettings : public RSettings
|
||||
{
|
||||
public:
|
||||
enum enumLastDir
|
||||
{
|
||||
LASTDIR_EXTRAFILE,
|
||||
LASTDIR_CERT,
|
||||
LASTDIR_HISTORY,
|
||||
LASTDIR_IMAGES,
|
||||
LASTDIR_MESSAGES,
|
||||
LASTDIR_BLOGS,
|
||||
LASTDIR_SOUNDS
|
||||
};
|
||||
enum enumLastDir
|
||||
{
|
||||
LASTDIR_EXTRAFILE,
|
||||
LASTDIR_CERT,
|
||||
LASTDIR_HISTORY,
|
||||
LASTDIR_IMAGES,
|
||||
LASTDIR_MESSAGES,
|
||||
LASTDIR_BLOGS,
|
||||
LASTDIR_SOUNDS
|
||||
};
|
||||
|
||||
enum enumToasterPosition
|
||||
{
|
||||
TOASTERPOS_TOPLEFT,
|
||||
TOASTERPOS_TOPRIGHT,
|
||||
TOASTERPOS_BOTTOMLEFT,
|
||||
TOASTERPOS_BOTTOMRIGHT
|
||||
};
|
||||
enum enumToasterPosition
|
||||
{
|
||||
TOASTERPOS_TOPLEFT,
|
||||
TOASTERPOS_TOPRIGHT,
|
||||
TOASTERPOS_BOTTOMLEFT,
|
||||
TOASTERPOS_BOTTOMRIGHT
|
||||
};
|
||||
|
||||
enum enumMsgOpen
|
||||
{
|
||||
MSG_OPEN_TAB,
|
||||
MSG_OPEN_WINDOW
|
||||
};
|
||||
enum enumMsgOpen
|
||||
{
|
||||
MSG_OPEN_TAB,
|
||||
MSG_OPEN_WINDOW
|
||||
};
|
||||
|
||||
public:
|
||||
/* create settings object */
|
||||
static void Create(bool forceCreateNew = false);
|
||||
/* create settings object */
|
||||
static void Create(bool forceCreateNew = false);
|
||||
|
||||
/** Gets the currently preferred language code for RShare. */
|
||||
QString getLanguageCode();
|
||||
/** Saves the preferred language code. */
|
||||
void setLanguageCode(QString languageCode);
|
||||
|
||||
/** Gets the interface style key (e.g., "windows", "motif", etc.) */
|
||||
QString getInterfaceStyle();
|
||||
/** Sets the interface style key. */
|
||||
void setInterfaceStyle(QString styleKey);
|
||||
|
||||
/** Sets the stylesheet */
|
||||
void setSheetName(QString sheet);
|
||||
/** Gets the stylesheet */
|
||||
QString getSheetName();
|
||||
/** Gets the currently preferred language code for RShare. */
|
||||
QString getLanguageCode();
|
||||
/** Saves the preferred language code. */
|
||||
void setLanguageCode(QString languageCode);
|
||||
|
||||
/** Gets the page button Location.*/
|
||||
bool getPageButtonLoc();
|
||||
/** Sets the page button Location.*/
|
||||
void setPageButtonLoc(bool onToolBar);
|
||||
/** Gets the interface style key (e.g., "windows", "motif", etc.) */
|
||||
QString getInterfaceStyle();
|
||||
/** Sets the interface style key. */
|
||||
void setInterfaceStyle(QString styleKey);
|
||||
|
||||
/** Gets the action button Location.*/
|
||||
bool getActionButtonLoc();
|
||||
/** Sets the action button Location.*/
|
||||
void setActionButtonLoc(bool onToolBar);
|
||||
/** Sets the stylesheet */
|
||||
void setSheetName(QString sheet);
|
||||
/** Gets the stylesheet */
|
||||
QString getSheetName();
|
||||
|
||||
/** Gets the tool button's style.*/
|
||||
Qt::ToolButtonStyle getToolButtonStyle();
|
||||
/** Sets the tool button's style.*/
|
||||
void setToolButtonStyle(Qt::ToolButtonStyle style);
|
||||
/** Gets the page button Location.*/
|
||||
bool getPageButtonLoc();
|
||||
/** Sets the page button Location.*/
|
||||
void setPageButtonLoc(bool onToolBar);
|
||||
|
||||
/** Gets the tool button's size.*/
|
||||
int getToolButtonSize();
|
||||
/** Sets the tool button's size.*/
|
||||
void setToolButtonSize(int size);
|
||||
/** Gets the action button Location.*/
|
||||
bool getActionButtonLoc();
|
||||
/** Sets the action button Location.*/
|
||||
void setActionButtonLoc(bool onToolBar);
|
||||
|
||||
/** Gets the list item icon's size.*/
|
||||
int getListItemIconSize();
|
||||
/** Sets the list item icon's size.*/
|
||||
void setListItemIconSize(int size);
|
||||
/** Gets the tool button's style.*/
|
||||
Qt::ToolButtonStyle getToolButtonStyle();
|
||||
/** Sets the tool button's style.*/
|
||||
void setToolButtonStyle(Qt::ToolButtonStyle style);
|
||||
|
||||
/** Returns true if RetroShare's main window should be visible when the
|
||||
/** Gets the tool button's size.*/
|
||||
int getToolButtonSize();
|
||||
/** Sets the tool button's 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
|
||||
* application starts. */
|
||||
bool getStartMinimized();
|
||||
/** Sets whether to show main window when the application starts. */
|
||||
void setStartMinimized(bool startMinimized);
|
||||
bool getStartMinimized();
|
||||
/** Sets whether to show main window when the application starts. */
|
||||
void setStartMinimized(bool startMinimized);
|
||||
|
||||
bool getCloseToTray();
|
||||
void setCloseToTray(bool closeToTray);
|
||||
bool getCloseToTray();
|
||||
void setCloseToTray(bool closeToTray);
|
||||
|
||||
/** Returns true if RetroShare should start on system boot. */
|
||||
bool runRetroshareOnBoot(bool &minimized);
|
||||
/** Returns true if RetroShare should start on system boot. */
|
||||
bool runRetroshareOnBoot(bool &minimized);
|
||||
|
||||
/** Set whether to run RetroShare on system boot. */
|
||||
void setRunRetroshareOnBoot(bool run, bool minimized);
|
||||
/** Set whether to run RetroShare on system boot. */
|
||||
void setRunRetroshareOnBoot(bool run, bool minimized);
|
||||
|
||||
/** Returns true if the user can set retroshare as protocol */
|
||||
bool canSetRetroShareProtocol();
|
||||
/** Returns true if retroshare:// is registered as protocol */
|
||||
bool getRetroShareProtocol();
|
||||
/** Register retroshare:// as protocl */
|
||||
bool setRetroShareProtocol(bool value);
|
||||
/** Returns true if the user can set retroshare as protocol */
|
||||
bool canSetRetroShareProtocol();
|
||||
/** Returns true if retroshare:// is registered as protocol */
|
||||
bool getRetroShareProtocol();
|
||||
/** Register retroshare:// as protocl */
|
||||
bool setRetroShareProtocol(bool value);
|
||||
|
||||
/* Get the destination log file. */
|
||||
QString getLogFile();
|
||||
/** Set the destination log file. */
|
||||
void setLogFile(QString file);
|
||||
/* Get the destination log file. */
|
||||
QString getLogFile();
|
||||
/** Set the destination log file. */
|
||||
void setLogFile(QString file);
|
||||
|
||||
QString getLastDir(enumLastDir type);
|
||||
void setLastDir(enumLastDir type, const QString &lastDir);
|
||||
QString getLastDir(enumLastDir type);
|
||||
void setLastDir(enumLastDir type, const QString &lastDir);
|
||||
|
||||
/* Get the bandwidth graph line filter. */
|
||||
uint getBWGraphFilter();
|
||||
/** Set the bandwidth graph line filter. */
|
||||
void setBWGraphFilter(uint line, bool status);
|
||||
/* Get the bandwidth graph line filter. */
|
||||
uint getBWGraphFilter();
|
||||
/** Set the bandwidth graph line filter. */
|
||||
void setBWGraphFilter(uint line, bool status);
|
||||
|
||||
/** Set the bandwidth graph opacity setting. */
|
||||
int getBWGraphOpacity();
|
||||
/** Set the bandwidth graph opacity settings. */
|
||||
void setBWGraphOpacity(int value);
|
||||
/** Set the bandwidth graph opacity setting. */
|
||||
int getBWGraphOpacity();
|
||||
/** Set the bandwidth graph opacity settings. */
|
||||
void setBWGraphOpacity(int value);
|
||||
|
||||
/** Gets whether the bandwidth graph is always on top. */
|
||||
bool getBWGraphAlwaysOnTop();
|
||||
/** Sets whether the bandwidth graph is always on top. */
|
||||
void setBWGraphAlwaysOnTop(bool alwaysOnTop);
|
||||
|
||||
uint getNewsFeedFlags();
|
||||
void setNewsFeedFlags(uint flags);
|
||||
/** Gets whether the bandwidth graph is always on top. */
|
||||
bool getBWGraphAlwaysOnTop();
|
||||
/** Sets whether the bandwidth graph is always on top. */
|
||||
void setBWGraphAlwaysOnTop(bool alwaysOnTop);
|
||||
|
||||
uint getChatFlags();
|
||||
void setChatFlags(uint flags);
|
||||
uint getNewsFeedFlags();
|
||||
void setNewsFeedFlags(uint flags);
|
||||
|
||||
uint getChatLobbyFlags();
|
||||
void setChatLobbyFlags(uint flags);
|
||||
uint getChatFlags();
|
||||
void setChatFlags(uint flags);
|
||||
|
||||
uint getNotifyFlags();
|
||||
void setNotifyFlags(uint flags);
|
||||
uint getChatLobbyFlags();
|
||||
void setChatLobbyFlags(uint flags);
|
||||
|
||||
uint getTrayNotifyFlags();
|
||||
void setTrayNotifyFlags(uint flags);
|
||||
uint getNotifyFlags();
|
||||
void setNotifyFlags(uint flags);
|
||||
|
||||
uint getTrayNotifyBlinkFlags();
|
||||
void setTrayNotifyBlinkFlags(uint flags);
|
||||
uint getTrayNotifyFlags();
|
||||
void setTrayNotifyFlags(uint flags);
|
||||
|
||||
uint getMessageFlags();
|
||||
void setMessageFlags(uint flags);
|
||||
uint getTrayNotifyBlinkFlags();
|
||||
void setTrayNotifyBlinkFlags(uint flags);
|
||||
|
||||
bool getDisplayTrayChatLobby();
|
||||
void setDisplayTrayChatLobby(bool bValue);
|
||||
bool getDisplayTrayGroupChat();
|
||||
void setDisplayTrayGroupChat(bool bValue);
|
||||
uint getMessageFlags();
|
||||
void setMessageFlags(uint flags);
|
||||
|
||||
bool getAddFeedsAtEnd();
|
||||
void setAddFeedsAtEnd(bool bValue);
|
||||
bool getDisplayTrayChatLobby();
|
||||
void setDisplayTrayChatLobby(bool bValue);
|
||||
bool getDisplayTrayGroupChat();
|
||||
void setDisplayTrayGroupChat(bool bValue);
|
||||
|
||||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
bool getAddFeedsAtEnd();
|
||||
void setAddFeedsAtEnd(bool bValue);
|
||||
|
||||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
|
||||
void setChatSearchCharToStartSearch(int iValue);
|
||||
int getChatSearchCharToStartSearch();
|
||||
@ -257,92 +255,91 @@ public:
|
||||
void setChatSearchFoundColor(QRgb rgbValue);
|
||||
QRgb getChatSearchFoundColor();
|
||||
|
||||
enumToasterPosition getToasterPosition();
|
||||
void setToasterPosition(enumToasterPosition position);
|
||||
enumToasterPosition getToasterPosition();
|
||||
void setToasterPosition(enumToasterPosition position);
|
||||
|
||||
QPoint getToasterMargin();
|
||||
void setToasterMargin(QPoint margin);
|
||||
QPoint getToasterMargin();
|
||||
void setToasterMargin(QPoint margin);
|
||||
|
||||
/* chat font */
|
||||
QString getChatScreenFont();
|
||||
void setChatScreenFont(const QString &font);
|
||||
/* chat font */
|
||||
QString getChatScreenFont();
|
||||
void setChatScreenFont(const QString &font);
|
||||
|
||||
/* chat styles */
|
||||
void getPublicChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setPublicChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
/* chat styles */
|
||||
void getPublicChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setPublicChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
|
||||
void getPrivateChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setPrivateChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
void getPrivateChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setPrivateChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
|
||||
void getHistoryChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setHistoryChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
void getHistoryChatStyle(QString &stylePath, QString &styleVariant);
|
||||
void setHistoryChatStyle(const QString &stylePath, const QString &styleVariant);
|
||||
|
||||
/* Chat */
|
||||
int getPublicChatHistoryCount();
|
||||
void setPublicChatHistoryCount(int value);
|
||||
/* Chat */
|
||||
int getPublicChatHistoryCount();
|
||||
void setPublicChatHistoryCount(int value);
|
||||
|
||||
int getPrivateChatHistoryCount();
|
||||
void setPrivateChatHistoryCount(int value);
|
||||
int getPrivateChatHistoryCount();
|
||||
void setPrivateChatHistoryCount(int value);
|
||||
|
||||
int getLobbyChatHistoryCount();
|
||||
void setLobbyChatHistoryCount(int value);
|
||||
int getLobbyChatHistoryCount();
|
||||
void setLobbyChatHistoryCount(int value);
|
||||
|
||||
//! Save placement, state and size information of a window.
|
||||
void saveWidgetInformation(QWidget *widget);
|
||||
//! Save placement, state and size information of a window.
|
||||
void saveWidgetInformation(QWidget *widget);
|
||||
|
||||
//! Load placement, state and size information of a window.
|
||||
void loadWidgetInformation(QWidget *widget);
|
||||
//! Load placement, state and size information of a window.
|
||||
void loadWidgetInformation(QWidget *widget);
|
||||
|
||||
//! Method overload. Save window and toolbar information.
|
||||
void saveWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
//! Method overload. Save window and toolbar information.
|
||||
void saveWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
|
||||
//! Method overload. Restore window and toolbar information.
|
||||
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
//! Method overload. Restore window and toolbar information.
|
||||
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||
|
||||
/* MainWindow */
|
||||
int getLastPageInMainWindow ();
|
||||
void setLastPageInMainWindow (int value);
|
||||
uint getStatusBarFlags();
|
||||
void setStatusBarFlags(uint flags);
|
||||
void setStatusBarFlag(uint flag, bool enable);
|
||||
/* MainWindow */
|
||||
int getLastPageInMainWindow ();
|
||||
void setLastPageInMainWindow (int value);
|
||||
uint getStatusBarFlags();
|
||||
void setStatusBarFlags(uint flags);
|
||||
void setStatusBarFlag(uint flag, bool enable);
|
||||
|
||||
/* Messages */
|
||||
bool getMsgSetToReadOnActivate();
|
||||
void setMsgSetToReadOnActivate(bool value);
|
||||
bool getMsgLoadEmbeddedImages();
|
||||
void setMsgLoadEmbeddedImages(bool value);
|
||||
/* Message */
|
||||
bool getMsgSetToReadOnActivate();
|
||||
void setMsgSetToReadOnActivate(bool value);
|
||||
bool getMsgLoadEmbeddedImages();
|
||||
void setMsgLoadEmbeddedImages(bool value);
|
||||
|
||||
enumMsgOpen getMsgOpen();
|
||||
void setMsgOpen(enumMsgOpen value);
|
||||
enumMsgOpen getMsgOpen();
|
||||
void setMsgOpen(enumMsgOpen value);
|
||||
|
||||
/* Forums */
|
||||
bool getForumMsgSetToReadOnActivate();
|
||||
void setForumMsgSetToReadOnActivate(bool value);
|
||||
bool getForumExpandNewMessages();
|
||||
void setForumExpandNewMessages(bool value);
|
||||
bool getForumLoadEmbeddedImages();
|
||||
void setForumLoadEmbeddedImages(bool value);
|
||||
/* Forum */
|
||||
bool getForumMsgSetToReadOnActivate();
|
||||
void setForumMsgSetToReadOnActivate(bool value);
|
||||
bool getForumExpandNewMessages();
|
||||
void setForumExpandNewMessages(bool value);
|
||||
bool getForumLoadEmbeddedImages();
|
||||
void setForumLoadEmbeddedImages(bool value);
|
||||
|
||||
/* GroupFrameSettings */
|
||||
bool getGroupFrameSettings(GroupFrameSettings::Type type, GroupFrameSettings &groupFrameSettings);
|
||||
void setGroupFrameSettings(GroupFrameSettings::Type type, const GroupFrameSettings &groupFrameSettings);
|
||||
/* GroupFrame settings */
|
||||
bool getGroupFrameSettings(GroupFrameSettings::Type type, GroupFrameSettings &groupFrameSettings);
|
||||
void setGroupFrameSettings(GroupFrameSettings::Type type, const GroupFrameSettings &groupFrameSettings);
|
||||
|
||||
/* time before idle */
|
||||
uint getMaxTimeBeforeIdle();
|
||||
void setMaxTimeBeforeIdle(uint value);
|
||||
/* time before idle */
|
||||
uint getMaxTimeBeforeIdle();
|
||||
void setMaxTimeBeforeIdle(uint value);
|
||||
|
||||
protected:
|
||||
/** Default constructor. */
|
||||
RshareSettings();
|
||||
/** Default constructor. */
|
||||
RshareSettings();
|
||||
|
||||
void initSettings();
|
||||
void initSettings();
|
||||
|
||||
/* member for fast access */
|
||||
int m_maxTimeBeforeIdle;
|
||||
/* member for fast access */
|
||||
int m_maxTimeBeforeIdle;
|
||||
};
|
||||
|
||||
// the one and only global settings object
|
||||
extern RshareSettings *Settings;
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user