OSDN Git Service

Ring 1.10 以来となる開発環境の日本語ローカライズ版 (評価版) を追加 (ノートパッド、フォームデザイナー、対話型実行環境、ファイルの検索)。
[ring-lang-081/ring.git] / applications / formdesigner / source / mainwindow / formdesignergeneral.ring
diff --git a/applications/formdesigner/source/mainwindow/formdesignergeneral.ring b/applications/formdesigner/source/mainwindow/formdesignergeneral.ring
new file mode 100644 (file)
index 0000000..631f772
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+**     Project : Form Designer 
+**     File Purpose :  Form Designer General
+**     Date : 2017.04.29
+**     Author :  Mahmoud Fayed <msfclipper@yahoo.com>
+*/
+
+package formdesigner
+
+Class FormDesignerGeneral
+
+       oCursor =  new qCursor()
+
+       func oCursorA
+               oCursor.setShape(Qt_ArrowCursor)
+               return oCursor
+
+       func oCursorF
+               oCursor.setShape(Qt_SizeFDiagCursor)
+               return oCursor
+
+       func oCursorB
+               oCursor.setShape(Qt_SizeBDiagCursor)
+               return oCursor
+
+       func oCursorH
+               oCursor.setShape(Qt_SizeHorCursor)
+               return oCursor
+
+       func oCursorV
+               oCursor.setShape(Qt_SizeVerCursor)
+               return oCursor
+
+       func SelectColor
+               oColor = new qColorDialog()
+               aColor = oColor.GetColor()
+               oColor.delete()
+               r=hex(acolor[1]) g=hex(acolor[2]) b=hex(acolor[3])
+               if len(r) < 2 { r = "0" + r }
+               if len(g) < 2 { g = "0" + g }
+               if len(b) < 2 { b = "0" + b }
+               cColor = "#" + r + g + b
+               return cColor
+
+       func SelectFont
+               cFont = ""
+               oFontDialog = new qfontdialog() {
+                       aFont = getfont()
+               }
+               oFontDialog.delete()
+               if aFont[1] != NULL {
+                       cFont = aFont[1]
+               }
+               return cFont
+
+       func SelectFile oDesigner
+               oFileDialog = new qfiledialog(oDesigner.oView.win) {
+                       cInputFileName = getopenfilename(oDesigner.oView.win,"Open File",currentdir(),"*.*")
+               }
+               oFileDialog.delete()
+               return cInputFileName
+