author | mickeyl <mickeyl> | 2003-12-07 13:51:01 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-07 13:51:01 (UTC) |
commit | c648101ca50a9782911b58b5158b31e1d0427ab3 (patch) (unidiff) | |
tree | 0fcf5801e23d95e071c7f1b62230c5b15c6256ea /noncore/apps/qashmoney/qashmoney.cpp | |
parent | 2d793ca674944241480f6939814e3f61d0a0e0fb (diff) | |
download | opie-c648101ca50a9782911b58b5158b31e1d0427ab3.zip opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.gz opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.bz2 |
s/QPEMenuBar/QMenuBar:
- remove usage of deprecated classses
- makes it easier to migrate to OMenuBar in the future
Diffstat (limited to 'noncore/apps/qashmoney/qashmoney.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/qashmoney.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/qashmoney.cpp b/noncore/apps/qashmoney/qashmoney.cpp index 20e8d32..e985f0b 100755 --- a/noncore/apps/qashmoney/qashmoney.cpp +++ b/noncore/apps/qashmoney/qashmoney.cpp | |||
@@ -1,74 +1,74 @@ | |||
1 | #include "qashmoney.h" | 1 | #include "qashmoney.h" |
2 | #include "preferencedialogs.h" | 2 | #include "preferencedialogs.h" |
3 | #include "memorydialog.h" | 3 | #include "memorydialog.h" |
4 | 4 | ||
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <iostream.h> | 6 | #include <iostream.h> |
7 | 7 | ||
8 | Budget *budget = new Budget (); | 8 | Budget *budget = new Budget (); |
9 | Preferences *preferences = new Preferences (); | 9 | Preferences *preferences = new Preferences (); |
10 | Account *account = new Account (); | 10 | Account *account = new Account (); |
11 | Transaction *transaction = new Transaction (); | 11 | Transaction *transaction = new Transaction (); |
12 | Transfer *transfer = new Transfer (); | 12 | Transfer *transfer = new Transfer (); |
13 | Memory *memory = new Memory (); | 13 | Memory *memory = new Memory (); |
14 | 14 | ||
15 | QashMoney::QashMoney () : QWidget () | 15 | QashMoney::QashMoney () : QWidget () |
16 | { | 16 | { |
17 | preferences->addPreferences (); | 17 | preferences->addPreferences (); |
18 | preferences->initializeColumnPreferences (); | 18 | preferences->initializeColumnPreferences (); |
19 | preferences->initializeSortingPreferences (); | 19 | preferences->initializeSortingPreferences (); |
20 | 20 | ||
21 | // set the text in the upper part of the frame | 21 | // set the text in the upper part of the frame |
22 | setCaption ( tr ( "QashMoney" ) ); | 22 | setCaption ( tr ( "QashMoney" ) ); |
23 | 23 | ||
24 | // Create new menubar for our mainwindow | 24 | // Create new menubar for our mainwindow |
25 | // and add menu items | 25 | // and add menu items |
26 | mainmenu = new QPEMenuBar ( this ); | 26 | mainmenu = new QMenuBar ( this ); |
27 | mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); | 27 | mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); |
28 | preferencesmenu = new QPopupMenu ( this ); | 28 | preferencesmenu = new QPopupMenu ( this ); |
29 | utilitiesmenu = new QPopupMenu ( this ); | 29 | utilitiesmenu = new QPopupMenu ( this ); |
30 | mainmenu->insertItem ( "Preferences", preferencesmenu ); | 30 | mainmenu->insertItem ( "Preferences", preferencesmenu ); |
31 | mainmenu->insertItem ( "Utilities", utilitiesmenu ); | 31 | mainmenu->insertItem ( "Utilities", utilitiesmenu ); |
32 | preferencesmenu->insertItem ( "Date", this, SLOT ( displayDatePreferencesDialog () ) ); | 32 | preferencesmenu->insertItem ( "Date", this, SLOT ( displayDatePreferencesDialog () ) ); |
33 | preferencesmenu->insertItem ( "Account", this, SLOT ( displayAccountPreferencesDialog () ) ); | 33 | preferencesmenu->insertItem ( "Account", this, SLOT ( displayAccountPreferencesDialog () ) ); |
34 | preferencesmenu->insertItem ( "Transaction", this, SLOT ( displayTransactionPreferencesDialog () ) ); | 34 | preferencesmenu->insertItem ( "Transaction", this, SLOT ( displayTransactionPreferencesDialog () ) ); |
35 | utilitiesmenu->insertItem ( "Memory", this, SLOT ( displayMemoryDialog () ) ); | 35 | utilitiesmenu->insertItem ( "Memory", this, SLOT ( displayMemoryDialog () ) ); |
36 | 36 | ||
37 | // create the main tabwidget for displaying accounts and transactions | 37 | // create the main tabwidget for displaying accounts and transactions |
38 | maintabs = new QTabWidget ( this ); | 38 | maintabs = new QTabWidget ( this ); |
39 | tab = new QWidget ( this ); | 39 | tab = new QWidget ( this ); |
40 | tab_2 = new QWidget ( this ); | 40 | tab_2 = new QWidget ( this ); |
41 | tab_3 = new QWidget ( this ); | 41 | tab_3 = new QWidget ( this ); |
42 | maintabs->addTab ( tab, "Accounts" ); | 42 | maintabs->addTab ( tab, "Accounts" ); |
43 | maintabs->addTab ( tab_2, "Transactions" ); | 43 | maintabs->addTab ( tab_2, "Transactions" ); |
44 | maintabs->addTab ( tab_3, "Budgets" ); | 44 | maintabs->addTab ( tab_3, "Budgets" ); |
45 | tabheight = tab->height(); | 45 | tabheight = tab->height(); |
46 | maintabs->setTabEnabled ( tab_2, FALSE ); | 46 | maintabs->setTabEnabled ( tab_2, FALSE ); |
47 | 47 | ||
48 | // create a new account display object | 48 | // create a new account display object |
49 | accountdisplay = new AccountDisplay ( maintabs ); | 49 | accountdisplay = new AccountDisplay ( maintabs ); |
50 | accountdisplay->setTabs ( tab_2, maintabs ); | 50 | accountdisplay->setTabs ( tab_2, maintabs ); |
51 | connect ( accountdisplay->listview, SIGNAL ( selectionChanged () ), this, SLOT ( setTransactionTab () ) ); | 51 | connect ( accountdisplay->listview, SIGNAL ( selectionChanged () ), this, SLOT ( setTransactionTab () ) ); |
52 | 52 | ||
53 | // set the connection to disable the one touch account viewing if we are transfering money | 53 | // set the connection to disable the one touch account viewing if we are transfering money |
54 | connect ( accountdisplay->transferbutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( toggleOneTouchViewing ( bool ) ) ); | 54 | connect ( accountdisplay->transferbutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( toggleOneTouchViewing ( bool ) ) ); |
55 | 55 | ||
56 | // create a new transactiondisplay object | 56 | // create a new transactiondisplay object |
57 | transactiondisplay = new TransactionDisplay ( maintabs ); | 57 | transactiondisplay = new TransactionDisplay ( maintabs ); |
58 | transactiondisplay->hide(); | 58 | transactiondisplay->hide(); |
59 | 59 | ||
60 | // create new budgetdisplay object | 60 | // create new budgetdisplay object |
61 | budgetdisplay = new BudgetDisplay ( maintabs ); | 61 | budgetdisplay = new BudgetDisplay ( maintabs ); |
62 | budgetdisplay->hide(); | 62 | budgetdisplay->hide(); |
63 | 63 | ||
64 | tabslayout = new QVBoxLayout ( maintabs, 4, 2 ); | 64 | tabslayout = new QVBoxLayout ( maintabs, 4, 2 ); |
65 | tabslayout->addSpacing ( tabheight ); | 65 | tabslayout->addSpacing ( tabheight ); |
66 | tabslayout->addWidget ( accountdisplay ); | 66 | tabslayout->addWidget ( accountdisplay ); |
67 | tabslayout->addWidget ( transactiondisplay ); | 67 | tabslayout->addWidget ( transactiondisplay ); |
68 | tabslayout->addWidget ( budgetdisplay ); | 68 | tabslayout->addWidget ( budgetdisplay ); |
69 | 69 | ||
70 | // connect a change in the maintabs with changing the tab display | 70 | // connect a change in the maintabs with changing the tab display |
71 | connect ( maintabs, SIGNAL ( currentChanged ( QWidget * ) ), this, SLOT ( changeTabDisplay () ) ); | 71 | connect ( maintabs, SIGNAL ( currentChanged ( QWidget * ) ), this, SLOT ( changeTabDisplay () ) ); |
72 | 72 | ||
73 | // create layout that will contain the menubar and the maintabs | 73 | // create layout that will contain the menubar and the maintabs |
74 | layout = new QVBoxLayout ( this, 2, 2 ); | 74 | layout = new QVBoxLayout ( this, 2, 2 ); |