// ======================================================= void CInterface::ErrorDiskFull() { showError(0, i18n("Error while writing image file: disk full!")); }
void CInterface::ErrorWritingSuperblock(signed int err) { showError(err, i18n("Can't write SuperBlock")); }
void IntroPhone::onInputChange() { changed = true; showError(""); }
void CInterface::ErrorWritingDisk(DWORD block, signed int err) { showError(err, i18n("Can't write block %ld to harddrive"), block); }
void CInterface::ErrorReadingHeader(char * header, signed int err) { showError(err, i18n("Can't read %s from image"), header); }
// ======================================================= void CInterface::ErrorReadingMBRMagic() { showError(0, i18n("Can't read MBR Magic: image file was damaged")); }
void CInterface::ErrorWritingBitmap(DWORD block, signed int err) { showError(err, i18n("Can't write bitmap block %ld to image"), block); }
// ======================================================= void CInterface::ErrorAskFirstVolume(char * szVolume) { showError(0, i18n("%s is not the first volume of an image. Please, retry with " "the volume number 000"), szVolume); }
// ======================================================= void CInterface::ErrorInvalidImagefile(char * szFilename) { showError(0, i18n("%s is not a valid partition image file."), szFilename); }
// ======================================================= void CInterface::ErrorReadingMainTail() { showError(0, i18n("Can't read main tail")); }
// ======================================================= void CInterface::ErrorEncryption() { showError(0, i18n("The image you try to restore was encrypted. The current " "version doesn't support encryption. Please, download the latest version " "of partimage.")); }
// ======================================================= void CInterface::ErrorWritingMainTail() { showError(0, i18n("Can't write main tail")); }
// ======================================================= void CInterface::ErrorWritingMainHeader() { showError(0, i18n("Can't write main header")); }
// ======================================================= void CInterface::ErrorDetectingFS(char * szDevice, signed int err) { showError(0, i18n("Can't detect file system of partition %s"), szDevice); }
// ======================================================= void CInterface::ErrorWritingInfos() { showError(0, i18n("Can't write informations")); }
// ======================================================= void CInterface::ErrorTooSmall(QWORD qwOriginalSize, QWORD qwSize) { showError(0, i18n("The partition is to small to be restored:\n" "Original partition size:........%llu bytes\n" "Destination partition size:.....%llu bytes"), qwOriginalSize, qwSize); }
// ======================================================= void CInterface::ErrorReadingInfos() { showError(0, i18n("Can't read informations")); }
// ======================================================= void CInterface::ErrorWrongVolumeNumber(DWORD dwExpectedVolume, DWORD dwVolume) { showError(1, i18n("Invalid volume number (%ld instead of %ld)."), dwVolume, dwExpectedVolume); }
void CInterface::ErrorWritingHeader(char * header, signed int err) { showError(err, i18n("Can't write %s to image"), header); }
// ======================================================= void CInterface::ErrorClosing() { showError(0, i18n("Error on close")); }
void CInterface::ErrorReadingBitmap(DWORD block, signed int err) { showError(err, i18n("Can't read bitmap block %ld from image"), block); }
// ======================================================= void CInterface::ErrorAlreadyLocked(char * szPartition, signed int err) { showDebug(1, "STR3=%s\n", szPartition); showError(err, i18n("The partition %s is already locked by another process." " Can't work on it"), szPartition); }
void CInterface::ErrorReading(DWORD block, signed int err) { showError(err, i18n("Can't read block %ld from image (%d)"), block); }
// ======================================================= void CInterface::ErrorOpeningPartition(const char * szDevice, signed int err) { showError(err, i18n("Can't open partition %s"), szDevice); }
void CInterface::ErrorReadingSuperblock(signed int err) { showError(err, i18n("Can't read SuperBlock")); }
// ======================================================= void CInterface::ErrorLocking(char * szFilename, signed int err) { showError(err, i18n("Can't lock partition %s"), szFilename); }
void CInterface::ErrorReadingDiskBitmap(DWORD block, signed int err) { showError(err, i18n("Can't read bitmap block %ld from harddrive partition (%s)"),block); }
// ======================================================= void CInterface::ErrorReadingMainHeader() { showError(0, i18n("Can't read main header: image file was damaged")); }
BookWindow::BookWindow() { ui.setupUi(this); if (!QSqlDatabase::drivers().contains("QSQLITE")) QMessageBox::critical(this, "Unable to load database", "This demo needs the SQLITE driver"); // initialize the database QSqlError err = initDb(); if (err.type() != QSqlError::NoError) { showError(err); return; } // Create the data model model = new QSqlRelationalTableModel(ui.bookTable); model->setEditStrategy(QSqlTableModel::OnManualSubmit); model->setTable("books"); // Remember the indexes of the columns authorIdx = model->fieldIndex("author"); genreIdx = model->fieldIndex("genre"); // Set the relations to the other database tables model->setRelation(authorIdx, QSqlRelation("authors", "id", "name")); model->setRelation(genreIdx, QSqlRelation("genres", "id", "name")); // Set the localized header captions model->setHeaderData(authorIdx, Qt::Horizontal, tr("Author Name")); model->setHeaderData(genreIdx, Qt::Horizontal, tr("Genre")); model->setHeaderData(model->fieldIndex("title"), Qt::Horizontal, tr("Title")); model->setHeaderData(model->fieldIndex("year"), Qt::Horizontal, tr("Year")); model->setHeaderData(model->fieldIndex("rating"), Qt::Horizontal, tr("Rating")); // Populate the model if (!model->select()) { showError(model->lastError()); return; } // Set the model and hide the ID column ui.bookTable->setModel(model); ui.bookTable->setItemDelegate(new BookDelegate(ui.bookTable)); ui.bookTable->setColumnHidden(model->fieldIndex("id"), true); ui.bookTable->setSelectionMode(QAbstractItemView::SingleSelection); // Initialize the Author combo box ui.authorEdit->setModel(model->relationModel(authorIdx)); ui.authorEdit->setModelColumn(model->relationModel(authorIdx)->fieldIndex("name")); ui.genreEdit->setModel(model->relationModel(genreIdx)); ui.genreEdit->setModelColumn(model->relationModel(genreIdx)->fieldIndex("name")); QDataWidgetMapper *mapper = new QDataWidgetMapper(this); mapper->setModel(model); mapper->setItemDelegate(new BookDelegate(this)); mapper->addMapping(ui.titleEdit, model->fieldIndex("title")); mapper->addMapping(ui.yearEdit, model->fieldIndex("year")); mapper->addMapping(ui.authorEdit, authorIdx); mapper->addMapping(ui.genreEdit, genreIdx); mapper->addMapping(ui.ratingEdit, model->fieldIndex("rating")); connect(ui.bookTable->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), mapper, SLOT(setCurrentModelIndex(QModelIndex))); ui.bookTable->setCurrentIndex(model->index(0, 0)); }
// ======================================================= void CInterface::ErrorNewerRelease() { showError(0, i18n("The partition was saved with a newer version of Partion Image. " "Please download the last one.")); }