Qt:Документация 4.3.2/q3picture

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Q3Picture Class Reference
[ Qt3Support module]

The Q3Picture class is a paint device that records and replays Q3Painter commands. Далее...

 #include <Q3Picture>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Inherits QPicture.

[править] Открытые функции

  • Q3Picture ()
  • Q3Picture ( const QPicture & other )
  • bool load ( QIODevice * device, const char * format = 0 )
  • bool load ( const QString & fileName, const char * format = 0 )
  • bool save ( QIODevice * device, const char * format = 0 )
  • bool save ( const QString & fileName, const char * format = 0 )
  • 12 public functions inherited from QPicture
  • 12 открытых функций, унаследованных от QPaintDevice

[править] Дополнительные унаследованные члены

  • 1 protected function inherited from QPicture
  • 1 защищенная функция, унаследованных от QPaintDevice

[править] Подробное описание

The Q3Picture class is a paint device that records and replays Q3Painter commands.

Q3Picture can also read and write SVG (Scalable Vector Graphics) files; these files are in an XML format specified by W3C http://www.w3.org/Graphics/SVG/ W3C. Note that when using the load() and save() functions to read and write SVG files, the format must be specified.

See also QPicture.


[править] Описание функций-членов

[править]
Q3Picture::Q3Picture ()

Constructs a Q3Picture.

[править]
Q3Picture::Q3Picture ( const QPicture & other )

Создаёт копию other.

[править]
bool Q3Picture::load ( QIODevice * device, const char * format = 0 )

Loads the picture in the specified format from the given device. Returns true if the file is loaded successfully; otherwise returns false.

Note that when using the load() function to read SVG files, the format must be specified. Пример:

 Q3Picture picture;
 picture.load("drawing.svg", SVG);

See also save().

[править]
bool Q3Picture::load ( const QString & fileName, const char * format = 0 )

Эта перегруженная функция предоставлена для удобства.

Loads the picture in the specified format from a file with the given fileName. Returns true if the file is loaded successfully; otherwise returns false.

[править]
bool Q3Picture::save ( QIODevice * device, const char * format = 0 )

Saves the picture in the specified format to the given device. Returns true if the save is successful. Returns false if, for example, the picture is still being painted, i.e., QPainter::end() has not yet been called.

Note that when using the save() function to save SVG files, the format must be specified. Пример:

 Q3Picture picture;
 QPainter painter;
 painter.begin(&amp;picture);           // paint in picture
 ...
 painter.end();                     // painting done
 picture.save("drawing.svg", SVG);  // save picture

See also load().

[править]
bool Q3Picture::save ( const QString & fileName, const char * format = 0 )

Эта перегруженная функция предоставлена для удобства.

Saves the picture in the specified format to the file with the given fileName.

See also load().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2