• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
  • dialogs
autolayoutoptionpage.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2002-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 // own header
12 #include "autolayoutoptionpage.h"
13 
14 // local includes
15 #include "layoutgenerator.h"
16 
17 // kde includes
18 #include <KFileDialog>
19 #include <KLineEdit>
20 #include <KLocale>
21 
22 // qt includes
23 #include <QCheckBox>
24 #include <QGridLayout>
25 #include <QGroupBox>
26 #include <QLabel>
27 #include <QPushButton>
28 #include <QVBoxLayout>
29 
34 AutoLayoutOptionPage::AutoLayoutOptionPage(QWidget* parent)
35  : QWidget(parent)
36 {
37  setupUi(this);
38  m_autoDotPath->setChecked(Settings::optionState().autoLayoutState.autoDotPath);
39  m_dotPath->setText(Settings::optionState().autoLayoutState.dotPath);
40  m_showExportLayout->setChecked(Settings::optionState().autoLayoutState.showExportLayout);
41  connect(m_autoDotPath, SIGNAL(toggled(bool)), this, SLOT(slotAutoDotPathCBClicked(bool)));
42 
43  if (Settings::optionState().autoLayoutState.autoDotPath) {
44  m_dotPath->setEnabled (false);
45  m_dotPath->setText(LayoutGenerator::currentDotPath());
46  }
47 }
48 
52 AutoLayoutOptionPage::~AutoLayoutOptionPage()
53 {
54 }
55 
59 void AutoLayoutOptionPage::setDefaults()
60 {
61  m_autoDotPath->setChecked(true);
62  m_showExportLayout->setChecked(false);
63 }
64 
69 void AutoLayoutOptionPage::apply()
70 {
71  Settings::optionState().autoLayoutState.autoDotPath = m_autoDotPath->isChecked();
72  Settings::optionState().autoLayoutState.dotPath = m_autoDotPath->isChecked() ? "" : m_dotPath->text();
73  Settings::optionState().autoLayoutState.showExportLayout = m_showExportLayout->isChecked();
74  emit applyClicked();
75 }
76 
77 void AutoLayoutOptionPage::slotAutoDotPathCBClicked(bool value)
78 {
79  if (value)
80  m_dotPath->setText(LayoutGenerator::currentDotPath());
81 }
autolayoutoptionpage.h
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:25
QWidget
AutoLayoutOptionPage::applyClicked
void applyClicked()
AutoLayoutOptionPage::setDefaults
void setDefaults()
sets default values
Definition: autolayoutoptionpage.cpp:59
Settings::OptionState::autoLayoutState
AutoLayoutState autoLayoutState
Definition: optionstate.h:148
AutoLayoutOptionPage::apply
void apply()
Reads the set values from their corresponding widgets, writes them back to the data structure...
Definition: autolayoutoptionpage.cpp:69
LayoutGenerator::currentDotPath
static QString currentDotPath()
Return the path where dot is installed.
Definition: layoutgenerator.h:127
Settings::AutoLayoutState::showExportLayout
bool showExportLayout
flag for display export layout
Definition: optionstate.h:138
Settings::AutoLayoutState::dotPath
QString dotPath
path to dot executable
Definition: optionstate.h:137
layoutgenerator.h
AutoLayoutOptionPage::AutoLayoutOptionPage
AutoLayoutOptionPage(QWidget *parent)
Constructor.general.
Definition: autolayoutoptionpage.cpp:34
Settings::AutoLayoutState::autoDotPath
bool autoDotPath
determine path to dot executable automatically
Definition: optionstate.h:136
AutoLayoutOptionPage::~AutoLayoutOptionPage
virtual ~AutoLayoutOptionPage()
destructor
Definition: autolayoutoptionpage.cpp:52
AutoLayoutOptionPage::slotAutoDotPathCBClicked
void slotAutoDotPathCBClicked(bool value)
Definition: autolayoutoptionpage.cpp:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal