2010-01-07 10:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/idethemes.prg
* contrib/hbide/resources/selectionlist.ui
! selectionlist.ui updated to have <OK><Cancel> buttons.
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-07 10:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/idethemes.prg
|
||||
* contrib/hbide/resources/selectionlist.ui
|
||||
! selectionlist.ui updated to have <OK><Cancel> buttons.
|
||||
|
||||
2010-01-07 09:28 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/idethemes.prg
|
||||
+ Added "Bare Minimum" theme.
|
||||
|
||||
@@ -581,7 +581,9 @@ METHOD IdeThemes:selectTheme()
|
||||
|
||||
oSL:qObj[ "listOptions" ]:setModel( oStrModel )
|
||||
|
||||
Qt_Slots_Connect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( p, oSL, @cTheme, o ) } )
|
||||
Qt_Slots_Connect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( 1, p, oSL, @cTheme, o ) } )
|
||||
Qt_Slots_Connect( pSlots, oSL:qObj[ "buttonOk" ], "clicked()" , {|o,p| ::selectThemeProc( 2, p, oSL, @cTheme, o ) } )
|
||||
Qt_Slots_Connect( pSlots, oSL:qObj[ "buttonCancel" ], "clicked()" , {|o,p| ::selectThemeProc( 3, p, oSL, o ) } )
|
||||
|
||||
nDone := oSL:exec()
|
||||
|
||||
@@ -591,14 +593,24 @@ METHOD IdeThemes:selectTheme()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeThemes:selectThemeProc( p, oSL, cTheme )
|
||||
LOCAL nRow, qModalIndex := QModelIndex():configure( p )
|
||||
METHOD IdeThemes:selectThemeProc( nMode, p, oSL, cTheme )
|
||||
LOCAL qModalIndex
|
||||
|
||||
nRow := qModalIndex:row() + 1
|
||||
DO CASE
|
||||
CASE nMode == 1
|
||||
qModalIndex := QModelIndex():configure( p )
|
||||
cTheme := ::aThemes[ qModalIndex:row() + 1, 1 ]
|
||||
oSL:done( 1 )
|
||||
|
||||
cTheme := ::aThemes[ nRow, 1 ]
|
||||
CASE nMode == 2
|
||||
qModalIndex := QModelIndex():configure( oSL:qObj[ "listOptions" ]:currentIndex() )
|
||||
cTheme := ::aThemes[ qModalIndex:row() + 1, 1 ]
|
||||
oSL:done( 1 )
|
||||
|
||||
oSL:done( 1 )
|
||||
CASE nMode == 3
|
||||
oSL:done( 0 )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Nil
|
||||
|
||||
@@ -670,7 +682,6 @@ METHOD IdeThemes:parseINI( lAppend )
|
||||
IF ( n := at( ":", s ) ) > 0
|
||||
cKey := alltrim( strtran( substr( s, n+1 ), "]" ) )
|
||||
ENDIF
|
||||
// HB_TRACE( HB_TR_ALWAYS, cKey )
|
||||
IF !empty( cKey )
|
||||
nPart := 3
|
||||
IF ( nTheme := ascan( ::aThemes, {|e_| e_[ 1 ] == cKey } ) ) == 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>221</width>
|
||||
<height>188</height>
|
||||
<height>285</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QListView" name="listOptions">
|
||||
<property name="editTriggers">
|
||||
@@ -27,6 +27,49 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOk">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>77</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonCancel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>77</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user