Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 713 → Rev 712

/branches/Version13x/Scribus/scribus/mpalette.cpp
4,7 → 4,6
#include <qpoint.h>
#include <qwmatrix.h>
#include <qmessagebox.h>
#include <qradiobutton.h>
#include "scribusview.h"
#include "autoform.h"
#include "tabmanager.h"
/branches/Version13x/Scribus/scribus/fileloader.cpp
848,9 → 848,9
if ((!Prefs->GFontSub.contains(tmpf)) || (!avail[Prefs->GFontSub[tmpf]]->UseFont))
{
qApp->setOverrideCursor(QCursor(Qt::arrowCursor), true);
MissingFont *dia = new MissingFont(0, tmpf, Prefs);
DmF *dia = new DmF(0, tmpf, Prefs);
dia->exec();
tmpf = dia->getReplacementFont();
tmpf = dia->Ersatz;
delete dia;
qApp->setOverrideCursor(QCursor(Qt::waitCursor), true);
Prefs->GFontSub[fStr] = tmpf;
/branches/Version13x/Scribus/scribus/scribusXml.cpp
151,9 → 151,9
if ((!Prefs->GFontSub.contains(tmpf)) || (!avail[Prefs->GFontSub[tmpf]]->UseFont))
{
qApp->setOverrideCursor(QCursor(arrowCursor), true);
MissingFont *dia = new MissingFont(0, tmpf, Prefs);
DmF *dia = new DmF(0, tmpf, Prefs);
dia->exec();
tmpf = dia->getReplacementFont();
tmpf = dia->Ersatz;
delete dia;
qApp->setOverrideCursor(QCursor(waitCursor), true);
Prefs->GFontSub[fStr] = tmpf;
1683,9 → 1683,9
{
if (!FontSub.contains(tmpf) || (!avail[FontSub[tmpf]]->UseFont))
{
MissingFont *dia = new MissingFont(0, tmpf, Prefs);
DmF *dia = new DmF(0, tmpf, Prefs);
dia->exec();
tmpf = dia->getReplacementFont();
tmpf = dia->Ersatz;
FontSub[pg.attribute("NAME")] = tmpf;
delete dia;
}
3151,9 → 3151,9
QString tmpf = dc.attribute("FACE");
if (!Vorein->AvailFonts.find(tmpf))
{
MissingFont *dia = new MissingFont(0, tmpf, Vorein);
DmF *dia = new DmF(0, tmpf, Vorein);
dia->exec();
Vorein->DefFont = dia->getReplacementFont();
Vorein->DefFont = dia->Ersatz;
delete dia;
}
else
/branches/Version13x/Scribus/scribus/plugins/gettext/htmlim/htmlim.h
21,8 → 21,8
#ifndef HTMLIM_H
#define HTMLIM_H
 
#include "scribus.h"
#include "gtwriter.h"
#include <scribus.h>
#include <gtwriter.h>
 
#include "config.h"
 
/branches/Version13x/Scribus/scribus/plugins/gettext/htmlim/htmlim.cpp
24,8 → 24,8
 
#ifdef HAVE_XML
 
#include "gtparagraphstyle.h" // Style for paragraph based formatting.
#include "gtframestyle.h"
#include <gtparagraphstyle.h> // Style for paragraph based formatting.
#include <gtframestyle.h>
 
QString FileFormatName()
{
/branches/Version13x/Scribus/scribus/scpreview.cpp
90,9 → 90,9
{
if (ScApp->splashScreen != NULL)
ScApp->splashScreen->hide();
MissingFont *dia = new MissingFont(0, tmpf, Prefs);
DmF *dia = new DmF(0, tmpf, Prefs);
dia->exec();
tmpf = dia->getReplacementFont();
tmpf = dia->Ersatz;
delete dia;
if (ScApp->splashScreen != NULL)
ScApp->splashScreen->show();
/branches/Version13x/Scribus/scribus/gtaction.cpp
18,7 → 18,6
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include "missing.h"
#include "gtaction.h"
#include <qcursor.h>
 
414,9 → 413,9
{
if (!ScApp->Prefs.GFontSub.contains(font->getName()))
{
MissingFont *dia = new MissingFont(0, useFont, &ScApp->Prefs);
DmF *dia = new DmF(0, useFont, &ScApp->Prefs);
dia->exec();
useFont = dia->getReplacementFont();
useFont = dia->Ersatz;
ScApp->Prefs.GFontSub[font->getName()] = useFont;
delete dia;
}
/branches/Version13x/Scribus/scribus/gtaction.h
25,6 → 25,7
#include <qvaluelist.h>
#include "scribus.h"
#include "scribusdoc.h"
#include "missing.h"
#include "mpalette.h"
#include "gtfont.h"
#include "gtframestyle.h"
/branches/Version13x/Scribus/scribus/missing.cpp
1,14 → 1,10
#include <qimage.h>
#include <qpixmap.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
 
#include "missing.h"
#include "missing.moc"
 
extern QPixmap loadIcon(QString nam);
 
#include <qimage.h>
#include <qpixmap.h>
 
static const char* const image100_data[] =
{
"32 32 243 2",
290,44 → 286,45
};
 
 
MissingFont::MissingFont( QWidget* parent, QString fon, preV *Prefs )
DmF::DmF( QWidget* parent, QString fon, preV *Prefs )
: QDialog( parent, "mfont", true, 0 )
{
QPixmap image0( ( const char** ) image100_data );
setCaption( tr("Missing Font"));
setIcon(loadIcon("AppIcon.png"));
missingFontLayout = new QHBoxLayout( this, 10, 0 );
missingFontGridLayout = new QGridLayout;
missingFontGridLayout->setSpacing( 12 );
missingFontGridLayout->setMargin( 0 );
notInstalledLabel = new QLabel( tr("The Font %1 is not installed.").arg(fon), this, "notInstalledLabel" );
missingFontGridLayout->addMultiCellWidget( notInstalledLabel, 0, 0, 1, 2 );
pixmapLabel = new QLabel( this, "pixmapLabel" );
pixmapLabel->setPixmap( image0 );
missingFontGridLayout->addWidget( pixmapLabel, 1, 0 );
useLabel = new QLabel( tr( "Use" ), this, "useLabel" );
missingFontGridLayout->addWidget( useLabel, 1, 1 );
replaceFontCombo = new FontCombo(this, Prefs);
replacementFont = replaceFontCombo->text(0);
missingFontGridLayout->addWidget( replaceFontCombo, 1, 2 );
insteadLabel = new QLabel( tr( "instead" ), this, "insteadLabel" );
missingFontGridLayout->addWidget( insteadLabel, 1, 3 );
okButton = new QPushButton( tr( "&OK"), this, "okButton" );
missingFontGridLayout->addWidget( okButton, 2, 2 );
missingFontLayout->addLayout( missingFontGridLayout );
MissingFontLayout = new QHBoxLayout( this );
MissingFontLayout->setSpacing( 0 );
MissingFontLayout->setMargin( 10 );
Layout1 = new QGridLayout;
Layout1->setSpacing( 12 );
Layout1->setMargin( 0 );
TextLabel1 = new QLabel( this, "TextLabel1" );
TextLabel1->setText( tr("The Font %1 is not installed.").arg(fon) );
Layout1->addMultiCellWidget( TextLabel1, 0, 0, 1, 2 );
PixmapLabel1 = new QLabel( this, "PixmapLabel1" );
PixmapLabel1->setPixmap( image0 );
Layout1->addWidget( PixmapLabel1, 1, 0 );
TextLabel4 = new QLabel( this, "TextLabel4" );
TextLabel4->setText( tr( "Use" ) );
Layout1->addWidget( TextLabel4, 1, 1 );
Replace = new FontCombo(this, Prefs);
Ersatz = Replace->text(0);
Layout1->addWidget( Replace, 1, 2 );
TextLabel6 = new QLabel( this, "TextLabel6" );
TextLabel6->setText( tr( "instead" ) );
Layout1->addWidget( TextLabel6, 1, 3 );
PushButton1 = new QPushButton( this, "PushButton1" );
PushButton1->setText( tr( "OK" ) );
Layout1->addWidget( PushButton1, 2, 2 );
MissingFontLayout->addLayout( Layout1 );
 
// signals and slots connections
connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( replaceFontCombo, SIGNAL( activated(const QString&) ), this, SLOT( newFont(const QString&) ) );
connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( Replace, SIGNAL( activated(const QString&) ), this, SLOT( NeuerFont(const QString&) ) );
}
 
void MissingFont::newFont(const QString& replacement)
void DmF::NeuerFont(const QString& e)
{
replacementFont = replacement;
Ersatz = e;
}
 
const QString MissingFont::getReplacementFont()
{
return replacementFont;
}
 
/branches/Version13x/Scribus/scribus/missing.h
2,36 → 2,35
#define MISSINGFONT_H
 
#include <qdialog.h>
class QLabel;
class QHBoxLayout;
class QGridLayout;
class QPushButton;
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include "scribusdoc.h"
#include "fontcombo.h"
 
class MissingFont : public QDialog
class DmF : public QDialog
{
Q_OBJECT
 
public:
MissingFont( QWidget* parent, QString fon, preV *Prefs );
~MissingFont() {};
const QString getReplacementFont();
DmF( QWidget* parent, QString fon, preV *Prefs );
~DmF() {};
 
QPushButton* PushButton1;
QLabel* TextLabel6;
QLabel* PixmapLabel1;
FontCombo* Replace;
QLabel* TextLabel1;
QLabel* TextLabel4;
QString Ersatz;
 
public slots:
virtual void newFont(const QString& replacement);
virtual void NeuerFont(const QString& e);
 
protected:
QHBoxLayout* missingFontLayout;
QGridLayout* missingFontGridLayout;
QPushButton* okButton;
QLabel* insteadLabel;
QLabel* pixmapLabel;
FontCombo* replaceFontCombo;
QLabel* notInstalledLabel;
QLabel* useLabel;
QString replacementFont;
QHBoxLayout* MissingFontLayout;
QGridLayout* Layout1;
 
};
 
#endif // MISSINGFONT_H