Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

scrapbookpalette.h

Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef BIBLIO_H
00008 #define BIBLIO_H
00009 
00010 #include <QDropEvent>
00011 #include <QDragMoveEvent>
00012 #include <QDragEnterEvent>
00013 #include <QListWidget>
00014 
00015 class QEvent;
00016 
00017 #include "scribusapi.h"
00018 #include "scrpalettebase.h"
00019 #include "scribusstructs.h"
00020 
00021 class QHBoxLayout;
00022 class QToolButton;
00023 class QVBoxLayout;
00024 class QToolBox;
00025 class QPixmap;
00026 class QListWidgetItem;
00027 
00028 class SCRIBUS_API BibView : public QListWidget
00029 {
00030     Q_OBJECT
00031 
00032 public:
00033     BibView( QWidget* parent);
00034     ~BibView() {};
00035     void AddObj(QString name, QString daten, QPixmap Bild);
00036     void checkAndChange(QString &text, QString nam, QString dir);
00037     void SaveContents(QString name, QString oldName);
00038     void ReadOldContents(QString, QString newName);
00039     void ReadContents(QString name);
00040     struct Elem
00041     {
00042         QString Data;
00043         QPixmap Preview;
00044     };
00045     QMap<QString,Elem> objectMap;
00046     QString ScFilename;
00047     bool canWrite;
00048 
00049 signals:
00050     void ToggleAllPalettes();
00051     void Schliessen();
00052     void CloseMpal();
00053     void CloseTpal();
00054     void objDropped(QString text);
00055 
00056 protected:
00057     void dragEnterEvent(QDragEnterEvent *e);
00058     void dragMoveEvent(QDragMoveEvent *e);
00059     void dropEvent(QDropEvent *e);
00060     void startDrag(Qt::DropActions supportedActions);
00061 };
00062 
00063 class SCRIBUS_API Biblio : public ScrPaletteBase
00064 {
00065     Q_OBJECT
00066 
00067 public:
00068     Biblio( QWidget* parent);
00069     ~Biblio() {};
00070     
00071     virtual void changeEvent(QEvent *e);
00072     
00073     void ObjFromCopyAction(QString text, QString name);
00074     void adjustReferences(QString nam);
00075     void CleanUpTemp();
00076     void setScrapbookFileName(QString);
00077     const QString getScrapbookFileName();
00078     const int objectCount();
00079     void readContents(QString);
00080     void readTempContents(QString);
00081     void readOldContents(QString, QString);
00082     void installEventFilter(QObject *);
00083     void setOpenScrapbooks(QStringList &fileNames);
00084     QStringList getOpenScrapbooks();
00085     QString getObjectName(QString &text);
00086     BibView* tempBView;
00087     BibView* activeBView;
00088     QListWidgetItem *actItem;
00089     
00090 public slots:
00091     void languageChange();
00092     void ObjFromMenu(QString text);
00093 
00094 private slots:
00095     void handleDoubleClick(QListWidgetItem *ite);
00096     void handlePasteToPage();
00097     void HandleMouse(QPoint p);
00098     bool copyObj(int id);
00099     void moveObj(int id);
00100     void deleteObj();
00101     void deleteAllObj();
00102     void renameObj();
00103     void NewLib();
00104     void Load();
00105     void SaveAs();
00106     void closeLib();
00107     void libChanged(int index);
00108     void Import();
00109 
00110 signals:
00111     void updateRecentMenue();
00112     void pasteToActualPage(QString);
00113 
00114 protected:
00115     QToolBox* Frame3;
00116     QVBoxLayout* BiblioLayout;
00117     int tempCount;
00118     QString OldName;
00119     QHBoxLayout* buttonLayout;
00120     QToolButton* newButton;
00121     QToolButton* loadButton;
00122     QToolButton* saveAsButton;
00123     QToolButton* importButton;
00124     QToolButton* closeButton;
00125 };
00126 
00127 #endif // BIBLIO_H
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.