#ifndef QUESTVIEW_H
#define QUESTVIEW_H
//
#include <QTableView>
#include <QSqlQueryModel>
#include <QModelIndex>
#include "mainwindowimpl.h"
//
{
Q_OBJECT
public:
bool insertRow( int qid, bool copied );
bool deleteRow( int qid );
private:
bool setRef
( int qid,
const QString ref
);
bool setType
( int qid,
const QString &type
);
bool setPreface
( int qid,
const QString &preface
);
bool setQuest
( int qid,
const QString &quest
);
bool setAns
( int qid,
const QString &ans
);
bool setCR
( int qid,
const QString &cr
);
bool parseRef
( const QString ref,
int *book,
int *chap,
int *verse,
int *verses
);
void refresh();
MainWindowImpl *pwin;
};
#endif
#ifndef QUESTVIEW_H
#define QUESTVIEW_H
//
#include <QTableView>
#include <QSqlQueryModel>
#include <QModelIndex>
#include "mainwindowimpl.h"
//
class editableSqlQueryModel : public QSqlQueryModel
{
Q_OBJECT
public:
editableSqlQueryModel( QObject *parent = 0, QTableView *v = 0 );
Qt::ItemFlags flags( const QModelIndex &index ) const;
bool setData( const QModelIndex &index, const QVariant &value, int role );
bool insertRow( int qid, bool copied );
bool deleteRow( int qid );
private:
bool setRef( int qid, const QString ref );
bool setType( int qid, const QString &type );
bool setPreface( int qid, const QString &preface );
bool setQuest( int qid, const QString &quest );
bool setAns( int qid, const QString &ans );
bool setCR( int qid, const QString &cr );
bool parseRef( const QString ref, int *book, int *chap, int *verse, int *verses );
void refresh();
MainWindowImpl *pwin;
QTableView *view;
};
#endif
To copy to clipboard, switch view to plain text mode
Bookmarks