-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index bb85a24..7394623 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp | |||
@@ -104,257 +104,257 @@ void MainWindow::documentSave(DocLnk *lnkDoc) | |||
104 | sheet->copySheetData(¤tSheet->data); | 104 | sheet->copySheetData(¤tSheet->data); |
105 | stream.writeRawBytes("SQT100", 6); | 105 | stream.writeRawBytes("SQT100", 6); |
106 | stream << (Q_UINT32)listSheets.count(); | 106 | stream << (Q_UINT32)listSheets.count(); |
107 | for (typeSheet *tempSheet=listSheets.first(); tempSheet; tempSheet=listSheets.next()) | 107 | for (typeSheet *tempSheet=listSheets.first(); tempSheet; tempSheet=listSheets.next()) |
108 | { | 108 | { |
109 | stream << tempSheet->name << (Q_UINT32)tempSheet->data.count(); | 109 | stream << tempSheet->name << (Q_UINT32)tempSheet->data.count(); |
110 | for (typeCellData *tempCell=tempSheet->data.first(); tempCell; tempCell=tempSheet->data.next()) | 110 | for (typeCellData *tempCell=tempSheet->data.first(); tempCell; tempCell=tempSheet->data.next()) |
111 | stream << (Q_UINT32)tempCell->col << (Q_UINT32)tempCell->row << tempCell->borders.right << tempCell->borders.bottom << tempCell->background << (Q_UINT32)tempCell->alignment << tempCell->fontColor << tempCell->font << tempCell->data; | 111 | stream << (Q_UINT32)tempCell->col << (Q_UINT32)tempCell->row << tempCell->borders.right << tempCell->borders.bottom << tempCell->background << (Q_UINT32)tempCell->alignment << tempCell->fontColor << tempCell->font << tempCell->data; |
112 | } | 112 | } |
113 | 113 | ||
114 | lnkDoc->setType("application/opie-sheet"); | 114 | lnkDoc->setType("application/opie-sheet"); |
115 | if (!fm.saveFile(*lnkDoc, streamBuffer)) | 115 | if (!fm.saveFile(*lnkDoc, streamBuffer)) |
116 | { | 116 | { |
117 | QMessageBox::critical(this, tr("Error"), tr("File cannot be saved!")); | 117 | QMessageBox::critical(this, tr("Error"), tr("File cannot be saved!")); |
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | documentModified=FALSE; | 120 | documentModified=FALSE; |
121 | } | 121 | } |
122 | 122 | ||
123 | void MainWindow::documentOpen(const DocLnk &lnkDoc) | 123 | void MainWindow::documentOpen(const DocLnk &lnkDoc) |
124 | { | 124 | { |
125 | FileManager fm; | 125 | FileManager fm; |
126 | QByteArray streamBuffer; | 126 | QByteArray streamBuffer; |
127 | if (!lnkDoc.isValid() || !fm.loadFile(lnkDoc, streamBuffer)) | 127 | if (!lnkDoc.isValid() || !fm.loadFile(lnkDoc, streamBuffer)) |
128 | { | 128 | { |
129 | QMessageBox::critical(this, tr("Error"), tr("File cannot be opened!")); | 129 | QMessageBox::critical(this, tr("Error"), tr("File cannot be opened!")); |
130 | documentModified=FALSE; | 130 | documentModified=FALSE; |
131 | selectorFileNew(DocLnk()); | 131 | selectorFileNew(DocLnk()); |
132 | return; | 132 | return; |
133 | } | 133 | } |
134 | QDataStream stream(streamBuffer, IO_ReadOnly); | 134 | QDataStream stream(streamBuffer, IO_ReadOnly); |
135 | 135 | ||
136 | Q_UINT32 countSheet, countCell, i, j, row, col, alignment; | 136 | Q_UINT32 countSheet, countCell, i, j, row, col, alignment; |
137 | typeSheet *newSheet; | 137 | typeSheet *newSheet; |
138 | typeCellData *newCell; | 138 | typeCellData *newCell; |
139 | 139 | ||
140 | char fileFormat[7]; | 140 | char fileFormat[7]; |
141 | stream.readRawBytes(fileFormat, 6); | 141 | stream.readRawBytes(fileFormat, 6); |
142 | fileFormat[6]=0; | 142 | fileFormat[6]=0; |
143 | if ((QString)fileFormat!="SQT100") | 143 | if ((QString)fileFormat!="SQT100") |
144 | { | 144 | { |
145 | QMessageBox::critical(this, tr("Error"), tr("Invalid file format!")); | 145 | QMessageBox::critical(this, tr("Error"), tr("Invalid file format!")); |
146 | documentModified=FALSE; | 146 | documentModified=FALSE; |
147 | selectorFileNew(DocLnk()); | 147 | selectorFileNew(DocLnk()); |
148 | return; | 148 | return; |
149 | } | 149 | } |
150 | 150 | ||
151 | stream >> countSheet; | 151 | stream >> countSheet; |
152 | for (i=0; i<countSheet; ++i) | 152 | for (i=0; i<countSheet; ++i) |
153 | { | 153 | { |
154 | newSheet=new typeSheet; | 154 | newSheet=new typeSheet; |
155 | newSheet->data.setAutoDelete(TRUE); | 155 | newSheet->data.setAutoDelete(TRUE); |
156 | stream >> newSheet->name >> countCell; | 156 | stream >> newSheet->name >> countCell; |
157 | comboSheets->insertItem(newSheet->name); | 157 | comboSheets->insertItem(newSheet->name); |
158 | 158 | ||
159 | for (j=0; j<countCell; ++j) | 159 | for (j=0; j<countCell; ++j) |
160 | { | 160 | { |
161 | newCell=new typeCellData; | 161 | newCell=new typeCellData; |
162 | stream >> col >> row >> newCell->borders.right >> newCell->borders.bottom >> newCell->background >> alignment >> newCell->fontColor >> newCell->font >> newCell->data; | 162 | stream >> col >> row >> newCell->borders.right >> newCell->borders.bottom >> newCell->background >> alignment >> newCell->fontColor >> newCell->font >> newCell->data; |
163 | newCell->col=col; | 163 | newCell->col=col; |
164 | newCell->row=row; | 164 | newCell->row=row; |
165 | newCell->alignment=(Qt::AlignmentFlags)alignment; | 165 | newCell->alignment=(Qt::AlignmentFlags)alignment; |
166 | newSheet->data.append(newCell); | 166 | newSheet->data.append(newCell); |
167 | } | 167 | } |
168 | listSheets.append(newSheet); | 168 | listSheets.append(newSheet); |
169 | 169 | ||
170 | if (i==0) | 170 | if (i==0) |
171 | { | 171 | { |
172 | sheet->setName(newSheet->name); | 172 | sheet->setName(newSheet->name); |
173 | sheet->setSheetData(&newSheet->data); | 173 | sheet->setSheetData(&newSheet->data); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | } | 176 | } |
177 | 177 | ||
178 | int MainWindow::saveCurrentFile(bool ask) | 178 | int MainWindow::saveCurrentFile(bool ask) |
179 | { | 179 | { |
180 | if (ask) | 180 | if (ask) |
181 | { | 181 | { |
182 | int result=QMessageBox::information(this, tr("Save File"), tr("Do you want to save the current file?"), QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel); | 182 | int result=QMessageBox::information(this, tr("Save File"), tr("Do you want to save the current file?"), QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel); |
183 | if (result!=QMessageBox::Yes) return result; | 183 | if (result!=QMessageBox::Yes) return result; |
184 | } | 184 | } |
185 | 185 | ||
186 | if (!currentDoc->isValid()) | 186 | if (!currentDoc->isValid()) |
187 | { | 187 | { |
188 | TextDialog dialogText(this); | 188 | TextDialog dialogText(this); |
189 | if (dialogText.exec(tr("Save File"), tr("&File Name:"), tr("UnnamedFile"))!=QDialog::Accepted || dialogText.getValue().isEmpty()) return QMessageBox::Cancel; | 189 | if (dialogText.exec(tr("Save File"), tr("&File Name:"), tr("UnnamedFile"))!=QDialog::Accepted || dialogText.getValue().isEmpty()) return QMessageBox::Cancel; |
190 | 190 | ||
191 | currentDoc->setName(dialogText.getValue()); | 191 | currentDoc->setName(dialogText.getValue()); |
192 | currentDoc->setFile(QString::null); | 192 | currentDoc->setFile(QString::null); |
193 | currentDoc->setLinkFile(QString::null); | 193 | currentDoc->setLinkFile(QString::null); |
194 | } | 194 | } |
195 | 195 | ||
196 | documentSave(currentDoc); | 196 | documentSave(currentDoc); |
197 | return QMessageBox::Yes; | 197 | return QMessageBox::Yes; |
198 | } | 198 | } |
199 | 199 | ||
200 | void MainWindow::selectorFileNew(const DocLnk &lnkDoc) | 200 | void MainWindow::selectorFileNew(const DocLnk &lnkDoc) |
201 | { | 201 | { |
202 | selectorHide(); | 202 | selectorHide(); |
203 | 203 | ||
204 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; | 204 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; |
205 | if (currentDoc) delete currentDoc; | 205 | if (currentDoc) delete currentDoc; |
206 | currentDoc = new DocLnk(lnkDoc); | 206 | currentDoc = new DocLnk(lnkDoc); |
207 | editData->clear(); | 207 | editData->clear(); |
208 | listSheets.clear(); | 208 | listSheets.clear(); |
209 | comboSheets->clear(); | 209 | comboSheets->clear(); |
210 | 210 | ||
211 | typeSheet *newSheet=createNewSheet(); | 211 | typeSheet *newSheet=createNewSheet(); |
212 | newSheet->data.setAutoDelete(TRUE); | 212 | newSheet->data.setAutoDelete(TRUE); |
213 | sheet->setName(newSheet->name); | 213 | sheet->setName(newSheet->name); |
214 | sheet->setSheetData(&newSheet->data); | 214 | sheet->setSheetData(&newSheet->data); |
215 | for (int i=1; i<DEFAULT_NUM_SHEETS; ++i) | 215 | for (int i=1; i<DEFAULT_NUM_SHEETS; ++i) |
216 | createNewSheet(); | 216 | createNewSheet(); |
217 | documentModified=FALSE; | 217 | documentModified=FALSE; |
218 | } | 218 | } |
219 | 219 | ||
220 | void MainWindow::closeEvent(QCloseEvent *e) | 220 | void MainWindow::closeEvent(QCloseEvent *e) |
221 | { | 221 | { |
222 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) e->ignore(); | 222 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) e->ignore(); |
223 | else e->accept(); | 223 | else e->accept(); |
224 | } | 224 | } |
225 | 225 | ||
226 | void MainWindow::selectorFileOpen(const DocLnk &lnkDoc) | 226 | void MainWindow::selectorFileOpen(const DocLnk &lnkDoc) |
227 | { | 227 | { |
228 | selectorHide(); | 228 | selectorHide(); |
229 | 229 | ||
230 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; | 230 | if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; |
231 | if (currentDoc) delete currentDoc; | 231 | if (currentDoc) delete currentDoc; |
232 | currentDoc = new DocLnk(); | 232 | currentDoc = new DocLnk( lnkDoc ); |
233 | listSheets.clear(); | 233 | listSheets.clear(); |
234 | comboSheets->clear(); | 234 | comboSheets->clear(); |
235 | 235 | ||
236 | documentOpen(lnkDoc); | 236 | documentOpen(lnkDoc); |
237 | documentModified=FALSE; | 237 | documentModified=FALSE; |
238 | } | 238 | } |
239 | 239 | ||
240 | void MainWindow::selectorShow() | 240 | void MainWindow::selectorShow() |
241 | { | 241 | { |
242 | sheet->hide(); | 242 | sheet->hide(); |
243 | setCentralWidget(fileSelector); | 243 | setCentralWidget(fileSelector); |
244 | fileSelector->show(); | 244 | fileSelector->show(); |
245 | fileSelector->reread(); | 245 | fileSelector->reread(); |
246 | } | 246 | } |
247 | 247 | ||
248 | void MainWindow::selectorHide() | 248 | void MainWindow::selectorHide() |
249 | { | 249 | { |
250 | fileSelector->hide(); | 250 | fileSelector->hide(); |
251 | setCentralWidget(sheet); | 251 | setCentralWidget(sheet); |
252 | sheet->show(); | 252 | sheet->show(); |
253 | } | 253 | } |
254 | 254 | ||
255 | void MainWindow::slotFileNew() | 255 | void MainWindow::slotFileNew() |
256 | { | 256 | { |
257 | selectorFileNew(DocLnk()); | 257 | selectorFileNew(DocLnk()); |
258 | } | 258 | } |
259 | 259 | ||
260 | void MainWindow::slotFileOpen() | 260 | void MainWindow::slotFileOpen() |
261 | { | 261 | { |
262 | selectorShow(); | 262 | selectorShow(); |
263 | } | 263 | } |
264 | 264 | ||
265 | void MainWindow::slotImportExcelOpen() | 265 | void MainWindow::slotImportExcelOpen() |
266 | { | 266 | { |
267 | sheet->hide(); | 267 | sheet->hide(); |
268 | setCentralWidget(ExcelSelector); | 268 | setCentralWidget(ExcelSelector); |
269 | ExcelSelector->show(); | 269 | ExcelSelector->show(); |
270 | ExcelSelector->reread(); | 270 | ExcelSelector->reread(); |
271 | } | 271 | } |
272 | 272 | ||
273 | void MainWindow::ExcelSelectorHide() | 273 | void MainWindow::ExcelSelectorHide() |
274 | { | 274 | { |
275 | ExcelSelector->hide(); | 275 | ExcelSelector->hide(); |
276 | setCentralWidget(sheet); | 276 | setCentralWidget(sheet); |
277 | sheet->show(); | 277 | sheet->show(); |
278 | } | 278 | } |
279 | 279 | ||
280 | void MainWindow::slotFileSave() | 280 | void MainWindow::slotFileSave() |
281 | { | 281 | { |
282 | saveCurrentFile(FALSE); | 282 | saveCurrentFile(FALSE); |
283 | } | 283 | } |
284 | 284 | ||
285 | void MainWindow::setDocument(const QString &applnk_filename) | 285 | void MainWindow::setDocument(const QString &applnk_filename) |
286 | { | 286 | { |
287 | selectorFileOpen(DocLnk(applnk_filename)); | 287 | selectorFileOpen(DocLnk(applnk_filename)); |
288 | } | 288 | } |
289 | 289 | ||
290 | void MainWindow::initActions() | 290 | void MainWindow::initActions() |
291 | { | 291 | { |
292 | fileNew=new QAction(tr("New File"), Resource::loadPixmap( "new" ), tr("&New"), 0, this); | 292 | fileNew=new QAction(tr("New File"), Resource::loadPixmap( "new" ), tr("&New"), 0, this); |
293 | connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew())); | 293 | connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew())); |
294 | fileOpen=new QAction(tr("Open File"), Resource::loadPixmap( "fileopen" ), tr("&Open"), 0, this); | 294 | fileOpen=new QAction(tr("Open File"), Resource::loadPixmap( "fileopen" ), tr("&Open"), 0, this); |
295 | connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen())); | 295 | connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen())); |
296 | fileSave=new QAction(tr("Save File"),Resource::loadPixmap( "save" ), tr("&Save"), 0, this); | 296 | fileSave=new QAction(tr("Save File"),Resource::loadPixmap( "save" ), tr("&Save"), 0, this); |
297 | connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave())); | 297 | connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave())); |
298 | fileSaveAs=new QAction(tr("Save File As"), Resource::loadPixmap( "save" ), tr("Save &As"), 0, this); | 298 | fileSaveAs=new QAction(tr("Save File As"), Resource::loadPixmap( "save" ), tr("Save &As"), 0, this); |
299 | connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs())); | 299 | connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs())); |
300 | 300 | ||
301 | //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); | 301 | //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); |
302 | //connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); | 302 | //connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); |
303 | fileExcelImport=new QAction(tr("Import Excel file"),Resource::loadPixmap( "opie-sheet/excel16" ),tr("Import E&xcel file"),0,this); | 303 | fileExcelImport=new QAction(tr("Import Excel file"),Resource::loadPixmap( "opie-sheet/excel16" ),tr("Import E&xcel file"),0,this); |
304 | connect(fileExcelImport, SIGNAL(activated()), this, SLOT(slotImportExcelOpen())); | 304 | connect(fileExcelImport, SIGNAL(activated()), this, SLOT(slotImportExcelOpen())); |
305 | 305 | ||
306 | // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); | 306 | // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); |
307 | //connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral())); | 307 | //connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral())); |
308 | //helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this); | 308 | //helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this); |
309 | //connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout())); | 309 | //connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout())); |
310 | 310 | ||
311 | editAccept=new QAction(tr("Accept"),Resource::loadPixmap( "enter" ) , tr("&Accept"), 0, this); | 311 | editAccept=new QAction(tr("Accept"),Resource::loadPixmap( "enter" ) , tr("&Accept"), 0, this); |
312 | connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); | 312 | connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); |
313 | editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this); | 313 | editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this); |
314 | connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); | 314 | connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); |
315 | editCellSelect=new QAction(tr("Cell Selector"), Resource::loadPixmap( "opie-sheet/cell-select" ), tr("Cell &Selector"), 0, this); | 315 | editCellSelect=new QAction(tr("Cell Selector"), Resource::loadPixmap( "opie-sheet/cell-select" ), tr("Cell &Selector"), 0, this); |
316 | editCellSelect->setToggleAction(TRUE); | 316 | editCellSelect->setToggleAction(TRUE); |
317 | connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool))); | 317 | connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool))); |
318 | editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this); | 318 | editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this); |
319 | editCopy=new QAction(tr("Copy Cells"), tr("&Copy"), 0, this); | 319 | editCopy=new QAction(tr("Copy Cells"), tr("&Copy"), 0, this); |
320 | editPaste=new QAction(tr("Paste Cells"), tr("&Paste"), 0, this); | 320 | editPaste=new QAction(tr("Paste Cells"), tr("&Paste"), 0, this); |
321 | connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste())); | 321 | connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste())); |
322 | editPasteContents=new QAction(tr("Paste Contents"), tr("Paste Cont&ents"), 0, this); | 322 | editPasteContents=new QAction(tr("Paste Contents"), tr("Paste Cont&ents"), 0, this); |
323 | connect(editPasteContents, SIGNAL(activated()), this, SLOT(slotEditPasteContents())); | 323 | connect(editPasteContents, SIGNAL(activated()), this, SLOT(slotEditPasteContents())); |
324 | editClear=new QAction(tr("Clear Cells"), tr("C&lear"), 0, this); | 324 | editClear=new QAction(tr("Clear Cells"), tr("C&lear"), 0, this); |
325 | 325 | ||
326 | insertCells=new QAction(tr("Insert Cells"), tr("C&ells"), 0, this); | 326 | insertCells=new QAction(tr("Insert Cells"), tr("C&ells"), 0, this); |
327 | connect(insertCells, SIGNAL(activated()), this, SLOT(slotInsertCells())); | 327 | connect(insertCells, SIGNAL(activated()), this, SLOT(slotInsertCells())); |
328 | insertRows=new QAction(tr("Insert Rows"), tr("&Rows"), 0, this); | 328 | insertRows=new QAction(tr("Insert Rows"), tr("&Rows"), 0, this); |
329 | connect(insertRows, SIGNAL(activated()), this, SLOT(slotInsertRows())); | 329 | connect(insertRows, SIGNAL(activated()), this, SLOT(slotInsertRows())); |
330 | insertCols=new QAction(tr("Insert Columns"), tr("&Columns"), 0, this); | 330 | insertCols=new QAction(tr("Insert Columns"), tr("&Columns"), 0, this); |
331 | connect(insertCols, SIGNAL(activated()), this, SLOT(slotInsertCols())); | 331 | connect(insertCols, SIGNAL(activated()), this, SLOT(slotInsertCols())); |
332 | insertSheets=new QAction(tr("Add Sheets"), tr("&Sheets"), 0, this); | 332 | insertSheets=new QAction(tr("Add Sheets"), tr("&Sheets"), 0, this); |
333 | connect(insertSheets, SIGNAL(activated()), this, SLOT(slotInsertSheets())); | 333 | connect(insertSheets, SIGNAL(activated()), this, SLOT(slotInsertSheets())); |
334 | 334 | ||
335 | formatCells=new QAction(tr("Cells"), tr("&Cells"), 0, this); | 335 | formatCells=new QAction(tr("Cells"), tr("&Cells"), 0, this); |
336 | connect(formatCells, SIGNAL(activated()), this, SLOT(slotFormatCells())); | 336 | connect(formatCells, SIGNAL(activated()), this, SLOT(slotFormatCells())); |
337 | 337 | ||
338 | rowHeight=new QAction(tr("Row Height"), tr("H&eight"), 0, this); | 338 | rowHeight=new QAction(tr("Row Height"), tr("H&eight"), 0, this); |
339 | connect(rowHeight, SIGNAL(activated()), this, SLOT(slotRowHeight())); | 339 | connect(rowHeight, SIGNAL(activated()), this, SLOT(slotRowHeight())); |
340 | rowAdjust=new QAction(tr("Adjust Row"), tr("&Adjust"), 0, this); | 340 | rowAdjust=new QAction(tr("Adjust Row"), tr("&Adjust"), 0, this); |
341 | connect(rowAdjust, SIGNAL(activated()), this, SLOT(slotRowAdjust())); | 341 | connect(rowAdjust, SIGNAL(activated()), this, SLOT(slotRowAdjust())); |
342 | rowShow=new QAction(tr("Show Row"), tr("&Show"), 0, this); | 342 | rowShow=new QAction(tr("Show Row"), tr("&Show"), 0, this); |
343 | connect(rowShow, SIGNAL(activated()), this, SLOT(slotRowShow())); | 343 | connect(rowShow, SIGNAL(activated()), this, SLOT(slotRowShow())); |
344 | rowHide=new QAction(tr("Hide Row"), tr("&Hide"), 0, this); | 344 | rowHide=new QAction(tr("Hide Row"), tr("&Hide"), 0, this); |
345 | connect(rowHide, SIGNAL(activated()), this, SLOT(slotRowHide())); | 345 | connect(rowHide, SIGNAL(activated()), this, SLOT(slotRowHide())); |
346 | 346 | ||
347 | colWidth=new QAction(tr("Column Width"), tr("&Width"), 0, this); | 347 | colWidth=new QAction(tr("Column Width"), tr("&Width"), 0, this); |
348 | connect(colWidth, SIGNAL(activated()), this, SLOT(slotColumnWidth())); | 348 | connect(colWidth, SIGNAL(activated()), this, SLOT(slotColumnWidth())); |
349 | colAdjust=new QAction(tr("Adjust Column"), tr("&Adjust"), 0, this); | 349 | colAdjust=new QAction(tr("Adjust Column"), tr("&Adjust"), 0, this); |
350 | connect(colAdjust, SIGNAL(activated()), this, SLOT(slotColumnAdjust())); | 350 | connect(colAdjust, SIGNAL(activated()), this, SLOT(slotColumnAdjust())); |
351 | colShow=new QAction(tr("Show Column"), tr("&Show"), 0, this); | 351 | colShow=new QAction(tr("Show Column"), tr("&Show"), 0, this); |
352 | connect(colShow, SIGNAL(activated()), this, SLOT(slotColumnShow())); | 352 | connect(colShow, SIGNAL(activated()), this, SLOT(slotColumnShow())); |
353 | colHide=new QAction(tr("Hide Column"), tr("&Hide"), 0, this); | 353 | colHide=new QAction(tr("Hide Column"), tr("&Hide"), 0, this); |
354 | connect(colHide, SIGNAL(activated()), this, SLOT(slotColumnHide())); | 354 | connect(colHide, SIGNAL(activated()), this, SLOT(slotColumnHide())); |
355 | 355 | ||
356 | sheetRename=new QAction(tr("Rename Sheet"), tr("&Rename"), 0, this); | 356 | sheetRename=new QAction(tr("Rename Sheet"), tr("&Rename"), 0, this); |
357 | connect(sheetRename, SIGNAL(activated()), this, SLOT(slotSheetRename())); | 357 | connect(sheetRename, SIGNAL(activated()), this, SLOT(slotSheetRename())); |
358 | sheetRemove=new QAction(tr("Remove Sheet"), tr("R&emove"), 0, this); | 358 | sheetRemove=new QAction(tr("Remove Sheet"), tr("R&emove"), 0, this); |
359 | connect(sheetRemove, SIGNAL(activated()), this, SLOT(slotSheetRemove())); | 359 | connect(sheetRemove, SIGNAL(activated()), this, SLOT(slotSheetRemove())); |
360 | 360 | ||