53 #include <wx/button.h>
54 #include <wx/statbox.h>
55 #include <wx/msgdlg.h>
77 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
87 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
93 GetSizer()->SetSizeHints(
this);
126 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
127 itemDialog1->SetSizer(itemBoxSizer2);
130 itemBoxSizer2->Add(
m_FeatureType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
133 m_CheckPartials =
new wxCheckBox( itemDialog1,
wxID_ANY,
_(
"Check partials"), wxDefaultPosition, wxDefaultSize, 0 );
135 itemBoxSizer2->Add(
m_CheckPartials, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
137 m_CaseSensitive =
new wxCheckBox( itemDialog1,
wxID_ANY,
_(
"Case sensitive"), wxDefaultPosition, wxDefaultSize, 0 );
139 itemBoxSizer2->Add(
m_CaseSensitive, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
143 itemBoxSizer2->Add(
m_RemoveProteins, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
153 itemBoxSizer2->Add(OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
191 bool modified =
false;
196 if (field_name.empty())
203 vector<CSeq_entry_Handle> entry_handles;
206 if (constraint && !constraint_field.empty())
212 const CSeq_feat *feat =
dynamic_cast<const CSeq_feat*
> ( (*obj_it)->GetOriginalObject() );
231 ITERATE(vector<CSeq_entry_Handle>, seh_it, entry_handles)
238 if (feat1->GetSeq_feat_Handle() < feat2->GetSeq_feat_Handle() &&
239 deleted_feats.
find(feat1->GetSeq_feat_Handle()) == deleted_feats.
end() &&
240 deleted_feats.
find(feat2->GetSeq_feat_Handle()) == deleted_feats.
end() &&
244 deleted_feats.
insert(feat2->GetSeq_feat_Handle());
263 wxSizerItemList& slist = sizer->GetChildren();
265 for (wxSizerItemList::iterator iter = slist.begin(); iter != slist.end(); ++iter, ++
n) {
266 if ((*iter)->IsSizer()) {
268 }
else if ((*iter)->IsWindow()) {
269 wxWindow* child = (*iter)->GetWindow();
275 wxSizer* subsizer = child->GetSizer();
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
void PopulateFeatureListbox(void)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr)
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
wxCheckBox * m_CaseSensitive
CStringConstraintPanel * m_StringConstraintPanel
bool Create(wxWindow *parent, wxWindowID id=11000, const wxString &caption=_("Remove Duplicate Features"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void Init()
Initialises member variables.
wxCheckBox * m_CheckPartials
CFeatureFieldNamePanel * m_FeatureConstraint
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
virtual CRef< CCmdComposite > GetCommand()
void CreateControls()
Creates the controls and sizers.
CFeatureTypePanel * m_FeatureType
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void UpdateChildrenFeaturePanels(wxSizer *sizer)
wxCheckBox * m_RemoveProteins
void ProcessUpdateFeatEvent(wxCommandEvent &event)
~CRmDupFeaturesDlg()
Destructor.
CRmDupFeaturesDlg()
Constructors.
static const CFeatList * GetFeatList()
namespace ncbi::objects::
CRef< edit::CStringConstraint > GetStringConstraint()
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
#define EVT_UPDATE_FEATURE_LIST(id, fn)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const TLocation & GetLocation(void) const
Get the Location member data.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
#define ID_RM_DUP_FEATURES_OKCANCEL
C++ wrappers for the Perl-compatible regular expression (PCRE) library.
void GetProductToCDSMap(objects::CScope &scope, map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > &product_to_cds)
CRef< CCmdComposite > GetDeleteFeatureCommand(const objects::CSeq_feat_Handle &fh, bool remove_proteins=true)