summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-7.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/designer-manual-7.html')
-rw-r--r--doc/html/designer-manual-7.html50
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/html/designer-manual-7.html b/doc/html/designer-manual-7.html
index d4320d300..9da32ad66 100644
--- a/doc/html/designer-manual-7.html
+++ b/doc/html/designer-manual-7.html
@@ -142,16 +142,16 @@ DBFILE = vcr.db
enum Mode { File, Directory };
- <a href="ntqstring.html">TQString</a> fileName() const;
+ <a href="tqstring.html">TQString</a> fileName() const;
Mode mode() const;
</pre>
<p>The constructor is declared in the standard way for widgets. We declare two public functions, <tt>fileName()</tt> to return the filename, and <tt>mode()</tt> to return the mode.</p>
<pre> public slots:
- void setFileName( const <a href="ntqstring.html">TQString</a> &amp;fn );
+ void setFileName( const <a href="tqstring.html">TQString</a> &amp;fn );
void setMode( Mode m );
signals:
- void fileNameChanged( const <a href="ntqstring.html">TQString</a> &amp; );
+ void fileNameChanged( const <a href="tqstring.html">TQString</a> &amp; );
private slots:
void chooseFile();
@@ -179,8 +179,8 @@ DBFILE = vcr.db
layout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( lineEdit );
</pre>
<p>We begin by creating a horizontal box layout (<a href="qhboxlayout.html">TQHBoxLayout</a>) and add a <a href="ntqlineedit.html">TQLineEdit</a> and a <a href="ntqpushbutton.html">TQPushButton</a> to it.</p>
-<pre> <a href="tqobject.html#connect">connect</a>( lineEdit, TQ_SIGNAL( <a href="ntqlineedit.html#textChanged">textChanged</a>( const <a href="ntqstring.html">TQString</a> &amp; ) ),
- this, TQ_SIGNAL( fileNameChanged( const <a href="ntqstring.html">TQString</a> &amp; ) ) );
+<pre> <a href="tqobject.html#connect">connect</a>( lineEdit, TQ_SIGNAL( <a href="ntqlineedit.html#textChanged">textChanged</a>( const <a href="tqstring.html">TQString</a> &amp; ) ),
+ this, TQ_SIGNAL( fileNameChanged( const <a href="tqstring.html">TQString</a> &amp; ) ) );
button = new <a href="ntqpushbutton.html">TQPushButton</a>( "...", this, "filechooser_button" );
button-&gt;<a href="tqwidget.html#setFixedWidth">setFixedWidth</a>( button-&gt;<a href="tqwidget.html#fontMetrics">fontMetrics</a>().width( " ... " ) );
@@ -194,7 +194,7 @@ DBFILE = vcr.db
}
</pre>
<p>We set the lineEdit as the focus proxy for our custom widget. This means that when the widget is given focus the focus actually goes to the lineEdit.</p>
-<pre> void FileChooser::setFileName( const <a href="ntqstring.html">TQString</a> &amp;fn )
+<pre> void FileChooser::setFileName( const <a href="tqstring.html">TQString</a> &amp;fn )
{
lineEdit-&gt;<a href="ntqlineedit.html#setText">setText</a>( fn );
}
@@ -207,13 +207,13 @@ DBFILE = vcr.db
<p>The <tt>setFileName()</tt> function sets the filename in the <a href="ntqlineedit.html">TQLineEdit</a>, and the <tt>fileName()</tt> function returns the filename from the <a href="ntqlineedit.html">TQLineEdit</a>. The <tt>setMode()</tt> and <tt>mode()</tt> functions (not shown) are similarly set and return the given mode.</p>
<pre> void FileChooser::chooseFile()
{
- <a href="ntqstring.html">TQString</a> fn;
+ <a href="tqstring.html">TQString</a> fn;
if ( mode() == File )
fn = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( lineEdit-&gt;<a href="ntqlineedit.html#text">text</a>(), TQString::null, this );
else
fn = TQFileDialog::<a href="ntqfiledialog.html#getExistingDirectory">getExistingDirectory</a>( lineEdit-&gt;<a href="ntqlineedit.html#text">text</a>(),this );
- if ( !fn.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) {
+ if ( !fn.<a href="tqstring.html#isEmpty">isEmpty</a>() ) {
lineEdit-&gt;<a href="ntqlineedit.html#setText">setText</a>( fn );
emit fileNameChanged( fn );
}
@@ -259,14 +259,14 @@ DEFINES += FILECHOOSER_IS_WIDGET
public:
CustomWidgetPlugin();
- <a href="ntqstringlist.html">TQStringList</a> keys() const;
- <a href="tqwidget.html">TQWidget</a>* create( const <a href="ntqstring.html">TQString</a> &amp;classname, TQWidget* parent = 0, const char* name = 0 );
- <a href="ntqstring.html">TQString</a> group( const <a href="ntqstring.html">TQString</a>&amp; ) const;
- <a href="ntqiconset.html">TQIconSet</a> iconSet( const <a href="ntqstring.html">TQString</a>&amp; ) const;
- <a href="ntqstring.html">TQString</a> includeFile( const <a href="ntqstring.html">TQString</a>&amp; ) const;
- <a href="ntqstring.html">TQString</a> toolTip( const <a href="ntqstring.html">TQString</a>&amp; ) const;
- <a href="ntqstring.html">TQString</a> whatsThis( const <a href="ntqstring.html">TQString</a>&amp; ) const;
- bool isContainer( const <a href="ntqstring.html">TQString</a>&amp; ) const;
+ <a href="tqstringlist.html">TQStringList</a> keys() const;
+ <a href="tqwidget.html">TQWidget</a>* create( const <a href="tqstring.html">TQString</a> &amp;classname, TQWidget* parent = 0, const char* name = 0 );
+ <a href="tqstring.html">TQString</a> group( const <a href="tqstring.html">TQString</a>&amp; ) const;
+ <a href="ntqiconset.html">TQIconSet</a> iconSet( const <a href="tqstring.html">TQString</a>&amp; ) const;
+ <a href="tqstring.html">TQString</a> includeFile( const <a href="tqstring.html">TQString</a>&amp; ) const;
+ <a href="tqstring.html">TQString</a> toolTip( const <a href="tqstring.html">TQString</a>&amp; ) const;
+ <a href="tqstring.html">TQString</a> whatsThis( const <a href="tqstring.html">TQString</a>&amp; ) const;
+ bool isContainer( const <a href="tqstring.html">TQString</a>&amp; ) const;
};
</pre>
<blockquote><p align="center"><em>From <tt>qt/tools/designer/examples/filechooser/plugin/plugin.h</tt></em></p></blockquote>
@@ -282,14 +282,14 @@ DEFINES += FILECHOOSER_IS_WIDGET
<!-- index keys() --><p>The <tt>keys</tt> function.</p>
<pre> TQStringList CustomWidgetPlugin::<a href="tqwidgetplugin.html#keys">keys</a>() const
{
- <a href="ntqstringlist.html">TQStringList</a> list;
+ <a href="tqstringlist.html">TQStringList</a> list;
list &lt;&lt; "FileChooser";
return list;
}
</pre>
<p>For each widget class that you want to wrap in the plugin implementation you should supply a key by which the class can be identified. This key <em>must</em> be your class's name, so in our example we add a single key, 'FileChooser'.</p>
<!-- index create() --><p>The <tt>create()</tt> function.</p>
-<pre> TQWidget* CustomWidgetPlugin::<a href="tqwidgetplugin.html#create">create</a>( const <a href="ntqstring.html">TQString</a> &amp;key, TQWidget* parent, const char* name )
+<pre> TQWidget* CustomWidgetPlugin::<a href="tqwidgetplugin.html#create">create</a>( const <a href="tqstring.html">TQString</a> &amp;key, TQWidget* parent, const char* name )
{
if ( key == "FileChooser" )
return new FileChooser( parent, name );
@@ -298,7 +298,7 @@ DEFINES += FILECHOOSER_IS_WIDGET
</pre>
<p>In this function we create an instance of the requested class and return a TQWidget pointer to the newly created widget. Copy this function changing the class name and the feature name and create an instance of your widget just as we've done here. (See the <a href="http://doc.trolltech.com/plugins.html">TQt Plugin documentation</a> for more information.)</p>
<!-- index includeFile() --><p>The <tt>includeFile()</tt> function.</p>
-<pre> TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#includeFile">includeFile</a>( const <a href="ntqstring.html">TQString</a>&amp; feature ) const
+<pre> TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#includeFile">includeFile</a>( const <a href="tqstring.html">TQString</a>&amp; feature ) const
{
if ( feature == "FileChooser" )
return "filechooser.h";
@@ -307,33 +307,33 @@ DEFINES += FILECHOOSER_IS_WIDGET
</pre>
<p>This function returns the name of the include file for the custom widget. Copy this function changing the class name, key and include filename to suit your own custom widget.</p>
<!-- index group() --><!-- index iconSet() --><!-- index includeFile() --><!-- index toolTip() --><!-- index whatsThis() --><p>The <tt>group()</tt>, <tt>iconSet()</tt>, <tt>toolTip()</tt> and <tt>whatsThis()</tt> functions.</p>
-<pre> TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#group">group</a>( const <a href="ntqstring.html">TQString</a>&amp; feature ) const
+<pre> TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#group">group</a>( const <a href="tqstring.html">TQString</a>&amp; feature ) const
{
if ( feature == "FileChooser" )
return "Input";
return TQString::null;
}
- TQIconSet CustomWidgetPlugin::<a href="tqwidgetplugin.html#iconSet">iconSet</a>( const <a href="ntqstring.html">TQString</a>&amp; ) const
+ TQIconSet CustomWidgetPlugin::<a href="tqwidgetplugin.html#iconSet">iconSet</a>( const <a href="tqstring.html">TQString</a>&amp; ) const
{
return TQIconSet( TQPixmap( filechooser_pixmap ) );
}
- TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#includeFile">includeFile</a>( const <a href="ntqstring.html">TQString</a>&amp; feature ) const
+ TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#includeFile">includeFile</a>( const <a href="tqstring.html">TQString</a>&amp; feature ) const
{
if ( feature == "FileChooser" )
return "filechooser.h";
return TQString::null;
}
- TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#toolTip">toolTip</a>( const <a href="ntqstring.html">TQString</a>&amp; feature ) const
+ TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#toolTip">toolTip</a>( const <a href="tqstring.html">TQString</a>&amp; feature ) const
{
if ( feature == "FileChooser" )
return "File Chooser Widget";
return TQString::null;
}
- TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#whatsThis">whatsThis</a>( const <a href="ntqstring.html">TQString</a>&amp; feature ) const
+ TQString CustomWidgetPlugin::<a href="tqwidgetplugin.html#whatsThis">whatsThis</a>( const <a href="tqstring.html">TQString</a>&amp; feature ) const
{
if ( feature == "FileChooser" )
return "A widget to choose a file or directory";
@@ -343,7 +343,7 @@ DEFINES += FILECHOOSER_IS_WIDGET
<p>We use the <tt>group()</tt> function to identify which <em>TQt Designer</em> toolbar group this custom widget should be part of. If we use a name that is not in use <em>TQt Designer</em> will create a new toolbar group with the given name. Copy this function, changing the class name, key and group name to suit your own widget plugin implementation.</p>
<p>The <tt>iconSet()</tt> function returns the pixmap to use in the toolbar to represent the custom widget. The <tt>toolTip()</tt> function returns the tooltip text and the <tt>whatsThis()</tt> function returns the Whats This text. Copy each of these functions changing the class name, key and the string you return to suit your own widget plugin implementation.</p>
<!-- index isContainer() --><p>The <tt>isContainer()</tt> function.</p>
-<pre> bool CustomWidgetPlugin::<a href="tqwidgetplugin.html#isContainer">isContainer</a>( const <a href="ntqstring.html">TQString</a>&amp; ) const
+<pre> bool CustomWidgetPlugin::<a href="tqwidgetplugin.html#isContainer">isContainer</a>( const <a href="tqstring.html">TQString</a>&amp; ) const
{
return FALSE;
}