OSDN Git Service

コピーライトの表示を修正。
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / dialog / ConfigSpellPage.java
1 /*\r
2  * This file is part of NixNote/NeighborNote \r
3  * Copyright 2009 Randy Baumgarte\r
4  * \r
5  * This file may be licensed under the terms of of the\r
6  * GNU General Public License Version 2 (the ``GPL'').\r
7  *\r
8  * Software distributed under the License is distributed\r
9  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either\r
10  * express or implied. See the GPL for the specific language\r
11  * governing rights and limitations.\r
12  *\r
13  * You should have received a copy of the GPL along with this\r
14  * program. If not, go to http://www.gnu.org/licenses/gpl.html\r
15  * or write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
17  *\r
18 */\r
19 \r
20 \r
21 \r
22 //**********************************************\r
23 //**********************************************\r
24 //* This dialog is the debugging information \r
25 //* page used in the Edit/Preferences dialog.  \r
26 //* It is the spelling dialog.\r
27 //**********************************************\r
28 //**********************************************\r
29 package cx.fbn.nevernote.dialog;\r
30 \r
31 import com.swabunga.spell.engine.Configuration;\r
32 import com.trolltech.qt.gui.QCheckBox;\r
33 import com.trolltech.qt.gui.QVBoxLayout;\r
34 import com.trolltech.qt.gui.QWidget;\r
35 \r
36 import cx.fbn.nevernote.Global;\r
37 \r
38 public class ConfigSpellPage extends QWidget {\r
39         \r
40 \r
41         private final QCheckBox ignoreDigitWords;\r
42         private final QCheckBox ignoreInternetAddresses;\r
43         private final QCheckBox ignoreMixedCase;\r
44         private final QCheckBox ignoreUpperCase;\r
45         private final QCheckBox ignoreSentenceCapitalization;\r
46 \r
47         \r
48         public ConfigSpellPage(QWidget parent) {        \r
49                 ignoreDigitWords = new QCheckBox(tr("Ignore words with numbers in them"));\r
50                 ignoreInternetAddresses = new QCheckBox(tr("Ignore internet addresses (i.e. http:// ftp://)"));\r
51                 ignoreMixedCase = new QCheckBox(tr("Ignore words with upper and lower cased letters"));\r
52                 ignoreUpperCase = new QCheckBox(tr("Ignore upper cased words"));\r
53                 ignoreSentenceCapitalization = new QCheckBox(tr("Ignore that sentences should begin with a capital letter"));\r
54                 \r
55                 setIgnoreDigitWords(Global.getSpellSetting(Configuration.SPELL_IGNOREDIGITWORDS));\r
56                 setIgnoreInternetAddresses(Global.getSpellSetting(Configuration.SPELL_IGNOREINTERNETADDRESSES));\r
57                 setIgnoreMixedCase(Global.getSpellSetting(Configuration.SPELL_IGNOREMIXEDCASE));\r
58                 setIgnoreUpperCase(Global.getSpellSetting(Configuration.SPELL_IGNOREUPPERCASE));\r
59                 setIgnoreSentenceCapitalization(Global.getSpellSetting(Configuration.SPELL_IGNORESENTENCECAPITALIZATION));\r
60                 \r
61                 QVBoxLayout mainLayout = new QVBoxLayout();\r
62                 mainLayout.addWidget(ignoreDigitWords);\r
63                 mainLayout.addWidget(ignoreInternetAddresses);\r
64                 mainLayout.addWidget(ignoreMixedCase);\r
65                 mainLayout.addWidget(ignoreUpperCase);\r
66                 mainLayout.addWidget(ignoreSentenceCapitalization);\r
67                 mainLayout.addStretch(1);\r
68                 setLayout(mainLayout);\r
69         }\r
70         \r
71         //****************************************\r
72         //* Getter/Setter for ignore digit words *\r
73         //****************************************\r
74         public boolean getIgnoreDigitWords() {\r
75                 return ignoreDigitWords.isChecked();\r
76         }\r
77         public void setIgnoreDigitWords(boolean value) {\r
78                 ignoreDigitWords.setChecked(value);\r
79         }\r
80         \r
81         //***********************************************\r
82         //* Getter/Setter for ignore internet addresses *\r
83         //***********************************************\r
84         public boolean getIgnoreInternetAddresses() {\r
85                 return ignoreInternetAddresses.isChecked();\r
86         }\r
87         public void setIgnoreInternetAddresses(boolean value) {\r
88                 ignoreInternetAddresses.setChecked(value);\r
89         }\r
90         \r
91         //*********************************************\r
92         //* Getter/Setter for ignore Mixed Case words *\r
93         //*********************************************\r
94         public boolean getIgnoreMixedCase() {\r
95                 return ignoreMixedCase.isChecked();\r
96         }\r
97         public void setIgnoreMixedCase(boolean value) {\r
98                 ignoreMixedCase.setChecked(value);\r
99         }\r
100         \r
101         //*********************************************\r
102         //* Getter/Setter for ignore Mixed Case words *\r
103         //*********************************************\r
104         public boolean getIgnoreUpperCase() {\r
105                 return ignoreUpperCase.isChecked();\r
106         }\r
107         public void setIgnoreUpperCase(boolean value) {\r
108                 ignoreUpperCase.setChecked(value);\r
109         }\r
110         \r
111         //****************************************************************\r
112         //* Getter/Setter for ignore that sentences begin with a capital *\r
113         //****************************************************************\r
114         public boolean getIgnoreSentenceCapitalization() {\r
115                 return ignoreSentenceCapitalization.isChecked();\r
116         }\r
117         public void setIgnoreSentenceCapitalization(boolean value) {\r
118                 ignoreSentenceCapitalization.setChecked(value);\r
119         }\r
120 \r
121 }\r