From: yuki Date: Tue, 10 Sep 2013 04:44:15 +0000 (+0900) Subject: データベースステータスページで連想ノートクリック回数を表示できるようにした X-Git-Tag: version0.3^2~3 X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=commitdiff_plain;h=b7734ce984fb1c79897320bc20f2d533715ad680;ds=sidebyside データベースステータスページで連想ノートクリック回数を表示できるようにした --- diff --git a/src/cx/fbn/nevernote/NeverNote.java b/src/cx/fbn/nevernote/NeverNote.java index c2c7466..11befe2 100644 --- a/src/cx/fbn/nevernote/NeverNote.java +++ b/src/cx/fbn/nevernote/NeverNote.java @@ -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.setRensoClickCount(conn.getHistoryTable().getRensoClickCount()); waitCursor(false); status.exec(); } diff --git a/src/cx/fbn/nevernote/dialog/DatabaseStatus.java b/src/cx/fbn/nevernote/dialog/DatabaseStatus.java index c13b54e..6d3f189 100644 --- a/src/cx/fbn/nevernote/dialog/DatabaseStatus.java +++ b/src/cx/fbn/nevernote/dialog/DatabaseStatus.java @@ -44,6 +44,7 @@ public class DatabaseStatus extends QDialog { QLabel indexCount; QLabel resourceIndexNeeded; QLabel historyCount; + QLabel rensoClickCount; private final QPushButton ok; private final String iconPath = new String("classpath:cx/fbn/nevernote/icons/"); @@ -63,6 +64,7 @@ public class DatabaseStatus extends QDialog { resourceIndexNeeded = new QLabel(); indexCount = new QLabel(); historyCount = new QLabel(); + rensoClickCount = new QLabel(); grid.addWidget(new QLabel(tr("Notebooks:")), 0,0); grid.addWidget(notebookCount, 0,1); @@ -94,11 +96,14 @@ public class DatabaseStatus extends QDialog { grid.addWidget(new QLabel(tr("Tobal Behavior History:")), 9, 0); grid.addWidget(historyCount, 9,1); + grid.addWidget(new QLabel(tr("Renso Note Click:")), 10, 0); + grid.addWidget(rensoClickCount, 10, 1); + QGridLayout buttonLayout = new QGridLayout(); ok = new QPushButton(tr("OK")); ok.clicked.connect(this, "okPushed()"); buttonLayout.addWidget(ok, 1, 1); - grid.addLayout(buttonLayout,10,1); + grid.addLayout(buttonLayout,11,1); } @SuppressWarnings("unused") @@ -135,6 +140,9 @@ public class DatabaseStatus extends QDialog { public void setHistoryCount(int d) { historyCount.setText(NumberFormat.getInstance().format(d)); } + public void setRensoClickCount(int d) { + rensoClickCount.setText(NumberFormat.getInstance().format(d)); + } public QPushButton getOkButton() { return ok; } diff --git a/src/cx/fbn/nevernote/sql/HistoryTable.java b/src/cx/fbn/nevernote/sql/HistoryTable.java index a00d30b..0d16a11 100644 --- a/src/cx/fbn/nevernote/sql/HistoryTable.java +++ b/src/cx/fbn/nevernote/sql/HistoryTable.java @@ -315,4 +315,13 @@ public class HistoryTable { 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; + } }