int QPrinterProto::numColors() const { QPrinter *item = qscriptvalue_cast<QPrinter*>(thisObject()); if (item) return item->numColors(); return 0; }