Exemple #1
0
QPrinter::PaperSource QPrinterProto::paperSource() const
{
  QPrinter *item = qscriptvalue_cast<QPrinter*>(thisObject());
  if (item)
    return item->paperSource();
  return QPrinter::Auto;
}
Exemple #2
0
// What about Upper and MultiPurpose?  And others in PPD???
QString FilePrinter::mediaPaperSource( QPrinter &printer )
{
    switch ( printer.paperSource() ) {
    case QPrinter::Auto:            return QString();
    case QPrinter::Cassette:        return QStringLiteral("Cassette");
    case QPrinter::Envelope:        return QStringLiteral("Envelope");
    case QPrinter::EnvelopeManual:  return QStringLiteral("EnvelopeManual");
    case QPrinter::FormSource:      return QStringLiteral("FormSource");
    case QPrinter::LargeCapacity:   return QStringLiteral("LargeCapacity");
    case QPrinter::LargeFormat:     return QStringLiteral("LargeFormat");
    case QPrinter::Lower:           return QStringLiteral("Lower");
    case QPrinter::MaxPageSource:   return QStringLiteral("MaxPageSource");
    case QPrinter::Middle:          return QStringLiteral("Middle");
    case QPrinter::Manual:          return QStringLiteral("Manual");
    case QPrinter::OnlyOne:         return QStringLiteral("OnlyOne");
    case QPrinter::Tractor:         return QStringLiteral("Tractor");
    case QPrinter::SmallFormat:     return QStringLiteral("SmallFormat");
    default:                        return QString();
    }
}
Exemple #3
0
int Printer::paperSource(lua_State * L) // const : PaperSource 
{
	QPrinter* lhs = ValueBinding<MyQPrinter>::check( L, 1 );
	Util::push( L, lhs->paperSource() );
	return 1; 
}