summaryrefslogtreecommitdiffstats
path: root/doc/html/showimg-example.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
commitea318d1431c89e647598c510c4245c6571aa5f46 (patch)
tree996d29b80c30d453dda86d1a23162d441628f169 /doc/html/showimg-example.html
parentaaf89d4b48f69c9293feb187db26362e550b5561 (diff)
downloadtqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz
tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/showimg-example.html')
-rw-r--r--doc/html/showimg-example.html432
1 files changed, 216 insertions, 216 deletions
diff --git a/doc/html/showimg-example.html b/doc/html/showimg-example.html
index 99828891d..48d883ee5 100644
--- a/doc/html/showimg-example.html
+++ b/doc/html/showimg-example.html
@@ -50,21 +50,21 @@ format (GIF, BMP, PPM, XMP, etc.).
#ifndef SHOWIMG_H
#define SHOWIMG_H
-#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;
-#include &lt;<a href="qimage-h.html">qimage.h</a>&gt;
+#include &lt;<a href="qwidget-h.html">ntqwidget.h</a>&gt;
+#include &lt;<a href="qimage-h.html">ntqimage.h</a>&gt;
class TQLabel;
class TQMenuBar;
class TQPopupMenu;
-class ImageViewer : public <a href="qwidget.html">TQWidget</a>
+class ImageViewer : public <a href="ntqwidget.html">TQWidget</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- ImageViewer( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0, int wFlags=0 );
+ ImageViewer( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0, int wFlags=0 );
~ImageViewer();
- bool loadImage( const <a href="qstring.html">TQString</a>&amp; );
+ bool loadImage( const <a href="ntqstring.html">TQString</a>&amp; );
protected:
void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> * );
void resizeEvent( <a href="qresizeevent.html">TQResizeEvent</a> * );
@@ -79,20 +79,20 @@ private:
bool useColorContext() const;
int alloc_context;
bool convertEvent( <a href="qmouseevent.html">TQMouseEvent</a>* e, int&amp; x, int&amp; y );
- <a href="qstring.html">TQString</a> filename;
- <a href="qimage.html">TQImage</a> image; // the loaded image
- <a href="qpixmap.html">TQPixmap</a> pm; // the converted pixmap
- <a href="qpixmap.html">TQPixmap</a> pmScaled; // the scaled pixmap
-
- <a href="qmenubar.html">TQMenuBar</a> *menubar;
- <a href="qpopupmenu.html">TQPopupMenu</a> *file;
- <a href="qpopupmenu.html">TQPopupMenu</a> *saveimage;
- <a href="qpopupmenu.html">TQPopupMenu</a> *savepixmap;
- <a href="qpopupmenu.html">TQPopupMenu</a> *edit;
- <a href="qpopupmenu.html">TQPopupMenu</a> *options;
-
- <a href="qwidget.html">TQWidget</a> *helpmsg;
- <a href="qlabel.html">TQLabel</a> *status;
+ <a href="ntqstring.html">TQString</a> filename;
+ <a href="ntqimage.html">TQImage</a> image; // the loaded image
+ <a href="ntqpixmap.html">TQPixmap</a> pm; // the converted pixmap
+ <a href="ntqpixmap.html">TQPixmap</a> pmScaled; // the scaled pixmap
+
+ <a href="ntqmenubar.html">TQMenuBar</a> *menubar;
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *file;
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *saveimage;
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *savepixmap;
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *edit;
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *options;
+
+ <a href="ntqwidget.html">TQWidget</a> *helpmsg;
+ <a href="ntqlabel.html">TQLabel</a> *status;
int si, sp, ac, co, mo, fd, bd, // Menu item ids
td, ta, ba, fa, au, ad, dd,
ss, cc, t1, t8, t32;
@@ -103,7 +103,7 @@ private:
int clickx, clicky;
bool may_be_other;
static ImageViewer* other;
- void setImage(const <a href="qimage.html">TQImage</a>&amp; newimage);
+ void setImage(const <a href="ntqimage.html">TQImage</a>&amp; newimage);
private slots:
void to1Bit();
@@ -147,14 +147,14 @@ private slots:
#include "showimg.h"
#include "imagetexteditor.h"
-#include &lt;<a href="qmenubar-h.html">qmenubar.h</a>&gt;
-#include &lt;<a href="qfiledialog-h.html">qfiledialog.h</a>&gt;
-#include &lt;<a href="qmessagebox-h.html">qmessagebox.h</a>&gt;
-#include &lt;<a href="qpopupmenu-h.html">qpopupmenu.h</a>&gt;
-#include &lt;<a href="qlabel-h.html">qlabel.h</a>&gt;
-#include &lt;<a href="qpainter-h.html">qpainter.h</a>&gt;
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qclipboard-h.html">qclipboard.h</a>&gt;
+#include &lt;<a href="qmenubar-h.html">ntqmenubar.h</a>&gt;
+#include &lt;<a href="qfiledialog-h.html">ntqfiledialog.h</a>&gt;
+#include &lt;<a href="qmessagebox-h.html">ntqmessagebox.h</a>&gt;
+#include &lt;<a href="qpopupmenu-h.html">ntqpopupmenu.h</a>&gt;
+#include &lt;<a href="qlabel-h.html">ntqlabel.h</a>&gt;
+#include &lt;<a href="qpainter-h.html">ntqpainter.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qclipboard-h.html">ntqclipboard.h</a>&gt;
/*
@@ -164,8 +164,8 @@ private slots:
The menu uses a single slot to simplify the process of adding
more items to the options menu.
*/
-<a name="f405"></a>ImageViewer::ImageViewer( <a href="qwidget.html">TQWidget</a> *parent, const char *name, int wFlags )
- : <a href="qwidget.html">TQWidget</a>( parent, name, wFlags ),
+<a name="f405"></a>ImageViewer::ImageViewer( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name, int wFlags )
+ : <a href="ntqwidget.html">TQWidget</a>( parent, name, wFlags ),
conversion_flags( PreferDither ),
helpmsg( 0 )
{
@@ -175,86 +175,86 @@ private slots:
clicky = -1;
alloc_context = 0;
- menubar = new <a href="qmenubar.html">TQMenuBar</a>(this);
-<a name="x1326"></a> menubar-&gt;<a href="qmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle );
+ menubar = new <a href="ntqmenubar.html">TQMenuBar</a>(this);
+<a name="x1326"></a> menubar-&gt;<a href="ntqmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle );
-<a name="x1323"></a> <a href="qstrlist.html">TQStrList</a> fmt = TQImage::<a href="qimage.html#outputFormats">outputFormats</a>();
- saveimage = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
- savepixmap = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
-<a name="x1344"></a><a name="x1343"></a> for (const char* f = fmt.<a href="qptrlist.html#first">first</a>(); f; f = fmt.<a href="qptrlist.html#next">next</a>()) {
-<a name="x1327"></a> saveimage-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( f );
- savepixmap-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( f );
+<a name="x1323"></a> <a href="ntqstrlist.html">TQStrList</a> fmt = TQImage::<a href="ntqimage.html#outputFormats">outputFormats</a>();
+ saveimage = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+ savepixmap = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+<a name="x1344"></a><a name="x1343"></a> for (const char* f = fmt.<a href="ntqptrlist.html#first">first</a>(); f; f = fmt.<a href="ntqptrlist.html#next">next</a>()) {
+<a name="x1327"></a> saveimage-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( f );
+ savepixmap-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( f );
}
-<a name="x1341"></a> <a href="qobject.html#connect">connect</a>( saveimage, SIGNAL(<a href="qpopupmenu.html#activated">activated</a>(int)), this, SLOT(saveImage(int)) );
- <a href="qobject.html#connect">connect</a>( savepixmap, SIGNAL(<a href="qpopupmenu.html#activated">activated</a>(int)), this, SLOT(savePixmap(int)) );
-
- file = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
- menubar-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;File", file );
- file-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;New window", this, SLOT(newWindow()), CTRL+Key_N );
- file-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;Open...", this, SLOT(openFile()), CTRL+Key_O );
- si = file-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Save image", saveimage );
- sp = file-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Save pixmap", savepixmap );
-<a name="x1328"></a> file-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- file-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "E&amp;xit", qApp, SLOT(<a href="qapplication.html#quit">quit</a>()), CTRL+Key_Q );
-
- edit = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
- menubar-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;Edit", edit );
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Copy", this, SLOT(copy()), CTRL+Key_C);
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Paste", this, SLOT(paste()), CTRL+Key_V);
- edit-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Horizontal flip", this, SLOT(hFlip()), ALT+Key_H);
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Vertical flip", this, SLOT(vFlip()), ALT+Key_V);
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Rotate 180", this, SLOT(rot180()), ALT+Key_R);
- edit-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>("&amp;Text...", this, SLOT(editText()));
- edit-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- t1 = edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Convert to &amp;1 bit", this, SLOT(to1Bit()) );
- t8 = edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Convert to &amp;8 bit", this, SLOT(to8Bit()) );
- t32 = edit-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Convert to &amp;32 bit", this, SLOT(to32Bit()) );
-
- options = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
- menubar-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;Options", options );
- ac = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "AutoColor" );
- co = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "ColorOnly" );
- mo = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "MonoOnly" );
- options-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- fd = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "DiffuseDither" );
- bd = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "OrderedDither" );
- td = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "ThresholdDither" );
- options-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- ta = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "ThresholdAlphaDither" );
- ba = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "OrderedAlphaDither" );
- fa = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "DiffuseAlphaDither" );
- options-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- ad = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "PreferDither" );
- dd = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "AvoidDither" );
- options-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
- ss = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Smooth scaling" );
- cc = options-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Use color context" );
-<a name="x1309"></a> if ( TQApplication::<a href="qapplication.html#colorSpec">colorSpec</a>() == TQApplication::ManyColor )
-<a name="x1331"></a> options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( cc, FALSE );
-<a name="x1342"></a> options-&gt;<a href="qpopupmenu.html#setCheckable">setCheckable</a>( TRUE );
+<a name="x1341"></a> <a href="ntqobject.html#connect">connect</a>( saveimage, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(saveImage(int)) );
+ <a href="ntqobject.html#connect">connect</a>( savepixmap, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(savePixmap(int)) );
+
+ file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+ menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;File", file );
+ file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;New window", this, SLOT(newWindow()), CTRL+Key_N );
+ file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Open...", this, SLOT(openFile()), CTRL+Key_O );
+ si = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save image", saveimage );
+ sp = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save pixmap", savepixmap );
+<a name="x1328"></a> file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "E&amp;xit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q );
+
+ edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+ menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Edit", edit );
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Copy", this, SLOT(copy()), CTRL+Key_C);
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Paste", this, SLOT(paste()), CTRL+Key_V);
+ edit-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Horizontal flip", this, SLOT(hFlip()), ALT+Key_H);
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Vertical flip", this, SLOT(vFlip()), ALT+Key_V);
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Rotate 180", this, SLOT(rot180()), ALT+Key_R);
+ edit-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Text...", this, SLOT(editText()));
+ edit-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ t1 = edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Convert to &amp;1 bit", this, SLOT(to1Bit()) );
+ t8 = edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Convert to &amp;8 bit", this, SLOT(to8Bit()) );
+ t32 = edit-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Convert to &amp;32 bit", this, SLOT(to32Bit()) );
+
+ options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+ menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Options", options );
+ ac = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "AutoColor" );
+ co = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "ColorOnly" );
+ mo = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "MonoOnly" );
+ options-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ fd = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "DiffuseDither" );
+ bd = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "OrderedDither" );
+ td = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "ThresholdDither" );
+ options-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ ta = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "ThresholdAlphaDither" );
+ ba = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "OrderedAlphaDither" );
+ fa = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "DiffuseAlphaDither" );
+ options-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ ad = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "PreferDither" );
+ dd = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "AvoidDither" );
+ options-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
+ ss = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Smooth scaling" );
+ cc = options-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Use color context" );
+<a name="x1309"></a> if ( TQApplication::<a href="ntqapplication.html#colorSpec">colorSpec</a>() == TQApplication::ManyColor )
+<a name="x1331"></a> options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( cc, FALSE );
+<a name="x1342"></a> options-&gt;<a href="ntqpopupmenu.html#setCheckable">setCheckable</a>( TRUE );
setMenuItemFlags();
- menubar-&gt;<a href="qmenudata.html#insertSeparator">insertSeparator</a>();
+ menubar-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
- <a href="qpopupmenu.html">TQPopupMenu</a>* help = new <a href="qpopupmenu.html">TQPopupMenu</a>( menubar );
- menubar-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "&amp;Help", help );
- help-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( "Help!", this, SLOT(giveHelp()), CTRL+Key_H );
+ <a href="ntqpopupmenu.html">TQPopupMenu</a>* help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
+ menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Help", help );
+ help-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Help!", this, SLOT(giveHelp()), CTRL+Key_H );
- <a href="qobject.html#connect">connect</a>( options, SIGNAL(<a href="qpopupmenu.html#activated">activated</a>(int)), this, SLOT(doOption(int)) );
+ <a href="ntqobject.html#connect">connect</a>( options, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(doOption(int)) );
- status = new <a href="qlabel.html">TQLabel</a>(this);
- status-&gt;<a href="qframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::WinPanel | TQFrame::Sunken );
-<a name="x1354"></a> status-&gt;<a href="qwidget.html#setFixedHeight">setFixedHeight</a>( <a href="qwidget.html#fontMetrics">fontMetrics</a>().height() + 4 );
+ status = new <a href="ntqlabel.html">TQLabel</a>(this);
+ status-&gt;<a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::WinPanel | TQFrame::Sunken );
+<a name="x1354"></a> status-&gt;<a href="ntqwidget.html#setFixedHeight">setFixedHeight</a>( <a href="ntqwidget.html#fontMetrics">fontMetrics</a>().height() + 4 );
- <a href="qwidget.html#setMouseTracking">setMouseTracking</a>( TRUE );
+ <a href="ntqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE );
}
ImageViewer::~ImageViewer()
{
if ( alloc_context )
-<a name="x1313"></a> TQColor::<a href="qcolor.html#destroyAllocContext">destroyAllocContext</a>( alloc_context );
+<a name="x1313"></a> TQColor::<a href="ntqcolor.html#destroyAllocContext">destroyAllocContext</a>( alloc_context );
if ( other == this )
other = 0;
}
@@ -268,15 +268,15 @@ void <a name="f406"></a>ImageViewer::doOption(int item)
{
if ( item == ss || item == cc ) {
// Toggle
-<a name="x1329"></a> bool newbool = !options-&gt;<a href="qmenudata.html#isItemChecked">isItemChecked</a>(item);
-<a name="x1330"></a> options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>(item, newbool);
+<a name="x1329"></a> bool newbool = !options-&gt;<a href="ntqmenudata.html#isItemChecked">isItemChecked</a>(item);
+<a name="x1330"></a> options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(item, newbool);
// And reconvert...
reconvertImage();
- <a href="qwidget.html#repaint">repaint</a>(image.hasAlphaBuffer()); // show image in widget
+ <a href="ntqwidget.html#repaint">repaint</a>(image.hasAlphaBuffer()); // show image in widget
return;
}
- if ( options-&gt;<a href="qmenudata.html#isItemChecked">isItemChecked</a>( item ) ) return; // They are all radio buttons
+ if ( options-&gt;<a href="ntqmenudata.html#isItemChecked">isItemChecked</a>( item ) ) return; // They are all radio buttons
int ocf = conversion_flags;
@@ -308,7 +308,7 @@ void <a name="f406"></a>ImageViewer::doOption(int item)
setMenuItemFlags();
// And reconvert...
reconvertImage();
- <a href="qwidget.html#repaint">repaint</a>(image.hasAlphaBuffer()); // show image in widget
+ <a href="ntqwidget.html#repaint">repaint</a>(image.hasAlphaBuffer()); // show image in widget
}
}
@@ -319,57 +319,57 @@ void <a name="f407"></a>ImageViewer::setMenuItemFlags()
{
// File
bool valid_image = pm.size() != TQSize( 0, 0 );
- file-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( si, valid_image );
- file-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( sp, valid_image );
+ file-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( si, valid_image );
+ file-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( sp, valid_image );
// Edit
- edit-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( t1, image.depth() != 1 );
- edit-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( t8, image.depth() != 8 );
- edit-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( t32, image.depth() != 32 );
+ edit-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( t1, image.depth() != 1 );
+ edit-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( t8, image.depth() != 8 );
+ edit-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( t32, image.depth() != 32 );
// Options
bool may_need_color_dithering =
!valid_image
- || image.depth() == 32 &amp;&amp; TQPixmap::<a href="qpixmap.html#defaultDepth">defaultDepth</a>() &lt; 24;
+ || image.depth() == 32 &amp;&amp; TQPixmap::<a href="ntqpixmap.html#defaultDepth">defaultDepth</a>() &lt; 24;
bool may_need_dithering = may_need_color_dithering
- || image.depth() &gt; 1 &amp;&amp; options-&gt;<a href="qmenudata.html#isItemChecked">isItemChecked</a>(mo)
- || image.depth() &gt; 1 &amp;&amp; TQPixmap::<a href="qpixmap.html#defaultDepth">defaultDepth</a>() == 1;
+ || image.depth() &gt; 1 &amp;&amp; options-&gt;<a href="ntqmenudata.html#isItemChecked">isItemChecked</a>(mo)
+ || image.depth() &gt; 1 &amp;&amp; TQPixmap::<a href="ntqpixmap.html#defaultDepth">defaultDepth</a>() == 1;
bool has_alpha_mask = !valid_image || image.hasAlphaBuffer();
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( fd, may_need_dithering );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( bd, may_need_dithering );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( td, may_need_dithering );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( fd, may_need_dithering );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( bd, may_need_dithering );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( td, may_need_dithering );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( ta, has_alpha_mask );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( fa, has_alpha_mask );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( ba, has_alpha_mask );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( ta, has_alpha_mask );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( fa, has_alpha_mask );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( ba, has_alpha_mask );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( ad, may_need_color_dithering );
- options-&gt;<a href="qmenudata.html#setItemEnabled">setItemEnabled</a>( dd, may_need_color_dithering );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( ad, may_need_color_dithering );
+ options-&gt;<a href="ntqmenudata.html#setItemEnabled">setItemEnabled</a>( dd, may_need_color_dithering );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( ac, (conversion_flags &amp; ColorMode_Mask) == AutoColor );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( co, (conversion_flags &amp; ColorMode_Mask) == ColorOnly );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( mo, (conversion_flags &amp; ColorMode_Mask) == MonoOnly );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( fd, (conversion_flags &amp; Dither_Mask) == DiffuseDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( bd, (conversion_flags &amp; Dither_Mask) == OrderedDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( td, (conversion_flags &amp; Dither_Mask) == ThresholdDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( ta, (conversion_flags &amp; AlphaDither_Mask) == ThresholdAlphaDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( fa, (conversion_flags &amp; AlphaDither_Mask) == DiffuseAlphaDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( ba, (conversion_flags &amp; AlphaDither_Mask) == OrderedAlphaDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( ad, (conversion_flags &amp; DitherMode_Mask) == PreferDither );
- options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( dd, (conversion_flags &amp; DitherMode_Mask) == AvoidDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( ac, (conversion_flags &amp; ColorMode_Mask) == AutoColor );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( co, (conversion_flags &amp; ColorMode_Mask) == ColorOnly );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( mo, (conversion_flags &amp; ColorMode_Mask) == MonoOnly );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( fd, (conversion_flags &amp; Dither_Mask) == DiffuseDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( bd, (conversion_flags &amp; Dither_Mask) == OrderedDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( td, (conversion_flags &amp; Dither_Mask) == ThresholdDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( ta, (conversion_flags &amp; AlphaDither_Mask) == ThresholdAlphaDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( fa, (conversion_flags &amp; AlphaDither_Mask) == DiffuseAlphaDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( ba, (conversion_flags &amp; AlphaDither_Mask) == OrderedAlphaDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( ad, (conversion_flags &amp; DitherMode_Mask) == PreferDither );
+ options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( dd, (conversion_flags &amp; DitherMode_Mask) == AvoidDither );
}
void <a name="f408"></a>ImageViewer::updateStatus()
{
if ( pm.size() == TQSize( 0, 0 ) ) {
if ( !filename.isEmpty() )
- status-&gt;<a href="qlabel.html#setText">setText</a>("Could not load image");
+ status-&gt;<a href="ntqlabel.html#setText">setText</a>("Could not load image");
else
- status-&gt;<a href="qlabel.html#setText">setText</a>("No image - select Open from File menu.");
+ status-&gt;<a href="ntqlabel.html#setText">setText</a>("No image - select Open from File menu.");
} else {
- <a href="qstring.html">TQString</a> message, moremsg;
- message.<a href="qstring.html#sprintf">sprintf</a>("%dx%d", image.width(), image.height());
+ <a href="ntqstring.html">TQString</a> message, moremsg;
+ message.<a href="ntqstring.html#sprintf">sprintf</a>("%dx%d", image.width(), image.height());
if ( pm.size() != pmScaled.size() ) {
moremsg.sprintf(" [%dx%d]", pmScaled.width(),
pmScaled.height());
@@ -416,7 +416,7 @@ void <a name="f408"></a>ImageViewer::updateStatus()
}
message += moremsg;
}
- status-&gt;<a href="qlabel.html#setText">setText</a>(message);
+ status-&gt;<a href="ntqlabel.html#setText">setText</a>(message);
}
}
@@ -425,12 +425,12 @@ void <a name="f408"></a>ImageViewer::updateStatus()
*/
void <a name="f409"></a>ImageViewer::saveImage( int item )
{
-<a name="x1332"></a> const char* fmt = saveimage-&gt;<a href="qmenudata.html#text">text</a>(item);
-<a name="x1319"></a> <a href="qstring.html">TQString</a> savefilename = TQFileDialog::<a href="qfiledialog.html#getSaveFileName">getSaveFileName</a>(TQString::null, <a href="qstring.html#TQString-null">TQString::null</a>,
+<a name="x1332"></a> const char* fmt = saveimage-&gt;<a href="ntqmenudata.html#text">text</a>(item);
+<a name="x1319"></a> <a href="ntqstring.html">TQString</a> savefilename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>(TQString::null, <a href="ntqstring.html#TQString-null">TQString::null</a>,
this, filename);
- if ( !savefilename.<a href="qstring.html#isEmpty">isEmpty</a>() )
+ if ( !savefilename.<a href="ntqstring.html#isEmpty">isEmpty</a>() )
if ( !image.save( savefilename, fmt ) )
-<a name="x1333"></a> TQMessageBox::<a href="qmessagebox.html#warning">warning</a>( this, "Save failed", "Error saving file" );
+<a name="x1333"></a> TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( this, "Save failed", "Error saving file" );
}
/*
@@ -438,20 +438,20 @@ void <a name="f409"></a>ImageViewer::saveImage( int item )
*/
void <a name="f410"></a>ImageViewer::savePixmap( int item )
{
- const char* fmt = savepixmap-&gt;<a href="qmenudata.html#text">text</a>(item);
- <a href="qstring.html">TQString</a> savefilename = TQFileDialog::<a href="qfiledialog.html#getSaveFileName">getSaveFileName</a>(TQString::null,
+ const char* fmt = savepixmap-&gt;<a href="ntqmenudata.html#text">text</a>(item);
+ <a href="ntqstring.html">TQString</a> savefilename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>(TQString::null,
TQString::null, this, filename);
- if ( !savefilename.<a href="qstring.html#isEmpty">isEmpty</a>() )
+ if ( !savefilename.<a href="ntqstring.html#isEmpty">isEmpty</a>() )
if ( !pmScaled.save( savefilename, fmt ) )
- TQMessageBox::<a href="qmessagebox.html#warning">warning</a>( this, "Save failed", "Error saving file" );
+ TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( this, "Save failed", "Error saving file" );
}
void <a name="f411"></a>ImageViewer::newWindow()
{
ImageViewer* that = new ImageViewer(0, "new window", WDestructiveClose);
- that-&gt;options-&gt;<a href="qmenudata.html#setItemChecked">setItemChecked</a>( that-&gt;cc, useColorContext() );
- that-&gt;<a href="qwidget.html#show">show</a>();
+ that-&gt;options-&gt;<a href="ntqmenudata.html#setItemChecked">setItemChecked</a>( that-&gt;cc, useColorContext() );
+ that-&gt;<a href="ntqwidget.html#show">show</a>();
}
/*
@@ -459,12 +459,12 @@ void <a name="f411"></a>ImageViewer::newWindow()
*/
void <a name="f412"></a>ImageViewer::openFile()
{
-<a name="x1318"></a> <a href="qstring.html">TQString</a> newfilename = TQFileDialog::<a href="qfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null,
+<a name="x1318"></a> <a href="ntqstring.html">TQString</a> newfilename = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null,
TQString::null,
this );
- if ( !newfilename.<a href="qstring.html#isEmpty">isEmpty</a>() ) {
+ if ( !newfilename.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) {
loadImage( newfilename ) ;
- <a href="qwidget.html#repaint">repaint</a>(); // show image in widget
+ <a href="ntqwidget.html#repaint">repaint</a>(); // show image in widget
}
}
@@ -477,19 +477,19 @@ void <a name="f412"></a>ImageViewer::openFile()
Returns TRUE if the image was successfully loaded.
*/
-bool <a name="f413"></a>ImageViewer::loadImage( const <a href="qstring.html">TQString</a>&amp; fileName )
+bool <a name="f413"></a>ImageViewer::loadImage( const <a href="ntqstring.html">TQString</a>&amp; fileName )
{
filename = fileName;
bool ok = FALSE;
if ( !filename.isEmpty() ) {
-<a name="x1312"></a> TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
+<a name="x1312"></a> TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
ok = image.load(filename, 0);
pickx = -1;
clickx = -1;
if ( ok )
ok = reconvertImage();
if ( ok ) {
- <a href="qwidget.html#setCaption">setCaption</a>( filename ); // set window caption
+ <a href="ntqwidget.html#setCaption">setCaption</a>( filename ); // set window caption
int w = pm.width();
int h = pm.height();
@@ -501,13 +501,13 @@ bool <a name="f413"></a>ImageViewer::loadImage( const <a href="qstring.html">TQS
h *= multiply;
}
-<a name="x1347"></a><a name="x1325"></a> h += menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>(w) + status-&gt;<a href="qwidget.html#height">height</a>();
- <a href="qwidget.html#resize">resize</a>( w, h ); // we resize to fit image
+<a name="x1347"></a><a name="x1325"></a> h += menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>(w) + status-&gt;<a href="ntqwidget.html#height">height</a>();
+ <a href="ntqwidget.html#resize">resize</a>( w, h ); // we resize to fit image
} else {
pm.resize(0,0); // couldn't load image
- <a href="qwidget.html#update">update</a>();
+ <a href="ntqwidget.html#update">update</a>();
}
-<a name="x1311"></a> TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
+<a name="x1311"></a> TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
}
updateStatus();
setMenuItemFlags();
@@ -521,44 +521,44 @@ bool <a name="f414"></a>ImageViewer::reconvertImage()
if ( image.isNull() ) return FALSE;
if ( alloc_context ) {
- TQColor::<a href="qcolor.html#destroyAllocContext">destroyAllocContext</a>( alloc_context );
+ TQColor::<a href="ntqcolor.html#destroyAllocContext">destroyAllocContext</a>( alloc_context );
alloc_context = 0;
}
if ( useColorContext() ) {
-<a name="x1314"></a> alloc_context = TQColor::<a href="qcolor.html#enterAllocContext">enterAllocContext</a>();
+<a name="x1314"></a> alloc_context = TQColor::<a href="ntqcolor.html#enterAllocContext">enterAllocContext</a>();
// Clear the image to hide flickering palette
- <a href="qpainter.html">TQPainter</a> painter(this);
-<a name="x1338"></a> painter.<a href="qpainter.html#eraseRect">eraseRect</a>(0, menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() ), width(), height());
+ <a href="ntqpainter.html">TQPainter</a> painter(this);
+<a name="x1338"></a> painter.<a href="ntqpainter.html#eraseRect">eraseRect</a>(0, menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() ), width(), height());
}
- TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
+ TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
if ( pm.convertFromImage(image, conversion_flags) )
{
pmScaled = TQPixmap();
scale();
- <a href="qwidget.html#resize">resize</a>( <a href="qwidget.html#width">width</a>(), height() );
+ <a href="ntqwidget.html#resize">resize</a>( <a href="ntqwidget.html#width">width</a>(), height() );
success = TRUE; // load successful
} else {
pm.resize(0,0); // couldn't load image
}
updateStatus();
setMenuItemFlags();
- TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
+ TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
if ( useColorContext() )
-<a name="x1315"></a> TQColor::<a href="qcolor.html#leaveAllocContext">leaveAllocContext</a>();
+<a name="x1315"></a> TQColor::<a href="ntqcolor.html#leaveAllocContext">leaveAllocContext</a>();
return success; // TRUE if loaded OK
}
bool <a name="f415"></a>ImageViewer::smooth() const
{
- return options-&gt;<a href="qmenudata.html#isItemChecked">isItemChecked</a>(ss);
+ return options-&gt;<a href="ntqmenudata.html#isItemChecked">isItemChecked</a>(ss);
}
bool <a name="f416"></a>ImageViewer::useColorContext() const
{
- return options-&gt;<a href="qmenudata.html#isItemChecked">isItemChecked</a>(cc);
+ return options-&gt;<a href="ntqmenudata.html#isItemChecked">isItemChecked</a>(cc);
}
/*
@@ -568,26 +568,26 @@ bool <a name="f416"></a>ImageViewer::useColorContext() const
void <a name="f417"></a>ImageViewer::scale()
{
- int h = <a href="qwidget.html#height">height</a>() - menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() ) - status-&gt;<a href="qwidget.html#height">height</a>();
+ int h = <a href="ntqwidget.html#height">height</a>() - menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() ) - status-&gt;<a href="ntqwidget.html#height">height</a>();
if ( image.isNull() ) return;
- TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
- if ( <a href="qwidget.html#width">width</a>() == pm.width() &amp;&amp; h == pm.height() )
+ TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( waitCursor ); // this might take time
+ if ( <a href="ntqwidget.html#width">width</a>() == pm.width() &amp;&amp; h == pm.height() )
{ // no need to scale if widget
pmScaled = pm; // size equals pixmap size
} else {
if (smooth()) {
- pmScaled.convertFromImage(image.smoothScale(<a href="qwidget.html#width">width</a>(), h),
+ pmScaled.convertFromImage(image.smoothScale(<a href="ntqwidget.html#width">width</a>(), h),
conversion_flags);
} else {
- <a href="qwmatrix.html">TQWMatrix</a> m; // <a href="qwmatrix.html#TransformationMode">transformation matrix</a>
-<a name="x1357"></a> m.<a href="qwmatrix.html#scale">scale</a>(((double)<a href="qwidget.html#width">width</a>())/pm.width(),// define scale factors
+ <a href="ntqwmatrix.html">TQWMatrix</a> m; // <a href="ntqwmatrix.html#TransformationMode">transformation matrix</a>
+<a name="x1357"></a> m.<a href="ntqwmatrix.html#scale">scale</a>(((double)<a href="ntqwidget.html#width">width</a>())/pm.width(),// define scale factors
((double)h)/pm.height());
pmScaled = pm.xForm( m ); // create scaled pixmap
}
}
- TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
+ TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); // restore original cursor
}
/*
@@ -595,30 +595,30 @@ void <a name="f417"></a>ImageViewer::scale()
scale() to fit the pixmap to the new widget size.
*/
-<a name="x1353"></a>void ImageViewer::<a href="qwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> * )
+<a name="x1353"></a>void ImageViewer::<a href="ntqwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> * )
{
-<a name="x1355"></a> status-&gt;<a href="qwidget.html#setGeometry">setGeometry</a>(0, height() - status-&gt;<a href="qwidget.html#height">height</a>(),
- <a href="qwidget.html#width">width</a>(), status-&gt;<a href="qwidget.html#height">height</a>());
+<a name="x1355"></a> status-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>(0, height() - status-&gt;<a href="ntqwidget.html#height">height</a>(),
+ <a href="ntqwidget.html#width">width</a>(), status-&gt;<a href="ntqwidget.html#height">height</a>());
if ( pm.size() == TQSize( 0, 0 ) ) // we couldn't load the image
return;
- int h = <a href="qwidget.html#height">height</a>() - menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() ) - status-&gt;<a href="qwidget.html#height">height</a>();
- if ( <a href="qwidget.html#width">width</a>() != pmScaled.width() || h != pmScaled.height())
+ int h = <a href="ntqwidget.html#height">height</a>() - menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() ) - status-&gt;<a href="ntqwidget.html#height">height</a>();
+ if ( <a href="ntqwidget.html#width">width</a>() != pmScaled.width() || h != pmScaled.height())
{ // if new size,
scale(); // scale pmScaled to window
updateStatus();
}
if ( image.hasAlphaBuffer() )
- <a href="qwidget.html#erase">erase</a>();
+ <a href="ntqwidget.html#erase">erase</a>();
}
bool <a name="f418"></a>ImageViewer::convertEvent( <a href="qmouseevent.html">TQMouseEvent</a>* e, int&amp; x, int&amp; y)
{
if ( pm.size() != TQSize( 0, 0 ) ) {
- int h = <a href="qwidget.html#height">height</a>() - menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() ) - status-&gt;<a href="qwidget.html#height">height</a>();
+ int h = <a href="ntqwidget.html#height">height</a>() - menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() ) - status-&gt;<a href="ntqwidget.html#height">height</a>();
<a name="x1335"></a> int nx = e-&gt;<a href="qmouseevent.html#x">x</a>() * image.width() / width();
-<a name="x1336"></a> int ny = (e-&gt;<a href="qmouseevent.html#y">y</a>()-menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() )) * image.height() / h;
+<a name="x1336"></a> int ny = (e-&gt;<a href="qmouseevent.html#y">y</a>()-menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() )) * image.height() / h;
if (nx != x || ny != y ) {
x = nx;
y = ny;
@@ -629,12 +629,12 @@ bool <a name="f418"></a>ImageViewer::convertEvent( <a href="qmouseevent.html">TQ
return FALSE;
}
-void ImageViewer::<a href="qwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+void ImageViewer::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
may_be_other = convertEvent(e, clickx, clicky);
}
-<a name="x1350"></a>void ImageViewer::<a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
+<a name="x1350"></a>void ImageViewer::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
{
if ( may_be_other )
other = this;
@@ -643,7 +643,7 @@ void ImageViewer::<a href="qwidget.html#mousePressEvent">mousePressEvent</a>( <a
/*
Record the pixel position of interest.
*/
-void ImageViewer::<a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+void ImageViewer::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
if (convertEvent(e,pickx,picky)) {
updateStatus();
@@ -661,12 +661,12 @@ void ImageViewer::<a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a h
an error message if no legal pixmap has been loaded.
*/
-void ImageViewer::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e )
+void ImageViewer::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e )
{
if ( pm.size() != TQSize( 0, 0 ) ) { // is an image loaded?
- <a href="qpainter.html">TQPainter</a> painter(this);
-<a name="x1340"></a><a name="x1339"></a> painter.<a href="qpainter.html#setClipRect">setClipRect</a>(e-&gt;<a href="qpaintevent.html#rect">rect</a>());
-<a name="x1337"></a> painter.<a href="qpainter.html#drawPixmap">drawPixmap</a>(0, menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>( <a href="qwidget.html#width">width</a>() ), pmScaled);
+ <a href="ntqpainter.html">TQPainter</a> painter(this);
+<a name="x1340"></a><a name="x1339"></a> painter.<a href="ntqpainter.html#setClipRect">setClipRect</a>(e-&gt;<a href="qpaintevent.html#rect">rect</a>());
+<a name="x1337"></a> painter.<a href="ntqpainter.html#drawPixmap">drawPixmap</a>(0, menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>( <a href="ntqwidget.html#width">width</a>() ), pmScaled);
}
}
@@ -677,21 +677,21 @@ void ImageViewer::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpa
void <a name="f419"></a>ImageViewer::giveHelp()
{
if (!helpmsg) {
- <a href="qstring.html">TQString</a> helptext =
+ <a href="ntqstring.html">TQString</a> helptext =
"&lt;b&gt;Usage:&lt;/b&gt; &lt;tt&gt;showimg [-m] &lt;i&gt;filename ...&lt;/i&gt;&lt;/tt&gt;"
"&lt;blockquote&gt;"
"&lt;tt&gt;-m&lt;/tt&gt; - use &lt;i&gt;ManyColor&lt;/i&gt; color spec"
"&lt;/blockquote&gt;"
"&lt;p&gt;Supported input formats:"
"&lt;blockquote&gt;";
-<a name="x1321"></a> helptext += TQImage::<a href="qimage.html#inputFormatList">inputFormatList</a>().join(", ");
+<a name="x1321"></a> helptext += TQImage::<a href="ntqimage.html#inputFormatList">inputFormatList</a>().join(", ");
helptext += "&lt;/blockquote&gt;";
- helpmsg = new <a href="qmessagebox.html">TQMessageBox</a>( "Help", helptext,
+ helpmsg = new <a href="ntqmessagebox.html">TQMessageBox</a>( "Help", helptext,
TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, FALSE );
}
-<a name="x1317"></a> helpmsg-&gt;<a href="qdialog.html#show">show</a>();
-<a name="x1352"></a> helpmsg-&gt;<a href="qwidget.html#raise">raise</a>();
+<a name="x1317"></a> helpmsg-&gt;<a href="ntqdialog.html#show">show</a>();
+<a name="x1352"></a> helpmsg-&gt;<a href="ntqwidget.html#raise">raise</a>();
}
void <a name="f420"></a>ImageViewer::copyFrom(ImageViewer* s)
@@ -711,9 +711,9 @@ void <a name="f420"></a>ImageViewer::copyFrom(ImageViewer* s)
dy = picky;
sy -= sh-1;
}
- <a href="qimage.html#bitBlt">bitBlt</a>( &amp;image, dx, dy, &amp;s-&gt;image, sx, sy, sw, sh );
+ <a href="ntqimage.html#bitBlt">bitBlt</a>( &amp;image, dx, dy, &amp;s-&gt;image, sx, sy, sw, sh );
reconvertImage();
- <a href="qwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
+ <a href="ntqwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
}
}
ImageViewer* ImageViewer::other = 0;
@@ -736,28 +736,28 @@ void <a name="f423"></a>ImageViewer::rot180()
void <a name="f424"></a>ImageViewer::copy()
{
#ifndef QT_NO_MIMECLIPBOARD
-<a name="x1308"></a> TQApplication::<a href="qapplication.html#clipboard">clipboard</a>()-&gt;setImage(image); // Less information loss
+<a name="x1308"></a> TQApplication::<a href="ntqapplication.html#clipboard">clipboard</a>()-&gt;setImage(image); // Less information loss
#endif
}
void <a name="f425"></a>ImageViewer::paste()
{
#ifndef QT_NO_MIMECLIPBOARD
- <a href="qimage.html">TQImage</a> p = TQApplication::<a href="qapplication.html#clipboard">clipboard</a>()-&gt;image();
-<a name="x1322"></a> if ( !p.<a href="qimage.html#isNull">isNull</a>() ) {
+ <a href="ntqimage.html">TQImage</a> p = TQApplication::<a href="ntqapplication.html#clipboard">clipboard</a>()-&gt;image();
+<a name="x1322"></a> if ( !p.<a href="ntqimage.html#isNull">isNull</a>() ) {
filename = "pasted";
setImage(p);
}
#endif
}
-void <a name="f426"></a>ImageViewer::setImage(const <a href="qimage.html">TQImage</a>&amp; newimage)
+void <a name="f426"></a>ImageViewer::setImage(const <a href="ntqimage.html">TQImage</a>&amp; newimage)
{
image = newimage;
pickx = -1;
clickx = -1;
- <a href="qwidget.html#setCaption">setCaption</a>( filename ); // set window caption
+ <a href="ntqwidget.html#setCaption">setCaption</a>( filename ); // set window caption
int w = image.width();
int h = image.height();
if ( !w )
@@ -771,11 +771,11 @@ void <a name="f426"></a>ImageViewer::setImage(const <a href="qimage.html">TQImag
h *= multiply;
}
- h += menubar-&gt;<a href="qmenubar.html#heightForWidth">heightForWidth</a>(w) + status-&gt;<a href="qwidget.html#height">height</a>();
- <a href="qwidget.html#resize">resize</a>( w, h ); // we resize to fit image
+ h += menubar-&gt;<a href="ntqmenubar.html#heightForWidth">heightForWidth</a>(w) + status-&gt;<a href="ntqwidget.html#height">height</a>();
+ <a href="ntqwidget.html#resize">resize</a>( w, h ); // we resize to fit image
reconvertImage();
- <a href="qwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
+ <a href="ntqwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
updateStatus();
setMenuItemFlags();
@@ -784,7 +784,7 @@ void <a name="f426"></a>ImageViewer::setImage(const <a href="qimage.html">TQImag
void <a name="f427"></a>ImageViewer::editText()
{
ImageTextEditor editor(image,this);
- editor.<a href="qdialog.html#exec">exec</a>();
+ editor.<a href="ntqdialog.html#exec">exec</a>();
}
void <a name="f428"></a>ImageViewer::to1Bit()
@@ -806,7 +806,7 @@ void <a name="f431"></a>ImageViewer::toBitDepth(int d)
{
image = image.convertDepth(d);
reconvertImage();
- <a href="qwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
+ <a href="ntqwidget.html#repaint">repaint</a>( image.hasAlphaBuffer() );
}
</pre>
@@ -824,50 +824,50 @@ void <a name="f431"></a>ImageViewer::toBitDepth(int d)
#include "showimg.h"
#include "imagefip.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qimage-h.html">qimage.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qimage-h.html">ntqimage.h</a>&gt;
int main( int argc, char **argv )
{
if ( argc &gt; 1 &amp;&amp; TQString(argv[1]) == "-m" ) {
-<a name="x1361"></a> TQApplication::<a href="qapplication.html#setColorSpec">setColorSpec</a>( TQApplication::ManyColor );
+<a name="x1361"></a> TQApplication::<a href="ntqapplication.html#setColorSpec">setColorSpec</a>( TQApplication::ManyColor );
argc--;
argv++;
}
else if ( argc &gt; 1 &amp;&amp; TQString(argv[1]) == "-n" ) {
- TQApplication::<a href="qapplication.html#setColorSpec">setColorSpec</a>( TQApplication::NormalColor );
+ TQApplication::<a href="ntqapplication.html#setColorSpec">setColorSpec</a>( TQApplication::NormalColor );
argc--;
argv++;
}
else {
- TQApplication::<a href="qapplication.html#setColorSpec">setColorSpec</a>( TQApplication::CustomColor );
+ TQApplication::<a href="ntqapplication.html#setColorSpec">setColorSpec</a>( TQApplication::CustomColor );
}
- <a href="qapplication.html">TQApplication</a> a( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
ImageIconProvider iip;
-<a name="x1362"></a> TQFileDialog::<a href="qfiledialog.html#setIconProvider">setIconProvider</a>( &amp;iip );
+<a name="x1362"></a> TQFileDialog::<a href="ntqfiledialog.html#setIconProvider">setIconProvider</a>( &amp;iip );
if ( argc &lt;= 1 ) {
// Create a window which looks after its own existence.
ImageViewer *w =
new ImageViewer(0, "new window", TQt::WDestructiveClose | TQt::WResizeNoErase );
-<a name="x1364"></a> w-&gt;<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Image Viewer");
- w-&gt;<a href="qwidget.html#show">show</a>();
+<a name="x1364"></a> w-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Image Viewer");
+ w-&gt;<a href="ntqwidget.html#show">show</a>();
} else {
for ( int i=1; i&lt;argc; i++ ) {
// Create a window which looks after its own existence.
ImageViewer *w =
new ImageViewer(0, argv[i], TQt::WDestructiveClose | TQt::WResizeNoErase );
- w-&gt;<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Image Viewer");
+ w-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Image Viewer");
w-&gt;loadImage( argv[i] );
- w-&gt;<a href="qwidget.html#show">show</a>();
+ w-&gt;<a href="ntqwidget.html#show">show</a>();
}
}
- TQObject::<a href="qobject.html#connect">connect</a>(qApp, SIGNAL(<a href="qapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="qapplication.html#quit">quit</a>()));
+ TQObject::<a href="ntqobject.html#connect">connect</a>(qApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
- return a.<a href="qapplication.html#exec">exec</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>