Switch to unified view

a/src/qtgui/restable.h b/src/qtgui/restable.h
...
...
14
 *   Free Software Foundation, Inc.,
14
 *   Free Software Foundation, Inc.,
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 */
16
 */
17
#ifndef _RESTABLE_H_INCLUDED_
17
#ifndef _RESTABLE_H_INCLUDED_
18
#define _RESTABLE_H_INCLUDED_
18
#define _RESTABLE_H_INCLUDED_
19
#include "autoconfig.h"
19
20
20
#include <Qt>
21
#include <Qt>
21
22
22
#include <string>
23
#include <string>
23
#include <map>
24
#include <map>
24
#include <vector>
25
#include <vector>
26
#include MEMORY_INCLUDE
25
27
26
#include "ui_restable.h"
28
#include "ui_restable.h"
27
#include "refcntr.h"
28
#include "docseq.h"
29
#include "docseq.h"
29
#include "plaintorich.h"
30
#include "plaintorich.h"
30
31
31
class ResTable;
32
class ResTable;
32
33
...
...
48
               int role = Qt::DisplayRole ) const;
49
               int role = Qt::DisplayRole ) const;
49
    virtual void saveAsCSV(FILE *fp);
50
    virtual void saveAsCSV(FILE *fp);
50
    virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
51
    virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
51
    // Specific methods
52
    // Specific methods
52
    virtual void readDocSource();
53
    virtual void readDocSource();
53
    virtual void setDocSource(RefCntr<DocSequence> nsource);
54
    virtual void setDocSource(STD_SHARED_PTR<DocSequence> nsource);
54
    virtual RefCntr<DocSequence> getDocSource() {return m_source;}
55
    virtual STD_SHARED_PTR<DocSequence> getDocSource() {return m_source;}
55
    virtual void deleteColumn(int);
56
    virtual void deleteColumn(int);
56
    virtual const std::vector<std::string>& getFields() {return m_fields;}
57
    virtual const std::vector<std::string>& getFields() {return m_fields;}
57
    virtual const std::map<std::string, QString>& getAllFields() 
58
    virtual const std::map<std::string, QString>& getAllFields() 
58
    { 
59
    { 
59
    return o_displayableFields;
60
    return o_displayableFields;
...
...
70
71
71
signals:
72
signals:
72
    void sortDataChanged(DocSeqSortSpec);
73
    void sortDataChanged(DocSeqSortSpec);
73
74
74
private:
75
private:
75
    mutable RefCntr<DocSequence> m_source;
76
    mutable STD_SHARED_PTR<DocSequence> m_source;
76
    std::vector<std::string> m_fields;
77
    std::vector<std::string> m_fields;
77
    std::vector<FieldGetter*> m_getters;
78
    std::vector<FieldGetter*> m_getters;
78
    static std::map<std::string, QString> o_displayableFields;
79
    static std::map<std::string, QString> o_displayableFields;
79
    bool m_ignoreSort;
80
    bool m_ignoreSort;
80
    FieldGetter* chooseGetter(const std::string&);
81
    FieldGetter* chooseGetter(const std::string&);
...
...
124
    void setRclMain(RclMain *m, bool ismain);
125
    void setRclMain(RclMain *m, bool ismain);
125
126
126
public slots:
127
public slots:
127
    virtual void onTableView_currentChanged(const QModelIndex&);
128
    virtual void onTableView_currentChanged(const QModelIndex&);
128
    virtual void on_tableView_entered(const QModelIndex& index);
129
    virtual void on_tableView_entered(const QModelIndex& index);
129
    virtual void setDocSource(RefCntr<DocSequence> nsource);
130
    virtual void setDocSource(STD_SHARED_PTR<DocSequence> nsource);
130
    virtual void saveColState();
131
    virtual void saveColState();
131
    virtual void resetSource();
132
    virtual void resetSource();
132
    virtual void readDocSource(bool resetPos = true);
133
    virtual void readDocSource(bool resetPos = true);
133
    virtual void onSortDataChanged(DocSeqSortSpec);
134
    virtual void onSortDataChanged(DocSeqSortSpec);
134
    virtual void createPopupMenu(const QPoint& pos);
135
    virtual void createPopupMenu(const QPoint& pos);