Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/kmymoney.h
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
54 | class MyMoneySecurity; | 54 | class MyMoneySecurity; | ||
55 | class MyMoneyPayee; | 55 | class MyMoneyPayee; | ||
56 | class MyMoneyPrice; | 56 | class MyMoneyPrice; | ||
57 | class MyMoneyTag; | 57 | class MyMoneyTag; | ||
58 | class MyMoneySplit; | 58 | class MyMoneySplit; | ||
59 | class MyMoneyTransaction; | 59 | class MyMoneyTransaction; | ||
60 | class WebConnect; | 60 | class WebConnect; | ||
61 | class creditTransfer; | 61 | class creditTransfer; | ||
62 | class IMyMoneyOperationsFormat; | ||||
62 | 63 | | |||
63 | template <class T> class onlineJobTyped; | 64 | template <class T> class onlineJobTyped; | ||
64 | 65 | | |||
65 | namespace eDialogs { enum class ScheduleResultCode; } | 66 | namespace eDialogs { enum class ScheduleResultCode; } | ||
66 | namespace eMenu { enum class Action; | 67 | namespace eMenu { enum class Action; | ||
67 | enum class Menu; } | 68 | enum class Menu; } | ||
68 | 69 | | |||
69 | /*! \mainpage KMyMoney Main Page for API documentation. | 70 | /*! \mainpage KMyMoney Main Page for API documentation. | ||
▲ Show 20 Lines • Show All 186 Lines • ▼ Show 20 Line(s) | 149 | #endif | |||
256 | void slotAccountMapOnline(); | 257 | void slotAccountMapOnline(); | ||
257 | void slotAccountUnmapOnline(); | 258 | void slotAccountUnmapOnline(); | ||
258 | void slotAccountUpdateOnline(); | 259 | void slotAccountUpdateOnline(); | ||
259 | void slotAccountUpdateOnlineAll(); | 260 | void slotAccountUpdateOnlineAll(); | ||
260 | 261 | | |||
261 | void slotStatusProgressDone(); | 262 | void slotStatusProgressDone(); | ||
262 | 263 | | |||
263 | public: | 264 | public: | ||
265 | enum fileActions { | ||||
266 | preOpen, postOpen, preSave, postSave, preClose, postClose | ||||
267 | }; | ||||
268 | | ||||
269 | // Keep a note of the file type | ||||
270 | typedef enum _fileTypeE { | ||||
271 | KmmBinary = 0, // native, binary | ||||
272 | KmmXML, // native, XML | ||||
273 | KmmDb, // SQL database | ||||
274 | /* insert new native file types above this line */ | ||||
275 | MaxNativeFileType, | ||||
276 | /* and non-native types below */ | ||||
277 | GncXML // Gnucash XML | ||||
278 | } fileTypeE; | ||||
279 | | ||||
264 | /** | 280 | /** | ||
265 | * This method checks if there is at least one asset or liability account | 281 | * This method checks if there is at least one asset or liability account | ||
266 | * in the current storage object. If not, it starts the new account wizard. | 282 | * in the current storage object. If not, it starts the new account wizard. | ||
267 | */ | 283 | */ | ||
268 | void createInitialAccount(); | 284 | void createInitialAccount(); | ||
269 | 285 | | |||
270 | /** | 286 | /** | ||
271 | * This method returns the last URL used or an empty URL | 287 | * This method returns the last URL used or an empty URL | ||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 358 | /** | |||
347 | */ | 363 | */ | ||
348 | bool okToWriteFile(const QUrl &url); | 364 | bool okToWriteFile(const QUrl &url); | ||
349 | 365 | | |||
350 | /** | 366 | /** | ||
351 | * Return pointer to the WebConnect object | 367 | * Return pointer to the WebConnect object | ||
352 | */ | 368 | */ | ||
353 | WebConnect* webConnect() const; | 369 | WebConnect* webConnect() const; | ||
354 | 370 | | |||
371 | /** | ||||
372 | * Call this to find out if the currently open file is a sql database | ||||
373 | * | ||||
374 | * @retval true file is database | ||||
375 | * @retval false file is serial | ||||
376 | */ | ||||
377 | bool isDatabase(); | ||||
378 | | ||||
379 | /** | ||||
380 | * Call this to find out if the currently open file is native KMM | ||||
381 | * | ||||
382 | * @retval true file is native | ||||
383 | * @retval false file is foreign | ||||
384 | */ | ||||
385 | bool isNativeFile(); | ||||
386 | | ||||
387 | bool fileOpen() const; | ||||
388 | | ||||
355 | protected: | 389 | protected: | ||
356 | /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration | 390 | /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration | ||
357 | * file | 391 | * file | ||
358 | */ | 392 | */ | ||
359 | void saveOptions(); | 393 | void saveOptions(); | ||
360 | 394 | | |||
361 | /** | 395 | /** | ||
362 | * Creates the interfaces necessary for the plugins to work. Therefore, | 396 | * Creates the interfaces necessary for the plugins to work. Therefore, | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 446 | public Q_SLOTS: | |||
420 | void slotFileOpen(); | 454 | void slotFileOpen(); | ||
421 | 455 | | |||
422 | bool isFileOpenedInAnotherInstance(const QUrl &url); | 456 | bool isFileOpenedInAnotherInstance(const QUrl &url); | ||
423 | 457 | | |||
424 | /** opens a file from the recent files menu */ | 458 | /** opens a file from the recent files menu */ | ||
425 | 459 | | |||
426 | void slotFileOpenRecent(const QUrl &url); | 460 | void slotFileOpenRecent(const QUrl &url); | ||
427 | 461 | | |||
428 | /** open a SQL database */ | | |||
429 | void slotOpenDatabase(); | | |||
430 | | ||||
431 | /** | 462 | /** | ||
432 | * saves the current document. If it has no name yet, the user | 463 | * saves the current document. If it has no name yet, the user | ||
433 | * will be queried for it. | 464 | * will be queried for it. | ||
434 | * | 465 | * | ||
435 | * @retval false save operation failed | 466 | * @retval false save operation failed | ||
436 | * @retval true save operation was successful | 467 | * @retval true save operation was successful | ||
437 | */ | 468 | */ | ||
438 | bool slotFileSave(); | 469 | bool slotFileSave(); | ||
439 | 470 | | |||
440 | /** | 471 | /** | ||
441 | * ask the user for the filename and save the current document | 472 | * ask the user for the filename and save the current document | ||
442 | * | 473 | * | ||
443 | * @retval false save operation failed | 474 | * @retval false save operation failed | ||
444 | * @retval true save operation was successful | 475 | * @retval true save operation was successful | ||
445 | */ | 476 | */ | ||
446 | bool slotFileSaveAs(); | 477 | bool slotFileSaveAs(); | ||
447 | 478 | | |||
448 | /** | | |||
449 | * ask the user to select a database and save the current document | | |||
450 | * | | |||
451 | * @retval false save operation failed | | |||
452 | * @retval true save operation was successful | | |||
453 | */ | | |||
454 | bool saveAsDatabase(); | | |||
455 | void slotSaveAsDatabase(); | | |||
456 | | ||||
457 | /** asks for saving if the file is modified, then closes the actual file and window */ | 479 | /** asks for saving if the file is modified, then closes the actual file and window */ | ||
458 | void slotFileCloseWindow(); | 480 | void slotFileCloseWindow(); | ||
459 | 481 | | |||
460 | /** asks for saving if the file is modified, then closes the actual file */ | 482 | /** asks for saving if the file is modified, then closes the actual file */ | ||
461 | void slotFileClose(); | 483 | void slotFileClose(); | ||
462 | 484 | | |||
463 | /** | 485 | /** | ||
464 | * closes all open windows by calling close() on each memberList item | 486 | * closes all open windows by calling close() on each memberList item | ||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Line(s) | 688 | /** | |||
669 | * @a schedule is identical to MyMoneySchedule(). This signal is used | 691 | * @a schedule is identical to MyMoneySchedule(). This signal is used | ||
670 | * by plugins to get information about changes. | 692 | * by plugins to get information about changes. | ||
671 | */ | 693 | */ | ||
672 | void scheduleSelected(const MyMoneySchedule& schedule); | 694 | void scheduleSelected(const MyMoneySchedule& schedule); | ||
673 | 695 | | |||
674 | void startMatchTransaction(const MyMoneyTransaction& t); | 696 | void startMatchTransaction(const MyMoneyTransaction& t); | ||
675 | void cancelMatchTransaction(); | 697 | void cancelMatchTransaction(); | ||
676 | 698 | | |||
699 | void kmmFilePlugin(unsigned int); | ||||
700 | | ||||
677 | public: | 701 | public: | ||
678 | 702 | | |||
679 | bool isActionToggled(const eMenu::Action _a); | 703 | bool isActionToggled(const eMenu::Action _a); | ||
680 | static const QHash<eMenu::Action, QString> s_Actions; | 704 | static const QHash<eMenu::Action, QString> s_Actions; | ||
681 | 705 | | |||
682 | private: | 706 | private: | ||
683 | /// \internal d-pointer class. | 707 | /// \internal d-pointer class. | ||
684 | class Private; | 708 | class Private; | ||
Show All 23 Lines |