24 #include <kstandarddirs.h>
29 #include "printstyle.h"
30 #include "printingwizard.h"
32 using namespace KABPrinting;
36 : TQObject( parent, name ), mWizard( parent ), mSortField( 0 )
40 PrintStyle::~PrintStyle()
57 TQString path = locate( "appdata", "printing/" + fileName );
58 if ( path.isEmpty() ) {
59 kdDebug(5720) << "PrintStyle::setPreview: preview not locatable." << endl;
62 if ( preview.load( path ) ) {
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;
121 PrintStyleFactory::PrintStyleFactory( PrintingWizard* parent, const char* name )
122 : mParent( parent ), mName( name )
126 PrintStyleFactory::~PrintStyleFactory()
130 #include "printstyle.moc"
|