mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Profile: add the isGrayscale flag
setPrintMode() can now be used to set the profile to be plotted in grayscale. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
fc84f8868d
commit
3076dc6d47
2 changed files with 5 additions and 2 deletions
|
@ -47,6 +47,7 @@ extern int evn_used;
|
||||||
ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent), toolTip(0) , dive(0), diveDC(0)
|
ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent), toolTip(0) , dive(0), diveDC(0)
|
||||||
{
|
{
|
||||||
printMode = false;
|
printMode = false;
|
||||||
|
isGrayscale = false;
|
||||||
gc.printer = false;
|
gc.printer = false;
|
||||||
fill_profile_color();
|
fill_profile_color();
|
||||||
setScene(new QGraphicsScene());
|
setScene(new QGraphicsScene());
|
||||||
|
@ -190,9 +191,10 @@ void ProfileGraphicsView::refresh()
|
||||||
plot(current_dive, TRUE);
|
plot(current_dive, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileGraphicsView::setPrintMode(bool mode)
|
void ProfileGraphicsView::setPrintMode(bool mode, bool grayscale)
|
||||||
{
|
{
|
||||||
printMode = mode;
|
printMode = mode;
|
||||||
|
isGrayscale = grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw)
|
void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw)
|
||||||
|
|
|
@ -92,7 +92,7 @@ public:
|
||||||
void plot(struct dive *d, bool forceRedraw = FALSE);
|
void plot(struct dive *d, bool forceRedraw = FALSE);
|
||||||
bool eventFilter(QObject* obj, QEvent* event);
|
bool eventFilter(QObject* obj, QEvent* event);
|
||||||
void clear();
|
void clear();
|
||||||
void setPrintMode(bool);
|
void setPrintMode(bool mode, bool grayscale = FALSE);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
@ -136,6 +136,7 @@ private:
|
||||||
struct divecomputer *diveDC;
|
struct divecomputer *diveDC;
|
||||||
int zoomLevel;
|
int zoomLevel;
|
||||||
bool printMode;
|
bool printMode;
|
||||||
|
bool isGrayscale;
|
||||||
|
|
||||||
// Top Level Items.
|
// Top Level Items.
|
||||||
QGraphicsItem* profileGrid;
|
QGraphicsItem* profileGrid;
|
||||||
|
|
Loading…
Add table
Reference in a new issue