~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/options/optw_highlighting.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _OPTW_HIGHLIGHTING_CPP_
2
 
#define _OPTW_HIGHLIGHTING_CPP_
3
 
//=============================================================================
4
 
//
5
 
//   File : optw_highlighting.cpp
6
 
//   Creation date : Sat Nov  3 18:09:35 2001 GMT by Szymon Stefanek
7
 
//
8
 
//   This file is part of the KVirc irc client distribution
9
 
//   Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net)
10
 
//
11
 
//   This program is FREE software. You can redistribute it and/or
12
 
//   modify it under the terms of the GNU General Public License
13
 
//   as published by the Free Software Foundation; either version 2
14
 
//   of the License, or (at your opinion) any later version.
15
 
//
16
 
//   This program is distributed in the HOPE that it will be USEFUL,
17
 
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
 
//   See the GNU General Public License for more details.
20
 
//
21
 
//   You should have received a copy of the GNU General Public License
22
 
//   along with this program. If not, write to the Free Software Foundation,
23
 
//   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
 
//
25
 
//=============================================================================
26
 
 
27
 
#include "optw_highlighting.h"
28
 
#include "kvi_options.h"
29
 
#include "kvi_locale.h"
30
 
 
31
 
#include <QLayout>
32
 
#include <QLabel>
33
 
 
34
 
KviAlertHighlightingOptionsWidget::KviAlertHighlightingOptionsWidget(QWidget * parent)
35
 
: KviOptionsWidget(parent)
36
 
{
37
 
        setObjectName("highlighting_options_widget");
38
 
}
39
 
 
40
 
KviAlertHighlightingOptionsWidget::~KviAlertHighlightingOptionsWidget()
41
 
{
42
 
}
43
 
 
44
 
 
45
 
KviHighlightingOptionsWidget::KviHighlightingOptionsWidget(QWidget * parent)
46
 
: KviOptionsWidget(parent)
47
 
{
48
 
        setObjectName("highlighting_options_widget");
49
 
 
50
 
        createLayout();
51
 
 
52
 
        KviBoolSelector * b;
53
 
 
54
 
        connect(
55
 
                addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable word highlighting","options"),KviOption_boolUseWordHighlighting),
56
 
                SIGNAL(toggled(bool)),
57
 
                addStringListSelector(0,1,0,1,__tr2qs_ctx("Words to highlight:","options"),KviOption_stringlistHighlightWords,KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting)),
58
 
                SLOT(setEnabled(bool)));
59
 
 
60
 
        connect(
61
 
                addBoolSelector(0,2,0,2,__tr2qs_ctx("Highlight every occurence of a word inside text","options"),KviOption_boolUseFullWordHighlighting),
62
 
                SIGNAL(toggled(bool)),
63
 
                addStringSelector(0,3,0,3,__tr2qs_ctx("Highlight only whole words using these word splitters:","options"),KviOption_stringWordSplitters,!KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting)),
64
 
                SLOT(setDisabled(bool)));
65
 
 
66
 
 
67
 
        // This can be used even without Word highlighting
68
 
        b = addBoolSelector(0,4,0,4,__tr2qs_ctx("Highlight messages containing my nickname","options"),KviOption_boolAlwaysHighlightNick);
69
 
        mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will highlight any user message containing your current nickname</center>","options"));
70
 
        b = addBoolSelector(0,5,0,5,__tr2qs_ctx("Flash the system taskbar entry on highlighted messages","options"),KviOption_boolFlashWindowOnHighlightedMessages);
71
 
        mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will (attempt to) flash the system taskbar entry when a highlighted message is printed and KVIrc is not the active window</center>","options"));
72
 
        b = addBoolSelector(0,6,0,6,__tr2qs_ctx("Popup the notifier window on highlighted messages","options"),KviOption_boolPopupNotifierOnHighlightedMessages);
73
 
        mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will popup a little notifier window in the low right corner of your desktop when a highlighted message is printed and KVIrc is not the active window</center>","options"));
74
 
 
75
 
        addRowSpacer(0,7,0,7);
76
 
}
77
 
 
78
 
KviHighlightingOptionsWidget::~KviHighlightingOptionsWidget()
79
 
{
80
 
}
81
 
 
82
 
 
83
 
KviAlertOptionsWidget::KviAlertOptionsWidget(QWidget * parent)
84
 
: KviOptionsWidget(parent)
85
 
{
86
 
        setObjectName("highlighting_options_widget");
87
 
 
88
 
        createLayout();
89
 
 
90
 
        KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Alert Restrictions","options"));
91
 
        KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Restrict alert","options"),KviOption_boolHighlightOnlyNormalMsg);
92
 
        mergeTip(b3, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the window list only if a normal message is received in a channel.<br>Actions like joins, parts and mode changes will be ignored.<br> This is useful if you are in channels with a high rate of traffic and only want to be alerted for messages that are interesting to you.</center>","options"));
93
 
 
94
 
        KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Alert for highlighted words","options"),KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
95
 
        mergeTip(b4, __tr2qs_ctx("<center>If this option is enabled, the window list will also alert for messages which contain a word from the highlighted words list above.</center>","options"));
96
 
 
97
 
        KviBoolSelector * b5 = addBoolSelector(g,__tr2qs_ctx("Alert for query messages","options"),KviOption_boolHighlightOnlyNormalMsgQueryToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
98
 
        mergeTip(b5, __tr2qs_ctx("<center>If this option is enabled, the window list will also alert for messages which are shown in queries.</center>","options"));
99
 
        connect(b3,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool)));
100
 
        connect(b3,SIGNAL(toggled(bool)),b5,SLOT(setEnabled(bool)));
101
 
 
102
 
        KviBoolSelector * b6 = addBoolSelector(g,__tr2qs_ctx("Use custom alert level","options"),KviOption_boolHighlightOnlyAtCostumHighlightLevel);
103
 
        mergeTip(b6, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the window list only if the specified alert level is reached.</center>","options"));
104
 
 
105
 
        KviUIntSelector * b7 = addUIntSelector(g,__tr2qs_ctx("Minimum alert level:","options"),KviOption_uintMinHighlightLevel,1,KVI_MSGTYPE_MAXLEVEL,KVI_MSGTYPE_MAXLEVEL,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
106
 
        b7->setEnabled(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
107
 
        mergeTip(b7, __tr2qs_ctx("<center>This option sets the minimum alert level for the window list.</center>","options"));
108
 
        connect(b6,SIGNAL(toggled(bool)),b7,SLOT(setEnabled(bool)));
109
 
 
110
 
        addRowSpacer(0,1,0,1);
111
 
}
112
 
 
113
 
KviAlertOptionsWidget::~KviAlertOptionsWidget()
114
 
{
115
 
}
116
 
 
117
 
 
118
 
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
119
 
#include "m_optw_highlighting.moc"
120
 
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES
121
 
 
122
 
#endif //_OPTW_HIGHLIGHTING_CPP_