OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CSMTools::Search Class Reference

#include <search.hpp>

Collaboration diagram for CSMTools::Search:

Public Types

enum  Type {
  Type_Text = 0, Type_TextRegEx = 1, Type_Id = 2, Type_IdRegEx = 3,
  Type_RecordState = 4, Type_None
}
 

Public Member Functions

 Search ()
 
 Search (Type type, bool caseSensitive, const std::string &value)
 
 Search (Type type, bool caseSensitive, const QRegExp &value)
 
 Search (Type type, bool caseSensitive, int value)
 
void configure (const CSMWorld::IdTableBase *model)
 
void searchRow (const CSMWorld::IdTableBase *model, int row, CSMDoc::Messages &messages) const
 
void setPadding (int before, int after)
 
void replace (CSMDoc::Document &document, CSMWorld::IdTableBase *model, const CSMWorld::UniversalId &id, const std::string &messageHint, const std::string &replaceText) const
 
bool verify (CSMDoc::Document &document, CSMWorld::IdTableBase *model, const CSMWorld::UniversalId &id, const std::string &messageHint) const
 

Private Member Functions

void searchTextCell (const CSMWorld::IdTableBase *model, const QModelIndex &index, const CSMWorld::UniversalId &id, bool writable, CSMDoc::Messages &messages) const
 
void searchRegExCell (const CSMWorld::IdTableBase *model, const QModelIndex &index, const CSMWorld::UniversalId &id, bool writable, CSMDoc::Messages &messages) const
 
void searchRecordStateCell (const CSMWorld::IdTableBase *model, const QModelIndex &index, const CSMWorld::UniversalId &id, bool writable, CSMDoc::Messages &messages) const
 
QString formatDescription (const QString &description, int pos, int length) const
 
QString flatten (const QString &text) const
 

Private Attributes

Type mType
 
std::string mText
 
QRegExp mRegExp
 
int mValue
 
bool mCase
 
std::set< intmColumns
 
int mIdColumn
 
int mTypeColumn
 
int mPaddingBefore
 
int mPaddingAfter
 

Member Enumeration Documentation

Enumerator
Type_Text 
Type_TextRegEx 
Type_Id 
Type_IdRegEx 
Type_RecordState 
Type_None 

Constructor & Destructor Documentation

CSMTools::Search::Search ( )
CSMTools::Search::Search ( Type  type,
bool  caseSensitive,
const std::string &  value 
)
CSMTools::Search::Search ( Type  type,
bool  caseSensitive,
const QRegExp &  value 
)
CSMTools::Search::Search ( Type  type,
bool  caseSensitive,
int  value 
)

Member Function Documentation

void CSMTools::Search::configure ( const CSMWorld::IdTableBase model)

Here is the call graph for this function:

Here is the caller graph for this function:

QString CSMTools::Search::flatten ( const QString &  text) const
private
QString CSMTools::Search::formatDescription ( const QString &  description,
int  pos,
int  length 
) const
private

Here is the caller graph for this function:

void CSMTools::Search::replace ( CSMDoc::Document document,
CSMWorld::IdTableBase model,
const CSMWorld::UniversalId id,
const std::string &  messageHint,
const std::string &  replaceText 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMTools::Search::searchRecordStateCell ( const CSMWorld::IdTableBase model,
const QModelIndex &  index,
const CSMWorld::UniversalId id,
bool  writable,
CSMDoc::Messages messages 
) const
private

Here is the call graph for this function:

void CSMTools::Search::searchRegExCell ( const CSMWorld::IdTableBase model,
const QModelIndex &  index,
const CSMWorld::UniversalId id,
bool  writable,
CSMDoc::Messages messages 
) const
private

Here is the call graph for this function:

void CSMTools::Search::searchRow ( const CSMWorld::IdTableBase model,
int  row,
CSMDoc::Messages messages 
) const

Here is the call graph for this function:

void CSMTools::Search::searchTextCell ( const CSMWorld::IdTableBase model,
const QModelIndex &  index,
const CSMWorld::UniversalId id,
bool  writable,
CSMDoc::Messages messages 
) const
private

Here is the call graph for this function:

void CSMTools::Search::setPadding ( int  before,
int  after 
)

Here is the caller graph for this function:

bool CSMTools::Search::verify ( CSMDoc::Document document,
CSMWorld::IdTableBase model,
const CSMWorld::UniversalId id,
const std::string &  messageHint 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool CSMTools::Search::mCase
private
std::set<int> CSMTools::Search::mColumns
private
int CSMTools::Search::mIdColumn
private
int CSMTools::Search::mPaddingAfter
private
int CSMTools::Search::mPaddingBefore
private
QRegExp CSMTools::Search::mRegExp
private
std::string CSMTools::Search::mText
private
Type CSMTools::Search::mType
private
int CSMTools::Search::mTypeColumn
private
int CSMTools::Search::mValue
private

The documentation for this class was generated from the following files: