summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
blob: 12836f0b61bf5a125423d5ada79e128fa737dbdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   copyright (C) 2006-2007                                               *
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 ***************************************************************************/

// own header
#include "exportallviewsdialog.h"

// include files for TQt
#include <tqlayout.h>
#include <tqlabel.h>
#include <tqtooltip.h>

// kde include files
#include <tdefilefiltercombo.h>
#include <klocale.h>

// application specific includes
#include "../umlviewimageexportermodel.h"

ExportAllViewsDialog::ExportAllViewsDialog(
        TQWidget* parent /* = 0 */,
        const char* name /* = 0 */,
        bool modal /* = false */,
        WFlags fl /* = 0*/,
        const TQString &defaultMimeType /*= "image/png"*/)
  : ExportAllViewsDialogBase(parent,name, modal,fl) {
    // create and initialize m_imageType
    m_imageType = new KFileFilterCombo(this, "m_imageType");
    m_imageType->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 0, m_imageType->sizePolicy().hasHeightForWidth()));
    m_imageType->setEditable(false);

    m_imageType->setMimeFilter(UMLViewImageExporterModel::supportedMimeTypes(), defaultMimeType);

    imageTypeLayout->addWidget(m_imageType);

    imageTypeLabel->setBuddy(m_imageType);

    // reload the strings so the m_imageType tooltip is added
    languageChange();
}

void ExportAllViewsDialog::languageChange() {
    ExportAllViewsDialogBase::languageChange();
    TQToolTip::add(m_imageType, tr2i18n("The format that the images will be exported to"));
}

#include "exportallviewsdialog.moc"