Subversion Repositories Scribus

Rev

Rev 5821 | Rev 6655 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
3 paul 7
#ifndef PICSTATUS_H
8
#define PICSTATUS_H
9
 
10
#include <qdialog.h>
11
#include <qpushbutton.h>
12
#include <qtable.h>
13
#include <qlayout.h>
14
#include <qtooltip.h>
15
#include <qcheckbox.h>
16
#include <qheader.h>
17
#include <qptrlist.h>
18
#include <qvaluelist.h>
2969 craig 19
 
20
#include "scribusapi.h"
838 cbradney 21
class ScribusDoc;
2805 craig 22
class FileSearch;
3 paul 23
 
4645 subik 24
 
2969 craig 25
class SCRIBUS_API PicStatus : public QDialog
3 paul 26
{
4645 subik 27
        Q_OBJECT
3 paul 28
 
29
public:
4645 subik 30
        /*!
31
        \author Franz Schmid
32
        \brief Constructs a Dialog, which list all Images in the current Document. In this Dialog it is possible
33
                to search for missing Images.
34
        \param parent Pointer to parent window
35
        \param docu Pointer to the current Document
36
        \param viewi Pointer to the current View
37
         */
5821 cbradney 38
        PicStatus(QWidget* parent, ScribusDoc *docu);
4645 subik 39
        ~PicStatus() {};
3 paul 40
 
3367 cbradney 41
public slots:
42
        void languageChange();
43
 
3 paul 44
private slots:
4645 subik 45
        /*!
46
        \author Franz Schmid
47
        \brief Moves to the Page containing the selected Image.
48
         */
49
        void GotoPic();
50
        /*!
51
        \author Franz Schmid
52
        \brief Searches for the given Picture. Displays a Dialog when more than one Picture is found.
53
        */
54
        void SearchPic();
5834 cbradney 55
        void searchAllPics();
4645 subik 56
        void SearchPicAborted(bool userCancelled);
57
        void SearchPicFinished(const QStringList & matches, const QString & fileName);
58
        /*!
59
        \author Franz Schmid
60
        \brief Enables or disables printing of the selected Image.
61
        */
62
        void PrintPic();
3 paul 63
 
64
protected:
4645 subik 65
        QVBoxLayout* PicStatusLayout;
66
        QHBoxLayout* Layout2;
3 paul 67
 
4645 subik 68
        /*! \brief Return the row index for the row containing the specified
69
                filename. Behavour is undefined if the filename is not in the
70
                table.
71
        \param fileName a search string
72
        \retval int table row
73
        */
2807 craig 74
        int getRowByFileName(const QString& fileName);
75
 
4645 subik 76
        /*! \brief Toggle a search button in the table between "Search" and "Cancel Search",
77
         fixing signal connections as well.
78
        \param row table row
79
        \param toCancel true in the "cancelation" state/process
80
        \param searcher a reference to the searcher object */
4143 cbradney 81
        void setSearchButton(int row, bool toCancel, const FileSearch* searcher);
2807 craig 82
 
4645 subik 83
        /*! \brief Load the image specified into the PageItem shown on row `row'
84
        \param newFilePath a file path
85
        \param row row number */
4143 cbradney 86
        bool loadPictByRow(const QString & newFilePath, unsigned int row);
2809 craig 87
 
2807 craig 88
        // Column indexes
5251 fschmid 89
        static const unsigned short COL_PREVIEW;
2807 craig 90
        static const unsigned short COL_FILENAME;
91
        static const unsigned short COL_PATH;
92
        static const unsigned short COL_PAGE;
93
        static const unsigned short COL_GOTO;
94
        static const unsigned short COL_PRINT;
95
        static const unsigned short COL_STATUS;
96
        static const unsigned short COL_SEARCH;
97
 
98
        // Common translated strings
3367 cbradney 99
        static QString trOK;
100
        static QString trMissing;
101
        static QString trSearch;
102
        static QString trCancelSearch;
103
        static QString trGoto;
2807 craig 104
 
3 paul 105
signals:
1615 fschmid 106
        void selectPage(int);
2093 cbradney 107
        void selectMasterPage(QString);
4645 subik 108
 
109
private:
110
        QTable* PicTable;
111
        QHeader *Header;
5834 cbradney 112
        QPushButton* cancelButton;
113
        QPushButton* okButton;
114
        QPushButton* searchAllButton;
5821 cbradney 115
        ScribusDoc *m_Doc;
4645 subik 116
        int Zeilen;
117
        QPtrList<QCheckBox> FlagsPic;
118
        QValueList<uint> ItemNrs;
3 paul 119
};
120
 
121
#endif // PICSTATUS_H