OSDN Git Service

データベースステータスページで連想ノートクリック回数を表示できるようにした
authoryuki <kimaira7@gmail.com>
Tue, 10 Sep 2013 04:44:15 +0000 (13:44 +0900)
committeryuki <kimaira7@gmail.com>
Tue, 10 Sep 2013 04:44:15 +0000 (13:44 +0900)
src/cx/fbn/nevernote/NeverNote.java
src/cx/fbn/nevernote/dialog/DatabaseStatus.java
src/cx/fbn/nevernote/sql/HistoryTable.java

index c2c7466..11befe2 100644 (file)
@@ -2965,6 +2965,7 @@ public class NeverNote extends QMainWindow{
                status.setResourceCount(conn.getNoteTable().noteResourceTable.getResourceCount());
                status.setWordCount(conn.getWordsTable().getWordCount());
                status.setHistoryCount(conn.getHistoryTable().getHistoryCount());
                status.setResourceCount(conn.getNoteTable().noteResourceTable.getResourceCount());
                status.setWordCount(conn.getWordsTable().getWordCount());
                status.setHistoryCount(conn.getHistoryTable().getHistoryCount());
+               status.setRensoClickCount(conn.getHistoryTable().getRensoClickCount());
                waitCursor(false);
                status.exec();
        }
                waitCursor(false);
                status.exec();
        }
index c13b54e..6d3f189 100644 (file)
@@ -44,6 +44,7 @@ public class DatabaseStatus extends QDialog {
        QLabel indexCount;\r
        QLabel resourceIndexNeeded;\r
        QLabel historyCount;\r
        QLabel indexCount;\r
        QLabel resourceIndexNeeded;\r
        QLabel historyCount;\r
+       QLabel rensoClickCount;\r
        private final QPushButton ok;\r
     private final String iconPath = new String("classpath:cx/fbn/nevernote/icons/");\r
        \r
        private final QPushButton ok;\r
     private final String iconPath = new String("classpath:cx/fbn/nevernote/icons/");\r
        \r
@@ -63,6 +64,7 @@ public class DatabaseStatus extends QDialog {
                resourceIndexNeeded = new QLabel();\r
                indexCount = new QLabel();\r
                historyCount = new QLabel();\r
                resourceIndexNeeded = new QLabel();\r
                indexCount = new QLabel();\r
                historyCount = new QLabel();\r
+               rensoClickCount = new QLabel();\r
                \r
                grid.addWidget(new QLabel(tr("Notebooks:")), 0,0);\r
                grid.addWidget(notebookCount, 0,1);\r
                \r
                grid.addWidget(new QLabel(tr("Notebooks:")), 0,0);\r
                grid.addWidget(notebookCount, 0,1);\r
@@ -94,11 +96,14 @@ public class DatabaseStatus extends QDialog {
                grid.addWidget(new QLabel(tr("Tobal Behavior History:")), 9, 0);\r
                grid.addWidget(historyCount, 9,1);\r
                \r
                grid.addWidget(new QLabel(tr("Tobal Behavior History:")), 9, 0);\r
                grid.addWidget(historyCount, 9,1);\r
                \r
+               grid.addWidget(new QLabel(tr("Renso Note Click:")), 10, 0);\r
+               grid.addWidget(rensoClickCount, 10, 1);\r
+               \r
                QGridLayout buttonLayout = new QGridLayout();\r
                ok = new QPushButton(tr("OK"));\r
                ok.clicked.connect(this, "okPushed()");\r
                buttonLayout.addWidget(ok, 1, 1);\r
                QGridLayout buttonLayout = new QGridLayout();\r
                ok = new QPushButton(tr("OK"));\r
                ok.clicked.connect(this, "okPushed()");\r
                buttonLayout.addWidget(ok, 1, 1);\r
-               grid.addLayout(buttonLayout,10,1);\r
+               grid.addLayout(buttonLayout,11,1);\r
        }\r
        \r
        @SuppressWarnings("unused")\r
        }\r
        \r
        @SuppressWarnings("unused")\r
@@ -135,6 +140,9 @@ public class DatabaseStatus extends QDialog {
        public void setHistoryCount(int d) {\r
                historyCount.setText(NumberFormat.getInstance().format(d));\r
        }\r
        public void setHistoryCount(int d) {\r
                historyCount.setText(NumberFormat.getInstance().format(d));\r
        }\r
+       public void setRensoClickCount(int d) {\r
+               rensoClickCount.setText(NumberFormat.getInstance().format(d));\r
+       }\r
        public QPushButton getOkButton() {\r
                return ok;\r
        }\r
        public QPushButton getOkButton() {\r
                return ok;\r
        }\r
index a00d30b..0d16a11 100644 (file)
@@ -315,4 +315,13 @@ public class HistoryTable {
                int returnValue = new Integer(query.valueString(0));
                return returnValue;
        }
                int returnValue = new Integer(query.valueString(0));
                return returnValue;
        }
+       
+       // 連想ノートクリック回数を取得
+       public int getRensoClickCount() {
+               NSqlQuery query = new NSqlQuery(db.getBehaviorConnection());
+               query.exec("Select count(*) from History where behaviorType='rensoItemClick'");
+               query.next();
+               int returnValue = new Integer(query.valueString(0));
+               return returnValue;
+       }
 }
 }