00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "authoroverview.h"
00025 #include "urlevent.h"
00026 #include "qapplication.h"
00027 #include <qsqlquery.h>
00028
00029 #include <kiconloader.h>
00030
00031 void MainWindow::init()
00032 {
00033 urlline = new QLineEdit(navtoolbar);
00034 connect(urlline, SIGNAL(returnPressed()), this, SLOT(urlEntered()));
00035 }
00036
00037 void MainWindow::fileExit()
00038 {
00039 qApp->exit();
00040 }
00041
00042 void MainWindow::editCut()
00043 {
00044
00045 }
00046
00047 void MainWindow::editCopy()
00048 {
00049
00050 }
00051
00052 void MainWindow::editPaste()
00053 {
00054
00055 }
00056
00057 void MainWindow::editFind()
00058 {
00059
00060 }
00061
00062 void MainWindow::helpIndex()
00063 {
00064
00065 }
00066
00067 void MainWindow::helpContents()
00068 {
00069
00070 }
00071
00072 void MainWindow::helpAbout()
00073 {
00074
00075 }
00076
00077
00078 void MainWindow::showAuthor( LitUrl url )
00079 {
00080 }
00081
00082 void MainWindow::forward()
00083 {
00084 }
00085
00086
00087 void MainWindow::back()
00088 {
00089 }
00090
00091
00092 void MainWindow::createAuthor()
00093 {
00094 QSqlQuery q("select create_author() as no");
00095 q.first();
00096 qApp->postEvent(this, new UrlEvent(LitUrl("lit://author/author?no="+q.value(0).toString()), false));
00097 }
00098
00099 void MainWindow::createPublication()
00100 {
00101 QSqlQuery q("select create_publication() as no");
00102 q.first();
00103 qApp->postEvent(this, new UrlEvent(LitUrl("lit://publication/publication?no="+q.value(0).toString()), false));
00104 }
00105
00106 void MainWindow::createProject()
00107 {
00108 QSqlQuery q("select create_project() as no");
00109 q.first();
00110 qApp->postEvent(this, new UrlEvent(LitUrl("lit://project/project?no="+q.value(0).toString()), false));
00111 }
00112
00113
00114 void MainWindow::createNote()
00115 {
00116 QSqlQuery q("select create_toplevel_note(0) as no");
00117 q.first();
00118 qApp->postEvent(this, new UrlEvent(LitUrl("lit://note/note?no="+q.value(0).toString()), false));
00119 }
00120
00121
00122 void MainWindow::createJournal()
00123 {
00124 QSqlQuery q("select create_journal() as no");
00125 q.first();
00126 qApp->postEvent(this, new UrlEvent(LitUrl("lit://journal/journal?no="+q.value(0).toString()), false));
00127 }
00128
00129 void MainWindow::createPublisher()
00130 {
00131 QSqlQuery q("select create_publisher() as no");
00132 q.first();
00133 qApp->postEvent(this, new UrlEvent(LitUrl("lit://publisher/publisher?no="+q.value(0).toString()), false));
00134 }
00135
00136
00137 void MainWindow::setWorkingGui( bool block )
00138 {
00139 backAction->setEnabled(!stback.isEmpty()&&!block);
00140 forwardAction->setEnabled(!stforward.isEmpty()&&!block);
00141 createAuthorAction->setEnabled(!block);
00142 createPublAction->setEnabled(!block);
00143 createPartAction->setEnabled(!block);
00144 createJournalAction->setEnabled(!block);
00145 createPublisherAction->setEnabled(!block);
00146 createNoteAction->setEnabled(!block);
00147 stateAction->setEnabled(!block);
00148 searchAction->setEnabled(!block);
00149 authorOverviewAction->setEnabled(!block);
00150 publOverviewAction->setEnabled(!block);
00151 noteOverviewAction->setEnabled(!block);
00152 publisherOverviewAction->setEnabled(!block);
00153 journalOverviewAction->setEnabled(!block);
00154 urlline->setEnabled(!block);
00155 }
00156
00157 void MainWindow::state()
00158 {
00159 qApp->postEvent(this, new UrlEvent(LitUrl("lit://state/state"), false));
00160 }
00161
00162 void MainWindow::search()
00163 {
00164 qApp->postEvent(this, new UrlEvent(LitUrl("lit://search/search"), false));
00165 }
00166
00167
00168 void MainWindow::authorOverview()
00169 {
00170 qApp->postEvent(this, new UrlEvent(LitUrl("lit://authoroverview/authoroverview"), false));
00171 }
00172
00173
00174 void MainWindow::noteOverview()
00175 {
00176 qApp->postEvent(this, new UrlEvent(LitUrl("lit://noteoverview/noteoverview"), false));
00177 }
00178
00179 void MainWindow::journalOverview()
00180 {
00181 qApp->postEvent(this, new UrlEvent(LitUrl("lit://journaloverview/journaloverview"), false));
00182 }
00183
00184 void MainWindow::publisherOverview()
00185 {
00186 qApp->postEvent(this, new UrlEvent(LitUrl("lit://publisheroverview/publisheroverview"), false));
00187 }
00188
00189 void MainWindow::projectOverview()
00190 {
00191 qApp->postEvent(this, new UrlEvent(LitUrl("lit://projectoverview/projectoverview"), false));
00192 }
00193
00194 void MainWindow::publOverview()
00195 {
00196 qApp->postEvent(this, new UrlEvent(LitUrl("lit://publicationoverview/publicationoverview"), false));
00197 }
00198
00199 void MainWindow::urlEntered()
00200 {
00201 qApp->postEvent(this, new UrlEvent(LitUrl(urlline->text()), false));
00202 }
00203
00204 void MainWindow::exportHtml()
00205 {
00206 CreateHtml *d=new CreateHtml();
00207 d->show();
00208 }
00209
00210 void MainWindow::reindex() {
00211 ReIndex r;
00212 r.show();
00213 r.start();
00214 }
00215
00216 void MainWindow::importJStor()
00217 {
00218 ImportWizardDialog *d=new ImportWizardDialog();
00219 d->show();
00220 }