Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 45dc0c4..463b202 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -2,25 +2,25 @@ | |||
2 | advancedfmData.cpp | 2 | advancedfmData.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Mon 09-23-2002 13:24:11 | 4 | ** Created: Mon 09-23-2002 13:24:11 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #include "advancedfm.h" | 12 | #include "advancedfm.h" |
13 | 13 | ||
14 | #include <opie/otabwidget.h> | 14 | #include <opie/osplitter.h> |
15 | #include <qpe/storage.h> | 15 | #include <qpe/storage.h> |
16 | 16 | ||
17 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
18 | #include <qpe/resource.h> | 18 | #include <qpe/resource.h> |
19 | #include <qpe/menubutton.h> | 19 | #include <qpe/menubutton.h> |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | 22 | #include <qhbox.h> |
23 | #include <qmenubar.h> | 23 | #include <qmenubar.h> |
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qtoolbutton.h> | 25 | #include <qtoolbutton.h> |
26 | #include <qlineedit.h> | 26 | #include <qlineedit.h> |
@@ -121,71 +121,72 @@ void AdvancedFm::init() { | |||
121 | menuButton->insertItem( s_removeBookmark); | 121 | menuButton->insertItem( s_removeBookmark); |
122 | menuButton->insertSeparator(); | 122 | menuButton->insertSeparator(); |
123 | 123 | ||
124 | customDirsToMenu(); | 124 | customDirsToMenu(); |
125 | 125 | ||
126 | currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); | 126 | currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); |
127 | currentPathCombo->setEditable(TRUE); | 127 | currentPathCombo->setEditable(TRUE); |
128 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 128 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
129 | 129 | ||
130 | layout->addWidget( lineBox ); | 130 | layout->addWidget( lineBox ); |
131 | 131 | ||
132 | 132 | ||
133 | TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab); | 133 | TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); |
134 | // TabWidget = new QTabWidget( this, "TabWidget" ); | 134 | // TabWidget = new QTabWidget( this, "TabWidget" ); |
135 | layout->addWidget( TabWidget, 4 ); | 135 | layout->addWidget( TabWidget, 4 ); |
136 | 136 | ||
137 | tab = new QWidget( TabWidget, "tab" ); | 137 | tab = new QWidget( TabWidget, "tab" ); |
138 | tabLayout = new QGridLayout( tab ); | 138 | tabLayout = new QGridLayout( tab ); |
139 | tabLayout->setSpacing( 2); | 139 | tabLayout->setSpacing( 2); |
140 | tabLayout->setMargin( 2); | 140 | tabLayout->setMargin( 2); |
141 | 141 | ||
142 | Local_View = new QListView( tab, "Local_View" ); | 142 | Local_View = new QListView( tab, "Local_View" ); |
143 | Local_View->addColumn( tr("File"),130); | 143 | Local_View->addColumn( tr("File"),130); |
144 | Local_View->addColumn( tr("Size"),-1); | 144 | Local_View->addColumn( tr("Size"),-1); |
145 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 145 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
146 | Local_View->addColumn( tr("Date"),-1); | 146 | Local_View->addColumn( tr("Date"),-1); |
147 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 147 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
148 | Local_View->setAllColumnsShowFocus(TRUE); | 148 | Local_View->setAllColumnsShowFocus(TRUE); |
149 | Local_View->setMultiSelection( TRUE ); | 149 | Local_View->setMultiSelection( TRUE ); |
150 | Local_View->setSelectionMode(QListView::Extended); | 150 | Local_View->setSelectionMode(QListView::Extended); |
151 | 151 | ||
152 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 152 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
153 | 153 | ||
154 | tabLayout->addWidget( Local_View, 0, 0 ); | 154 | tabLayout->addWidget( Local_View, 0, 0 ); |
155 | 155 | ||
156 | TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1")); | 156 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); |
157 | // TabWidget->insertTab( tab, tr("1")); | 157 | // TabWidget->insertTab( tab, tr("1")); |
158 | 158 | ||
159 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 159 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
160 | tabLayout_2 = new QGridLayout( tab_2 ); | 160 | tabLayout_2 = new QGridLayout( tab_2 ); |
161 | tabLayout_2->setSpacing( 2); | 161 | tabLayout_2->setSpacing( 2); |
162 | tabLayout_2->setMargin( 2); | 162 | tabLayout_2->setMargin( 2); |
163 | 163 | ||
164 | Remote_View = new QListView( tab_2, "Remote_View" ); | 164 | Remote_View = new QListView( tab_2, "Remote_View" ); |
165 | Remote_View->addColumn( tr("File"),130); | 165 | Remote_View->addColumn( tr("File"),130); |
166 | Remote_View->addColumn( tr("Size"),-1); | 166 | Remote_View->addColumn( tr("Size"),-1); |
167 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 167 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
168 | Remote_View->addColumn( tr("Date"),-1); | 168 | Remote_View->addColumn( tr("Date"),-1); |
169 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 169 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
170 | Remote_View->setAllColumnsShowFocus(TRUE); | 170 | Remote_View->setAllColumnsShowFocus(TRUE); |
171 | Remote_View->setMultiSelection( TRUE ); | 171 | Remote_View->setMultiSelection( TRUE ); |
172 | Remote_View->setSelectionMode(QListView::Extended); | 172 | Remote_View->setSelectionMode(QListView::Extended); |
173 | 173 | ||
174 | 174 | ||
175 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 175 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
176 | 176 | ||
177 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 177 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
178 | 178 | ||
179 | TabWidget->addTab( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 179 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
180 | TabWidget->setSizeChange( 370 ); | ||
180 | // TabWidget->insertTab( tab_2, tr( "2")); | 181 | // TabWidget->insertTab( tab_2, tr( "2")); |
181 | 182 | ||
182 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 183 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
183 | tabLayout_3 = new QGridLayout( tab_3 ); | 184 | tabLayout_3 = new QGridLayout( tab_3 ); |
184 | tabLayout_3->setSpacing( 2); | 185 | tabLayout_3->setSpacing( 2); |
185 | tabLayout_3->setMargin( 2); | 186 | tabLayout_3->setMargin( 2); |
186 | 187 | ||
187 | 188 | ||
188 | // OFileDialog fileDialog; | 189 | // OFileDialog fileDialog; |
189 | // fileDialog; | 190 | // fileDialog; |
190 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 191 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
191 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 192 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
@@ -223,25 +224,25 @@ void AdvancedFm::init() { | |||
223 | } | 224 | } |
224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 225 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
225 | currentDir.setPath( QDir::currentDirPath()); | 226 | currentDir.setPath( QDir::currentDirPath()); |
226 | 227 | ||
227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 228 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
228 | currentRemoteDir.setPath( QDir::currentDirPath()); | 229 | currentRemoteDir.setPath( QDir::currentDirPath()); |
229 | 230 | ||
230 | // b = TRUE; | 231 | // b = TRUE; |
231 | 232 | ||
232 | filterStr="*"; | 233 | filterStr="*"; |
233 | b=FALSE; | 234 | b=FALSE; |
234 | showMenuHidden(); | 235 | showMenuHidden(); |
235 | TabWidget->setCurrentTab(0); | 236 | TabWidget->setCurrentWidget(0); |
236 | 237 | ||
237 | } | 238 | } |
238 | 239 | ||
239 | void AdvancedFm::initConnections() | 240 | void AdvancedFm::initConnections() |
240 | { | 241 | { |
241 | 242 | ||
242 | connect( qApp,SIGNAL( aboutToQuit()), | 243 | connect( qApp,SIGNAL( aboutToQuit()), |
243 | this, SLOT( cleanUp()) ); | 244 | this, SLOT( cleanUp()) ); |
244 | connect( qpeDirButton ,SIGNAL(released()), | 245 | connect( qpeDirButton ,SIGNAL(released()), |
245 | this,SLOT( QPEButtonPushed()) ); | 246 | this,SLOT( QPEButtonPushed()) ); |
246 | connect( cfButton ,SIGNAL(released()), | 247 | connect( cfButton ,SIGNAL(released()), |
247 | this,SLOT( CFButtonPushed()) ); | 248 | this,SLOT( CFButtonPushed()) ); |