ApplicationsTab Class Reference

#include <tabdialog.h>

Inheritance diagram for ApplicationsTab:

Inheritance graph
[legend]
Collaboration diagram for ApplicationsTab:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 51 of file tabdialog.h.

Public Member Functions

 ApplicationsTab (const QFileInfo &fileInfo, QWidget *parent=0)


Constructor & Destructor Documentation

ApplicationsTab::ApplicationsTab ( const QFileInfo fileInfo,
QWidget parent = 0 
)

Definition at line 137 of file tabdialog.cpp.

References QLayout::addWidget(), QList< T >::append(), i, QListWidget::insertItems(), QString::isEmpty(), QWidget::layout(), QWidget::setLayout(), and QFileInfo::suffix().

00138     : QWidget(parent)
00139 {
00140     QLabel *topLabel = new QLabel(tr("Open with:"));
00141 
00142     QListWidget *applicationsListBox = new QListWidget;
00143     QStringList applications;
00144 
00145     for (int i = 1; i <= 30; ++i)
00146         applications.append(tr("Application %1").arg(i));
00147     applicationsListBox->insertItems(0, applications);
00148 
00149     QCheckBox *alwaysCheckBox;
00150 
00151     if (fileInfo.suffix().isEmpty())
00152         alwaysCheckBox = new QCheckBox(tr("Always use this application to "
00153             "open this type of file"));
00154     else
00155         alwaysCheckBox = new QCheckBox(tr("Always use this application to "
00156             "open files with the extension '%1'").arg(fileInfo.suffix()));
00157 
00158     QVBoxLayout *layout = new QVBoxLayout;
00159     layout->addWidget(topLabel);
00160     layout->addWidget(applicationsListBox);
00161     layout->addWidget(alwaysCheckBox);
00162     setLayout(layout);
00163 }

Here is the call graph for this function:


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