24#include <kstandarddirs.h>
29#include "printstyle.h"
30#include "printingwizard.h"
32using namespace KABPrinting;
36 : TQObject( parent, name ), mWizard( parent ), mSortField( 0 )
40PrintStyle::~PrintStyle()
57 TQString path = locate( "appdata", "printing/" + fileName );
58 if ( path.isEmpty() ) {
59 kdDebug(5720) << "PrintStyle::setPreview: preview not locatable." << endl;
66 kdDebug(5720) << "PrintStyle::setPreview: preview at '" << path << "' cannot be loaded." << endl;
79 if ( mPageList.find( page ) == -1 ) {
80 mPageList.append( page );
81 mPageTitles.append( title );
89 for ( wdg = mPageList.first(); wdg; wdg = mPageList.next(), ++i ) {
90 mWizard->addPage( wdg, mPageTitles[ i ] );
92 mWizard->setAppropriate( wdg, true );
96 mWizard->setFinishEnabled( wdg, true );
101 for ( TQWidget *wdg = mPageList.first(); wdg; wdg = mPageList.next() )
102 mWizard->removePage( wdg );
108 mSortType = ascending;
121PrintStyleFactory::PrintStyleFactory( PrintingWizard* parent, const char* name )
122 : mParent( parent ), mName( name )
126PrintStyleFactory::~PrintStyleFactory()
130#include "printstyle.moc"
bool preferredSortType() Returns the preferred sort type.
bool setPreview(const TQString &fileName) Load the preview image from the kaddressbook data directory.
TDEABC::Field * preferredSortField() Returns the preferred sort criterion field.
void addPage(TQWidget *page, const TQString &title) Add additional page to the wizard e.g.
PrintingWizard * wizard() Return the wizard object.
const TQPixmap & preview() Reimplement this method to provide a preview of what will be printed.
void showPages() Show all style specific pages in the wizard.
void hidePages() Hide all style specific pages in the wizard.
void setPreferredSortOptions(TDEABC::Field *field, bool ascending=true) Set preferred sort options for this printing style.
The PrintingWizard combines pages common for all print styles and those provided by the respective st...
|