~ubuntu-branches/ubuntu/karmic/kdevelop/karmic

« back to all changes in this revision

Viewing changes to parts/ctags2/ctags2_createtagfile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-05-25 19:34:26 UTC
  • mfrom: (1.1.11 upstream) (2.3.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090525193426-hdntv90rvflyew8g
Tags: 4:3.9.93-1ubuntu1
* Merge from Debian experimental, remaining changes:
  - Conflict/replace -kde4 packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2006 by Jens Dagerbo                                    *
3
 
 *   jens.dagerbo@swipnet.se                                               *
4
 
 *                                                                         *
5
 
 *   This program is free software; you can redistribute it and/or modify  *
6
 
 *   it under the terms of the GNU General Public License as published by  *
7
 
 *   the Free Software Foundation; either version 2 of the License, or     *
8
 
 *   (at your option) any later version.                                   *
9
 
 *                                                                         *
10
 
 ***************************************************************************/
11
 
 
12
 
#include <kurlrequester.h>
13
 
#include <klineedit.h>
14
 
 
15
 
#include "ctags2_createtagfile.h"
16
 
#include "ctags2_part.h"
17
 
 
18
 
 
19
 
CreateTagFile::CreateTagFile(QWidget* parent, const char* name, bool modal, WFlags fl)
20
 
: CTags2CreateTagFileBase( parent, name, modal, fl )
21
 
{
22
 
        dirToTag->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
23
 
        newTagFilePath->setMode( KFile::File | KFile::LocalOnly );
24
 
        createTagFileButton->setEnabled( false );
25
 
}
26
 
 
27
 
CreateTagFile::~CreateTagFile()
28
 
{
29
 
}
30
 
 
31
 
void CreateTagFile::validate()
32
 
{
33
 
        bool valid = ( !displayName->text().isEmpty() && !newTagFilePath->url().isEmpty() && !dirToTag->url().isEmpty() );
34
 
 
35
 
        createTagFileButton->setEnabled( valid );
36
 
}
37
 
 
38
 
QString CreateTagFile::name( )
39
 
{
40
 
        return displayName->text();
41
 
}
42
 
 
43
 
QString CreateTagFile::tagsfilePath( )
44
 
{
45
 
        return newTagFilePath->url();
46
 
}
47
 
 
48
 
QString CreateTagFile::directory( )
49
 
{
50
 
        return dirToTag->url();
51
 
}
52
 
 
53
 
// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off;