[Rqda-commits] r30 - pkg pkg/R pkg/man www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 4 17:10:38 CET 2008


Author: wincent
Date: 2008-12-04 17:10:38 +0100 (Thu, 04 Dec 2008)
New Revision: 30

Modified:
   pkg/ChangeLog
   pkg/DESCRIPTION
   pkg/R/CodeCatButton.R
   pkg/R/FileCatButton.R
   pkg/R/GUIHandler.R
   pkg/TODO
   pkg/man/RQDA-internal.rd
   pkg/man/RQDA-package.Rd
   www/ChangeLog.txt
Log:


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/ChangeLog	2008-12-04 16:10:38 UTC (rev 30)
@@ -1,3 +1,6 @@
+2008-12-05
+	* New functionality of add memo to File category and Code category.
+	
 2008-12-04
 	* Better handler colors for coding and case-mark. Now can customize colors for coding-mark 
 	(set .rqda$fore.col, default is "blue") and case-mark (set .rqda$back.col, default is "gray92").

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/DESCRIPTION	2008-12-04 16:10:38 UTC (rev 30)
@@ -1,7 +1,7 @@
 Package: RQDA
 Type: Package
 Title: Qualitative Data Analysis
-Version: 0.1.5-27
+Version: 0.1.5-30
 Date: 2008-11-01
 Author: HUANG Ronggui
 Maintainer: HUANG Ronggui <ronggui.huang at gmail.com>

Modified: pkg/R/CodeCatButton.R
===================================================================
--- pkg/R/CodeCatButton.R	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/R/CodeCatButton.R	2008-12-04 16:10:38 UTC (rev 30)
@@ -172,3 +172,49 @@
   }
           )
 }
+
+
+
+MemoWidget <- function(prefix,widget,dbTable){
+  ## prefix of window tile. E.g. "Code" ->  tile of gwindow becomes "Code Memo:"
+  ## widget of the F-cat/C-cat list, such as widget=.rqda$.fnames_rqda
+  
+  if (is_projOpen(env=.rqda,"qdacon")) {
+      Selected <- svalue(widget)
+      if (length(Selected)==0){
+        gmessage("No selection first.",icon="error",con=TRUE)
+      }
+      else {
+        tryCatch(eval(sprintf("dispose(.rqda$.%smemo)",prefix)),error=function(e) {})
+        assign(sprintf(".%smemo",prefix),gwindow(title=sprintf("%s Memo:%s",prefix,Selected),
+                                   parent=c(370,10),width=600,height=400),env=.rqda)
+        assign(sprintf(".%smemo2",prefix),
+               gpanedgroup(horizontal = FALSE, con=get(sprintf(".%smemo",prefix),env=.rqda)),
+               env=.rqda)
+        gbutton("Save Memo",con=get(sprintf(".%smemo2",prefix),env=.rqda),handler=function(h,...){
+          newcontent <- svalue(W)
+          Encoding(newcontent) <- "UTF-8"
+          newcontent <- enc(newcontent) ## take care of double quote.
+          Encoding(Selected) <- "UTF-8"
+          dbGetQuery(.rqda$qdacon,sprintf("update %s set memo='%s' where name='%s'",dbTable,newcontent,Selected))
+        }
+                )## end of save memo button
+        assign(sprintf(".%smemoW",prefix),gtext(container=get(sprintf(".%smemo2",prefix),env=.rqda),
+                                              font.attr=c(sizes="large")),env=.rqda)
+        prvcontent <- dbGetQuery(.rqda$qdacon, sprintf("select memo from %s where name='%s'",dbTable,Selected))[1,1]
+        if (is.na(prvcontent)) prvcontent <- ""
+        Encoding(prvcontent) <- "UTF-8"
+        W <- get(sprintf(".%smemoW",prefix),env=.rqda)
+        add(W,prvcontent,font.attr=c(sizes="large"),do.newline=FALSE)
+      }
+    }
+  }
+
+
+##CodeCatWidgetMenu <- list()
+##CodeCatWidgetMenu$Memo$handler <- function(h,...){
+## if (is_projOpen(env=.rqda,conName="qdacon")) {
+## MemoWidget("CodeCat",.rqda$.CodeCatWidget,"codecat")
+##}
+##}
+

Modified: pkg/R/FileCatButton.R
===================================================================
--- pkg/R/FileCatButton.R	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/R/FileCatButton.R	2008-12-04 16:10:38 UTC (rev 30)
@@ -164,3 +164,11 @@
   }
 }
 
