Hugin trunk 0.1
Loading...
Searching...
No Matches
BatchFrame.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
27#ifndef BATCHFRAME_H
28#define BATCHFRAME_H
29
30#include "RunStitchFrame.h"
31#include "Batch.h"
32#include "ProjectListBox.h"
33#include "DirTraverser.h"
34#include "wx/help.h"
35#if !wxUSE_HELP
36#error wxWidgets needs to be compiled with help support (wxUSE_HELP not set)
37#endif
38#include "BatchTrayIcon.h"
39//#include <wx/app.h>
40#include "ProgressStatusBar.h"
41#include <wx/timer.h>
42
44class BatchDropTarget : public wxFileDropTarget
45{
46public:
54};
55
56class BatchFrame : public wxFrame
57{
58public:
59 //Main constructor
61 // create statusbar with progress control
62 wxStatusBar* OnCreateStatusBar(int number, long style, wxWindowID id, const wxString& name);
63
64 void OnUserExit(wxCommandEvent& event);
65 void OnButtonAddCommand(wxCommandEvent& event);
66 void OnButtonAddDir(wxCommandEvent& event);
67 void OnButtonSearchPano(wxCommandEvent& e);
69 void OnButtonGenerateSequence(wxCommandEvent& e);
71 void OnButtonAddToStitchingQueue(wxCommandEvent& event);
73 void OnButtonAddToAssistantQueue(wxCommandEvent& event);
74 void OnButtonCancel(wxCommandEvent& event);
75 void OnButtonChangePrefix(wxCommandEvent& event);
76 void OnButtonChangeUserDefinedSequence(wxCommandEvent& event);
77 void OnButtonClear(wxCommandEvent& event);
78 void OnMinimizeTrayMenu(wxCommandEvent& e);
79 void OnButtonHelp(wxCommandEvent& event);
80 void OnButtonMoveDown(wxCommandEvent& event);
81 void OnButtonMoveUp(wxCommandEvent& event);
82 void OnButtonOpenBatch(wxCommandEvent& event);
83 void OnButtonOpenWithHugin(wxCommandEvent& event);
84 void OnButtonPause(wxCommandEvent& event);
85 void OnButtonRemoveComplete(wxCommandEvent& event);
86 void OnButtonRemoveFromList(wxCommandEvent& event);
87 void OnButtonReset(wxCommandEvent& event);
88 void OnButtonResetAll(wxCommandEvent& event);
89 void OnButtonRunBatch(wxCommandEvent& event);
90 void OnButtonSaveBatch(wxCommandEvent& event);
91 void OnButtonSkip(wxCommandEvent& event);
92
93 void OnCheckOverwrite(wxCommandEvent& event);
94 void OnChoiceEnd(wxCommandEvent& event);
95 void OnCheckVerbose(wxCommandEvent& event);
97 void OnCheckAutoRemove(wxCommandEvent& event);
99 void OnCheckAutoStitch(wxCommandEvent& event);
101 void OnCheckSaveLog(wxCommandEvent& event);
103 void OnProgress(wxCommandEvent& event);
104
105 //Called on window close to take care of the child thread
108 void OnMinimize(wxIconizeEvent& e);
109 //Resets all checkboxes based on m_batch object properties
110 void PropagateDefaults();
111 //Sets all checkboxes corresponding the setting in config
112 void SetCheckboxes();
113 //Starts batch execution
114 void RunBatch();
115 //Sets locale and XRC prefix pointers from main app
116 void SetLocaleAndXRC(wxLocale* locale, wxString xrc);
117 //Swaps the project entry at index in the list with the next (at index+1).
118 void SwapProject(int index, bool down);
119 //PanoramaOptions readOptions(wxString projectFile);
123 bool GetCheckOverwrite();
125 bool GetCheckVerbose();
127 bool GetCheckAutoRemove();
129 bool GetCheckAutoStitch();
131 bool GetCheckSaveLog();
132 void RestoreSize();
136 void ChangePrefix(int index,wxString newPrefix);
139 bool IsRunning();
141 bool IsPaused();
146 {
147 return m_startedMinimized;
148 };
153
156
157 //wxMutex* projListMutex;
159
160private:
167 // help controller
174 // timer for checking of modified projects
177
182 void OnBatchFailed(wxCommandEvent& event);
184 void OnBatchInformation(wxCommandEvent& e);
186 void OnRefillListBox(wxCommandEvent& e);
188 void UpdateTrayIcon(const bool createTrayIcon);
189};
190
191#endif //BATCHFRAME_H
definition of tray/task bar icon for PTBatcherGUI
Batch processor for Hugin.
Batch processor for Hugin.
definition of statusbar with progress indicator
Batch processor for Hugin with GUI.
Stitch a pto project file, with GUI output etc.
Simple class that forward the drop to the mainframe.
Definition BatchFrame.h:45
bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames)
File/directory drag and drop handler method.
ProgressStatusBar * m_progStatusBar
Definition BatchFrame.h:170
void ChangeUserDefined(int index, wxString newUserDefined)
void OnButtonResetAll(wxCommandEvent &event)
void OnMinimizeTrayMenu(wxCommandEvent &e)
void UpdateTrayIcon(const bool createTrayIcon)
create or destroy the tray icon
wxIcon m_iconRunning
Definition BatchFrame.h:172
void OnButtonRunBatch(wxCommandEvent &event)
bool m_startedMinimized
Definition BatchFrame.h:176
wxString m_xrcPrefix
Definition BatchFrame.h:162
void OnButtonPause(wxCommandEvent &event)
void PropagateDefaults()
void OnCheckVerbose(wxCommandEvent &event)
void OnCheckOverwrite(wxCommandEvent &event)
ProjectListBox * projListBox
Definition BatchFrame.h:158
void OnRefillListBox(wxCommandEvent &e)
called if the project box needs to be updated, because projects were added or deleted
bool IsPaused()
returns true, if batch is paused
void SetInternalVerbose(bool newVerbose)
sets the current verbose status, does not update the checkbox
void AddArrayToList(const wxArrayString &fileList, Project::Target target)
void OnButtonAddToAssistantQueue(wxCommandEvent &event)
let the user select a project file which should be added to the stitching queue
void OnButtonMoveUp(wxCommandEvent &event)
void SwapProject(int index, bool down)
wxHelpController & GetHelpController()
return help controller for open help
Definition BatchFrame.h:155
void UpdateBatchVerboseStatus()
update visibility of verbose output window depending on status of verbose checkbox
void OnProgress(wxCommandEvent &event)
event handler for update progress controls
void OnButtonRemoveFromList(wxCommandEvent &event)
wxTimer * m_updateProjectsTimer
Definition BatchFrame.h:175
void RunBatch()
void OnCheckAutoStitch(wxCommandEvent &event)
event handler called when auto stitch checkbox was changed
wxChoice * m_endChoice
Definition BatchFrame.h:166
void OnButtonSkip(wxCommandEvent &event)
void OnButtonAddDir(wxCommandEvent &event)
void OnUpdateListBox(wxTimerEvent &event)
called by thread to update listbox
bool GetCheckAutoRemove()
return if auto remove checkbox is checked
wxIcon m_iconPaused
Definition BatchFrame.h:173
Batch::EndTask GetEndTask()
return which task should be executed at end
void OnButtonChangePrefix(wxCommandEvent &event)
void OnButtonAddToStitchingQueue(wxCommandEvent &event)
let the user select a project file which should be added to the stitching queue
void OnProcessTerminate(wxProcessEvent &event)
Batch * m_batch
Definition BatchFrame.h:163
BatchTaskBarIcon * m_tray
Definition BatchFrame.h:169
void OnButtonOpenBatch(wxCommandEvent &event)
void OnButtonChangeUserDefinedSequence(wxCommandEvent &event)
void OnButtonGenerateSequence(wxCommandEvent &e)
generate a sequence of panoramas
void OnButtonMoveDown(wxCommandEvent &event)
void OnButtonReset(wxCommandEvent &event)
bool GetCheckSaveLog()
return if always save log is checked
void OnButtonHelp(wxCommandEvent &event)
void SetCheckboxes()
void OnClose(wxCloseEvent &event)
void OnButtonSearchPano(wxCommandEvent &e)
void OnButtonCancel(wxCommandEvent &event)
wxStatusBar * OnCreateStatusBar(int number, long style, wxWindowID id, const wxString &name)
bool GetCheckVerbose()
return if verbose checkbox is checked
void OnCheckSaveLog(wxCommandEvent &event)
event handler called when always save log checkbox was changed
bool GetCheckAutoStitch()
return if auto stitch checkbox is checked
void SetLocaleAndXRC(wxLocale *locale, wxString xrc)
wxHelpController m_HelpController
Definition BatchFrame.h:168
bool IsStartedMinimized()
returns true, if last session was finished minimized
Definition BatchFrame.h:145
void OnBatchInformation(wxCommandEvent &e)
called when batch wants to show some progress message
void OnCheckAutoRemove(wxCommandEvent &event)
event handler called when auto remove checkbox was changed
void OnBatchFailed(wxCommandEvent &event)
called when batch was finished and there are failed projects
wxIcon m_iconNormal
Definition BatchFrame.h:171
wxLocale * m_locale
Definition BatchFrame.h:161
bool GetCheckOverwrite()
return if overwrite checkbox is checked
void OnButtonOpenWithHugin(wxCommandEvent &event)
void OnButtonSaveBatch(wxCommandEvent &event)
void OnMinimize(wxIconizeEvent &e)
handle when minimize or restore image
bool m_paused
Definition BatchFrame.h:165
void OnButtonAddCommand(wxCommandEvent &event)
bool IsRunning()
returns true, if batch is running
bool m_cancelled
Definition BatchFrame.h:164
void OnChoiceEnd(wxCommandEvent &event)
void AddDirToList(wxString aDir)
void OnUserExit(wxCommandEvent &event)
void RestoreSize()
void OnButtonClear(wxCommandEvent &event)
void OnButtonRemoveComplete(wxCommandEvent &event)
void ChangePrefix(int index, wxString newPrefix)
void UpdateTaskBarProgressBar()
update the progress bar in the task bar
void AddToList(wxString aFile, Project::Target target=Project::STITCHING, wxString userDefined=wxEmptyString)
class for showing a taskbar/tray icon
Definition Batch.h:47
EndTask
Definition Batch.h:50
class for showing a status bar with progress, the progress bar is always in the last field of the sta...
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41