Public Member Functions

PostsPage Class Reference

Manage the forum's page where are listed the new messages. More...

#include <PostsPage.h>

List of all members.

Public Member Functions

 PostsPage (Forum *parent)
QString getPageContent ()
void setPageContent (QString page, QList< QStringList > cache=QList< QStringList >())
bool isEmpty ()
bool hasPosts ()
bool detectAllCodes ()
bool detectPostEntry ()
 Detect codes of post entry (row in the posts page's table).
bool detectPostLink ()
 Detect codes of post' topic link.
bool detectPostField ()
 Detect codes of post' field (row's column).
bool detectPostReplies ()
 Detect codes of post's number of replies and set also its field number.
ErrorgetErrorDetectAllCodes ()
ErrorgetErrorSearchCodes ()
bool searchCodes (const QList< QStringList > *codes, const QList< QRegExp * > *to)
bool areCodesDetected ()
int countPostsTotalNum ()
QRegExp getPostStartCode ()
QRegExp getPostEndCode ()
QRegExp getPostTopicLinkStartCode ()
QRegExp getPostTopicLinkEndCode ()
QRegExp getPostFieldStartCode ()
QRegExp getPostFieldEndCode ()
QRegExp getPostFieldRepliesStartCode ()
QRegExp getPostFieldRepliesEndCode ()
int getPostFieldRepliesNum ()
void copyCodes (PostsPage *postsPage)
void setPostsCache (QList< QStringList > cache)
QList< QStringList > getPostsCache ()
bool post (ushort postNum)
bool nextPost ()
 Move to the next post.
bool postField (ushort fieldNum)
bool nextPostField ()
 Move to the next post's field.
QString postTopicTitle ()
QString postTopicTitleHref ()
int postTotReplies ()

Detailed Description

Manage the forum's page where are listed the new messages.


Member Function Documentation

bool PostsPage::nextPost (  )

Move to the next post.

See also:
post()
bool PostsPage::nextPostField (  )

Move to the next post's field.

See also:
postField()
bool PostsPage::post ( ushort  postNum )

Move to the specified post. Specifically, update the 'currentPostStartPos' and 'currentPostEndPos' class members; these variables can be used by other methods for searching data in a single post by checking that currentPostStartPos < data < currentPostEndPos.

Parameters:
postNumthe post's number.
bool PostsPage::postField ( ushort  fieldNum )

Move to the specified post's field (column in a row). Specifically, update the 'currentPostFieldStartPos' and 'currentPostFieldEndPos' class members; these variables can be used by other methods for searching data in a single post's field by checking that currentPostFieldStartPos < data < currentPostFieldEndPos.

Parameters:
fieldNumthe field's number.
bool PostsPage::searchCodes ( const QList< QStringList > *  codes,
const QList< QRegExp * > *  to 
)

Accepts as argument a list of start/end codes that it searches on the page, saving those that were found as pattern for the regexs in the list passed as second argument.

Parameters:
codesthe codes to search in the page, each one is in turn a list containing the start and end regex patterns.
towhere to save the detected patterns.

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