24 #include <kstandarddirs.h> 29 #include "printstyle.h" 30 #include "printingwizard.h" 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 ) ) {
63 setPreview( preview );
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" bool preferredSortType()
Returns the preferred sort type.
void showPages()
Show all style specific pages in the wizard.
The PrintingWizard combines pages common for all print styles and those provided by the respective st...
void setPreferredSortOptions(TDEABC::Field *field, bool ascending=true)
Set preferred sort options for this printing style.
TDEABC::Field * preferredSortField()
Returns the preferred sort criterion field.
PrintingWizard * wizard()
Return the wizard object.
void hidePages()
Hide all style specific pages in the wizard.
void addPage(TQWidget *page, const TQString &title)
Add additional page to the wizard e.g.
const TQPixmap & preview()
Reimplement this method to provide a preview of what will be printed.
bool setPreview(const TQString &fileName)
Load the preview image from the kaddressbook data directory.