2010-04-08 17:21 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbqt/hbqt_hbqplaintextedit.cpp
    ! Removed some debug calls.

  + contrib/hbide/resources/shortcuts.ui
  + contrib/hbide/resources/shortcuts.uic
    + Added shortcuts interface widget.
    
  * contrib/hbide/resources/themesex.ui
  * contrib/hbide/resources/themesex.uic
    ! Fixed some resizing issues when objects were appearing at 
      dis-proportioned locations.

  * contrib/hbide/hbide.hbp
  * contrib/hbide/hbide.prg
  * contrib/hbide/ideactions.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/ideobject.prg
  * contrib/hbide/ideshortcuts.prg
  * contrib/hbide/idetools.prg
  * contrib/hbide/idewizard.prg
  * contrib/hbide/resources/check.png
    + Implemented: interface to define keyborad shortcuts.
      This implementation is like xMate and provides a powerful
      mechanism to write developer-friendly code to simulate
      exact same behavior he/she might be adept to other editors.
      
      The development is under progress, just play with its interface
      and let me know if some more elements can be added.

      More on http://hbide.vouch.info/ ( Topic: Keyboard Mappings )
This commit is contained in:
Pritpal Bedi
2010-04-09 00:32:28 +00:00
parent b721eddaae
commit 8ee20c433e
16 changed files with 974 additions and 107 deletions

View File

@@ -17,6 +17,40 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-04-08 17:21 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
! Removed some debug calls.
+ contrib/hbide/resources/shortcuts.ui
+ contrib/hbide/resources/shortcuts.uic
+ Added shortcuts interface widget.
* contrib/hbide/resources/themesex.ui
* contrib/hbide/resources/themesex.uic
! Fixed some resizing issues when objects were appearing at
dis-proportioned locations.
* contrib/hbide/hbide.hbp
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/idetools.prg
* contrib/hbide/idewizard.prg
* contrib/hbide/resources/check.png
+ Implemented: interface to define keyborad shortcuts.
This implementation is like xMate and provides a powerful
mechanism to write developer-friendly code to simulate
exact same behavior he/she might be adept to other editors.
The development is under progress, just play with its interface
and let me know if some more elements can be added.
More on http://hbide.vouch.info/ ( Topic: Keyboard Mappings )
2010-04-08 13:37 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/idemisc.prg
! Fixed wrong concataion of path and file when path was empty.

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2009-2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
@@ -140,6 +140,7 @@ CLASS HbIde
DATA oPM /* Project Manager */
DATA oSM /* Souces Manager */
DATA oSK /* Skeletons Managet */
DATA oSC /* Shortcuts Manager */
DATA oTM /* Plugin Tools Manager */
DATA oTH /* Themes Manager */
@@ -370,6 +371,9 @@ hbide_dbg( "HbIde:create( cProjIni )", "#Params=" )
/* Skeletons Manager */
::oSK := IdeSkeletons():new( Self ):create()
/* Shortcuts */
::oSC := IdeShortcuts():new( Self ):create()
/* Initialte Project Manager */
::oPM := IdeProjManager():new( Self ):create()
@@ -577,6 +581,7 @@ hbide_dbg( "HbIde:create( cProjIni )", "#Params=" )
::oTM:destroy()
::oSK:destroy()
::oSC:destroy()
::oDW:destroy()
::oEV:destroy()
::oFN:destroy()
@@ -673,6 +678,9 @@ METHOD HbIde:execAction( cKey )
::nAnimantionMode := iif( ::nAnimantionMode == HBIDE_ANIMATION_NONE, HBIDE_ANIMATION_GRADIENT, HBIDE_ANIMATION_NONE )
::oDK:animateComponents( ::nAnimantionMode )
EXIT
CASE "Shortcuts"
::oSC:show()
EXIT
CASE "NewProject"
CASE "LoadProject"
CASE "LaunchProject"

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2009-2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
@@ -307,6 +307,7 @@ METHOD IdeActions:loadActions()
aadd( aAct, { "Environments" , "Environments..." , "envconfig" , "" , "No", "Yes" } )
aadd( aAct, { "GotoFunc" , "Goto Function" , "dc_function" , "" , "No", "Yes" } )
aadd( aAct, { "Shortcuts" , "Keyboard Mappings" , "" , "" , "No", "Yes" } )
RETURN aAct
@@ -538,10 +539,11 @@ METHOD IdeActions:buildMainMenu()
oMenuBar:addItem( { oSubMenu, NIL } )
/*----------------------------------------------------------------------------*/
/* Options */
/* Setup */
/*----------------------------------------------------------------------------*/
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Setup"
oSubMenu:addItem( { ::getAction( "Shortcuts" ), {|| oIde:execAction( "Shortcuts" ) } } )
oSubMenu2 := hbide_buildCodecMenu( oIde, oSubMenu )
oSubMenu2:title := "~Encoding"
oSubMenu:addItem( { oSubMenu2, NIL } )

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2009-2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
@@ -194,7 +194,7 @@ METHOD IdeDocks:buildDialog()
::oIde:oDlg := XbpDialog():new()
::oDlg:icon := hbide_image( "hbide" )
::oDlg:title := "Harbour IDE"
::oDlg:qtObject := HbQtUI():new( ::resPath + "mainwindow.uic" ):build()
::oDlg:qtObject := HbQtUI():new( hbide_uic( "mainwindow" ) ):build()
::oDlg:create( , , , , , .f. )
::oDlg:setStyleSheet( GetStyleSheet( "QMainWindow", ::nAnimantionMode ) )

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2009-2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -1072,7 +1072,7 @@ FUNCTION hbide_help( nOption )
tit_ := 'About hbIde'
AAdd( txt_, "<b>Harbour IDE ( hbIDE )</b>" )
AAdd( txt_, "Developed by" )
AAdd( txt_, "Pritpal Bedi ( pritpal@vouchcac.com )" )
AAdd( txt_, "Pritpal Bedi ( bedipritpal@hotmail.com )" )
AAdd( txt_, "" )
AAdd( txt_, "built with:" )
AAdd( txt_, HB_VERSION() )
@@ -1081,6 +1081,7 @@ FUNCTION hbide_help( nOption )
AAdd( txt_, "" )
AAdd( txt_, "Visit the project website at:" )
AAdd( txt_, "<a href='http://www.harbour-project.org/'>http://www.harbour-project.org/</a>" )
AAdd( txt_, "<a href='http://hbide.vouch.info/'>http://hbide.vouch.info/</a>" )
EXIT
CASE 2

