|
|
|
@ -127,16 +127,16 @@ void BookReader::load(const KURL& url)
|
|
|
|
|
{
|
|
|
|
|
TQString target;
|
|
|
|
|
// download the contents
|
|
|
|
|
if(!KIO::NetAccess::download(url, target, this))
|
|
|
|
|
if(!TDEIO::NetAccess::download(url, target, this))
|
|
|
|
|
{
|
|
|
|
|
KMessageBox::error(this, KIO::NetAccess::lastErrorString());
|
|
|
|
|
KMessageBox::error(this, TDEIO::NetAccess::lastErrorString());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
recentFilesAction->addURL(url);
|
|
|
|
|
setCaption(url.fileName());
|
|
|
|
|
m_view->openURL(url);
|
|
|
|
|
updateBookmarks();
|
|
|
|
|
KIO::NetAccess::removeTempFile(target);
|
|
|
|
|
TDEIO::NetAccess::removeTempFile(target);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BookReader::setupActions()
|
|
|
|
@ -165,7 +165,7 @@ void BookReader::setupActions()
|
|
|
|
|
|
|
|
|
|
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
|
|
|
|
|
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
recentFilesAction->loadEntries(config);
|
|
|
|
|
|
|
|
|
|
// this doesn't do anything useful. it's just here to illustrate
|
|
|
|
@ -176,7 +176,7 @@ void BookReader::setupActions()
|
|
|
|
|
actionCollection(), "custom_action" );*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BookReader::saveProperties(KConfig *config)
|
|
|
|
|
void BookReader::saveProperties(TDEConfig *config)
|
|
|
|
|
{
|
|
|
|
|
// the 'config' object points to the session managed
|
|
|
|
|
// config file. anything you write here will be available
|
|
|
|
@ -188,7 +188,7 @@ void BookReader::saveProperties(KConfig *config)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BookReader::readProperties(KConfig */*config*/)
|
|
|
|
|
void BookReader::readProperties(TDEConfig */*config*/)
|
|
|
|
|
{
|
|
|
|
|
// the 'config' object points to the session managed
|
|
|
|
|
// config file. this function is automatically called whenever
|
|
|
|
@ -293,10 +293,10 @@ void BookReader::filePrint()
|
|
|
|
|
|
|
|
|
|
void BookReader::optionsPreferences()
|
|
|
|
|
{
|
|
|
|
|
if (KConfigDialog::showDialog("settings"))
|
|
|
|
|
if (TDEConfigDialog::showDialog("settings"))
|
|
|
|
|
return ;
|
|
|
|
|
|
|
|
|
|
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self(),
|
|
|
|
|
TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self(),
|
|
|
|
|
KDialogBase::IconList);
|
|
|
|
|
SettingsWidget *general = new SettingsWidget(0, "General");
|
|
|
|
|
|
|
|
|
@ -349,7 +349,7 @@ bool BookReader::queryExit()
|
|
|
|
|
|
|
|
|
|
void BookReader::writeSettings()
|
|
|
|
|
{
|
|
|
|
|
KConfig * config = kapp->config();
|
|
|
|
|
TDEConfig * config = kapp->config();
|
|
|
|
|
config->writeEntry("size", m_view->size());
|
|
|
|
|
config->writeEntry("lastURL", m_view->currentURL());
|
|
|
|
|
config->writeEntry("lastURLPage", m_view->currentPage());
|
|
|
|
@ -387,7 +387,7 @@ void BookReader::fullScreen()
|
|
|
|
|
|
|
|
|
|
void BookReader::loadLastUrl()
|
|
|
|
|
{
|
|
|
|
|
KConfig * config = kapp->config();
|
|
|
|
|
TDEConfig * config = kapp->config();
|
|
|
|
|
TQSize size = config->readSizeEntry("size");
|
|
|
|
|
lastURL = config->readEntry("lastURL");
|
|
|
|
|
connect(m_view, TQT_SIGNAL(loadingFinished()), TQT_TQOBJECT(this), TQT_SLOT(loadLastURLSetPage()));
|
|
|
|
|