+
+##FileCatWidgetMenu <- list()
+##FileCatWidgetMenu$Memo$handler <- function(h,...){
+## if (is_projOpen(env=.rqda,conName="qdacon")) {
+## MemoWidget("FileCat",.rqda$.FileCatWidget,"filecat")
+## see CodeCatButton.R  for definition of MemoWidget
+##}
+##}

Modified: pkg/R/GUIHandler.R
===================================================================
--- pkg/R/GUIHandler.R	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/R/GUIHandler.R	2008-12-04 16:10:38 UTC (rev 30)
@@ -149,6 +149,8 @@
     UpdateCodeofCatWidget(con=.rqda$qdacon,Widget=.rqda$.CodeofCat)
 })
 
+ addhandlerdoubleclick(.rqda$.CodeCatWidget, handler=function(h,...) MemoWidget("CodeCat",.rqda$.CodeCatWidget,"codecat"))
+
   addhandlerdoubleclick(.rqda$.CodeofCat,handler=function(h,...) {
             if (is_projOpen(env=.rqda,conName="qdacon"))  retrieval2(CodeNameWidget=.rqda$.CodeofCat)
           }
@@ -158,6 +160,8 @@
     UpdateFileofCatWidget(con=.rqda$qdacon,Widget=.rqda$.FileofCat)
 })
 
+addhandlerdoubleclick(.rqda$.FileCatWidget, handler=function(h,...) MemoWidget("FileCat",.rqda$.FileCatWidget,"filecat"))
+
 addhandlerdoubleclick(.rqda$.FileofCat, handler <- function(h,...) ViewFileFun(FileNameWidget=.rqda$.FileofCat))
 
 add3rdmousepopupmenu(.rqda$.CasesNamesWidget, CaseNamesWidgetMenu)

Modified: pkg/TODO
===================================================================
--- pkg/TODO	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/TODO	2008-12-04 16:10:38 UTC (rev 30)
@@ -8,8 +8,6 @@
 
 inter-coder reliability 
 
-f-cat and c-cat memo
-
 unmark button in Cases Tab
 
 ### less important

Modified: pkg/man/RQDA-internal.rd
===================================================================
--- pkg/man/RQDA-internal.rd	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/man/RQDA-internal.rd	2008-12-04 16:10:38 UTC (rev 30)
@@ -71,6 +71,7 @@
 \alias{AddFileToCaseMenu}
 \alias{HL_Case}
 \alias{UpdateFileofCaseWidget}
+\alias{MemoWidget}
 %% add related alias functions here.
 
 \title{Internal Functions}

Modified: pkg/man/RQDA-package.Rd
===================================================================
--- pkg/man/RQDA-package.Rd	2008-12-04 13:14:13 UTC (rev 29)
+++ pkg/man/RQDA-package.Rd	2008-12-04 16:10:38 UTC (rev 30)
@@ -13,7 +13,7 @@
 Package: \tab RQDA\cr
 Type: \tab Package\cr
 Version: \tab 0.1.5\cr
-Date: \tab 2008-11-22\cr
+Date: \tab 2008-11-30\cr
 Depends: \tab DBI, RSQLite, RGtk2, gWidgets, gWidgetsRGtk2\cr
 License: \tab New style BSD License\cr
 LazyLoad: \tab yes\cr

Modified: www/ChangeLog.txt
===================================================================
--- www/ChangeLog.txt	2008-12-04 13:14:13 UTC (rev 29)
+++ www/ChangeLog.txt	2008-12-04 16:10:38 UTC (rev 30)
@@ -1,5 +1,12 @@
+2008-12-05
+	* New functionality of add memo to File category and Code category.
+	
 2008-12-04
-	* Better handler colors for coding and case-mark. Now can customize colors for coding-mark (set .rqda$fore.col, default is "blue") and case-mark (set .rqda$back.col, default is "gray92").
+	* Better handler colors for coding and case-mark. Now can customize colors for coding-mark 
+	(set .rqda$fore.col, default is "blue") and case-mark (set .rqda$back.col, default is "gray92").
+	* Add selected file to File-category by popup menu in Files Tab.
+	* Popup menu in Cases tab to link files with selected case.
+	* Drop selected Files from Files.of.This.Case Widget by clicking popu menu.
 	
 2008-12-03
 	* Attached file to case by pop-up menu in Files Tab.



More information about the Rqda-commits mailing list