79 return ds->AllJobsFinished();
128 int p = (
int)(progress->GetNormDone() * 100);
130 if ( !progress->GetText().empty() ) {
131 msg =
", " + progress->GetText();
156 return ds->IsJobNeeded(
id);
171 errorStatus.
m_ErrorMsg =
"Track data loading failed";
172 LOG_POST(
Warning <<
"Track load error detected, message: " << appError->GetText());
176 SetMsg(
", could not retrieve data");
188 m_Msg +=
", No data";
192 "No data in this range",
193 "No track data found in this range"));
CAppJobNotification Notification send by CAppJobEventTranslator.
CDataTrack - a abstract base class for layout tracks which need to deal with background data retrieva...
virtual void x_OnJobFailed(CAppJobNotification ¬ify)
void OnAJNotification(CEvent *evt)
event handlers for job notification event.
virtual CRef< CSGGenBankDS > GetDataSource()=0
Method for accessing the data source.
virtual void x_Expand(bool expand)
Collapse or expand the track.
virtual void x_UpdateData()=0
update track content.
virtual bool x_IsJobNeeded(CAppJobDispatcher::TJobID id) const
virtual void x_OnAllJobsFinished()
void OnAJProgress(CEvent *evt)
virtual void Update(bool layout_only)
Update content and layout including the bounding box.
virtual void x_OnJobCompleted(CAppJobNotification ¬ify)=0
virtual bool AllJobsFinished() const
virtual void DeleteAllJobs()
int m_JNotificationDepth
it is possible that OnAJNotification() is recursively called several times and therefore excessively ...
CEvent - generic event implementation TODO TODO - Attachments.
const CLayoutGroup::TObjectList & GetChildren() const
virtual void Update(bool layout_only)
Update content and layout including the bounding box.
bool m_Expanded
is this track in expanded state
void SetErrorStatus(const TTrackErrorStatus &ErrorStatus)
virtual void x_Expand(bool expand)
Collapse or expand the track.
string m_Msg
special message need to show on title bar
bool m_On
is this track shown
void x_OnLayoutChanged()
update the layout.
TTrackAttrFlags m_Attrs
various track attributes
bool isInErrorStatus() const
@ fCollapsible
can be collpased and expanded.
void x_SetStatus(const string &msg, int progress)
void SetMsg(const string &msg)
int m_Progress
any job progress index (0 - 100)
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
ON_EVENT(CAppJobNotification, CAppJobNotification::eStateChanged, &CDataTrack::OnAJNotification) ON_EVENT(CAppJobNotification
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Warning(CExceptionArgs_Base &args)
CConstIRef< IAppJobError > GetError() const
returns non-null pointer only if job Failed
TErrorSeverity m_ErrorSeverity
CConstIRef< IAppJobProgress > GetProgress() const
returns non-null pointer only if notification type is eProgress
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
TJobState GetState() const
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
constexpr bool empty(list< Ts... >) noexcept