Implemented Page Selection.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10777 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2005-01-16 16:12:41 +00:00
parent b1a3ccb885
commit af6520e96c
3 changed files with 27 additions and 10 deletions
@@ -61,6 +61,8 @@ private:
void cleanupData();
void cleanupBitmap();
bool printPage(PageDataList *pages);
bool collectPages(SpoolData *spool_data, PageDataList *pages);
bool skipPages(SpoolData *spool_data);
bool printDocument(SpoolData *spool_data);
bool printJob(BFile *file);
static void rgb32_to_rgb24(void* src, void* dst, int width);
+13 -3
View File
@@ -212,6 +212,12 @@ public:
kPageSettings,
kJobSettings
};
enum PageSelection {
kAllPages,
kOddNumberedPages,
kEvenNumberedPages
};
private:
Paper fPaper;
@@ -237,8 +243,9 @@ private:
PageOrder fPageOrder;
Settings fSettings;
BMessage *fMsg;
bool fColor;
Color fColor;
Halftone::DitherType fDitherType;
PageSelection fPageSelection;
public:
JobData(BMessage *msg, const PrinterCap *cap, Settings settings);
@@ -316,11 +323,14 @@ public:
PageOrder getPageOrder() const { return fPageOrder; }
void setPageOrder(PageOrder page_order) { fPageOrder = page_order; }
Color getColor() const { return fColor ? kColor : kMonochrome; }
void setColor(Color color) { fColor = color == kColor; }
Color getColor() const { return fColor; }
void setColor(Color color) { fColor = color; }
Halftone::DitherType getDitherType() const { return fDitherType; }
void setDitherType(Halftone::DitherType dither_type) { fDitherType = dither_type; }
PageSelection getPageSelection() const { return fPageSelection; }
void setPageSelection(PageSelection pageSelection) { fPageSelection = pageSelection; }
};
#endif /* __JOBDATA_H */
+12 -7
View File
@@ -14,6 +14,7 @@
#include "JSDSlider.h"
class BTextControl;
class BTextView;
class BRadioButton;
class BCheckBox;
class BPopUpMenu;
@@ -30,17 +31,19 @@ public:
virtual void MessageReceived(BMessage *msg);
bool UpdateJobData();
public:
BTextControl *copies;
BTextControl *from_page;
BTextControl *to_page;
private:
void UpdateButtonEnabledState();
BRadioButton* AddPageSelectionItem(BView* parent, BRect rect, const char* name, const char* label,
JobData::PageSelection pageSelection);
void AllowOnlyDigits(BTextView* textView, int maxDigits);
JobData::Color getColor();
Halftone::DitherType getDitherType();
float getGamma();
float getInkDensity();
BTextControl *fCopies;
BTextControl *fFromPage;
BTextControl *fToPage;
JobData *fJobData;
PrinterData *fPrinterData;
const PrinterCap *fPrinterCap;
@@ -56,16 +59,18 @@ private:
BPopUpMenu *fPaperFeed;
BCheckBox *fDuplex;
BPopUpMenu *fNup;
BRadioButton *fAllPages;
BRadioButton *fOddNumberedPages;
BRadioButton *fEvenNumberedPages;
};
class JobSetupDlg : public DialogWindow {
public:
JobSetupDlg(JobData *job_data, PrinterData *printer_data, const PrinterCap *printer_cap);
~JobSetupDlg();
virtual void MessageReceived(BMessage *message);
private:
BMessageFilter *fFilter;
JobSetupView *fJobSetup;
};
#endif /* __JOBSETUPDLG_H */