Ejemplo n.º 1
0
void LinksWidget::CreateReport(QSharedPointer<Book> book)
{
    m_Book = book;
    m_HTMLResources = m_Book->GetFolderKeeper()->GetResourceTypeList<HTMLResource>(false);

    SetupTable();
}
DialogParametersConfig::DialogParametersConfig(ItemProperty* SelectedProperty, QWidget* parent /*-0*/) :
    QDialog(parent),
    ui(new Ui::DialogParametersConfig)
{
    QString LabelText;

    // Init Variables
    m_SelectedProperty = NULL;
    m_SpinBoxEditor = NULL;

    // Build the UI
    ui->setupUi(this);

    // Set the title
    setWindowTitle(CONFIGPARAMDLG_DLGTITLE);

    // Save the selected property
    m_SelectedProperty = SelectedProperty;

    // Set the label text for this component
    LabelText = CONFIGPARAMDLG_COMPONENTTITLE;
    ui->SetDynamicParametersTitle->setText(LabelText);

    // Create The SpinBox Delegate (Special Editor & Keypress handler for the 2nd column)
    m_SpinBoxEditor = new SpinBoxEditor(0, CONFIGPARAMDLG_MAX_NUM_DYNAMIC_PARAMS, this);

    // Setup the Table for Dynamic Parameters
    SetupTable();
}
void CharactersInHTMLFilesWidget::CreateReport(QSharedPointer<Book> book)
{
    m_Book = book;
    SetupTable();
    AddTableData();

    for (int i = 0; i < ui.fileTree->header()->count(); i++) {
        ui.fileTree->resizeColumnToContents(i);
    }

    ui.fileTree->sortByColumn(0, Qt::AscendingOrder);
}
Ejemplo n.º 4
0
ImageFilesWidget::ImageFilesWidget(QList<Resource*> image_resources, QSharedPointer<Book> book)
    :
    m_ImageResources(image_resources),
    m_Book(book),
    m_ItemModel(new QStandardItemModel),
    m_ThumbnailSize(THUMBNAIL_SIZE)
{
    ui.setupUi(this);
    connectSignalsSlots();

    ReadSettings();

    SetupTable();
}
Ejemplo n.º 5
0
void ClassesInHTMLFilesWidget::CreateReport(QSharedPointer<Book> book)
{
    m_Book = book;
    SetupTable();
    QList<BookReports::StyleData *> html_classes_usage = BookReports::GetHTMLClassUsage(m_Book);
    AddTableData(html_classes_usage);
    qDeleteAll(html_classes_usage);

    for (int i = 0; i < ui.fileTree->header()->count(); i++) {
        ui.fileTree->resizeColumnToContents(i);
    }

    // Sort commonly used order
    ui.fileTree->sortByColumn(2, Qt::AscendingOrder);
    ui.fileTree->sortByColumn(1, Qt::AscendingOrder);
    ui.fileTree->sortByColumn(0, Qt::AscendingOrder);
    ui.fileTree->sortByColumn(3, Qt::AscendingOrder);
}
Ejemplo n.º 6
0
StylesInCSSFilesWidget::StylesInCSSFilesWidget(QList<Resource *>html_resources, QList<Resource *>css_resources, QSharedPointer< Book > book)
    :
    m_HTMLResources(html_resources),
    m_CSSResources(css_resources),
    m_Book(book),
    m_ItemModel(new QStandardItemModel)
{
    ui.setupUi(this);
    connectSignalsSlots();

    SetupTable();
    QHash< QString, QList<StylesInCSSFilesWidget::Selector *> > css_selectors = CheckHTMLFiles();
    CheckCSSFiles(css_selectors);

    for (int i = 0; i < ui.fileTree->header()->count(); i++) {
        ui.fileTree->resizeColumnToContents(i);
    }

}
BOOL CThetaGridAdjustmentSimpleOutputDlg::OnInitDialog() 
{
	int i;
	CString T;
	BOOL b;
	CWnd* pWnd;
	CDC* pDC;

	pWnd=this;
	pWnd->CenterWindow();
	if (m_nType==1) pWnd->SetWindowTextW(L"Simple Output - Event's Arguments"); //if dealing with the event's arguments
	else if (m_nType==2) pWnd->SetWindowTextW(L"Simple Output - Complement Clause"); //if dealing with the event's complement clause
	CDialog::OnInitDialog();
	m_bSubjectRaised=FALSE;
	m_strTargetFontName=m_pDoc->GetTargetLanguageFontName(); //used in ChangeFont
	if (HFONT(m_fontTarget)==NULL)        //first time this modeless dialog activated
	{
		//create the fonts that will be used in the combo boxes
		pWnd=&m_datatblInput;
		pDC=pWnd->GetDC();	                    //get a pointer to the device context
		T=m_pDoc->GetSourceLanguageFontName(4);
		b=m_fontArial.CreatePointFont(90,L"Arial",pDC);
		if (b==FALSE) AfxMessageBox(L"Unable to create Arial font.",MB_OK);
		i=m_pDoc->GetTargetLanguageFontSize();
		b=m_fontTarget.CreatePointFont(10*i,m_strTargetFontName,pDC);
		if (b==FALSE) AfxMessageBox(L"Unable to create Target font.",MB_OK);
	}
	SetupTable();
	if (m_nType==2)        //if specifying features for object complement clause
	{
		pWnd=GetDlgItem(IDC_BUTTONFEATURESET);
		pWnd->MoveWindow(12,68,75,22);
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 8
0
void AllFilesWidget::CreateReport(QSharedPointer<Book> book)
{
    m_Book = book;
    m_AllResources = m_Book->GetAllResources();
    SetupTable();
}