pane_content_conf.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:7k
- /*
- * ===========================================================================
- * PRODUCTION $Log: pane_content_conf.hpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 19:53:23 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_WIDGETS_SEQ_GRAPHIC___PANECONTENT_CONF__HPP
- #define GUI_WIDGETS_SEQ_GRAPHIC___PANECONTENT_CONF__HPP
- /* $Id: pane_content_conf.hpp,v 1000.1 2004/06/01 19:53:23 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Authors: Robert Smith
- *
- * File Description:
- * Configuration file for Sequence Graphical Widget
- *
- */
- #include <gui/config/feat_show.hpp>
- #include <gui/config/layout_chooser.hpp>
- BEGIN_NCBI_SCOPE
- /// CLayoutSpec : the specifications of what kind of layout objects to put
- /// together and how to do their layout.
- class NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT CLayoutSpec : public CObject
- {
- public:
- typedef vector<CRef<CLayoutSpec> > TLayoutSpecs;
- CLayoutSpec(CLayoutObjectChooser& chooser);
-
- string GetSpecName() const;
- void SetSpecName(const string& aName);
-
- const CLayoutObjectChooser& GetObjectChooser() const;
- CLayoutObjectChooser& SetObjectChooser();
- void SetObjectChooser(CLayoutObjectChooser& );
-
- bool GetLinkFeatures() const;
- void SetLinkFeatures(bool);
-
- bool GetShowProtProd() const;
- void SetShowProtProd(bool);
-
- bool GetIfNotUsed() const;
- void SetIfNotUsed(bool);
- private:
- string m_SpecName;
- CRef<CLayoutObjectChooser> m_Chooser;
- bool m_LinkFeatures;
- bool m_ShowProtProd;
- bool m_IfNotUsed;
- };
- class NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT CPaneContentConf : public CFeatConfigShow
- {
- public:
- CPaneContentConf(objects::CPluginConfigCache* config_cache,
- const string& desc = "Content");
-
- virtual bool LoadCurrentSettings(ELoadValueSource src);
- virtual bool SaveCurrentSettings(void);
- const CLayoutSpec::TLayoutSpecs& GetLayoutSpecs() const;
- CLayoutSpec::TLayoutSpecs& SetLayoutSpecs();
- void SetLayoutSpecs(CLayoutSpec::TLayoutSpecs& );
-
- // individual histogram settings
- bool GetHistogram(int type, int subtype) const;
- void SetHistogram(int type, int subtype, bool hist);
- void SetHistogramInherited(int type, int subtype, bool inherited);
- // all histogram settings.
- const CFeatConfigValues<bool>& GetHistograms() const;
- void SetHistograms(CFeatConfigValues<bool>& h);
- void ClearHistograms();
- bool GetShowAlignments(void) const;
- void SetShowAlignments(bool b);
- bool GetShowPWAlignLabels() const;
- void SetShowPWAlignLabels(bool);
- bool GetShowSegmentMap() const;
- void SetShowSegmentMap(bool);
- bool GetShowGraphs(void) const;
- void SetShowGraphs(bool b);
- int GetRulerSpacer() const;
- void SetRulerSpacer(int);
- protected:
- CFeatConfigValues<bool> m_HistFeat;
- CLayoutSpec::TLayoutSpecs m_LayoutSpecs;
- bool m_ShowAlignments;
- bool m_ShowGraphs;
- bool m_ShowPWAlignLabels;
- bool m_ShowSegmentMap;
- int m_RulerSpacer;
- };
- inline
- bool CPaneContentConf::GetShowAlignments(void) const
- {
- return m_ShowAlignments;
- }
- inline
- void CPaneContentConf::SetShowAlignments(bool b)
- {
- m_ShowAlignments = b;
- }
- inline
- bool CPaneContentConf::GetShowGraphs(void) const
- {
- return m_ShowGraphs;
- }
- inline
- void CPaneContentConf::SetShowGraphs(bool b)
- {
- m_ShowGraphs = b;
- }
- inline
- bool CPaneContentConf::GetShowPWAlignLabels(void) const
- {
- return m_ShowPWAlignLabels;
- }
- inline
- void CPaneContentConf::SetShowPWAlignLabels(bool b)
- {
- m_ShowPWAlignLabels = b;
- }
- inline
- bool CPaneContentConf::GetShowSegmentMap(void) const
- {
- return m_ShowSegmentMap;
- }
- inline
- void CPaneContentConf::SetShowSegmentMap(bool b)
- {
- m_ShowSegmentMap = b;
- }
- inline
- int CPaneContentConf::GetRulerSpacer(void) const
- {
- return m_RulerSpacer;
- }
- inline
- void CPaneContentConf::SetRulerSpacer(int spacer)
- {
- m_RulerSpacer = spacer;
- }
- class CCPaneContentFactoryDefaults : public CFeatShowFactoryDefaults
- {
- public:
- virtual string Get(const string& key) const;
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: pane_content_conf.hpp,v $
- * Revision 1000.1 2004/06/01 19:53:23 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8
- *
- * Revision 1.8 2004/05/12 16:54:13 lebedev
- * Added option to specify a space between the ruler and the rest of the dispay
- *
- * Revision 1.7 2004/05/10 15:57:55 lebedev
- * Configuration option to show/hide segment maps added.
- *
- * Revision 1.6 2004/05/07 11:12:14 lebedev
- * Configuration option to show/hide labels for pairwise alignments and mate pairs added.
- *
- * Revision 1.5 2004/04/06 13:31:16 dicuccio
- * Formatting changes. Added default flags for disabling graphs, alignments
- *
- * Revision 1.4 2004/02/02 18:45:39 rsmith
- * add description to CSettingsSet, constructor and descendants.
- *
- * Revision 1.3 2004/01/20 13:58:06 rsmith
- * Inherit feature 'show' settings.
- *
- * Revision 1.2 2003/12/30 14:55:00 dicuccio
- * Standardized export specifiers
- *
- * Revision 1.1 2003/12/29 14:56:28 rsmith
- * initial checkin
- *
- *
- * ===========================================================================
- */
- #endif /* GUI_WIDGETS_SEQ_GRAPHIC___PANECONTENT_CONF__HPP */