aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/options/OptionsWidget_avatar.cpp
diff options
context:
space:
mode:
authorGravatar un1versal2016-04-26 20:50:01 +0100
committerGravatar un1versal2016-04-27 04:10:24 +0100
commit83d5cf501df303e207d2830066193e1cbd1d988b (patch)
treeff522293e64c490e8aa07d34eb0d52296e4b975c /src/modules/options/OptionsWidget_avatar.cpp
parentOptionsWidget_avatar: add pixel suffix to image spinbox value (diff)
downloadKVIrc-83d5cf501df303e207d2830066193e1cbd1d988b.tar.gz
KVIrc-83d5cf501df303e207d2830066193e1cbd1d988b.tar.bz2
KVIrc-83d5cf501df303e207d2830066193e1cbd1d988b.zip
OptionsWidget_avatar: cleanup formatting + indenting
Diffstat (limited to 'src/modules/options/OptionsWidget_avatar.cpp')
-rw-r--r--src/modules/options/OptionsWidget_avatar.cpp74
1 files changed, 33 insertions, 41 deletions
diff --git a/src/modules/options/OptionsWidget_avatar.cpp b/src/modules/options/OptionsWidget_avatar.cpp
index e866e9a60..c3865c72a 100644
--- a/src/modules/options/OptionsWidget_avatar.cpp
+++ b/src/modules/options/OptionsWidget_avatar.cpp
@@ -29,21 +29,22 @@
#include "KviOptions.h"
#include "KviTalToolTip.h"
+
OptionsWidget_avatar::OptionsWidget_avatar(QWidget * parent)
: KviOptionsWidget(parent)
{
setObjectName("avatar_advanced_options_widget");
-
createLayout();
- // AVATAR
- // 1st Box
- KviTalGroupBox *g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Scaling in Userlist","options"));
- KviBoolSelector *b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images in userlist (recommended)","options"),KviOption_boolScaleAvatars);
- KviTalToolTip::add(b,__tr2qs_ctx("This option will force KVIrc to scale avatars" \
- " shown in the userlist.<br>" \
- "Avatars will be scaled to fit the " \
- "constraints set below. Better keep this option on. :)","options"));
+ KviTalGroupBox * g;
+ KviBoolSelector * b;
+
+ g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Scaling in Userlist","options"));
+ b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images in userlist (recommended)","options"),KviOption_boolScaleAvatars);
+ mergeTip(b,__tr2qs_ctx("This option will force KVIrc to scale avatars" \
+ " shown in the userlist.<br>" \
+ "Avatars will be scaled to fit the " \
+ "constraints set below. Better keep this option on.","options"));
addBoolSelector(g,__tr2qs_ctx("Do not scale avatar if it is less than required size","options"),KviOption_boolDoNotUpscaleAvatars);
@@ -54,7 +55,6 @@ OptionsWidget_avatar::OptionsWidget_avatar(QWidget * parent)
u->setSuffix(__tr2qs_ctx(" pixels","options"));
connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
- //2nd
g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Scaling on Load and in User Tooltips","options"));
b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images on image load","options"),KviOption_boolScaleAvatarsOnLoad);
@@ -65,52 +65,44 @@ OptionsWidget_avatar::OptionsWidget_avatar(QWidget * parent)
u->setSuffix(__tr2qs_ctx(" pixels","options"));
connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
- // 2st Box
KviTalGroupBox *gs = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("Request CTCP","options"));
KviBoolSelector * bs = addBoolSelector(g,__tr2qs_ctx("Request missing avatars","options"),KviOption_boolRequestMissingAvatars);
- KviUIntSelector * us = addUIntSelector(g,__tr2qs_ctx("Maximum requested file size:","options"),KviOption_uintMaximumRequestedAvatarSize,0,1048576,102400,KVI_OPTION_BOOL(KviOption_boolRequestMissingAvatars));
+ mergeTip(bs,__tr2qs_ctx("This option will cause KVIrc to send a DCC GET request " \
+ "when someone sets an avatar and there is no cached copy available.","options"));
- mergeTip(bs,
- __tr2qs_ctx("This option will cause KVIrc to send a DCC GET request " \
- "when someone sets an avatar and there is no cached copy available.","options"));
+ KviUIntSelector * us = addUIntSelector(g,__tr2qs_ctx("Maximum requested file size:","options"),KviOption_uintMaximumRequestedAvatarSize,0,1048576,102400,
+ KVI_OPTION_BOOL(KviOption_boolRequestMissingAvatars));
us->setSuffix(__tr2qs_ctx(" bytes","options"));
+ mergeTip(us,__tr2qs_ctx("This is the maximum size for avatar images that " \
+ "will be automatically requested.<br>" \
+ "A reasonable value might be 102400 bytes (100 K).","options"));
- mergeTip(us,
- __tr2qs_ctx("This is the maximum size for avatar images that " \
- "will be automatically requested.<br>" \
- "A reasonable value might be 102400 bytes (100 K).","options"));
connect(bs,SIGNAL(toggled(bool)),us,SLOT(setEnabled(bool)));
bs = addBoolSelector(gs,__tr2qs_ctx("Automatically accept incoming avatars","options"),KviOption_boolAutoAcceptIncomingAvatars);
- mergeTip(
- bs,
- __tr2qs_ctx("This option will cause KVIrc to auto-accept " \
- "DCC SEND requests for incoming avatars.<br>" \
- "If you're using the \"Request missing avatars\" option " \
- "above, enabling this may by useful.<br>" \
- "Avatars will be saved in the local KVIrc directory.","options"));
+ mergeTip(bs,__tr2qs_ctx("This option will cause KVIrc to auto-accept " \
+ "DCC SEND requests for incoming avatars.<br>" \
+ "If you're using the \"Request missing avatars\" option " \
+ "above, enabling this may by useful.<br>" \
+ "Avatars will be saved in the local KVIrc directory.","options"));
bs = addBoolSelector(gs,__tr2qs_ctx("Remember avatars for registered users","options"),KviOption_boolSetLastAvatarAsDefaultForRegisteredUsers);
- mergeTip(
- bs,
- __tr2qs_ctx("Use a user's last known avatar by default " \
- "(only for users that are registered).","options"));
+ mergeTip(bs,__tr2qs_ctx("Use a user's last known avatar by default " \
+ "(only for users that are registered).","options"));
us = addUIntSelector(gs,__tr2qs_ctx("Avatar offer timeout:","options"),KviOption_uintAvatarOfferTimeoutInSecs,1,99999,60);
us->setSuffix(__tr2qs_ctx(" sec","options"));
- mergeTip(us,
- __tr2qs_ctx("This is the amount of time to make an avatar available for transfer when requested.<br>" \
- "When someone sends a CTCP AVATAR request, " \
- "KVIrc will reply with a CTCP AVATAR message containing the name and size " \
- "of your avatar image.<br>" \
- "A time-limited file offer is added for the image file " \
- "to the requesting user.","options"));
+ mergeTip(us,__tr2qs_ctx("This is the amount of time to make an avatar available for transfer when requested.<br>" \
+ "When someone sends a CTCP AVATAR request, " \
+ "KVIrc will reply with a CTCP AVATAR message containing the name and size " \
+ "of your avatar image.<br>" \
+ "A time-limited file offer is added for the image file " \
+ "to the requesting user.","options"));
bs = addBoolSelector(gs,__tr2qs_ctx("Ignore requests if no avatar is set","options"),KviOption_boolIgnoreChannelAvatarRequestsWhenNoAvatarSet);
- mergeTip(bs,
- __tr2qs_ctx("This option will cause KVIrc to ignore channel CTCP AVATAR requests " \
- "when you have no avatar set. This is usually a good practice since " \
- "it helps in reducing traffic by not sending a reply that would be empty.","options"));
+ mergeTip(bs,__tr2qs_ctx("This option will cause KVIrc to ignore channel CTCP AVATAR requests " \
+ "when you have no avatar set. This is usually a good practice since " \
+ "it helps in reducing traffic by not sending a reply that would be empty.","options"));
addRowSpacer(0,3,0,3);
}