2
* Copyright (C) 2004 Ahn, Duk J.(adjj22@kornet.net) (adjj1@hanmail.net)
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; see the file COPYING.LIB. If not, write to
16
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
24
#include <kdevproject.h>
25
#include <kdevplugin.h>
26
#include <ksqueezedtextlabel.h>
28
#include <codemodel.h>
30
#include "quickopenfunctionchooseform.h"
31
#include "quickopenfunctiondialog.h"
33
QuickOpenFunctionChooseForm::QuickOpenFunctionChooseForm(QWidget* parent, const char* name, bool modal, WFlags fl)
34
: QuickOpenFunctionChooseFormBase(parent,name, modal,fl)
36
setCaption( i18n("Select One Argument or File of Function %1").arg( name ) );
41
QuickOpenFunctionChooseForm::~QuickOpenFunctionChooseForm()
45
void QuickOpenFunctionChooseForm::slotArgsChange( int id )
47
argBox->setCurrentItem( id );
50
void QuickOpenFunctionChooseForm::slotFileChange( int id )
52
fileBox->setCurrentItem( id );
54
QuickOpenFunctionDialog *parentDlg = static_cast< QuickOpenFunctionDialog* >( parent() );
55
FunctionDefinitionModel *model = ( *(parentDlg->matchingFuncList()) )[id].data();
56
KURL full_url( model->fileName() );
57
KURL base_url( parentDlg->part()->project()->projectDirectory()+"/" );
58
KURL::relativeURL( base_url, full_url );
59
filepathlabel->setText( KURL::relativeURL( base_url, full_url ) );
63
#include "quickopenfunctionchooseform.moc"