File: tablemanipulation.h

package info (click to toggle)
texstudio 2.3%2Bdebian-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 20,992 kB
  • sloc: cpp: 61,734; ansic: 4,300; xml: 726; sh: 125; makefile: 25
file content (31 lines) | stat: -rw-r--r-- 1,579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef TABLEMANIPULATION_H
#define TABLEMANIPULATION_H

#include "qdocument.h"
class QEditor;

class LatexTables{
public:
    static void addRow(QDocumentCursor &c,const int numberOfColumns );
    static void addColumn(QDocument *doc,const int lineNumber,const int afterColumn,QStringList *cutBuffer=0);
    static void removeColumn(QDocument *doc,const int lineNumber,const int column,QStringList *cutBuffer=0);
    static void removeRow(QDocumentCursor &c);
    static int findNextToken(QDocumentCursor &cur,QStringList tokens,bool keepAnchor=false,bool backwards=false);
    static int getColumn(QDocumentCursor &cur);
    static QString getDef(QDocumentCursor &cur);
    static QString getSimplifiedDef(QDocumentCursor &cur);
    static int getNumberOfColumns(QDocumentCursor &cur);
    static int getNumberOfColumns(QStringList values);
    static bool inTableEnv(QDocumentCursor &cur);
    static int getNumOfColsInMultiColumn(const QString &str);
    static int incNumOfColsInMultiColumn(const QString &str,int add);
    static void addHLine(QDocumentCursor &c,const int numberOfLines=-1,const bool remove=false);
    static QStringList splitColDef(QString def);
    static void executeScript(QString script,QEditor *m_editor);
    static void generateTableFromTemplate(QEditor *m_editor,QString templateFileName,QString def,QList<QStringList> table,QString env);
    static QString getTableText(QDocumentCursor &cur);

    static QStringList tabularNames;
    static QStringList tabularNamesWithOneOption;
};
#endif // TABLEMANIPULATION_H