blob: 4c05d7a7da0be6a33078c8191a8c9c4466fffdba (
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
56
57
58
59
60
61
62
63
64
65
66
67
|
/***************************************************************************
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2.0 as *
* published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program in the file LICENSE.GPL; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "config.h"
#include "UiGuiInfoDialog.h"
#include "IndentHandler.h"
#include "MainWindow.h"
#include "SettingsPaths.h"
#include <tqlineedit.h>
#include <tqpixmap.h>
#include <tqtabwidget.h>
/*
\class UiGuiInfoDialog
\brief Displays a dialog window with information about the current file
and about the paths used by the application
*/
UiGuiInfoDialog::UiGuiInfoDialog(TQWidget *parent, const IndentHandler *indenter) :
UiGuiInfoDialogBase(parent), m_mainWindow((const MainWindow*)parent),
m_indentHandler(indenter)
{
// For icon setup
const TQString ICONS_PATH(APP_ICONS_PATH);
// Application icon
setIcon(TQPixmap(ICONS_PATH + "info.png"));
tabWidget->setTabIconSet(tabFile, TQPixmap(ICONS_PATH + "accessories-text-editor.png"));
tabWidget->setTabIconSet(tabPaths, TQPixmap(ICONS_PATH + "syntax-highlight.png"));
}
/*
\brief Displays the dialog by calling the dialogs exec function.
*/
void UiGuiInfoDialog::showDialog()
{
// Populate all dialog objects
leFilename->setText(m_mainWindow->m_currentSourceFile);
leConfigFilename->setText(m_indentHandler->m_indenterConfigFilename);
leIndenter->setText(m_indentHandler->m_indenterName);
leApplicationPath->setText(SettingsPaths::getApplicationBinaryPath());
leSettingsPath->setText(SettingsPaths::getSettingsPath());
leGlobalFilesPath->setText(SettingsPaths::getGlobalFilesPath());
leIndentersPath->setText(SettingsPaths::getIndenterPath());
leTempPath->setText(SettingsPaths::getTempPath());
// Execute the dialog.
exec();
}
#include "UiGuiInfoDialog.moc"
|