Changeset 233 for trunk/src/JobPrint.cxx

Show
Ignore:
Timestamp:
06/13/06 16:11:47 (2 years ago)
Author:
jordi
Message:

The JobPrint? now implements the new Resolution and ColorMode?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/JobPrint.cxx

    r223 r233  
    3333{ 
    3434    m_Collate = FALSE; 
     35    m_ColorModel = NULL; 
    3536    m_CurrentPage = 1; 
    3637    m_Document = NULL; 
     
    4546    m_PageWidth = 0.1147f; 
    4647    m_PrinterName = NULL; 
     48    m_Resolution = NULL; 
    4749    m_TempFileName = NULL; 
    4850} 
     
    5557    delete m_DocumentCopy; 
    5658    delete[] m_PageRange; 
     59    g_free (m_ColorModel); 
    5760    g_free (m_PageRangeString); 
    5861    g_free (m_PrinterName); 
     62    g_free (m_Resolution); 
    5963    g_free (m_TempFileName); 
    6064} 
     
    6670} 
    6771 
     72const gchar * 
     73JobPrint::getColorModel () 
     74{ 
     75    return m_ColorModel; 
     76} 
     77 
    6878guint 
    6979JobPrint::getCurrentPage () 
     
    126136{ 
    127137    return m_PrinterName; 
     138} 
     139 
     140const gchar * 
     141JobPrint::getResolution () 
     142{ 
     143    return m_Resolution; 
    128144} 
    129145 
     
    175191 
    176192void 
     193JobPrint::setColorModel (const gchar *colorModel) 
     194{ 
     195    g_free (m_ColorModel); 
     196    m_ColorModel = g_strdup (colorModel); 
     197} 
     198 
     199void 
    177200JobPrint::setCurrentPage (guint pageNumber) 
    178201{ 
     
    229252    m_PageWidth = pageWidth; 
    230253    m_PageHeight = pageHeight; 
     254} 
     255 
     256void 
     257JobPrint::setResolution (const gchar *resolution) 
     258{ 
     259    g_free (m_Resolution); 
     260    m_Resolution = g_strdup (resolution); 
    231261} 
    232262 
     
    467497    } 
    468498    numOptions = cupsAddOption ("number-up", layout, numOptions, &options); 
     499    numOptions = cupsAddOption ("ColorModel", job->getColorModel (), 
     500                                numOptions, &options); 
     501    numOptions = cupsAddOption ("Resolution", job->getResolution (), 
     502                                numOptions, &options); 
    469503 
    470504    cupsPrintFile (job->getPrinterName (), job->getTempFileName (),