OSDN Git Service

- Added the ability to do special refreshes for debugging. - Added the ability to...
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / dialog / ConfigIndexPage.java
index 44c4a42..06947bb 100644 (file)
@@ -42,6 +42,10 @@ public class ConfigIndexPage extends QWidget {
        private final QSpinBox weightSpinner;\r
        private final QSpinBox sleepSpinner;\r
        private final QCheckBox indexAttachmentsLocally;\r
+       private final QCheckBox indexImageRecognition;\r
+       private final QCheckBox indexTitle;\r
+       private final QLineEdit specialStrip;\r
+       private final QCheckBox indexBody;\r
        private final QLineEdit regexEdit;\r
        \r
        public ConfigIndexPage(QWidget parent) {\r
@@ -61,12 +65,29 @@ public class ConfigIndexPage extends QWidget {
                weightGroup.setLayout(weightLayout);\r
                \r
                // Local attachment indexing\r
-               QGroupBox attachmentGroup = new QGroupBox(tr("Attachments"));\r
+               QGroupBox attachmentGroup = new QGroupBox(tr("Content"));\r
+               indexBody = new QCheckBox(tr("Index Note Body"));\r
+               indexBody.setChecked(Global.indexNoteBody());\r
+               indexTitle = new QCheckBox(tr("Index Note Title"));\r
+               indexTitle.setChecked(Global.indexNoteTitle());\r
                indexAttachmentsLocally = new QCheckBox(tr("Index Attachments Locally"));\r
                indexAttachmentsLocally.setChecked(Global.indexAttachmentsLocally());\r
+               indexImageRecognition = new QCheckBox(tr("Index Image Recognition"));\r
+               indexImageRecognition.setChecked(Global.indexImageRecognition());\r
                \r
-               QHBoxLayout attachmentLayout = new QHBoxLayout();\r
+               specialStrip = new QLineEdit();\r
+               specialStrip.setText(Global.getSpecialIndexCharacters());\r
+               \r
+               QVBoxLayout attachmentLayout = new QVBoxLayout();\r
+               attachmentLayout.addWidget(indexBody);\r
+               attachmentLayout.addWidget(indexTitle);\r
                attachmentLayout.addWidget(indexAttachmentsLocally);\r
+               attachmentLayout.addWidget(indexImageRecognition);\r
+               \r
+               QHBoxLayout specialCharLayout = new QHBoxLayout();\r
+               specialCharLayout.addWidget(new QLabel(tr("Special Word Characters")));\r
+               specialCharLayout.addWidget(specialStrip);\r
+               attachmentLayout.addLayout(specialCharLayout);\r
                attachmentGroup.setLayout(attachmentLayout);\r
 \r
                // Index sleep interval\r
@@ -112,6 +133,18 @@ public class ConfigIndexPage extends QWidget {
        public boolean getIndexAttachmentsLocally() {\r
                return indexAttachmentsLocally.isChecked();\r
        }\r
+       public boolean getIndexNoteBody() {\r
+               return indexBody.isChecked();\r
+       }\r
+       public boolean getIndexNoteTitle() {\r
+               return indexTitle.isChecked();\r
+       }\r
+       public String getSpecialCharacters() {\r
+               return specialStrip.text();\r
+       }\r
+       public boolean getIndexImageRecognition() {\r
+               return indexImageRecognition.isChecked();\r
+       }\r
        \r
        //*****************************************\r
        //* Word length get/set methods \r