[Rqda-commits] r31 - pkg pkg/R pkg/man www
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 5 03:43:45 CET 2008
Author: wincent
Date: 2008-12-05 03:43:44 +0100 (Fri, 05 Dec 2008)
New Revision: 31
Modified:
pkg/ChangeLog
pkg/DESCRIPTION
pkg/R/CaseButton.R
pkg/R/CodeCatButton.R
pkg/R/FileCatButton.R
pkg/R/GUIHandler.R
pkg/R/root_gui.R
pkg/TODO
pkg/man/RQDA-package.Rd
www/index.html
Log:
Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/ChangeLog 2008-12-05 02:43:44 UTC (rev 31)
@@ -1,5 +1,7 @@
2008-12-05
* New functionality of add memo to File category and Code category.
+ * Reorganize the memo for Cases. Now opem case memo by double-click or popup menu
+ * Unmark button for cases.
2008-12-04
* Better handler colors for coding and case-mark. Now can customize colors for coding-mark
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/DESCRIPTION 2008-12-05 02:43:44 UTC (rev 31)
@@ -1,7 +1,7 @@
Package: RQDA
Type: Package
Title: Qualitative Data Analysis
-Version: 0.1.5-30
+Version: 0.1.5-31
Date: 2008-11-01
Author: HUANG Ronggui
Maintainer: HUANG Ronggui <ronggui.huang at gmail.com>
Modified: pkg/R/CaseButton.R
===================================================================
--- pkg/R/CaseButton.R 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/R/CaseButton.R 2008-12-05 02:43:44 UTC (rev 31)
@@ -57,6 +57,7 @@
CaseMemoButton <- function(label="Memo",...){
+## no longer used
gbutton(label, handler=function(h,...) {
## code memo: such as meaning of code etc.
if (is_projOpen(env=.rqda,"qdacon")) {
@@ -124,51 +125,83 @@
}
-AddWebSearchButton <- function(label="WebSearch",CaseNamesWidget=.rqda$.CasesNamesWidget){
- gbutton(label,handler=function(h,...) {
- if (is_projOpen(env=.rqda,conName="qdacon")) {
- KeyWord <- svalue(CaseNamesWidget)
- engine <- select.list(c("Baidu","Google","Yahoo"))
- if (engine=="Baidu") {
- KeyWord <- iconv(KeyWord, from="UTF-8")
- browseURL(sprintf("http://www.baidu.com/s?wd=%s",paste("%",paste(charToRaw(KeyWord),sep="",collapse="%"),sep="",collapse="")))
- }
- if (engine=="Yahoo") {
- KeyWord <- iconv(KeyWord, from="UTF-8")
- browseURL(sprintf("http://search.yahoo.com/search;_ylt=A0oGkmFV.CZJNssAOK.l87UF?p=%s&ei=UTF-8&iscqry=&fr=sfp&fr2=sfp"
- ,KeyWord))
- }
+
+CaseUnMark_Button<-function(label="Unmark"){
+ gbutton(label,
+ handler=function(h,...) {
+ if (is_projOpen(env=.rqda,conName="qdacon")) {
+ con <- .rqda$qdacon
+ W <- tryCatch(get(h$action$widget,env=.rqda),error=function(e){})
+ ## get the widget for file display. If it does not exist, then return NULL.
+ sel_index <- tryCatch(sindex(W),error=function(e) {})
+ ## if the not file is open, unmark doesn't work.
+ if (!is.null(sel_index)) {
+ SelectedCase <- svalue(.rqda$.CasesNamesWidget)
+ ## Encoding(SelectedCase) <- "UTF-8"
+ caseid <- dbGetQuery(.rqda$qdacon,sprintf("select id from cases where name=='%s'",SelectedCase))[,1]
+ SelectedFile <- svalue(.rqda$.root_edit)
+ ## Encoding(SelectedFile) <- "UTF-8"
+ currentFid <- dbGetQuery(con,sprintf("select id from source where name=='%s'", SelectedFile))[,1]
+ codings_index <- dbGetQuery(con,sprintf("select rowid, caseid, fid, selfirst, selend from caselinkage where caseid==%i and fid==%i", caseid, currentFid))
+ ## should only work with those related to current case and current file.
+ rowid <- codings_index$rowid[(codings_index$selfirst >= sel_index$startN) &
+ (codings_index$selend <= sel_index$endN)]
+ if (is.numeric(rowid)) for (j in rowid) {
+ dbGetQuery(con,sprintf("update caselinkage set status=0 where rowid=%i", j))
+ }
+ ## better to get around the loop by sqlite condition expression.
+ ClearMark(W,min=sel_index$startN,max=sel_index$endN,clear.fore.col = FALSE, clear.back.col = TRUE)
+ ## even for the non-current code. can improve.
+ }
+ }},action=list(widget=".openfile_gui")
+ )
+ }
+
+ AddWebSearchButton <- function(label="WebSearch",CaseNamesWidget=.rqda$.CasesNamesWidget){
+ gbutton(label,handler=function(h,...) {
+ if (is_projOpen(env=.rqda,conName="qdacon")) {
+ KeyWord <- svalue(CaseNamesWidget)
+ engine <- select.list(c("Baidu","Google","Yahoo"))
+ if (engine=="Baidu") {
+ KeyWord <- iconv(KeyWord, from="UTF-8")
+ browseURL(sprintf("http://www.baidu.com/s?wd=%s",paste("%",paste(charToRaw(KeyWord),sep="",collapse="%"),sep="",collapse="")))
+ }
+ if (engine=="Yahoo") {
+ KeyWord <- iconv(KeyWord, from="UTF-8")
+ browseURL(sprintf("http://search.yahoo.com/search;_ylt=A0oGkmFV.CZJNssAOK.l87UF?p=%s&ei=UTF-8&iscqry=&fr=sfp&fr2=sfp"
+ ,KeyWord))
+ }
if (engine=="Google")browseURL(sprintf("http://www.google.com/search?q=%s",KeyWord))
+ }
}
- }
- )
+ )
}
-
-CaseNamesWidgetMenu <- list()
-CaseNamesWidgetMenu$WebSearch$Baidu$handler <- function(h,...){
+
+ CaseNamesWidgetMenu <- list()
+ CaseNamesWidgetMenu$WebSearch$Baidu$handler <- function(h,...){
KeyWord <- svalue(.rqda$.CasesNamesWidget)
if (length(KeyWord)!=0){
KeyWord <- iconv(KeyWord, from="UTF-8")
browseURL(sprintf("http://www.baidu.com/s?wd=%s",paste("%",paste(charToRaw(KeyWord),sep="",collapse="%"),sep="",collapse="")))
-}
-}
+ }
+ }
CaseNamesWidgetMenu$WebSearch$Google$handler <- function(h,...){
- KeyWord <- svalue(.rqda$.CasesNamesWidget)
- if (length(KeyWord)!=0){
+ KeyWord <- svalue(.rqda$.CasesNamesWidget)
+ if (length(KeyWord)!=0){
KeyWord <- iconv(KeyWord, from="UTF-8")
browseURL(sprintf("http://www.google.com/search?q=%s",KeyWord))
+ }
}
-}
-CaseNamesWidgetMenu$WebSearch$Yahoo$handler <- function(h,...){
+ CaseNamesWidgetMenu$WebSearch$Yahoo$handler <- function(h,...){
KeyWord <- svalue(.rqda$.CasesNamesWidget)
if (length(KeyWord)!=0){
KeyWord <- iconv(KeyWord, from="UTF-8")
browseURL(sprintf("http://search.yahoo.com/search;_ylt=A0oGkmFV.CZJNssAOK.l87UF?p=%s&ei=UTF-8&iscqry=&fr=sfp&fr2=sfp"
,KeyWord))
+ }
}
-}
-
-CaseNamesWidgetMenu$"AddFile(s)"$handler <- function(h, ...) {
+
+ CaseNamesWidgetMenu$"AddFile(s)"$handler <- function(h, ...) {
if (is_projOpen(env = .rqda, conName = "qdacon", message = FALSE)) {
SelectedCase <- svalue(.rqda$.CasesNamesWidget)
caseid <- dbGetQuery(.rqda$qdacon,sprintf("select id from cases where status=1 and name='%s'",SelectedCase))[,1]
@@ -191,19 +224,26 @@
}
}
}
-
-
-
-## pop-up menu of .rqda$.FileofCase
+
+
+CaseNamesWidgetMenu$Memo$handler <- function(h,...){
+ if (is_projOpen(env=.rqda,conName="qdacon")) {
+ MemoWidget("Case",.rqda$.CasesNamesWidget,"cases")
+ ## see CodeCatButton.R for definition of MemoWidget
+}
+}
+
+
+ ## pop-up menu of .rqda$.FileofCase
FileofCaseWidgetMenu <- list() ## not used yet.
-FileofCaseWidgetMenu$"DropFile(s)"$handler <- function(h, ...) {
- if (is_projOpen(env = .rqda, conName = "qdacon", message = FALSE)) {
- FileOfCat <- svalue(.rqda$.FileofCase)
- if ((NumofSelected <- length(FileOfCat)) ==0) {
+ FileofCaseWidgetMenu$"DropFile(s)"$handler <- function(h, ...) {
+ if (is_projOpen(env = .rqda, conName = "qdacon", message = FALSE)) {
+ FileOfCat <- svalue(.rqda$.FileofCase)
+ if ((NumofSelected <- length(FileOfCat)) ==0) {
gmessage("Please select the Files you want to delete.",con=TRUE)} else
- {
- ## Give a confirm msg
- del <- gconfirm(sprintf("Delete %i file(s) from this category. Are you sure?",NumofSelected),con=TRUE,icon="question")
+ {
+ ## Give a confirm msg
+ del <- gconfirm(sprintf("Delete %i file(s) from this category. Are you sure?",NumofSelected),con=TRUE,icon="question")
if (isTRUE(del)){
SelectedCase <- svalue(.rqda$.CasesNamesWidget)
## Encoding(SelectedCase) <- Encoding(FileOfCat)<- "UTF-8"
@@ -215,9 +255,7 @@
## update Widget
UpdateFileofCaseWidget()
}
- }
+ }
}
-}
-
-
-
+ }
+
Modified: pkg/R/CodeCatButton.R
===================================================================
--- pkg/R/CodeCatButton.R 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/R/CodeCatButton.R 2008-12-05 02:43:44 UTC (rev 31)
@@ -185,7 +185,7 @@
gmessage("No selection first.",icon="error",con=TRUE)
}
else {
- tryCatch(eval(sprintf("dispose(.rqda$.%smemo)",prefix)),error=function(e) {})
+ tryCatch(eval(parse(text=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),
@@ -211,10 +211,10 @@
}
-##CodeCatWidgetMenu <- list()
-##CodeCatWidgetMenu$Memo$handler <- function(h,...){
-## if (is_projOpen(env=.rqda,conName="qdacon")) {
-## MemoWidget("CodeCat",.rqda$.CodeCatWidget,"codecat")
-##}
-##}
+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 16:10:38 UTC (rev 30)
+++ pkg/R/FileCatButton.R 2008-12-05 02:43:44 UTC (rev 31)
@@ -165,10 +165,10 @@
}
-##FileCatWidgetMenu <- list()
-##FileCatWidgetMenu$Memo$handler <- function(h,...){
-## if (is_projOpen(env=.rqda,conName="qdacon")) {
-## MemoWidget("FileCat",.rqda$.FileCatWidget,"filecat")
+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 16:10:38 UTC (rev 30)
+++ pkg/R/GUIHandler.R 2008-12-05 02:43:44 UTC (rev 31)
@@ -115,8 +115,8 @@
## }
## )
+ addhandlerdoubleclick(.rqda$.CasesNamesWidget, handler=function(h,...) MemoWidget("Case",.rqda$.CasesNamesWidget,"cases"))
-
addHandlerClicked(.rqda$.CasesNamesWidget,handler <- function(h,...){
CaseNamesUpdate(.rqda$.CasesNamesWidget)
con <- .rqda$qdacon
@@ -150,6 +150,7 @@
})
addhandlerdoubleclick(.rqda$.CodeCatWidget, handler=function(h,...) MemoWidget("CodeCat",.rqda$.CodeCatWidget,"codecat"))
+ add3rdmousepopupmenu(.rqda$.CodeCatWidget, CodeCatWidgetMenu)
addhandlerdoubleclick(.rqda$.CodeofCat,handler=function(h,...) {
if (is_projOpen(env=.rqda,conName="qdacon")) retrieval2(CodeNameWidget=.rqda$.CodeofCat)
@@ -162,6 +163,9 @@
addhandlerdoubleclick(.rqda$.FileCatWidget, handler=function(h,...) MemoWidget("FileCat",.rqda$.FileCatWidget,"filecat"))
+add3rdmousepopupmenu(.rqda$.FileCatWidget, FileCatWidgetMenu)
+
+
addhandlerdoubleclick(.rqda$.FileofCat, handler <- function(h,...) ViewFileFun(FileNameWidget=.rqda$.FileofCat))
add3rdmousepopupmenu(.rqda$.CasesNamesWidget, CaseNamesWidgetMenu)
Modified: pkg/R/root_gui.R
===================================================================
--- pkg/R/root_gui.R 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/R/root_gui.R 2008-12-05 02:43:44 UTC (rev 31)
@@ -35,7 +35,7 @@
glabel(
"Author: <ronggui.huang at gmail.com>\n
License: New style BSD License\n
-Version: 0.1.5 rev 28\n",
+Version: 0.1.5 rev 31\n",
container=.proj_gui)
@@ -86,7 +86,8 @@
.case_buttons[1,1] <- AddCaseButton()
.case_buttons[1,2] <- DeleteCaseButton()
.case_buttons[1,3] <- Case_RenameButton()
- .case_buttons[1,4] <- CaseMemoButton()
+ ##.case_buttons[1,4] <- CaseMemoButton()
+ .case_buttons[1,4] <- CaseUnMark_Button()
.case_buttons[1,5] <- CaseMark_Button()
##.case_buttons[2,3] <- AddWebSearchButton("WebSearch") # use popup menu instead
Modified: pkg/TODO
===================================================================
--- pkg/TODO 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/TODO 2008-12-05 02:43:44 UTC (rev 31)
@@ -8,7 +8,5 @@
inter-coder reliability
-unmark button in Cases Tab
-
### less important
should add document on the table structure.
Modified: pkg/man/RQDA-package.Rd
===================================================================
--- pkg/man/RQDA-package.Rd 2008-12-04 16:10:38 UTC (rev 30)
+++ pkg/man/RQDA-package.Rd 2008-12-05 02:43:44 UTC (rev 31)
@@ -13,7 +13,7 @@
Package: \tab RQDA\cr
Type: \tab Package\cr
Version: \tab 0.1.5\cr
-Date: \tab 2008-11-30\cr
+Date: \tab 2008-11-31\cr
Depends: \tab DBI, RSQLite, RGtk2, gWidgets, gWidgetsRGtk2\cr
License: \tab New style BSD License\cr
LazyLoad: \tab yes\cr
Modified: www/index.html
===================================================================
--- www/index.html 2008-12-04 16:10:38 UTC (rev 30)
+++ www/index.html 2008-12-05 02:43:44 UTC (rev 31)
@@ -47,6 +47,7 @@
<li>Show the temporary deletion files and codes
<li>Undo the temporary deletion
<li>Permanently erase the temporary deletion
+<li>Import a batch of files (function write.FileList)
<p>Other functions may be added with the development of the software in the future. Click <A HREF="ChangeLog.txt">here</A> to see the <B>new features</B>.
@@ -116,8 +117,7 @@
<p>
<h1>Screenshots</h1>
-<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><IMG SRC="Main.png" NAME="Main GUI" ALIGN=LEFT BORDER=0><BR CLEAR=LEFT><BR>
-</P>
+<A HREF="Main.png" target="_blank">Main Window</A>
</BODY>
</HTML>
\ No newline at end of file
More information about the Rqda-commits
mailing list