Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Attributes
SMReplaceDia Class Reference

#include <smreplacedia.h>

List of all members.

Public Member Functions

 SMReplaceDia (const QStringList &toBeDeleted, const QStringList &replaceOptions, QWidget *parent)
 ~SMReplaceDia ()
QValueList< RemoveItemitems ()

Private Attributes

QVBoxLayout * layout
QHBoxLayout * headerLayout
QLabel * deleteHeader
QLabel * optionsHeader
QPtrList< SMRowWidgetrowWidgets

Detailed Description

Definition at line 36 of file smreplacedia.h.


Constructor & Destructor Documentation

SMReplaceDia::SMReplaceDia ( const QStringList &  toBeDeleted,
const QStringList &  replaceOptions,
QWidget *  parent 
)

Definition at line 50 of file smreplacedia.cpp.

                                                                                                             : SMReplaceDiaBase(parent)
{
       rowWidgets.setAutoDelete(true);

       QStringList options;

       for (uint i = 0; i < replaceOptions.count(); ++i)
       {
              if (!toBeDeleted.contains(replaceOptions[i]))
                     options << replaceOptions[i];
       }

       layout = new QVBoxLayout(mainFrame, 0, 5, "layout");
       headerLayout = new QHBoxLayout(layout, 5, "headerLayout");
       deleteHeader = new QLabel("<b>" + tr("Remove") + "</b>", mainFrame);
       optionsHeader = new QLabel("<b>" + tr("Replace with") + "</b>", mainFrame);
       headerLayout->addWidget(deleteHeader);
       headerLayout->addWidget(optionsHeader);

       for (uint i = 0; i < toBeDeleted.count(); ++i)
       {
              SMRowWidget *tmp = new SMRowWidget(toBeDeleted[i], options, mainFrame);
              layout->addWidget(tmp);
              rowWidgets.append(tmp);
       }

       layout->addStretch(10);
}

Here is the call graph for this function:

Definition at line 91 of file smreplacedia.cpp.

{
       delete optionsHeader;
       delete deleteHeader;
       delete headerLayout;
       delete layout;
}

Member Function Documentation

QValueList< RemoveItem > SMReplaceDia::items ( )

Definition at line 79 of file smreplacedia.cpp.

{
       QValueList<RemoveItem> tmp;
       for (uint i = 0; i < rowWidgets.count(); ++i)
       {
              QString s1 = rowWidgets.at(i)->toBeDeleted();
              QString s2 = rowWidgets.at(i)->replaceWith();
              tmp.append(RemoveItem(s1, s2));
       }
       return tmp;
}

Member Data Documentation

QLabel* SMReplaceDia::deleteHeader [private]

Definition at line 47 of file smreplacedia.h.

QHBoxLayout* SMReplaceDia::headerLayout [private]

Definition at line 46 of file smreplacedia.h.

QVBoxLayout* SMReplaceDia::layout [private]

Definition at line 45 of file smreplacedia.h.

QLabel* SMReplaceDia::optionsHeader [private]

Definition at line 48 of file smreplacedia.h.

Definition at line 49 of file smreplacedia.h.


The documentation for this class was generated from the following files: