Qt 4.8
Classes | Functions
qprintpreviewdialog.cpp File Reference
#include "qprintpreviewdialog.h"
#include "qprintpreviewwidget.h"
#include <private/qprinter_p.h>
#include "private/qdialog_p.h"
#include <QtGui/qaction.h>
#include <QtGui/qboxlayout.h>
#include <QtGui/qcombobox.h>
#include <QtGui/qlabel.h>
#include <QtGui/qlineedit.h>
#include <QtGui/qpagesetupdialog.h>
#include <QtGui/qprinter.h>
#include <QtGui/qstyle.h>
#include <QtGui/qtoolbutton.h>
#include <QtGui/qvalidator.h>
#include <QtGui/qfiledialog.h>
#include <QtGui/qmainwindow.h>
#include <QtGui/qtoolbar.h>
#include <QtGui/qformlayout.h>
#include <QtCore/QCoreApplication>
#include <math.h>
#include "moc_qprintpreviewdialog.cpp"
#include "qprintpreviewdialog.moc"

Go to the source code of this file.

Classes

class  QPrintPreviewDialogPrivate
 

Functions

static void qt_setupActionIcon (QAction *action, const QLatin1String &name)
 

Function Documentation

◆ qt_setupActionIcon()

static void qt_setupActionIcon ( QAction action,
const QLatin1String name 
)
inlinestatic

Definition at line 347 of file qprintpreviewdialog.cpp.

Referenced by QPrintPreviewDialogPrivate::setupActions().

348 {
349  QLatin1String imagePrefix(":/trolltech/dialogs/qprintpreviewdialog/images/");
350  QIcon icon;
351  icon.addFile(imagePrefix + name + QLatin1String("-24.png"), QSize(24, 24));
352  icon.addFile(imagePrefix + name + QLatin1String("-32.png"), QSize(32, 32));
353  action->setIcon(icon);
354 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
void setIcon(const QIcon &icon)
Definition: qaction.cpp:772
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
void addFile(const QString &fileName, const QSize &size=QSize(), Mode mode=Normal, State state=Off)
Adds an image from the file with the given fileName to the icon, as a specialization for size...
Definition: qicon.cpp:851
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60