View File

@@ -95,6 +95,7 @@ CLASS IdeObject
ACCESS oFN INLINE ::oIde:oFN
ACCESS oDW INLINE ::oIde:oDW
ACCESS oSK INLINE ::oIde:oSK
ACCESS oSC INLINE ::oIde:oSC
ACCESS oTM INLINE ::oIde:oTM
ACCESS oTH INLINE ::oIde:oTH
ACCESS oFF INLINE ::oIde:oFF

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2010 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
@@ -71,11 +71,31 @@
/*----------------------------------------------------------------------*/
#define listMethods_itemDoubleClicked 101
#define listMethods_currentRowChanged 102
#define tableMacros_itemSelectionChanged 103
#define tableMacros_itemDoubleClicked 104
#define buttonSet_clicked 105
#define buttonNew_clicked 106
/*----------------------------------------------------------------------*/
CLASS IdeShortcuts INHERIT IdeObject
DATA aHdr INIT {}
DATA aKeys INIT {}
DATA aMethods INIT {}
DATA aMtdItms INIT {}
DATA aDftSCuts INIT {}
DATA aDftSCutsItms INIT {}
METHOD new( oIde )
METHOD create( oIde )
METHOD destroy()
METHOD show()
METHOD execEvent( nMode, p )
METHOD buildUI()
METHOD buildSignals()
METHOD evalMacro( cString )
METHOD fetchAndExecMacro()
@@ -85,6 +105,15 @@ CLASS IdeShortcuts INHERIT IdeObject
METHOD getText()
METHOD execTool( ... )
METHOD loadDftSCuts()
METHOD loadMethods()
METHOD loadKeys()
METHOD populateData( nMode )
METHOD populateDftSCuts()
METHOD populateKeys()
METHOD populateMethods()
ENDCLASS
/*----------------------------------------------------------------------*/
@@ -102,33 +131,398 @@ METHOD IdeShortcuts:create( oIde )
DEFAULT oIde TO ::oIde
::oIde := oIde
::loadMethods()
::loadKeys()
::loadDftSCuts()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:destroy()
LOCAL a_, qItm
IF !empty( ::oUI )
FOR EACH qItm IN ::aHdr
qItm := NIL
NEXT
::aHdr := {}
FOR EACH qItm IN ::aMtdItms
qItm := NIL
NEXT
::aMtdItms := {}
FOR EACH a_ IN ::aDftSCutsItms
FOR EACH qItm IN a_
qItm := NIL
NEXT
NEXT
::aDftSCutsItms := {}
::oUI:destroy()
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:execTool( ... )
RETURN ::oTM:execTool( ... )
METHOD IdeShortcuts:show()
IF empty( ::oUI )
::buildUI()
::populateData( 1 )
ENDIF
::oUI:show()
::oUI:raise()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getWord( lSelect )
RETURN ::oEM:getWord( lSelect )
METHOD IdeShortcuts:execEvent( nMode, p )
LOCAL nRow, nKey, cKey
SWITCH nMode
CASE buttonNew_clicked
EXIT
CASE buttonSet_clicked
nRow := ::oUI:q_tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < len( ::aDftSCuts )
nRow++
::aDftSCuts[ nRow, 1 ] := ::oUI:q_editName:text()
::aDftSCuts[ nRow, 2 ] := ::aKeys[ ::oUI:q_comboKey:currentIndex() + 1, 2 ]
::aDftSCuts[ nRow, 3 ] := iif( ::oUI:q_checkAlt :isChecked(), "YES", "NO" )
::aDftSCuts[ nRow, 4 ] := iif( ::oUI:q_checkCtrl :isChecked(), "YES", "NO" )
::aDftSCuts[ nRow, 5 ] := iif( ::oUI:q_checkShift:isChecked(), "YES", "NO" )
::aDftSCuts[ nRow, 6 ] := ::oUI:q_editMenu:text()
::aDftSCuts[ nRow, 7 ] := ::oUI:q_plainBlock:toPlainText()
::aDftSCutsItms[ nRow, 1 ]:setText( ::aDftSCuts[ nRow, 1 ] )
::aDftSCutsItms[ nRow, 2 ]:setText( ::aDftSCuts[ nRow, 2 ] )
::aDftSCutsItms[ nRow, 3 ]:setIcon( hbide_image( iif( ::aDftSCuts[ nRow, 3 ] == "YES", "check", "" ) ) )
::aDftSCutsItms[ nRow, 4 ]:setIcon( hbide_image( iif( ::aDftSCuts[ nRow, 4 ] == "YES", "check", "" ) ) )
::aDftSCutsItms[ nRow, 5 ]:setIcon( hbide_image( iif( ::aDftSCuts[ nRow, 5 ] == "YES", "check", "" ) ) )
ENDIF
EXIT
CASE tableMacros_itemDoubleClicked
EXIT
CASE tableMacros_itemSelectionChanged
nRow := ::oUI:q_tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < len( ::aDftSCuts )
nRow++
::oUI:q_editName:setText( ::aDftSCuts[ nRow, 1 ] )
cKey := ::aDftSCuts[ nRow, 2 ]
IF ( nKey := ascan( ::aKeys, {|e_| e_[ 2 ] == cKey } ) ) > 0
::oUI:q_comboKey:setCurrentIndex( nKey - 1 )
ENDIF
::oUI:q_checkAlt :setChecked( ::aDftSCuts[ nRow, 3 ] == "YES" )
::oUI:q_checkCtrl :setChecked( ::aDftSCuts[ nRow, 4 ] == "YES" )
::oUI:q_checkShift:setChecked( ::aDftSCuts[ nRow, 5 ] == "YES" )
::oUI:q_editMenu:setText( ::aDftSCuts[ nRow, 6 ] )
::oUI:q_plainBlock:setPlainText( ::aDftSCuts[ nRow, 7 ] )
ENDIF
EXIT
CASE listMethods_itemDoubleClicked
EXIT
CASE listMethods_currentRowChanged
IF p >= 0 .AND. p < len( ::aMethods )
::oUI:q_texteditSyntax:setPlainText( ::aMethods[ p+1, 2 ] )
ENDIF
EXIT
ENDSWITCH
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getLine( lSelect )
RETURN ::oEM:getLine( lSelect )
METHOD IdeShortcuts:buildUI()
LOCAL oTbl, n, qItm
LOCAL hdr_:= { { "Name", 190 }, { "Key", 50 }, { "Alt", 30 }, { "Ctrl", 30 }, { "Shift", 30 } }
::oUI := HbQtUI():new( hbide_uic( "shortcuts" ) ):build()
::oUI:setWindowIcon( hbide_image( "hbide" ) )
oTbl := ::oUI:q_tableMacros /* Build Table Header */
QHeaderView():from( oTbl:verticalHeader() ):hide()
QHeaderView():from( oTbl:horizontalHeader() ):stretchLastSection( .t. )
oTbl:setAlternatingRowColors( .t. )
oTbl:setColumnCount( len( hdr_ ) )
oTbl:setShowGrid( .f. )
oTbl:setSelectionMode( QAbstractItemView_SingleSelection )
oTbl:setSelectionBehavior( QAbstractItemView_SelectRows )
FOR n := 1 TO len( hdr_ )
qItm := QTableWidgetItem():new()
qItm:setText( hdr_[ n,1 ] )
oTbl:setHorizontalHeaderItem( n-1, qItm )
oTbl:setColumnWidth( n-1, hdr_[ n,2 ] )
aadd( ::aHdr, qItm )
NEXT
::oUI:q_listMethods:setAlternatingRowColors( .t. ) /* Public Methods List */
::buildSignals()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getText()
RETURN ::oEM:getText()
METHOD IdeShortcuts:buildSignals()
::oUI:signal( "buttonNew" , "clicked()" , {| | ::execEvent( buttonNew_clicked ) } )
::oUI:signal( "buttonSet" , "clicked()" , {| | ::execEvent( buttonSet_clicked ) } )
::oUI:signal( "listMethods", "itemDoubleClicked(QLWItem)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } )
::oUI:signal( "listMethods", "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } )
::oUI:signal( "tableMacros", "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } )
::oUI:signal( "tableMacros", "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:populateData( nMode )
IF nMode == 1
::populateMethods()
::populateKeys()
::populateDftSCuts()
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:populateDftSCuts()
LOCAL a_, q1,q2,q3,q4,q5, n
LOCAL oTbl := ::oUI:q_tableMacros
oTbl:setRowCount( len( ::aDftSCuts ) )
n := 0
FOR EACH a_ IN ::aDftSCuts
q1 := QTableWidgetItem():new()
q1:setText( a_[ 1 ] )
oTbl:setItem( n, 0, q1 )
q2 := QTableWidgetItem():new()
q2:setText( a_[ 2 ] )
oTbl:setItem( n, 1, q2 )
q3 := QTableWidgetItem():new()
q3:setIcon( iif( a_[ 3 ] == "YES", hbide_image( "check" ), "" ) )
oTbl:setItem( n, 2, q3 )
q4 := QTableWidgetItem():new()
q4:setIcon( iif( a_[ 4 ] == "YES", hbide_image( "check" ), "" ) )
oTbl:setItem( n, 3, q4 )
q5 := QTableWidgetItem():new()
q5:setIcon( iif( a_[ 5 ] == "YES", hbide_image( "check" ), "" ) )
oTbl:setItem( n, 4, q5 )
oTbl:setRowHeight( n, 16 )
QApplication():processEvents()
aadd( ::aDftSCutsItms, { q1, q2, q3, q4, q5 } )
n++
NEXT
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:populateMethods()
LOCAL qItem, a_
LOCAL qLW := ::oUI:q_listMethods
//qLW:setSortingEnabled( .t. )
FOR EACH a_ IN ::aMethods
IF !empty( a_[ 1 ] )
qItem := QListWidgetItem():new()
qItem:setText( a_[ 1 ] )
aadd( ::aMtdItms, qItem )
qLW:addItem_1( qItem )
ENDIF
NEXT
qLW:setCurrentRow( 0 )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:populateKeys()
LOCAL a_
LOCAL oCB := ::oUI:q_comboKey
FOR EACH a_ IN ::aKeys
oCB:addItem( a_[ 2 ] )
NEXT
oCB:setCurrentIndex( -1 )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:loadDftSCuts()
/* Name Key Alt Ctrl Sh Menu Expr Icon */
//
aadd( ::aDftSCuts, { "Duplicate Line" , "D" , "NO", "YES", "NO", "", "", "" } )
aadd( ::aDftSCuts, { "Current Line Up", "Up", "NO", "YES", "NO", "", "", "" } )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:loadKeys()
LOCAL a_
aadd( ::aKeys, { Qt_Key_Escape , "Escape " } )
aadd( ::aKeys, { Qt_Key_Tab , "Tab " } )
aadd( ::aKeys, { Qt_Key_Backtab , "Backtab " } )
aadd( ::aKeys, { Qt_Key_Backspace , "Backspace " } )
aadd( ::aKeys, { Qt_Key_Return , "Return " } )
aadd( ::aKeys, { Qt_Key_Enter , "Enter " } )
aadd( ::aKeys, { Qt_Key_Insert , "Insert " } )
aadd( ::aKeys, { Qt_Key_Delete , "Delete " } )
aadd( ::aKeys, { Qt_Key_Pause , "Pause " } )
aadd( ::aKeys, { Qt_Key_Print , "Print " } )
aadd( ::aKeys, { Qt_Key_SysReq , "SysReq " } )
aadd( ::aKeys, { Qt_Key_Clear , "Clear " } )
aadd( ::aKeys, { Qt_Key_Home , "Home " } )
aadd( ::aKeys, { Qt_Key_End , "End " } )
aadd( ::aKeys, { Qt_Key_Left , "Left " } )
aadd( ::aKeys, { Qt_Key_Up , "Up " } )
aadd( ::aKeys, { Qt_Key_Right , "Right " } )
aadd( ::aKeys, { Qt_Key_Down , "Down " } )
aadd( ::aKeys, { Qt_Key_PageUp , "PageUp " } )
aadd( ::aKeys, { Qt_Key_PageDown , "PageDown " } )
aadd( ::aKeys, { Qt_Key_CapsLock , "CapsLock " } )
aadd( ::aKeys, { Qt_Key_NumLock , "NumLock " } )
aadd( ::aKeys, { Qt_Key_ScrollLock , "ScrollLock " } )
aadd( ::aKeys, { Qt_Key_F1 , "F1 " } )
aadd( ::aKeys, { Qt_Key_F2 , "F2 " } )
aadd( ::aKeys, { Qt_Key_F3 , "F3 " } )
aadd( ::aKeys, { Qt_Key_F4 , "F4 " } )
aadd( ::aKeys, { Qt_Key_F5 , "F5 " } )
aadd( ::aKeys, { Qt_Key_F6 , "F6 " } )
aadd( ::aKeys, { Qt_Key_F7 , "F7 " } )
aadd( ::aKeys, { Qt_Key_F8 , "F8 " } )
aadd( ::aKeys, { Qt_Key_F9 , "F9 " } )
aadd( ::aKeys, { Qt_Key_F10 , "F10 " } )
aadd( ::aKeys, { Qt_Key_F11 , "F11 " } )
aadd( ::aKeys, { Qt_Key_F12 , "F12 " } )
aadd( ::aKeys, { Qt_Key_F13 , "F13 " } )
aadd( ::aKeys, { Qt_Key_F14 , "F14 " } )
aadd( ::aKeys, { Qt_Key_F15 , "F15 " } )
aadd( ::aKeys, { Qt_Key_F16 , "F16 " } )
aadd( ::aKeys, { Qt_Key_F17 , "F17 " } )
aadd( ::aKeys, { Qt_Key_F18 , "F18 " } )
aadd( ::aKeys, { Qt_Key_F19 , "F19 " } )
aadd( ::aKeys, { Qt_Key_F20 , "F20 " } )
aadd( ::aKeys, { Qt_Key_F21 , "F21 " } )
aadd( ::aKeys, { Qt_Key_F22 , "F22 " } )
aadd( ::aKeys, { Qt_Key_F23 , "F23 " } )
aadd( ::aKeys, { Qt_Key_F24 , "F24 " } )
aadd( ::aKeys, { Qt_Key_F25 , "F25 " } )
aadd( ::aKeys, { Qt_Key_F26 , "F26 " } )
aadd( ::aKeys, { Qt_Key_F27 , "F27 " } )
aadd( ::aKeys, { Qt_Key_F28 , "F28 " } )
aadd( ::aKeys, { Qt_Key_F29 , "F29 " } )
aadd( ::aKeys, { Qt_Key_F30 , "F30 " } )
aadd( ::aKeys, { Qt_Key_F31 , "F31 " } )
aadd( ::aKeys, { Qt_Key_F32 , "F32 " } )
aadd( ::aKeys, { Qt_Key_F33 , "F33 " } )
aadd( ::aKeys, { Qt_Key_F34 , "F34 " } )
aadd( ::aKeys, { Qt_Key_F35 , "F35 " } )
aadd( ::aKeys, { Qt_Key_Space , "Space " } )
aadd( ::aKeys, { Qt_Key_Exclam , "Exclam " } )
aadd( ::aKeys, { Qt_Key_QuoteDbl , "QuoteDbl " } )
aadd( ::aKeys, { Qt_Key_NumberSign , "NumberSign " } )
aadd( ::aKeys, { Qt_Key_Dollar , "Dollar " } )
aadd( ::aKeys, { Qt_Key_Percent , "Percent " } )
aadd( ::aKeys, { Qt_Key_Ampersand , "Ampersand " } )
aadd( ::aKeys, { Qt_Key_Apostrophe , "Apostrophe " } )
aadd( ::aKeys, { Qt_Key_ParenLeft , "ParenLeft " } )
aadd( ::aKeys, { Qt_Key_ParenRight , "ParenRight " } )
aadd( ::aKeys, { Qt_Key_Asterisk , "Asterisk " } )
aadd( ::aKeys, { Qt_Key_Plus , "Plus " } )
aadd( ::aKeys, { Qt_Key_Comma , "Comma " } )
aadd( ::aKeys, { Qt_Key_Minus , "Minus " } )
aadd( ::aKeys, { Qt_Key_Period , "Period " } )
aadd( ::aKeys, { Qt_Key_Slash , "Slash " } )
aadd( ::aKeys, { Qt_Key_0 , "0 " } )
aadd( ::aKeys, { Qt_Key_1 , "1 " } )
aadd( ::aKeys, { Qt_Key_2 , "2 " } )
aadd( ::aKeys, { Qt_Key_3 , "3 " } )
aadd( ::aKeys, { Qt_Key_4 , "4 " } )
aadd( ::aKeys, { Qt_Key_5 , "5 " } )
aadd( ::aKeys, { Qt_Key_6 , "6 " } )
aadd( ::aKeys, { Qt_Key_7 , "7 " } )
aadd( ::aKeys, { Qt_Key_8 , "8 " } )
aadd( ::aKeys, { Qt_Key_9 , "9 " } )
aadd( ::aKeys, { Qt_Key_Colon , "Colon " } )
aadd( ::aKeys, { Qt_Key_Semicolon , "Semicolon " } )
aadd( ::aKeys, { Qt_Key_Less , "Less " } )
aadd( ::aKeys, { Qt_Key_Equal , "Equal " } )
aadd( ::aKeys, { Qt_Key_Greater , "Greater " } )
aadd( ::aKeys, { Qt_Key_Question , "Question " } )
aadd( ::aKeys, { Qt_Key_At , "At " } )
aadd( ::aKeys, { Qt_Key_A , "A " } )
aadd( ::aKeys, { Qt_Key_B , "B " } )
aadd( ::aKeys, { Qt_Key_C , "C " } )
aadd( ::aKeys, { Qt_Key_D , "D " } )
aadd( ::aKeys, { Qt_Key_E , "E " } )
aadd( ::aKeys, { Qt_Key_F , "F " } )
aadd( ::aKeys, { Qt_Key_G , "G " } )
aadd( ::aKeys, { Qt_Key_H , "H " } )
aadd( ::aKeys, { Qt_Key_I , "I " } )
aadd( ::aKeys, { Qt_Key_J , "J " } )
aadd( ::aKeys, { Qt_Key_K , "K " } )
aadd( ::aKeys, { Qt_Key_L , "L " } )
aadd( ::aKeys, { Qt_Key_M , "M " } )
aadd( ::aKeys, { Qt_Key_N , "N " } )
aadd( ::aKeys, { Qt_Key_O , "O " } )
aadd( ::aKeys, { Qt_Key_P , "P " } )
aadd( ::aKeys, { Qt_Key_Q , "Q " } )
aadd( ::aKeys, { Qt_Key_R , "R " } )
aadd( ::aKeys, { Qt_Key_S , "S " } )
aadd( ::aKeys, { Qt_Key_T , "T " } )
aadd( ::aKeys, { Qt_Key_U , "U " } )
aadd( ::aKeys, { Qt_Key_V , "V " } )
aadd( ::aKeys, { Qt_Key_W , "W " } )
aadd( ::aKeys, { Qt_Key_X , "X " } )
aadd( ::aKeys, { Qt_Key_Y , "Y " } )
aadd( ::aKeys, { Qt_Key_Z , "Z " } )
aadd( ::aKeys, { Qt_Key_BracketLeft , "BracketLeft " } )
aadd( ::aKeys, { Qt_Key_Backslash , "Backslash " } )
aadd( ::aKeys, { Qt_Key_BracketRight , "BracketRight " } )
aadd( ::aKeys, { Qt_Key_AsciiCircum , "AsciiCircum " } )
aadd( ::aKeys, { Qt_Key_Underscore , "Underscore " } )
aadd( ::aKeys, { Qt_Key_QuoteLeft , "QuoteLeft " } )
aadd( ::aKeys, { Qt_Key_BraceLeft , "BraceLeft " } )
aadd( ::aKeys, { Qt_Key_Bar , "Bar " } )
aadd( ::aKeys, { Qt_Key_BraceRight , "BraceRight " } )
aadd( ::aKeys, { Qt_Key_AsciiTilde , "AsciiTilde " } )
FOR EACH a_ IN ::aKeys
a_[ 2 ] := trim( a_[ 2 ] )
NEXT
RETURN Self
/*----------------------------------------------------------------------*/
@@ -175,3 +569,36 @@ METHOD IdeShortcuts:fetchAndExecMacro()
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:loadMethods()
aadd( ::aMethods, { "getWord( lSelect )", "Returns text of the word under cursor. If <lSelect == .T.> text appears as selected." } )
aadd( ::aMethods, { "getLine( lSelect )", "Returns text of the current line. If <lSelect == .T.> text appears as selected." } )
aadd( ::aMethods, { "getText()" , "Returns current selected text." } )
aadd( ::aMethods, { "execTool( ... )" , "Executes a 'Tool' under tools menu or without an entry." } )
#if 0
aadd( ::aMethods, { "", "" } )
#endif
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:execTool( ... )
RETURN ::oTM:execTool( ... )
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getWord( lSelect )
RETURN ::oEM:getWord( lSelect )
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getLine( lSelect )
RETURN ::oEM:getLine( lSelect )
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:getText()
RETURN ::oEM:getText()
/*----------------------------------------------------------------------*/

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2010 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -5,7 +5,7 @@
/*
* Harbour Project source code:
*
* Copyright 2010 Pritpal Bedi <pritpal@vouchcac.com>
* Copyright 2010 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FormShortCuts</class>
<widget class="QWidget" name="FormShortCuts">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>664</width>
<height>478</height>
</rect>
</property>
<property name="windowTitle">
<string>Shortcuts</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelMethods">
<property name="text">
<string>Public Methods</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="6">
<widget class="QLabel" name="labelSyntax">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QListWidget" name="listMethods"/>
</item>
<item row="1" column="1" colspan="6">
<widget class="QTextEdit" name="texteditSyntax"/>
</item>
<item row="2" column="0" colspan="7">
<widget class="QLabel" name="labelMacros">
<property name="text">
<string>Macros</string>
</property>
</widget>
</item>
<item row="3" column="0" rowspan="5">
<widget class="QTableWidget" name="tableMacros"/>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelName">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="5">
<widget class="QLineEdit" name="editName"/>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelKey">
<property name="text">
<string>Key</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QComboBox" name="comboKey"/>
</item>
<item row="4" column="3" colspan="2">
<widget class="QCheckBox" name="checkAlt">
<property name="text">
<string>Alt</string>
</property>
</widget>
</item>
<item row="4" column="5">
<widget class="QCheckBox" name="checkCtrl">
<property name="text">
<string>Ctrl</string>
</property>
</widget>
</item>
<item row="4" column="6">
<widget class="QCheckBox" name="checkShift">
<property name="text">
<string>Shift</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="labelMenu">
<property name="text">
<string>Menu</string>
</property>
</widget>
</item>
<item row="5" column="2" colspan="5">
<widget class="QLineEdit" name="editMenu"/>
</item>
<item row="6" column="1" colspan="6">
<widget class="QPlainTextEdit" name="plainBlock"/>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="buttonNew">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>New</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="buttonSet">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QPushButton" name="buttonLoad">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
<item row="7" column="4" colspan="2">
<widget class="QPushButton" name="buttonSave">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item row="7" column="6">
<widget class="QPushButton" name="buttonSaveAs">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>SaveAs</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,214 @@
/********************************************************************************
** Form generated from reading ui file 'shortcuts.ui'
**
** Created: Wed Apr 7 12:19:23 2010
** by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
#ifndef SHORTCUTS_H
#define SHORTCUTS_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QComboBox>
#include <QtGui/QGridLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QListWidget>
#include <QtGui/QPlainTextEdit>
#include <QtGui/QPushButton>
#include <QtGui/QTableWidget>
#include <QtGui/QTextEdit>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_FormShortCuts
{
public:
QGridLayout *gridLayout;
QLabel *labelMethods;
QLabel *labelSyntax;
QListWidget *listMethods;
QTextEdit *texteditSyntax;
QLabel *labelMacros;
QTableWidget *tableMacros;
QLabel *labelName;
QLineEdit *editName;
QLabel *labelKey;
QComboBox *comboKey;
QCheckBox *checkAlt;
QCheckBox *checkCtrl;
QCheckBox *checkShift;
QLabel *labelMenu;
QLineEdit *editMenu;
QPlainTextEdit *plainBlock;
QPushButton *buttonNew;
QPushButton *buttonSet;
QPushButton *buttonLoad;
QPushButton *buttonSave;
QPushButton *buttonSaveAs;
void setupUi(QWidget *FormShortCuts)
{
if (FormShortCuts->objectName().isEmpty())
FormShortCuts->setObjectName(QString::fromUtf8("FormShortCuts"));
FormShortCuts->resize(664, 478);
gridLayout = new QGridLayout(FormShortCuts);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
labelMethods = new QLabel(FormShortCuts);
labelMethods->setObjectName(QString::fromUtf8("labelMethods"));
gridLayout->addWidget(labelMethods, 0, 0, 1, 1);
labelSyntax = new QLabel(FormShortCuts);
labelSyntax->setObjectName(QString::fromUtf8("labelSyntax"));
gridLayout->addWidget(labelSyntax, 0, 1, 1, 6);
listMethods = new QListWidget(FormShortCuts);
listMethods->setObjectName(QString::fromUtf8("listMethods"));
gridLayout->addWidget(listMethods, 1, 0, 1, 1);
texteditSyntax = new QTextEdit(FormShortCuts);
texteditSyntax->setObjectName(QString::fromUtf8("texteditSyntax"));
gridLayout->addWidget(texteditSyntax, 1, 1, 1, 6);
labelMacros = new QLabel(FormShortCuts);
labelMacros->setObjectName(QString::fromUtf8("labelMacros"));
gridLayout->addWidget(labelMacros, 2, 0, 1, 7);
tableMacros = new QTableWidget(FormShortCuts);
tableMacros->setObjectName(QString::fromUtf8("tableMacros"));
gridLayout->addWidget(tableMacros, 3, 0, 5, 1);
labelName = new QLabel(FormShortCuts);
labelName->setObjectName(QString::fromUtf8("labelName"));
gridLayout->addWidget(labelName, 3, 1, 1, 1);
editName = new QLineEdit(FormShortCuts);
editName->setObjectName(QString::fromUtf8("editName"));
gridLayout->addWidget(editName, 3, 2, 1, 5);
labelKey = new QLabel(FormShortCuts);
labelKey->setObjectName(QString::fromUtf8("labelKey"));
gridLayout->addWidget(labelKey, 4, 1, 1, 1);
comboKey = new QComboBox(FormShortCuts);
comboKey->setObjectName(QString::fromUtf8("comboKey"));
gridLayout->addWidget(comboKey, 4, 2, 1, 1);
checkAlt = new QCheckBox(FormShortCuts);
checkAlt->setObjectName(QString::fromUtf8("checkAlt"));
gridLayout->addWidget(checkAlt, 4, 3, 1, 2);
checkCtrl = new QCheckBox(FormShortCuts);
checkCtrl->setObjectName(QString::fromUtf8("checkCtrl"));
gridLayout->addWidget(checkCtrl, 4, 5, 1, 1);
checkShift = new QCheckBox(FormShortCuts);
checkShift->setObjectName(QString::fromUtf8("checkShift"));
gridLayout->addWidget(checkShift, 4, 6, 1, 1);
labelMenu = new QLabel(FormShortCuts);
labelMenu->setObjectName(QString::fromUtf8("labelMenu"));
gridLayout->addWidget(labelMenu, 5, 1, 1, 1);
editMenu = new QLineEdit(FormShortCuts);
editMenu->setObjectName(QString::fromUtf8("editMenu"));
gridLayout->addWidget(editMenu, 5, 2, 1, 5);
plainBlock = new QPlainTextEdit(FormShortCuts);
plainBlock->setObjectName(QString::fromUtf8("plainBlock"));
gridLayout->addWidget(plainBlock, 6, 1, 1, 6);
buttonNew = new QPushButton(FormShortCuts);
buttonNew->setObjectName(QString::fromUtf8("buttonNew"));
buttonNew->setMinimumSize(QSize(45, 0));
buttonNew->setMaximumSize(QSize(45, 16777215));
gridLayout->addWidget(buttonNew, 7, 1, 1, 1);
buttonSet = new QPushButton(FormShortCuts);
buttonSet->setObjectName(QString::fromUtf8("buttonSet"));
buttonSet->setMinimumSize(QSize(45, 0));
buttonSet->setMaximumSize(QSize(45, 16777215));
gridLayout->addWidget(buttonSet, 7, 2, 1, 1);
buttonLoad = new QPushButton(FormShortCuts);
buttonLoad->setObjectName(QString::fromUtf8("buttonLoad"));
buttonLoad->setMinimumSize(QSize(45, 0));
buttonLoad->setMaximumSize(QSize(45, 16777215));
gridLayout->addWidget(buttonLoad, 7, 3, 1, 1);
buttonSave = new QPushButton(FormShortCuts);
buttonSave->setObjectName(QString::fromUtf8("buttonSave"));
buttonSave->setMinimumSize(QSize(45, 0));
buttonSave->setMaximumSize(QSize(45, 16777215));
gridLayout->addWidget(buttonSave, 7, 4, 1, 2);
buttonSaveAs = new QPushButton(FormShortCuts);
buttonSaveAs->setObjectName(QString::fromUtf8("buttonSaveAs"));
buttonSaveAs->setMinimumSize(QSize(45, 0));
buttonSaveAs->setMaximumSize(QSize(45, 16777215));
gridLayout->addWidget(buttonSaveAs, 7, 6, 1, 1);
retranslateUi(FormShortCuts);
QMetaObject::connectSlotsByName(FormShortCuts);
} // setupUi
void retranslateUi(QWidget *FormShortCuts)
{
FormShortCuts->setWindowTitle(QApplication::translate("FormShortCuts", "Shortcuts", 0, QApplication::UnicodeUTF8));
labelMethods->setText(QApplication::translate("FormShortCuts", "Public Methods", 0, QApplication::UnicodeUTF8));
labelSyntax->setText(QApplication::translate("FormShortCuts", "Description", 0, QApplication::UnicodeUTF8));
labelMacros->setText(QApplication::translate("FormShortCuts", "Macros", 0, QApplication::UnicodeUTF8));
labelName->setText(QApplication::translate("FormShortCuts", "Name", 0, QApplication::UnicodeUTF8));
labelKey->setText(QApplication::translate("FormShortCuts", "Key", 0, QApplication::UnicodeUTF8));
checkAlt->setText(QApplication::translate("FormShortCuts", "Alt", 0, QApplication::UnicodeUTF8));
checkCtrl->setText(QApplication::translate("FormShortCuts", "Ctrl", 0, QApplication::UnicodeUTF8));
checkShift->setText(QApplication::translate("FormShortCuts", "Shift", 0, QApplication::UnicodeUTF8));
labelMenu->setText(QApplication::translate("FormShortCuts", "Menu", 0, QApplication::UnicodeUTF8));
buttonNew->setText(QApplication::translate("FormShortCuts", "New", 0, QApplication::UnicodeUTF8));
buttonSet->setText(QApplication::translate("FormShortCuts", "Set", 0, QApplication::UnicodeUTF8));
buttonLoad->setText(QApplication::translate("FormShortCuts", "Load", 0, QApplication::UnicodeUTF8));
buttonSave->setText(QApplication::translate("FormShortCuts", "Save", 0, QApplication::UnicodeUTF8));
buttonSaveAs->setText(QApplication::translate("FormShortCuts", "SaveAs", 0, QApplication::UnicodeUTF8));
Q_UNUSED(FormShortCuts);
} // retranslateUi
};
namespace Ui {
class FormShortCuts: public Ui_FormShortCuts {};
} // namespace Ui
QT_END_NAMESPACE
#endif // SHORTCUTS_H

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>423</width>
<height>507</height>
<height>434</height>
</rect>
</property>
<property name="windowTitle">
@@ -16,27 +16,15 @@
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelTheme">
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Theme:</string>
<string>Themes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="1" colspan="2">
<widget class="QLabel" name="labelItems">
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Items:</string>
<string>Items</string>
</property>
</widget>
</item>
@@ -44,14 +32,14 @@
<widget class="QListWidget" name="listThemes">
<property name="minimumSize">
<size>
<width>150</width>
<height>170</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>170</height>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
</widget>
@@ -61,13 +49,13 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>170</height>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>170</height>
<height>16777215</height>
</size>
</property>
</widget>
@@ -94,14 +82,14 @@
</widget>
</item>
<item row="4" column="2">
<spacer name="verticalSpacer_3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>63</height>
<width>72</width>
<height>45</height>
</size>
</property>
</spacer>
@@ -119,10 +107,10 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelPreview">
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="text">
<string>Preview:</string>
<string>Preview</string>
</property>
</widget>
</item>
@@ -150,19 +138,6 @@
</property>
</widget>
</item>
<item row="10" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="2">
<widget class="QPushButton" name="buttonDefault">
<property name="text">
@@ -184,19 +159,6 @@
</property>
</widget>
</item>
<item row="14" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>24</height>
</size>
</property>
</spacer>
</item>
<item row="15" column="2">
<widget class="QPushButton" name="buttonClose">
<property name="text">
@@ -204,6 +166,32 @@
</property>
</widget>
</item>
<item row="10" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="14" column="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>

View File

@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading ui file 'themesex.ui'
**
** Created: Wed Mar 10 22:01:39 2010
** Created: Tue Apr 6 18:18:36 2010
** by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
@@ -37,50 +37,48 @@ public:
QCheckBox *checkBold;
QCheckBox *checkItalic;
QCheckBox *checkUnderline;
QSpacerItem *verticalSpacer_3;
QSpacerItem *verticalSpacer;
QPushButton *buttonColor;
QLabel *labelPreview;
QLabel *label;
QPlainTextEdit *plainThemeText;
QPushButton *buttonSave;
QPushButton *buttonSaveAs;
QPushButton *buttonCopy;
QSpacerItem *verticalSpacer;
QPushButton *buttonDefault;
QPushButton *buttonApply;
QPushButton *buttonApplyAll;
QSpacerItem *verticalSpacer_2;
QPushButton *buttonClose;
QSpacerItem *verticalSpacer_2;
QSpacerItem *verticalSpacer_3;
void setupUi(QWidget *FormThemes)
{
if (FormThemes->objectName().isEmpty())
FormThemes->setObjectName(QString::fromUtf8("FormThemes"));
FormThemes->resize(423, 507);
FormThemes->resize(423, 434);
gridLayout = new QGridLayout(FormThemes);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
labelTheme = new QLabel(FormThemes);
labelTheme->setObjectName(QString::fromUtf8("labelTheme"));
labelTheme->setMaximumSize(QSize(40, 16777215));
gridLayout->addWidget(labelTheme, 0, 0, 1, 1);
labelItems = new QLabel(FormThemes);
labelItems->setObjectName(QString::fromUtf8("labelItems"));
labelItems->setMaximumSize(QSize(40, 16777215));
gridLayout->addWidget(labelItems, 0, 1, 1, 1);
gridLayout->addWidget(labelItems, 0, 1, 1, 2);
listThemes = new QListWidget(FormThemes);
listThemes->setObjectName(QString::fromUtf8("listThemes"));
listThemes->setMinimumSize(QSize(150, 170));
listThemes->setMaximumSize(QSize(150, 170));
listThemes->setMinimumSize(QSize(0, 0));
listThemes->setMaximumSize(QSize(16777215, 16777215));
gridLayout->addWidget(listThemes, 1, 0, 5, 1);
listItems = new QListWidget(FormThemes);
listItems->setObjectName(QString::fromUtf8("listItems"));
listItems->setMinimumSize(QSize(0, 170));
listItems->setMaximumSize(QSize(16777215, 170));
listItems->setMinimumSize(QSize(0, 0));
listItems->setMaximumSize(QSize(16777215, 16777215));
gridLayout->addWidget(listItems, 1, 1, 5, 1);
@@ -99,9 +97,9 @@ public:
gridLayout->addWidget(checkUnderline, 3, 2, 1, 1);
verticalSpacer_3 = new QSpacerItem(32, 63, QSizePolicy::Minimum, QSizePolicy::Expanding);
verticalSpacer = new QSpacerItem(72, 45, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer_3, 4, 2, 1, 1);
gridLayout->addItem(verticalSpacer, 4, 2, 1, 1);
buttonColor = new QPushButton(FormThemes);
buttonColor->setObjectName(QString::fromUtf8("buttonColor"));
@@ -109,10 +107,10 @@ public:
gridLayout->addWidget(buttonColor, 5, 2, 1, 1);
labelPreview = new QLabel(FormThemes);
labelPreview->setObjectName(QString::fromUtf8("labelPreview"));
label = new QLabel(FormThemes);
label->setObjectName(QString::fromUtf8("label"));
gridLayout->addWidget(labelPreview, 6, 0, 1, 1);
gridLayout->addWidget(label, 6, 0, 1, 3);
plainThemeText = new QPlainTextEdit(FormThemes);
plainThemeText->setObjectName(QString::fromUtf8("plainThemeText"));
@@ -134,10 +132,6 @@ public:
gridLayout->addWidget(buttonCopy, 9, 2, 1, 1);
verticalSpacer = new QSpacerItem(20, 26, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer, 10, 2, 1, 1);
buttonDefault = new QPushButton(FormThemes);
buttonDefault->setObjectName(QString::fromUtf8("buttonDefault"));
@@ -153,15 +147,19 @@ public:
gridLayout->addWidget(buttonApplyAll, 13, 2, 1, 1);
verticalSpacer_2 = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer_2, 14, 2, 1, 1);
buttonClose = new QPushButton(FormThemes);
buttonClose->setObjectName(QString::fromUtf8("buttonClose"));
gridLayout->addWidget(buttonClose, 15, 2, 1, 1);
verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer_2, 10, 2, 1, 1);
verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer_3, 14, 2, 1, 1);
retranslateUi(FormThemes);
@@ -171,13 +169,13 @@ public:
void retranslateUi(QWidget *FormThemes)
{
FormThemes->setWindowTitle(QApplication::translate("FormThemes", "Form", 0, QApplication::UnicodeUTF8));
labelTheme->setText(QApplication::translate("FormThemes", "Theme:", 0, QApplication::UnicodeUTF8));
labelItems->setText(QApplication::translate("FormThemes", "Items:", 0, QApplication::UnicodeUTF8));
labelTheme->setText(QApplication::translate("FormThemes", "Themes", 0, QApplication::UnicodeUTF8));
labelItems->setText(QApplication::translate("FormThemes", "Items", 0, QApplication::UnicodeUTF8));
checkBold->setText(QApplication::translate("FormThemes", "Bold", 0, QApplication::UnicodeUTF8));
checkItalic->setText(QApplication::translate("FormThemes", "Italic", 0, QApplication::UnicodeUTF8));
checkUnderline->setText(QApplication::translate("FormThemes", "Underline", 0, QApplication::UnicodeUTF8));
buttonColor->setText(QApplication::translate("FormThemes", "Color", 0, QApplication::UnicodeUTF8));
labelPreview->setText(QApplication::translate("FormThemes", "Preview:", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("FormThemes", "Preview", 0, QApplication::UnicodeUTF8));
buttonSave->setText(QApplication::translate("FormThemes", "Save", 0, QApplication::UnicodeUTF8));
buttonSaveAs->setText(QApplication::translate("FormThemes", "Save As", 0, QApplication::UnicodeUTF8));
buttonCopy->setText(QApplication::translate("FormThemes", "Copy", 0, QApplication::UnicodeUTF8));

View File

@@ -106,16 +106,10 @@ HBQPlainTextEdit::~HBQPlainTextEdit()
disconnect( this, SIGNAL( updateRequest( const QRect &, int ) ) );
disconnect( this, SIGNAL( cursorPositionChanged() ) );
HB_TRACE( HB_TR_ALWAYS, ( "HBQPlainTextEdit::~HBQPlainTextEdit( 1 )" ) );
delete lineNumberArea;
HB_TRACE( HB_TR_ALWAYS, ( "HBQPlainTextEdit::~HBQPlainTextEdit( 2 )" ) );
if( block )
hb_itemRelease( block );
HB_TRACE( HB_TR_ALWAYS, ( "HBQPlainTextEdit::~HBQPlainTextEdit( 3 )" ) );
}
void HBQPlainTextEdit::hbSetEventBlock( PHB_ITEM pBlock )