PreviewWindow Class Reference

#include <previewwindow.h>

Inheritance diagram for PreviewWindow:

Inheritance graph
[legend]
Collaboration diagram for PreviewWindow:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 32 of file previewwindow.h.

Public Member Functions

 PreviewWindow (QWidget *parent=0)
void setWindowFlags (Qt::WindowFlags flags)

Private Attributes

QTextEdittextEdit
QPushButtoncloseButton


Constructor & Destructor Documentation

PreviewWindow::PreviewWindow ( QWidget parent = 0  ) 

Definition at line 28 of file previewwindow.cpp.

References QLayout::addWidget(), QWidget::close(), closeButton, QObject::connect(), QWidget::layout(), QTextEdit::NoWrap, QWidget::setLayout(), QTextEdit::setLineWrapMode(), QTextEdit::setReadOnly(), QWidget::setWindowTitle(), SIGNAL, SLOT, and textEdit.

00029     : QWidget(parent)
00030 {
00031     textEdit = new QTextEdit;
00032     textEdit->setReadOnly(true);
00033     textEdit->setLineWrapMode(QTextEdit::NoWrap);
00034 
00035     closeButton = new QPushButton(tr("&Close"));
00036     connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
00037 
00038     QVBoxLayout *layout = new QVBoxLayout;
00039     layout->addWidget(textEdit);
00040     layout->addWidget(closeButton);
00041     setLayout(layout);
00042 
00043     setWindowTitle(tr("Preview"));
00044 }

Here is the call graph for this function:


Member Function Documentation

void PreviewWindow::setWindowFlags ( Qt::WindowFlags  flags  ) 

Reimplemented from QWidget.

Definition at line 46 of file previewwindow.cpp.

References Qt::Dialog, Qt::Drawer, Qt::FramelessWindowHint, Qt::MSWindowsFixedSizeDialogHint, Qt::Popup, QTextEdit::setPlainText(), QWidget::setWindowFlags(), Qt::Sheet, Qt::SplashScreen, textEdit, Qt::Tool, Qt::ToolTip, type, Qt::Window, Qt::WindowContextHelpButtonHint, Qt::WindowMaximizeButtonHint, Qt::WindowMinimizeButtonHint, Qt::WindowShadeButtonHint, Qt::WindowStaysOnTopHint, Qt::WindowSystemMenuHint, Qt::WindowTitleHint, Qt::WindowType_Mask, and Qt::X11BypassWindowManagerHint.

Referenced by ControllerWindow::updatePreview().

00047 {
00048     QWidget::setWindowFlags(flags);
00049 
00050     QString text;
00051 
00052     Qt::WindowFlags type = (flags & Qt::WindowType_Mask);
00053     if (type == Qt::Window) {
00054         text = "Qt::Window";
00055     } else if (type == Qt::Dialog) {
00056         text = "Qt::Dialog";
00057     } else if (type == Qt::Sheet) {
00058         text = "Qt::Sheet";
00059     } else if (type == Qt::Drawer) {
00060         text = "Qt::Drawer";
00061     } else if (type == Qt::Popup) {
00062         text = "Qt::Popup";
00063     } else if (type == Qt::Tool) {
00064         text = "Qt::Tool";
00065     } else if (type == Qt::ToolTip) {
00066         text = "Qt::ToolTip";
00067     } else if (type == Qt::SplashScreen) {
00068         text = "Qt::SplashScreen";
00069     }
00070 
00071     if (flags & Qt::MSWindowsFixedSizeDialogHint)
00072         text += "\n| Qt::MSWindowsFixedSizeDialogHint";
00073     if (flags & Qt::X11BypassWindowManagerHint)
00074         text += "\n| Qt::X11BypassWindowManagerHint";
00075     if (flags & Qt::FramelessWindowHint)
00076         text += "\n| Qt::FramelessWindowHint";
00077     if (flags & Qt::WindowTitleHint)
00078         text += "\n| Qt::WindowTitleHint";
00079     if (flags & Qt::WindowSystemMenuHint)
00080         text += "\n| Qt::WindowSystemMenuHint";
00081     if (flags & Qt::WindowMinimizeButtonHint)
00082         text += "\n| Qt::WindowMinimizeButtonHint";
00083     if (flags & Qt::WindowMaximizeButtonHint)
00084         text += "\n| Qt::WindowMaximizeButtonHint";
00085     if (flags & Qt::WindowContextHelpButtonHint)
00086         text += "\n| Qt::WindowContextHelpButtonHint";
00087     if (flags & Qt::WindowShadeButtonHint)
00088         text += "\n| Qt::WindowShadeButtonHint";
00089     if (flags & Qt::WindowStaysOnTopHint)
00090         text += "\n| Qt::WindowStaysOnTopHint";
00091 
00092     textEdit->setPlainText(text);
00093 }

Here is the call graph for this function:


Member Data Documentation

QTextEdit* PreviewWindow::textEdit [private]

Definition at line 42 of file previewwindow.h.

Referenced by PreviewWindow(), and setWindowFlags().

QPushButton* PreviewWindow::closeButton [private]

Definition at line 43 of file previewwindow.h.

Referenced by PreviewWindow().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 15:36:47 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1