Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions include/gtimeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ class gTimeline: public wxFrame, public gWindow
void OnPopUpSaveCFG( wxCommandEvent& event );
void OnPopUpSaveImageDialog( wxCommandEvent& event );
void OnPopUpSaveText( wxCommandEvent& event );
void OnPopUpSaveToClipboardWithLegend( wxCommandEvent& event );
void OnPopUpSaveToClipboardWithOutLegend( wxCommandEvent& event );
void OnPopUpSaveToClipboardLegend( wxCommandEvent& event );

void OnMenuGradientFunction( TGradientFunction function );

Expand All @@ -629,6 +632,8 @@ class gTimeline: public wxFrame, public gWindow
void OnItemColorLeftUp( wxMouseEvent& event );

void saveImage( wxString whichFileName = _( "" ), TImageFormat filterIndex = TImageFormat::PNG );
void saveImageToClipboard(bool withLegend);
void saveLegendToClipboard();
void saveImageLegend( wxString whichFileName = _( "" ),
TImageFormat filterIndex = TImageFormat::PNG,
bool appendLegendSuffix = true );
Expand All @@ -641,7 +646,16 @@ class gTimeline: public wxFrame, public gWindow

static wxProgressDialog *dialogProgress;
static int numberOfProgressDialogUsers;

private:
// Gets the Bitmap for saveImage and saveImageToClipboard
// @param withLegend is doing a best effort
// as its only makes sense to embed the legend with
// continous data representation
wxBitmap getBitmapForImage(bool withLegend);
wxBitmap getBitmapForLegend(TImageFormat filterIndex);

public:

// void OnRightClick(wxMouseEvent& event);
////@begin gTimeline member variables
Expand Down Expand Up @@ -856,14 +870,13 @@ class gTimeline: public wxFrame, public gWindow
wxColour whichForeground,
int whichBackgroundMode, // wxSOLID or wxTRANSPARENT; wxTRANSPARENT overrides fore and back
wxFont whichTextFont,
wxString& whichImagePath,
const wxString& whichImageInfix,
wxBitmapType& whichImageType );

virtual ~ScaleImageVertical();

void process();
void save();
void save(const wxString &imagePath);
wxImage *getImage() { return scaleImage; }
wxBitmap *getBitmap() { return scaleBitmap; }

Expand All @@ -875,7 +888,7 @@ class gTimeline: public wxFrame, public gWindow
virtual void createDC();
virtual void draw();
virtual void bitmapToImage();
virtual wxString buildScaleImagePath();
virtual wxString buildScaleImagePath(const wxString &imagePath);
virtual void drawLabeledRectangle( rgb semanticColour,
wxString semanticValueLabel,
bool drawIt = true );
Expand All @@ -887,7 +900,6 @@ class gTimeline: public wxFrame, public gWindow
wxColour foreground;
int backgroundMode;
wxFont textFont;
wxString& imagePath;
wxString imageInfix;
wxBitmapType& imageType;
TImageFormat filterIndex;
Expand Down Expand Up @@ -929,7 +941,6 @@ class gTimeline: public wxFrame, public gWindow
wxColour whichForeground,
int whichBackgroundMode,
wxFont whichTextFont,
wxString& whichImagePath,
const wxString& whichImageInfix,
wxBitmapType& whichImageType );

Expand All @@ -950,7 +961,6 @@ class gTimeline: public wxFrame, public gWindow
wxColour whichForeground,
int whichBackgroundMode,
wxFont whichTextFont,
wxString& whichImagePath,
const wxString& whichImageInfix,
wxBitmapType& whichImageType );

Expand All @@ -976,7 +986,6 @@ class gTimeline: public wxFrame, public gWindow
wxColour whichForeground,
int whichBackgroundMode,
wxFont whichTextFont,
wxString& whichImagePath,
const wxString& whichImageInfix,
wxBitmapType& whichImageType );

Expand All @@ -999,7 +1008,6 @@ class gTimeline: public wxFrame, public gWindow
wxColour whichForeground,
int whichBackgroundMode,
wxFont whichTextFont,
wxString& whichImagePath,
const wxString& whichImageInfix,
wxBitmapType& whichImageType,
int whichWantedWidth = 0 );
Expand Down
5 changes: 5 additions & 0 deletions include/popupmenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@
#define ID_MENU_PROFET 30108
#define ID_MENU_ALTERNATIVE_GRADIENT_COLOR 30109
#define ID_MENU_ALTERNATIVE_GRADIENT_COLOR_2D 30110
#define ID_MENU_SAVE_TO_CLIPBOARD_WITH_LEGEND 30111
#define ID_MENU_SAVE_TO_CLIPBOARD_WO_LEGEND 30112
#define ID_MENU_SAVE_TO_CLIPBOARD_LEGEND 30113

#define ID_MENU_SYNC_GROUP_BASE 31000
#define ID_MENU_SYNC_REMOVE_GROUP_BASE 32000
Expand Down Expand Up @@ -190,6 +193,8 @@ class gPopUpMenu : public wxMenu
wxMenu *popUpMenuLabels;
wxMenu *popUpMenuObjectAxis;
wxMenu *popUpMenuSave;
// only used in timeline for now
wxMenu *popUpMenuCopy;
wxMenu *popUpMenuRun;
wxMenu *popUpMenuSync;
wxMenu *popUpMenuSyncRemove;
Expand Down
Loading