⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trace_graph.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: trace_graph.hpp,v $ * PRODUCTION Revision 1000.1  2004/06/01 19:51:52  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8 * PRODUCTION * =========================================================================== */#ifndef __GUI_WIDGETS_ALNMULTI___ALIGN_TRACE_GRAPH__HPP#define __GUI_WIDGETS_ALNMULTI___ALIGN_TRACE_GRAPH__HPP/*  $Id: trace_graph.hpp,v 1000.1 2004/06/01 19:51:52 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:  Andrey Yazhuk * * File Description: * */#include <objtools/alnmgr/alnmap.hpp>#include <gui/opengl/glpane.hpp>#include <gui/widgets/aln_multiple/alnvec_row_graph.hpp>#include <gui/widgets/aln_multiple/trace_data.hpp>BEGIN_NCBI_SCOPEUSING_SCOPE(objects);class NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT CTraceGraphProperties    :   public  IAlnRowGraphProperties{public:    /// chromatogram rendering mode    enum    ESingnalStyle   {        eCurve,        eIntensity    };        enum    EGraphState {        eHidden,        eCollapsed,        eExpanded    };public:    ESingnalStyle   m_SignalStyle;    EGraphState m_ConfGraphState;    EGraphState m_SignalGraphState;    bool    m_bReverseColors; // reverse colors for signals measured on back strand     // so that they correspond to assembly sequence rather than to trace sequence    CTraceGraphProperties();    CTraceGraphProperties&  operator=(const CTraceGraphProperties& orig);};/////////////////////////////////////////////////////////////////////////////////// CTraceGraph - trace data renderer./// Renders confidence graph and A, C, T, G chromatograms using CTraceData as/// datasource.class NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT CTraceGraph : public IAlnVecRowGraph{public:    typedef CConstRef<CAlnMap::CAlnChunkVec>   TChunkVec;    typedef CTraceGraphProperties::ESingnalStyle   ESingnalStyle;    typedef CTraceGraphProperties::EGraphState     EGraphState;    CTraceGraph(const CBioseq_Handle& handle, bool b_neg_strand);    /// @name IAlnVecRowGraph implementaion    /// @{    virtual ~CTraceGraph();        virtual bool    HasData() const;    virtual bool    IsCreated() const;    virtual bool    Create();    virtual void    Destroy();    virtual const IAlnRowGraphProperties*     GetProperties() const;    virtual void    SetProperties(IAlnRowGraphProperties* props);    virtual int     GetPreferredHeight()    const;    virtual void    Render(CGlPane& pane, int y, int h, const TChunkVec& chunks);       /// @}    void    SetConfGraphState(EGraphState state);        void    SetSignalGraphState(EGraphState state);        protected:    int     x_GetConfGraphH() const;    int     x_GetSignalGraphH() const;    void    x_RenderContour(CGlPane& pane, int y,                             int conf_h, int total_h,                            const TChunkVec& chunks);        void    x_RenderConfGraph(CGlPane& pane, int y, int h,                               const TChunkVec& chunks);           void    x_RenderSignalGraph(CGlPane& pane, int y, int h,                                const TChunkVec& chunks);           void    x_RenderCurveChunk(CGlPane& pane,                                 CConstRef<CAlnMap::CAlnChunk> chunk,                                 const CTraceData::TPositions& positions,                                 const CTraceData::TValues& values,                                int bottom_y, int h, int amp);        void    x_RenderIntensityGraphs(CGlPane& pane, int y, int h,                                              const TChunkVec& chunks);    const CGlColor&     GetColorByValue(double value, int signal) const;    int x_FindSampleToLeft(double pos) const;    int x_FindSampleToRight(double pos) const;protected:    CTraceDataProxy m_DataProxy;    CTraceData*     m_pData;        CTraceGraphProperties   m_Props;    vector<CGlColor>    m_vSignalColors;};END_NCBI_SCOPE/* * =========================================================================== * $Log: trace_graph.hpp,v $ * Revision 1000.1  2004/06/01 19:51:52  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8 * * Revision 1.8  2004/05/14 13:20:08  yazhuk * Added m_bReverseColors * * Revision 1.7  2004/03/29 18:59:28  yazhuk * Added support for data loading and Properties management * * Revision 1.6  2004/03/26 14:59:02  yazhuk * Renamed EMode to ESignalStyle * * Revision 1.5  2004/03/25 13:06:13  dicuccio * Minor rearrangement to avoid compiler warning * * Revision 1.4  2004/03/08 17:05:56  yazhuk * Inherited from IAlnVecRowGraph * * Revision 1.3  2004/03/08 15:37:59  yazhuk * Implemented state management expanded/collapsed/hidden * * Revision 1.2  2004/03/02 18:06:35  kans * remove CTraceGraph from x_RenderContour * * Revision 1.1  2004/03/02 15:11:00  yazhuk * Initial revision * * =========================================================================== */#endif  // __GUI_WIDGETS_ALNMULTI___ALIGN_TRACE_GRAPH__HPP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -