author | drw <drw> | 2003-03-08 22:35:47 (UTC) |
---|---|---|
committer | drw <drw> | 2003-03-08 22:35:47 (UTC) |
commit | 984291364aaedd4a6e0c50add833d30d7223c3e4 (patch) (unidiff) | |
tree | 09f950cd405131f1d63bb2f1ed7abd72563103cf | |
parent | 71b6f7c1ced665b062e7546bb8c7196a32deea03 (diff) | |
download | opie-984291364aaedd4a6e0c50add833d30d7223c3e4.zip opie-984291364aaedd4a6e0c50add833d30d7223c3e4.tar.gz opie-984291364aaedd4a6e0c50add833d30d7223c3e4.tar.bz2 |
Use inline pic
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index cabd231..ab1ceef 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp | |||
@@ -51,97 +51,97 @@ | |||
51 | 51 | ||
52 | MainWindow::MainWindow() | 52 | MainWindow::MainWindow() |
53 | : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) | 53 | : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) |
54 | { | 54 | { |
55 | setCaption( tr( "Checkbook" ) ); | 55 | setCaption( tr( "Checkbook" ) ); |
56 | 56 | ||
57 | cbDir = Global::applicationFileName( "checkbook", "" ); | 57 | cbDir = Global::applicationFileName( "checkbook", "" ); |
58 | lockIcon = Resource::loadPixmap( "locked" ); | 58 | lockIcon = Resource::loadPixmap( "locked" ); |
59 | 59 | ||
60 | // Load configuration options | 60 | // Load configuration options |
61 | Config config( "checkbook" ); | 61 | Config config( "checkbook" ); |
62 | config.setGroup( "Config" ); | 62 | config.setGroup( "Config" ); |
63 | currencySymbol = config.readEntry( "CurrencySymbol", "$" ); | 63 | currencySymbol = config.readEntry( "CurrencySymbol", "$" ); |
64 | showLocks = config.readBoolEntry( "ShowLocks", FALSE ); | 64 | showLocks = config.readBoolEntry( "ShowLocks", FALSE ); |
65 | showBalances = config.readBoolEntry( "ShowBalances", FALSE ); | 65 | showBalances = config.readBoolEntry( "ShowBalances", FALSE ); |
66 | 66 | ||
67 | // Build menu and tool bars | 67 | // Build menu and tool bars |
68 | setToolBarsMovable( FALSE ); | 68 | setToolBarsMovable( FALSE ); |
69 | 69 | ||
70 | QPEToolBar *bar = new QPEToolBar( this ); | 70 | QPEToolBar *bar = new QPEToolBar( this ); |
71 | bar->setHorizontalStretchable( TRUE ); | 71 | bar->setHorizontalStretchable( TRUE ); |
72 | QPEMenuBar *mb = new QPEMenuBar( bar ); | 72 | QPEMenuBar *mb = new QPEMenuBar( bar ); |
73 | mb->setMargin( 0 ); | 73 | mb->setMargin( 0 ); |
74 | QPopupMenu *popup = new QPopupMenu( this ); | 74 | QPopupMenu *popup = new QPopupMenu( this ); |
75 | 75 | ||
76 | bar = new QPEToolBar( this ); | 76 | bar = new QPEToolBar( this ); |
77 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); | 77 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); |
78 | a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) ); | 78 | a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) ); |
79 | connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); | 79 | connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); |
80 | a->addTo( popup ); | 80 | a->addTo( popup ); |
81 | a->addTo( bar ); | 81 | a->addTo( bar ); |
82 | 82 | ||
83 | actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, | 83 | actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, |
84 | 0, this, 0 ); | 84 | 0, this, 0 ); |
85 | actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) ); | 85 | actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) ); |
86 | connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); | 86 | connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); |
87 | actionOpen->addTo( popup ); | 87 | actionOpen->addTo( popup ); |
88 | actionOpen->addTo( bar ); | 88 | actionOpen->addTo( bar ); |
89 | 89 | ||
90 | actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, | 90 | actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, |
91 | 0, this, 0 ); | 91 | 0, this, 0 ); |
92 | actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) ); | 92 | actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) ); |
93 | connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); | 93 | connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); |
94 | actionDelete->addTo( popup ); | 94 | actionDelete->addTo( popup ); |
95 | actionDelete->addTo( bar ); | 95 | actionDelete->addTo( bar ); |
96 | 96 | ||
97 | popup->insertSeparator(); | 97 | popup->insertSeparator(); |
98 | 98 | ||
99 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "checkbook/config" ), QString::null, 0, this, 0 ); | 99 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); |
100 | a->setWhatsThis( tr( "Click here to configure this app." ) ); | 100 | a->setWhatsThis( tr( "Click here to configure this app." ) ); |
101 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); | 101 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); |
102 | a->addTo( popup ); | 102 | a->addTo( popup ); |
103 | a->addTo( bar ); | 103 | a->addTo( bar ); |
104 | 104 | ||
105 | mb->insertItem( tr( "Checkbook" ), popup ); | 105 | mb->insertItem( tr( "Checkbook" ), popup ); |
106 | 106 | ||
107 | // Load Checkbook selection list | 107 | // Load Checkbook selection list |
108 | checkbooks = new CBInfoList(); | 108 | checkbooks = new CBInfoList(); |
109 | 109 | ||
110 | QDir checkdir( cbDir ); | 110 | QDir checkdir( cbDir ); |
111 | if (checkdir.exists() == true) | 111 | if (checkdir.exists() == true) |
112 | { | 112 | { |
113 | QStringList cblist = checkdir.entryList( "*.qcb", QDir::Files|QDir::Readable|QDir::Writable, | 113 | QStringList cblist = checkdir.entryList( "*.qcb", QDir::Files|QDir::Readable|QDir::Writable, |
114 | QDir::Time ); | 114 | QDir::Time ); |
115 | CBInfo *cb = 0x0; | 115 | CBInfo *cb = 0x0; |
116 | QString filename; | 116 | QString filename; |
117 | 117 | ||
118 | for ( QStringList::Iterator it = cblist.begin(); it != cblist.end(); it++ ) | 118 | for ( QStringList::Iterator it = cblist.begin(); it != cblist.end(); it++ ) |
119 | { | 119 | { |
120 | filename = cbDir; | 120 | filename = cbDir; |
121 | filename.append( (*it) ); | 121 | filename.append( (*it) ); |
122 | 122 | ||
123 | cb = new CBInfo( (*it).remove( (*it).find('.'), (*it).length() ), filename ); | 123 | cb = new CBInfo( (*it).remove( (*it).find('.'), (*it).length() ), filename ); |
124 | checkbooks->inSort( cb ); | 124 | checkbooks->inSort( cb ); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | // Build Checkbook selection list control | 128 | // Build Checkbook selection list control |
129 | cbList = 0x0; | 129 | cbList = 0x0; |
130 | buildList(); | 130 | buildList(); |
131 | } | 131 | } |
132 | 132 | ||
133 | MainWindow::~MainWindow() | 133 | MainWindow::~MainWindow() |
134 | { | 134 | { |
135 | //config.write(); | 135 | //config.write(); |
136 | } | 136 | } |
137 | 137 | ||
138 | void MainWindow::buildList() | 138 | void MainWindow::buildList() |
139 | { | 139 | { |
140 | if ( cbList ) | 140 | if ( cbList ) |
141 | { | 141 | { |
142 | delete cbList; | 142 | delete cbList; |
143 | } | 143 | } |
144 | 144 | ||
145 | cbList = new QListView( this ); | 145 | cbList = new QListView( this ); |
146 | QWhatsThis::add( cbList, tr( "This is a listing of all checkbooks currently available." ) ); | 146 | QWhatsThis::add( cbList, tr( "This is a listing of all checkbooks currently available." ) ); |
147 | 147 | ||