Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3136 → Rev 3137

/branches/Version13x/Scribus/scribus/cpalette.cpp
37,38 → 37,8
#include "units.h"
#include "page.h"
#include "util.h"
#include "dynamictip.h"
 
DynamicTip::DynamicTip( QListBox* parent, Cpalette* pale ) : QToolTip( parent )
{
pal = pale;
listB = parent;
}
 
void DynamicTip::maybeTip( const QPoint &pos )
{
QListBoxItem* it = listB->itemAt(pos);
if (it != 0)
{
if (!pal->colorList.contains(it->text()))
return;
QString tipText = "";
ScColor col = pal->colorList[it->text()];
if (col.getColorModel() == colorModelCMYK)
{
int c, m, y, k;
col.getCMYK(&c, &m, &y, &k);
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
}
else
{
int r, g, b;
col.getRawRGBColor(&r, &g, &b);
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b);
}
tip(listB->itemRect(it), tipText);
}
}
 
Cpalette::Cpalette(QWidget* parent) : QWidget(parent, "Cdouble")
{
alertIcon = loadIcon("alert.png");
167,7 → 137,7
colorListQLBox->setMinimumSize( QSize( 150, 30 ) );
colorListQLBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
Form1Layout->addWidget(colorListQLBox);
dynTip = new DynamicTip(colorListQLBox, this);
dynTip = new DynamicTip(colorListQLBox, &colorList);
Inhalt->setOn(true);
InnenButton();
GradientMode = false;
/branches/Version13x/Scribus/scribus/Makefile.am
48,6 → 48,7
documentchecker.cpp \
documentinformation.cpp \
druck.cpp \
dynamictip.cpp \
edit1format.cpp \
editformats.cpp \
editor.cpp \
247,6 → 248,7
$(INSTALL_DATA) $(srcdir)/documentchecker.h $(prefix)/include/scribus/documentchecker.h
$(INSTALL_DATA) $(srcdir)/documentinformation.h $(prefix)/include/scribus/documentinformation.h
$(INSTALL_DATA) $(srcdir)/druck.h $(prefix)/include/scribus/druck.h
$(INSTALL_DATA) $(srcdir)/dynamictip.h $(prefix)/include/scribus/dynamictip.h
$(INSTALL_DATA) $(srcdir)/edit1format.h $(prefix)/include/scribus/edit1format.h
$(INSTALL_DATA) $(srcdir)/editformats.h $(prefix)/include/scribus/editformats.h
$(INSTALL_DATA) $(srcdir)/editor.h $(prefix)/include/scribus/editor.h
424,6 → 426,7
-rm -f $(prefix)/include/scribus/documentchecker.h
-rm -f $(prefix)/include/scribus/documentinformation.h
-rm -f $(prefix)/include/scribus/druck.h
-rm -f $(prefix)/include/scribus/dynamictip.h
-rm -f $(prefix)/include/scribus/edit1format.h
-rm -f $(prefix)/include/scribus/editformats.h
-rm -f $(prefix)/include/scribus/editor.h
/branches/Version13x/Scribus/scribus/about.cpp
46,7 → 46,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1 %2 %3 ").arg("30").arg("August").arg("2005 ");
QString bu = tr("%1 %2 %3 ").arg("31").arg("August").arg("2005 ");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/pdflib.cpp
56,8 → 56,9
#endif
extern ScribusApp* ScApp;
 
PDFlib::PDFlib()
PDFlib::PDFlib(ScribusDoc *docu)
{
doc = docu;
OwnerKey = QByteArray(32);
UserKey = QByteArray(32);
FileID = QByteArray(16);
114,7 → 115,7
QPixmap pm;
bool ret = false;
int progresscount=0;
if (PDF_Begin_Doc(fn, doc, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts, doc->UsedFonts, ScApp->bookmarkPalette->BView))
if (PDF_Begin_Doc(fn, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts, doc->UsedFonts, ScApp->bookmarkPalette->BView))
{
QMap<int, int> pageNsMpa;
for (uint a = 0; a < pageNs.size(); ++a)
400,7 → 401,7
return ComputeMD5Sum(&TBytes);
}
 
bool PDFlib::PDF_Begin_Doc(QString fn, ScribusDoc *docu, PDFOptions *opts, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, BookMView* vi)
bool PDFlib::PDF_Begin_Doc(QString fn, PDFOptions *opts, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, BookMView* vi)
{
Spool.setName(fn);
if (!Spool.open(IO_WriteOnly))
411,7 → 412,6
QFileInfo fd;
QString fext;
int a;
doc = docu;
Bvie = vi;
Options = opts;
BookMinUse = false;
/branches/Version13x/Scribus/scribus/cpalette.h
129,14 → 129,4
DynamicTip* dynTip;
};
 
class SCRIBUS_API DynamicTip : public QToolTip
{
public:
DynamicTip( QListBox* parent, Cpalette* pale );
Cpalette* pal;
QListBox* listB;
protected:
void maybeTip( const QPoint & );
};
 
#endif
/branches/Version13x/Scribus/scribus/dynamictip.cpp
0,0 → 1,49
/***************************************************************************
dynamictip.cpp - description
-------------------
begin : Wed Aug 31 2005
copyright : (C) 2005 by Franz Schmid
email : Franz.Schmid@altmuehlnet.de
***************************************************************************/
 
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
 
#include "dynamictip.h"
 
DynamicTip::DynamicTip( QListBox* parent, ColorList* pale ) : QToolTip( parent )
{
colorList = pale;
listB = parent;
}
 
void DynamicTip::maybeTip( const QPoint &pos )
{
QListBoxItem* it = listB->itemAt(pos);
if (it != 0)
{
if (!colorList->contains(it->text()))
return;
QString tipText = "";
ScColor col = (*colorList)[it->text()];
if (col.getColorModel() == colorModelCMYK)
{
int c, m, y, k;
col.getCMYK(&c, &m, &y, &k);
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
}
else
{
int r, g, b;
col.getRawRGBColor(&r, &g, &b);
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b);
}
tip(listB->itemRect(it), tipText);
}
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: branches/Version13x/Scribus/scribus/pdflib.h
===================================================================
--- branches/Version13x/Scribus/scribus/pdflib.h (revision 3136)
+++ branches/Version13x/Scribus/scribus/pdflib.h (revision 3137)
@@ -44,10 +44,10 @@
Q_OBJECT
public:
- PDFlib();
+ PDFlib(ScribusDoc *docu);
~PDFlib() {};
bool doExport(QString fn, QString nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs, QProgressBar *dia2);
- bool PDF_Begin_Doc(QString fn, ScribusDoc *docu, PDFOptions *opts, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, BookMView* vi);
+ bool PDF_Begin_Doc(QString fn, PDFOptions *opts, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, BookMView* vi);
void PDF_Begin_Page(Page* pag, QPixmap pm = 0);
void PDF_End_Page();
void PDF_TemplatePage(Page* pag, bool clip = false);
/branches/Version13x/Scribus/scribus/dynamictip.h
0,0 → 1,36
/***************************************************************************
dynamictip.h - description
-------------------
begin : Wed Aug 31 2005
copyright : (C) 2005 by Franz Schmid
email : Franz.Schmid@altmuehlnet.de
***************************************************************************/
 
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
 
#ifndef DYNAMICTIP_H
#define DYNAMICTIP_H
 
#include <qtooltip.h>
#include <qlistbox.h>
#include "scribusapi.h"
#include "scribusstructs.h"
 
class SCRIBUS_API DynamicTip : public QToolTip
{
public:
DynamicTip( QListBox* parent, ColorList* pale );
ColorList* colorList;
QListBox* listB;
protected:
void maybeTip( const QPoint & );
};
 
#endif
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: branches/Version13x/Scribus/scribus/scribus.cpp
===================================================================
--- branches/Version13x/Scribus/scribus/scribus.cpp (revision 3136)
+++ branches/Version13x/Scribus/scribus/scribus.cpp (revision 3137)
@@ -7768,7 +7768,7 @@
bool ScribusApp::getPDFDriver(QString fn, QString nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs)
{
bool ret = false;
- PDFlib *dia = new PDFlib();
+ PDFlib *dia = new PDFlib(doc);
fileWatcher->forceScan();
fileWatcher->stop();
ret = dia->doExport(fn, nam, Components, pageNs, thumbs, mainWindowProgressBar);
Index: branches/Version13x/Scribus/scribus/colorm.h
===================================================================
--- branches/Version13x/Scribus/scribus/colorm.h (revision 3136)
+++ branches/Version13x/Scribus/scribus/colorm.h (revision 3137)
@@ -24,7 +24,7 @@
#include "scribusstructs.h"
#include "query.h"
-class DynamicTip2;
+class DynamicTip;
class SCRIBUS_API Farbmanager : public QDialog
{
@@ -63,7 +63,7 @@
QPixmap rgbIcon;
QPixmap spotIcon;
QPixmap regIcon;
- DynamicTip2* dynTip;
+ DynamicTip* dynTip;
private slots:
void saveDefaults();
@@ -86,14 +86,4 @@
QVBoxLayout* Layout1;
};
-class SCRIBUS_API DynamicTip2 : public QToolTip
-{
-public:
- DynamicTip2( QListBox* parent, Farbmanager* pale );
- Farbmanager* pal;
- QListBox* listB;
-protected:
- void maybeTip( const QPoint & );
-};
-
#endif // FARBMANAGER_H
/branches/Version13x/Scribus/scribus/colorm.cpp
25,40 → 25,10
 
#include "scconfig.h"
#include "util.h"
#include "dynamictip.h"
 
extern ScribusApp* ScApp;
 
DynamicTip2::DynamicTip2( QListBox* parent, Farbmanager* pale ) : QToolTip( parent )
{
pal = pale;
listB = parent;
}
 
void DynamicTip2::maybeTip( const QPoint &pos )
{
QListBoxItem* it = listB->itemAt(pos);
if (it != 0)
{
if (!pal->EditColors.contains(it->text()))
return;
QString tipText = "";
ScColor col = pal->EditColors[it->text()];
if (col.getColorModel() == colorModelCMYK)
{
int c, m, y, k;
col.getCMYK(&c, &m, &y, &k);
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
}
else
{
int r, g, b;
col.getRawRGBColor(&r, &g, &b);
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b);
}
tip(listB->itemRect(it), tipText);
}
}
 
Farbmanager::Farbmanager( QWidget* parent, ColorList doco, bool HDoc, QString DcolSet, QStringList Cust )
: QDialog( parent, "dd", true, 0 )
{
165,7 → 135,7
Layout2->addLayout( layout5 );
Ersatzliste.clear();
EditColors = doco;
dynTip = new DynamicTip2(ListBox1, this);
dynTip = new DynamicTip(ListBox1, &EditColors);
updateCList();
// signals and slots connections
if (!HaveDoc)