diff options
Diffstat (limited to 'qtruby/rubylib/designer/examples')
6 files changed, 112 insertions, 112 deletions
diff --git a/qtruby/rubylib/designer/examples/colortool/colornameform.ui b/qtruby/rubylib/designer/examples/colortool/colornameform.ui index 50f2d6de..e03897e5 100644 --- a/qtruby/rubylib/designer/examples/colortool/colornameform.ui +++ b/qtruby/rubylib/designer/examples/colortool/colornameform.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>ColorNameForm</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ColorNameForm</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>colorLabel</cstring> </property> @@ -39,7 +39,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -47,7 +47,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -55,7 +55,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -66,7 +66,7 @@ <cstring>colorLineEdit</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>colorLineEdit</cstring> </property> @@ -90,7 +90,7 @@ </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -115,7 +115,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okPushButton</cstring> </property> @@ -126,7 +126,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelPushButton</cstring> </property> @@ -161,7 +161,7 @@ <slot>validate()</slot> </slots> <functions> - <function>setColors( const QMap<QString, QColor> & colors )</function> + <function>setColors( const TQMap<TQString, TQColor> & colors )</function> </functions> <pixmapinproject/> <layoutdefaults spacing="6" margin="11"/> diff --git a/qtruby/rubylib/designer/examples/colortool/findform.ui b/qtruby/rubylib/designer/examples/colortool/findform.ui index 3e627945..0107fabe 100644 --- a/qtruby/rubylib/designer/examples/colortool/findform.ui +++ b/qtruby/rubylib/designer/examples/colortool/findform.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>FindForm</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>FindForm</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout11</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -38,7 +38,7 @@ <cstring>findLineEdit</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>findLineEdit</cstring> </property> @@ -62,7 +62,7 @@ </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout10</cstring> </property> @@ -87,7 +87,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>findPushButton</cstring> </property> @@ -98,7 +98,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>closePushButton</cstring> </property> @@ -128,7 +128,7 @@ <include location="local" impldecl="in implementation">findform.ui.h</include> </includes> <signals> - <signal>lookfor(const QString&)</signal> + <signal>lookfor(const TQString&)</signal> </signals> <slots> <slot>find()</slot> diff --git a/qtruby/rubylib/designer/examples/colortool/main.rb b/qtruby/rubylib/designer/examples/colortool/main.rb index 9ebe84cb..539da700 100644 --- a/qtruby/rubylib/designer/examples/colortool/main.rb +++ b/qtruby/rubylib/designer/examples/colortool/main.rb @@ -1,19 +1,19 @@ -require 'Qt'
+retquire 'Qt'
-require 'mainform.rb'
-require 'mainform.ui.rb'
+retquire 'mainform.rb'
+retquire 'mainform.ui.rb'
-require 'colornameform.rb'
-require 'colornameform.ui.rb'
+retquire 'colornameform.rb'
+retquire 'colornameform.ui.rb'
-require 'optionsform.rb'
+retquire 'optionsform.rb'
-require 'findform.rb'
-require 'findform.ui.rb'
+retquire 'findform.rb'
+retquire 'findform.ui.rb'
-require 'qmake_image_collection.rb'
+retquire 'qmake_image_collection.rb'
-a = Qt::Application.new(ARGV)
+a = TQt::Application.new(ARGV)
w = MainForm.new
a.mainWidget = w
w.show
diff --git a/qtruby/rubylib/designer/examples/colortool/mainform.ui b/qtruby/rubylib/designer/examples/colortool/mainform.ui index 6c89baca..f4081882 100644 --- a/qtruby/rubylib/designer/examples/colortool/mainform.ui +++ b/qtruby/rubylib/designer/examples/colortool/mainform.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MainForm</class> -<widget class="QMainWindow"> +<widget class="TQMainWindow"> <property name="name"> <cstring>MainForm</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>colorWidgetStack</cstring> </property> @@ -29,7 +29,7 @@ <property name="frameShadow"> <enum>Plain</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tablePage</cstring> </property> @@ -40,7 +40,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTable"> + <widget class="TQTable"> <column> <property name="text"> <string>Name</string> @@ -71,7 +71,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>iconsPage</cstring> </property> @@ -82,7 +82,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QIconView"> + <widget class="TQIconView"> <property name="name"> <cstring>colorIconView</cstring> </property> @@ -496,15 +496,15 @@ </connection> <connection> <sender>colorIconView</sender> - <signal>currentChanged(QIconViewItem*)</signal> + <signal>currentChanged(TQIconViewItem*)</signal> <receiver>MainForm</receiver> - <slot>changedIconColor(QIconViewItem*)</slot> + <slot>changedIconColor(TQIconViewItem*)</slot> </connection> <connection> <sender>viewActionGroup</sender> - <signal>selected(QAction*)</signal> + <signal>selected(TQAction*)</signal> <receiver>MainForm</receiver> - <slot>changeView(QAction*)</slot> + <slot>changeView(TQAction*)</slot> </connection> <connection> <sender>editAddAction</sender> @@ -548,38 +548,38 @@ <include location="local" impldecl="in implementation">mainform.ui.h</include> </includes> <forwards> - <forward>class QString;</forward> - <forward>class QColor;</forward> + <forward>class TQString;</forward> + <forward>class TQColor;</forward> </forwards> <variables> - <variable>QStringList m_comments;</variable> - <variable>QString m_filename;</variable> + <variable>TQStringList m_comments;</variable> + <variable>TQString m_filename;</variable> <variable>bool m_changed;</variable> <variable>bool m_table_dirty;</variable> <variable>bool m_icons_dirty;</variable> <variable>int m_clip_as;</variable> <variable>bool m_show_web;</variable> - <variable>QClipboard *clipboard;</variable> + <variable>TQClipboard *clipboard;</variable> <variable>FindForm *findForm;</variable> - <variable>QMap<QString,QColor> m_colors;</variable> + <variable>TQMap<TQString,TQColor> m_colors;</variable> </variables> <slots> <slot>fileNew()</slot> <slot>fileOpen()</slot> <slot>fileSave()</slot> <slot>fileSaveAs()</slot> - <slot>closeEvent( QCloseEvent * )</slot> + <slot>closeEvent( TQCloseEvent * )</slot> <slot>fileExit()</slot> <slot>editCut()</slot> <slot>editCopy()</slot> <slot>editFind()</slot> - <slot>lookfor( const QString & text )</slot> + <slot>lookfor( const TQString & text )</slot> <slot>helpIndex()</slot> <slot>helpContents()</slot> <slot>helpAbout()</slot> <slot>changedTableColor( int row, int )</slot> - <slot>changedIconColor( QIconViewItem * item )</slot> - <slot>changeView( QAction * action )</slot> + <slot>changedIconColor( TQIconViewItem * item )</slot> + <slot>changeView( TQAction * action )</slot> <slot>editAdd()</slot> <slot>editOptions()</slot> <slot>aboutToShow()</slot> @@ -588,11 +588,11 @@ <function access="private">init()</function> <function>clearData( bool fillWithDefaults )</function> <function>populate()</function> - <function returnType="QPixmap">colorSwatch( const QColor color )</function> - <function>load( const QString & filename )</function> + <function returnType="TQPixmap">colorSwatch( const TQColor color )</function> + <function>load( const TQString & filename )</function> <function returnType="bool">okToClear()</function> - <function>changedColor( const QString & name )</function> - <function returnType="bool">isWebColor( QColor color )</function> + <function>changedColor( const TQString & name )</function> + <function returnType="bool">isWebColor( TQColor color )</function> <function>loadSettings()</function> <function>saveSettings()</function> </functions> diff --git a/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb b/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb index 471233bd..3f4f5945 100644 --- a/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb +++ b/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb @@ -10,7 +10,7 @@ class MainForm APP_KEY = "/ColorTool/" def init() - @clipboard = Qt::Application.clipboard() + @clipboard = TQt::Application.clipboard() if @clipboard.supportsSelection() @clipboard.selectionMode = true end @@ -33,23 +33,23 @@ def clearData( fillWithDefaults ) @comments.clear() if fillWithDefaults - @colors["black"] = Qt::black - @colors["blue"] = Qt::blue - @colors["cyan"] = Qt::cyan - @colors["darkblue"] = Qt::darkBlue - @colors["darkcyan"] = Qt::darkCyan - @colors["darkgray"] = Qt::darkGray - @colors["darkgreen"] = Qt::darkGreen - @colors["darkmagenta"] = Qt::darkMagenta - @colors["darkred"] = Qt::darkRed - @colors["darkyellow"] = Qt::darkYellow - @colors["gray"] = Qt::gray - @colors["green"] = Qt::green - @colors["lightgray"] = Qt::lightGray - @colors["magenta"] = Qt::magenta - @colors["red"] = Qt::red - @colors["white"] = Qt::white - @colors["yellow"] = Qt::yellow + @colors["black"] = TQt::black + @colors["blue"] = TQt::blue + @colors["cyan"] = TQt::cyan + @colors["darkblue"] = TQt::darkBlue + @colors["darkcyan"] = TQt::darkCyan + @colors["darkgray"] = TQt::darkGray + @colors["darkgreen"] = TQt::darkGreen + @colors["darkmagenta"] = TQt::darkMagenta + @colors["darkred"] = TQt::darkRed + @colors["darkyellow"] = TQt::darkYellow + @colors["gray"] = TQt::gray + @colors["green"] = TQt::green + @colors["lightgray"] = TQt::lightGray + @colors["magenta"] = TQt::magenta + @colors["red"] = TQt::red + @colors["white"] = TQt::white + @colors["yellow"] = TQt::yellow end populate() @@ -65,7 +65,7 @@ def populate() @colorTable.numRows = @colors.length if ! @colors.empty? - pixmap = Qt::Pixmap.new( 22, 22 ) + pixmap = TQt::Pixmap.new( 22, 22 ) row = 0 @colors.sort.each do |pair| key = pair[0] @@ -75,7 +75,7 @@ def populate() @colorTable.setPixmap( row, COL_NAME, pixmap ); @colorTable.setText( row, COL_HEX, color.name().upcase() ) if @show_web - item = Qt::CheckTableItem.new( @colorTable, "" ) + item = TQt::CheckTableItem.new( @colorTable, "" ) item.checked = webColor?( color ) @colorTable.setItem( row, COL_WEB, item ) end @@ -98,16 +98,16 @@ def populate() @colorIconView.clear() @colors.each do |key, data| - Qt::IconViewItem.new( @colorIconView, key, colorSwatch(data) ) + TQt::IconViewItem.new( @colorIconView, key, colorSwatch(data) ) end @icons_dirty = false end end def colorSwatch( color ) - pixmap = Qt::Pixmap.new( 80, 80 ) + pixmap = TQt::Pixmap.new( 80, 80 ) pixmap.fill( white ) - painter = Qt::Painter.new + painter = TQt::Painter.new painter.begin( pixmap ) painter.pen = NoPen painter.brush = color @@ -131,7 +131,7 @@ def fileOpen() return end - filename = Qt::FileDialog.getOpenFileName( + filename = TQt::FileDialog.getOpenFileName( nil, "Colors (*.txt)", self, "file open", "Color Tool -- File Open" ) if ! filename.nil? @@ -147,9 +147,9 @@ def fileSave() return end - file = Qt::File.new( @filename ) - if file.open( Qt::IO_WriteOnly ) - stream = Qt::TextStream.new( file ) + file = TQt::File.new( @filename ) + if file.open( TQt::IO_WriteOnly ) + stream = TQt::TextStream.new( file ) if ! @comments.empty? stream << @comments + "\n" << "\n" end @@ -167,13 +167,13 @@ def fileSave() end def fileSaveAs() - filename = Qt::FileDialog.getSaveFileName( + filename = TQt::FileDialog.getSaveFileName( nil, "Colors (*.txt)", self, "file save as", "Color Tool -- File Save As" ) if ! filename.nil? ans = 0 - if Qt::File.exists( filename ) - ans = Qt::MessageBox.warning( + if TQt::File.exists( filename ) + ans = TQt::MessageBox.warning( self, "Color Tool -- Overwrite File", "Overwrite\n'#{filename}'?" , "&Yes", "&No", nil, 1, 1 ) @@ -191,17 +191,17 @@ def load( filename ) clearData( false ) @filename = filename regex = Regexp.new( "^\\s*(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S+.*)$" ) - file = Qt::File.new( filename ) - if file.open( Qt::IO_ReadOnly ) + file = TQt::File.new( filename ) + if file.open( TQt::IO_ReadOnly ) statusBar().message( "Loading '#{filename}'..." ) - stream = Qt::TextStream.new( file ) + stream = TQt::TextStream.new( file ) while ! stream.eof() line = stream.readLine() m = regex.match( line ) if m.nil? @comments += line else - @colors[m[4]] = Qt::Color.new(m[1].to_i,m[2].to_i,m[3].to_i ) + @colors[m[4]] = TQt::Color.new(m[1].to_i,m[2].to_i,m[3].to_i ) end end file.close() @@ -227,7 +227,7 @@ def okToClear() msg = "Colors '#{@filename}'\n" end msg += "has been changed." - ans = Qt::MessageBox.information( + ans = TQt::MessageBox.information( self, "Color Tool -- Unsaved Changes", msg, "&Save", "Cancel", "&Abandon", @@ -249,7 +249,7 @@ end def fileExit() if okToClear() saveSettings() - Qt::Application.exit( 0 ) + TQt::Application.exit( 0 ) end end @@ -321,8 +321,8 @@ end def editFind() if ! @findForm @findForm = FindForm.new( self ) - connect( @findForm, SIGNAL( 'lookfor(const QString&)' ), - self, SLOT( 'lookfor(const QString&)' ) ) + connect( @findForm, SIGNAL( 'lookfor(const TQString&)' ), + self, SLOT( 'lookfor(const TQString&)' ) ) end @findForm.show() end @@ -425,19 +425,19 @@ end def editAdd() - color = Qt::white + color = TQt::white if ! @colors.empty? visible = @colorWidgetStack.visibleWidget() if visible == @tablePage - color = Qt::Color.new(@colorTable.text( @colorTable.currentRow(), + color = TQt::Color.new(@colorTable.text( @colorTable.currentRow(), @colorTable.currentColumn() )) else - color = Qt::Color.new(@colorIconView.currentItem().text()) + color = TQt::Color.new(@colorIconView.currentItem().text()) end end - color = Qt::ColorDialog.getColor( color, self ) + color = TQt::ColorDialog.getColor( color, self ) if color.valid? - pixmap = Qt::Pixmap.new( 80, 10 ) + pixmap = TQt::Pixmap.new( 80, 10 ) pixmap.fill( color ) colorForm = ColorNameForm.new( self, "color", true ) colorForm.setColors( @colors ) @@ -445,7 +445,7 @@ def editAdd() if colorForm.exec() name = colorForm.colorLineEdit.text() @colors[name] = color - pixmap = Qt::Pixmap.new( 22, 22 ) + pixmap = TQt::Pixmap.new( 22, 22 ) pixmap.fill( color ) row = @colorTable.currentRow() @colorTable.insertRows( row, 1 ) @@ -453,13 +453,13 @@ def editAdd() @colorTable.setPixmap( row, COL_NAME, pixmap ) @colorTable.setText( row, COL_HEX, color.name().upcase() ) if @show_web - item = Qt::CheckTableItem.new( @colorTable, "" ) + item = TQt::CheckTableItem.new( @colorTable, "" ) item.checked = webColor?( color ) @colorTable.setItem( row, COL_WEB, item ) end @colorTable.setCurrentCell( row, 0 ) - Qt::IconViewItem.new( @colorIconView, name, + TQt::IconViewItem.new( @colorIconView, name, colorSwatch( color ) ) @changed = true end @@ -493,8 +493,8 @@ def editOptions() end def loadSettings() - settings = Qt::Settings.new - settings.insertSearchPath( Qt::Settings::Windows, WINDOWS_REGISTRY ) + settings = TQt::Settings.new + settings.insertSearchPath( TQt::Settings::Windows, WINDOWS_REGISTRY ) windowWidth = settings.readNumEntry( APP_KEY + "WindowWidth", 550 ) windowHeight = settings.readNumEntry( APP_KEY + "WindowHeight", 500 ) windowX = settings.readNumEntry( APP_KEY + "WindowX", 0 ) @@ -511,8 +511,8 @@ def loadSettings() end def saveSettings() - settings = Qt::Settings.new - settings.insertSearchPath( Qt::Settings::Windows, WINDOWS_REGISTRY ) + settings = TQt::Settings.new + settings.insertSearchPath( TQt::Settings::Windows, WINDOWS_REGISTRY ) settings.writeEntry( APP_KEY + "WindowWidth", width() ) settings.writeEntry( APP_KEY + "WindowHeight", height() ) settings.writeEntry( APP_KEY + "WindowX", x() ) diff --git a/qtruby/rubylib/designer/examples/colortool/optionsform.ui b/qtruby/rubylib/designer/examples/colortool/optionsform.ui index 1bb7e8ef..15bc71c4 100644 --- a/qtruby/rubylib/designer/examples/colortool/optionsform.ui +++ b/qtruby/rubylib/designer/examples/colortool/optionsform.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>OptionsForm</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>OptionsForm</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>webCheckBox</cstring> </property> @@ -43,7 +43,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup1</cstring> </property> @@ -54,7 +54,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>hexRadioButton</cstring> </property> @@ -65,7 +65,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>nameRadioButton</cstring> </property> @@ -73,7 +73,7 @@ <string>&Name, e.g. light blue</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>rgbRadioButton</cstring> </property> @@ -83,7 +83,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -108,7 +108,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okPushButton</cstring> </property> @@ -119,7 +119,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelPushButton</cstring> </property> |