filetablemodel.cpp \
filetableview.cpp \
history.cpp \
- historydialog.cpp
+ historydialog.cpp \
+ preferencedialog.cpp \
+ clickablelabel.cpp \
+ colorsamplemodel.cpp
HEADERS += mainwindow.h \
folderpanel.h \
filetablemodel.h \
filetableview.h \
history.h \
- historydialog.h
+ historydialog.h \
+ preferencedialog.h \
+ clickablelabel.h \
+ colorsamplemodel.h
FORMS += mainwindow.ui \
folderpanel.ui \
operationdialog.ui \
overwritedialog.ui \
sortdialog.ui \
- historydialog.ui
+ historydialog.ui \
+ preferencedialog.ui
RESOURCES += \
resource.qrc
Gefu is Experimental File Utility.
### TODO
-- 環境設定ダイアログ
+- オプション
+ - ファンクションキー
+- ドラッグ&ドロップ
- 簡易テキストビューア
- 簡易画像ビューア
+- 簡易アーカイバ
+- SNS連携(タイムライン表示とか)
+
+#### 2014/08/21 Ver0.03 公開
+- 環境設定ダイアログおよびオプションを実装。
+ - 終了時の確認ダイアログ。
+ - 起動時のウィンドウ位置・サイズ。
+ - 起動時に設定をリセット。
+ - 色とフォントの設定。
#### 2014/08/20 Ver0.02 公開
- QTableWidget -> QTableView + Modelへ変更し高速化。
-- フォルダ履歴機能を実装
+- フォルダ履歴機能を実装。
- 行の高さを調整。
- マーク時の背景色、前景色を変更。
- ウィンドウの位置・サイズを保存するようにした。
- ソート方法の選択機能を追加。
#### 2014/08/18 Ver0.00 公開
-- 新規
+- 新規。
QLabel(parent)
{
}
+
+
+void ClickableLabel::mouseReleaseEvent(QMouseEvent *)
+{
+ emit clicked();
+}
explicit ClickableLabel(QWidget *parent = 0);
signals:
+ void clicked();
public slots:
+
+ // QWidget interface
+protected:
+ void mouseReleaseEvent(QMouseEvent *);
};
#endif // CLICKABLELABEL_H
#include "colorsamplemodel.h"
+#include <QBrush>
+
ColorSampleModel::ColorSampleModel(QObject *parent) :
QAbstractTableModel(parent)
{
}
+
+void ColorSampleModel::setFont(const QFont &font)
+{
+ m_font = font;
+}
+
+int ColorSampleModel::rowCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return 3;
+}
+
+int ColorSampleModel::columnCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return 2;
+}
+
+QVariant ColorSampleModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid()) {
+ return QVariant();
+ }
+
+ const QString strText[3][2] = {
+ { tr("通常"), tr("システム") },
+ { tr("マーク"), tr("隠し属性") },
+ { tr(""), tr("読取専用") }
+ };
+
+ switch (role) {
+ case Qt::DisplayRole:
+ return strText[index.row()][index.column()];
+
+ case Qt::FontRole:
+ return m_font;
+ break;
+
+ case Qt::BackgroundRole:
+ switch (index.column()) {
+ case 0:
+ switch (index.row()) {
+ case 0: return QBrush(m_colorMap->value("clrBgNormal"));
+ case 1: return QBrush(m_colorMap->value("clrBgMark"));
+ }
+ break;
+
+ case 1:
+ switch (index.row()) {
+ case 0:
+ case 1:
+ case 2:
+ return QBrush(m_colorMap->value("clrBgNormal"));
+ }
+ break;
+ }
+ break;
+
+ case Qt::ForegroundRole:
+ switch (index.column()) {
+ case 0:
+ switch (index.row()) {
+ case 0: return QBrush(m_colorMap->value("clrFgNormal"));
+ case 1: return QBrush(m_colorMap->value("clrFgMark"));
+ }
+ break;
+
+ case 1:
+ switch (index.row()) {
+ case 0: return QBrush(m_colorMap->value("clrFgSystem"));
+ case 1: return QBrush(m_colorMap->value("clrFgHidden"));
+ case 2: return QBrush(m_colorMap->value("clrFgReadonly"));
+ }
+ break;
+ }
+ break;
+ }
+
+ return QVariant();
+}
#define COLORSAMPLEMODEL_H
#include <QAbstractTableModel>
+#include <QFont>
+#include <QMap>
+
+typedef QMap<QString, QColor> ColorMap;
class ColorSampleModel : public QAbstractTableModel
{
public:
explicit ColorSampleModel(QObject *parent = 0);
+ const QFont& font() { return m_font; }
+ void setFont(const QFont &font);
+
+ void setColorMap(ColorMap *colorMap) {
+ m_colorMap = colorMap;
+ }
+
+ void update() {
+ beginResetModel();
+ endResetModel();
+ }
+
+private:
+ ColorMap *m_colorMap;
+ QFont m_font;
+
signals:
public slots:
+
+ // QAbstractItemModel interface
+public:
+ int rowCount(const QModelIndex &parent) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const;
};
+
#endif // COLORSAMPLEMODEL_H
extern MainWindow* getMainWnd();\r
extern QString FilesizeToString(quint64 size);\r
\r
-#define VERSION_VALUE 0.02\r
+#define VERSION_VALUE 0.03\r
\r
#define slash QString("/")\r
#define QQ(x) ("\"" + (x) + "\"")\r
\r
#define IniKey_ShowHidden "Common/ShowHidden"\r
#define IniKey_ShowSystem "Common/ShowSystem"\r
+#define IniKey_ConfirmExit "BootAndExit/ConfirmExit"\r
+#define IniKey_BootSizeSpec "BootAndExit/SizeSpec"\r
+#define IniKey_BootSizeRel "BootAndExit/SizeRel"\r
+#define IniKey_BootSizeAbs "BootAndExit/SizeAbs"\r
+#define IniKey_BootPosSpec "BootAndExit/PosSpec"\r
+#define IniKey_BootPosRel "BootAndExit/PosRel"\r
+#define IniKey_BootPosAbs "BootAndExit/PosAbs"\r
+#define IniKey_ResetOnBoot "BootAndExit/Reset"\r
+#define IniKey_BoxColorFg "Appearance/BoxColorFg"\r
+#define IniKey_BoxColorBg "Appearance/BoxColorBg"\r
+#define IniKey_BoxFont "Appearance/BoxFont"\r
+#define IniKey_ViewFont "Appearance/ViewFont"\r
+#define IniKey_ViewColorBgNormal "Appearance/ViewColorBgNormal"\r
+#define IniKey_ViewColorBgMark "Appearance/ViewColorBgMark"\r
+#define IniKey_ViewColorFgNormal "Appearance/ViewColorFgNormal"\r
+#define IniKey_ViewColorFgMark "Appearance/ViewColorFgMark"\r
+#define IniKey_ViewColorFgSystem "Appearance/ViewColorFgSystem"\r
+#define IniKey_ViewColorFgHidden "Appearance/ViewColorFgHidden"\r
+#define IniKey_ViewColorFgReadonly "Appearance/ViewColorFgReadonly"\r
#define IniKey_WindowGeometry "Window/Geometry"\r
+#define iniKey_WindowState "Window/State"\r
#define IniSec_Left "Left"\r
#define IniSec_Right "Right"\r
#define IniKey_Dir "dir"\r
#define IniKey_OrderBy "OrderBy"\r
#define IniKey_PutDirs "PutDirs"\r
#define IniKey_IgnoreCase "IgnoreCase"\r
-#define IniKey_LeftDir IniSec_Left"/"IniKey_Dir\r
-#define IniKey_LeftSortBy IniSec_Left"/"IniKey_SortBy\r
-#define IniKey_LeftOrderBy IniSec_Left"/"IniKey_OrderBy\r
-#define IniKey_LeftPutDirs IniSec_Left"/"IniKey_PutDirs\r
-#define IniKey_LeftIgnoreCase IniSec_Left"/"IniKey_IgnoreCase\r
-#define IniKey_RightDir IniSec_Right"/"IniKey_Dir\r
-#define IniKey_RightSortBy IniSec_Right"/"IniKey_SortBy\r
-#define IniKey_RightOrderBy IniSec_Right"/"IniKey_OrderBy\r
-#define IniKey_RightPutDirs IniSec_Right"/"IniKey_PutDirs\r
-#define IniKey_RightIgnoreCase IniSec_Right"/"IniKey_IgnoreCase\r
\r
#define SortByName QDir::Name\r
#define SortByDate QDir::Time\r
#define PutDirsLast QDir::DirsLast\r
#define PutDirsDefault 0\r
\r
+#define DefaultMarkBgColor QColor(0, 192, 0)\r
+#define DefaultMarkFgColor QColor(128, 0, 0)\r
+#define DefaultSystemColor QColor(128, 0, 128)\r
+#define DefaultHiddenColor QColor(128, 128, 128)\r
+#define DefaultReadonlyColor QColor(0, 128, 0)\r
\r
#endif // COMMON_H\r
\r
#include <QDateTime>\r
#include <QDebug>\r
-#include <QBrush>\r
+#include <QApplication>\r
+#include <QSettings>\r
+#include <QMenuBar>\r
#ifdef Q_OS_WIN32\r
#include <windows.h>\r
#endif\r
m_fileInfoList(),\r
m_checkStates(),\r
m_IconFactory(),\r
- m_fsWatcher(NULL)\r
+ m_fsWatcher(NULL),\r
+ m_font(),\r
+ m_NormalBrush(),\r
+ m_NormalTextBrush(),\r
+ m_MarkBrush(),\r
+ m_MarkTextBrush(),\r
+ m_SystemBrush(),\r
+ m_HiddenBrush(),\r
+ m_ReadonlyBrush()\r
{\r
}\r
\r
return m_fileInfoList[index.row()];\r
}\r
\r
+#define Brush(x, y, z) QBrush((x).value((y), (z)).value<QColor>());\r
+\r
+\r
+void FileTableModel::updateAppearance()\r
+{\r
+ QSettings settings;\r
+ QPalette palette(QApplication::palette("QTableView"));\r
+\r
+ m_font = settings.value(IniKey_ViewFont, QApplication::font()).value<QFont>();\r
+ m_NormalBrush = Brush(settings, IniKey_ViewColorBgNormal, palette.base());\r
+ m_NormalTextBrush = Brush(settings, IniKey_ViewColorFgNormal, palette.text());\r
+ m_MarkBrush = Brush(settings, IniKey_ViewColorBgMark, DefaultMarkBgColor);\r
+ m_MarkTextBrush = Brush(settings, IniKey_ViewColorFgMark, DefaultMarkFgColor);\r
+ m_SystemBrush = Brush(settings, IniKey_ViewColorFgSystem, DefaultSystemColor);\r
+ m_HiddenBrush = Brush(settings, IniKey_ViewColorFgHidden, DefaultHiddenColor);\r
+ m_ReadonlyBrush = Brush(settings, IniKey_ViewColorFgReadonly, DefaultReadonlyColor);\r
+\r
+ beginResetModel();\r
+ endResetModel();\r
+}\r
+\r
void FileTableModel::stateChanged()\r
{\r
int numFolder = 0;\r
}\r
break;\r
\r
+ case Qt::FontRole:\r
+ return m_font;\r
+\r
case Qt::TextAlignmentRole:\r
switch (index.column()) {\r
case 0:\r
\r
case Qt::BackgroundRole:\r
if (checked) {\r
- return QBrush(QColor(0, 196, 0));\r
+ return m_MarkBrush;\r
}\r
- break;\r
+ return m_NormalBrush;\r
\r
case Qt::ForegroundRole:\r
if (checked) {\r
- return QBrush(QColor(196, 0, 0));\r
+ return m_MarkTextBrush;\r
}\r
- break;\r
+#ifdef Q_OS_WIN32\r
+ {\r
+ DWORD dwFlags = ::GetFileAttributes(\r
+ info.absoluteFilePath().toStdWString().c_str());\r
+ if (dwFlags != DWORD(-1) && (dwFlags & FILE_ATTRIBUTE_SYSTEM) == FILE_ATTRIBUTE_SYSTEM))\r
+ {\r
+ return m_SystemBrush;\r
+ }\r
+ }\r
+#endif\r
+ if (info.isHidden() && info.fileName() != "..") {\r
+ return m_HiddenBrush;\r
+ }\r
+ if (!info.isWritable()) {\r
+ return m_ReadonlyBrush;\r
+ }\r
+ return m_NormalTextBrush;\r
\r
case Qt::CheckStateRole:\r
if (index.column() == 0 && info.fileName() != "..") {\r
#include <QDir>\r
#include <QFileIconProvider>\r
#include <QFileSystemWatcher>\r
+#include <QBrush>\r
+#include <QFont>\r
\r
class FileTableModel : public QAbstractTableModel\r
{\r
QFileInfoList checkedItems() const;\r
QFileInfo fileInfo(const QModelIndex &index) const;\r
\r
+ void updateAppearance();\r
+\r
signals:\r
void rootChanged(const QString &root);\r
void stateChanged(int checkedFoldrs, int checkedFiles, quint64 totalSize);\r
QVector<Qt::CheckState> m_checkStates;\r
QFileIconProvider m_IconFactory;\r
QFileSystemWatcher *m_fsWatcher;\r
+ QFont m_font;\r
+ QBrush m_NormalBrush;\r
+ QBrush m_NormalTextBrush;\r
+ QBrush m_MarkBrush;\r
+ QBrush m_MarkTextBrush;\r
+ QBrush m_SystemBrush;\r
+ QBrush m_HiddenBrush;\r
+ QBrush m_ReadonlyBrush;\r
\r
void stateChanged();\r
\r
QString key = side + slash + IniKey_Dir;\r
QString path = settings.value(key, QDir::homePath()).toString();\r
\r
+ model->updateAppearance();\r
ui->fileTable->setModel(model);\r
ui->fileTable->setRootPath(path, true);\r
ui->fileTable->selectRow(0);\r
}\r
\r
+void FolderPanel::updateAppearance()\r
+{\r
+ QSettings settings;\r
+ QPalette palette;\r
+ QFont font;\r
+\r
+ font = ui->locationField->font();\r
+ font = settings.value(IniKey_BoxFont, font).value<QFont>();\r
+ palette = ui->locationField->palette();\r
+ palette.setColor(\r
+ QPalette::Base,\r
+ settings.value(IniKey_BoxColorBg, palette.base()).value<QColor>());\r
+ palette.setColor(\r
+ QPalette::Text,\r
+ settings.value(IniKey_BoxColorFg, palette.text()).value<QColor>());\r
+ ui->locationField->setFont(font);\r
+ ui->locationField->setPalette(palette);\r
+\r
+ palette = ui->fileTable->palette();\r
+ palette.setColor(\r
+ QPalette::Base,\r
+ settings.value(IniKey_ViewColorBgNormal, palette.base()).value<QColor>());\r
+ ui->fileTable->setPalette(palette);\r
+\r
+ FileTableModel *model = static_cast<FileTableModel*>(ui->fileTable->model());\r
+ if (model) {\r
+ model->updateAppearance();\r
+ }\r
+}\r
+\r
void FolderPanel::onStateChanged(int checkedFolders, int checkedFiles, quint64 totalSize)\r
{\r
QString msg = "";\r
const QString side() const;\r
void setSide(const QString &side);\r
\r
+ void updateAppearance();\r
+\r
private:\r
Ui::FolderPanel *ui;\r
\r
+#include "common.h"\r
#include "mainwindow.h"\r
#include <QApplication>\r
#include <QSettings>\r
a.setWindowIcon(QIcon(":/images/Gefu.png"));\r
\r
QSettings::setDefaultFormat(QSettings::IniFormat);\r
+ QSettings settings;\r
+ if (settings.value(IniKey_ResetOnBoot, false).toBool()) {\r
+ settings.clear();\r
+ }\r
\r
MainWindow w;\r
w.show();\r
#include "renamesingledialog.h"\r
#include "renameworker.h"\r
#include "sortdialog.h"\r
+#include "preferencedialog.h"\r
#include "ui_mainwindow.h"\r
#include <QFileSystemModel>\r
#include <QDebug>\r
#include <QProcess>\r
#include <QThread>\r
#include <QInputDialog>\r
+#include <QCheckBox>\r
+#include <QDesktopWidget>\r
\r
MainWindow::MainWindow(QWidget *parent) :\r
QMainWindow(parent),\r
ui->setupUi(this);\r
ui->RPanel->setSide("Right");\r
ui->LPanel->setSide("Left");\r
+ ui->LPanel->updateAppearance();\r
+ ui->RPanel->updateAppearance();\r
ui->LPanel->fileTable()->setFocus();\r
\r
QSettings settings;\r
\r
// シグナル/スロットを設定する\r
connect(ui->action_Setting, SIGNAL(triggered()), this, SLOT(onActionSetting()));\r
- connect(ui->action_Quit, SIGNAL(triggered()), qApp, SLOT(quit()));\r
+ connect(ui->action_Quit, SIGNAL(triggered()), this, SLOT(close()));\r
connect(ui->help_About, SIGNAL(triggered()), this, SLOT(onHelpAbout()));\r
connect(ui->view_Hidden, SIGNAL(triggered()), this, SLOT(toggleShowHiddenFiles()));\r
connect(ui->view_System, SIGNAL(triggered()), this, SLOT(toggleShowSystemFiles()));\r
setWindowTitle(tr("げふぅ v%1").arg(VERSION_VALUE));\r
// ウィンドウアイコンを設定する\r
setWindowIcon(QIcon(":/images/Gefu.png"));\r
- // ウィンドウサイズと位置を設定する\r
- QRect rc = settings.value(IniKey_WindowGeometry, QRect()).toRect();\r
- if (rc != QRect()) {\r
- this->setGeometry(rc);\r
+ //>>>>> ウィンドウサイズと位置を設定する\r
+ QString strValue;\r
+ QPoint point = this->geometry().topLeft();\r
+ QSize size = this->geometry().size();\r
+ //>>>> 前回の位置・サイズ・状態を復元する\r
+ restoreGeometry(settings.value(IniKey_WindowGeometry).toByteArray());\r
+ restoreState(settings.value(iniKey_WindowState).toByteArray());\r
+ //>>>> INIファイルの設定から復元する\r
+ //>>> サイズ\r
+ strValue = settings.value(IniKey_BootSizeSpec, "").toString();\r
+ if (strValue == "sizeAbsolute") {\r
+ size = settings.value(IniKey_BootSizeAbs).toSize();\r
+ }\r
+ else if (strValue == "sizeRelative") {\r
+ size = settings.value(IniKey_BootSizeRel).toSize();\r
+ size.setWidth(size.width() * QApplication::desktop()->width() / 100.0);\r
+ size.setHeight(size.height() * QApplication::desktop()->height() / 100.0);\r
+ }\r
+ else if (strValue == "sizeLast") {\r
+ size = this->geometry().size();\r
+ }\r
+ //>>> 位置\r
+ strValue = settings.value(IniKey_BootPosSpec, "").toString();\r
+ if (strValue == "posAbsolute") {\r
+ point = settings.value(IniKey_BootPosAbs).toPoint();\r
+ }\r
+ else if (strValue == "posRelative") {\r
+ point = settings.value(IniKey_BootPosRel).toPoint();\r
+ point.setX(point.x() * QApplication::desktop()->width() / 100.0);\r
+ point.setY(point.y() * QApplication::desktop()->height() / 100.0);\r
+ }\r
+ else if (strValue == "posLast") {\r
+ point = this->geometry().topLeft();\r
}\r
else {\r
- this->resize(800, 600);\r
+ point.setX((QApplication::desktop()->width() - size.width()) / 2);\r
+ point.setY((QApplication::desktop()->height() - size.height()) / 2);\r
}\r
+ this->setGeometry(QRect(point, size));\r
}\r
\r
MainWindow::~MainWindow()\r
{\r
- QSettings settings;\r
- settings.setValue(IniKey_WindowGeometry, this->geometry());\r
-\r
delete ui;\r
}\r
\r
\r
void MainWindow::onActionSetting()\r
{\r
- QMessageBox::information(this, tr("情報"), tr("環境設定機能は未実装です。"));\r
+ PreferenceDialog dlg(this);\r
+\r
+ if (dlg.exec() == QDialog::Accepted) {\r
+ ui->LPanel->updateAppearance();\r
+ ui->RPanel->updateAppearance();\r
+ }\r
}\r
\r
void MainWindow::toggleShowHiddenFiles()\r
qDebug() << "MainWindow not found !?";\r
return NULL;\r
}\r
+\r
+\r
+void MainWindow::closeEvent(QCloseEvent *event)\r
+{\r
+ qDebug() << "closeEvent();";\r
+\r
+ QSettings settings;\r
+\r
+ if (settings.value(IniKey_ConfirmExit, true).toBool()) {\r
+ QMessageBox msgBox;\r
+ QCheckBox *checkBox = new QCheckBox();\r
+ checkBox->setText(tr("次回以降は確認しない"));\r
+ msgBox.setCheckBox(checkBox);\r
+ msgBox.setText(tr("終了しますか?"));\r
+ msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);\r
+\r
+ if (msgBox.exec() == QMessageBox::No) {\r
+ event->ignore();\r
+ return;\r
+ }\r
+ settings.setValue(IniKey_ConfirmExit, !checkBox->isChecked());\r
+ }\r
+\r
+ settings.setValue(IniKey_WindowGeometry, saveGeometry());\r
+ settings.setValue(iniKey_WindowState, saveState());\r
+ QMainWindow::closeEvent(event);\r
+}\r
\r
private:\r
Ui::MainWindow *ui;\r
+\r
+ // QWidget interface\r
+protected:\r
+ void closeEvent(QCloseEvent *event);\r
};\r
\r
#endif // MAINWINDOW_H\r
+#include "colorsamplemodel.h"
+#include"common.h"
#include "preferencedialog.h"
#include "ui_preferencedialog.h"
+#include <QAbstractTableModel>
+#include <QColorDialog>
+#include <QSettings>
+#include <QDebug>
+#include <QDir>
+
+
+
PreferenceDialog::PreferenceDialog(QWidget *parent) :
QDialog(parent),
- ui(new Ui::PreferenceDialog)
+ ui(new Ui::PreferenceDialog),
+ m_model(),
+ m_colorMap()
{
+ m_model.setColorMap(&m_colorMap);
+
ui->setupUi(this);
+ ui->tabWidget->setCurrentIndex(0);
+ ui->tabWidget->setTabText(0, "起動と終了");
+ ui->tabWidget->setTabText(1, "色とフォント");
+ ui->sampleEdit->setText(QDir::homePath());
+ ui->sampleTable->setModel(&m_model);
+ ui->sampleTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+ ui->sampleTable->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+
+ connect(ui->bootSize, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+ connect(ui->sizeAbsolute, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+ connect(ui->sizeRelative, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+ connect(ui->bootPos, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+ connect(ui->posAbsolute, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+ connect(ui->posRelative, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+
+ connect(ui->boxClrBg, SIGNAL(clicked()), this, SLOT(selectBoxColor()));
+ connect(ui->boxClrFg, SIGNAL(clicked()), this, SLOT(selectBoxColor()));
+
+ connect(ui->clrBgMark, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrBgNormal, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrFgHidden, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrFgMark, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrFgNormal, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrFgReadonly, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+ connect(ui->clrFgSystem, SIGNAL(clicked()), this, SLOT(selectViewColor()));
+
+ connect(ui->boxFont, SIGNAL(currentFontChanged(QFont)), this, SLOT(changeFont()));
+ connect(ui->boxFontBold, SIGNAL(clicked()), this, SLOT(changeFont()));
+ connect(ui->boxFontSize, SIGNAL(valueChanged(int)), this, SLOT(changeFont()));
+
+ connect(ui->viewFont, SIGNAL(currentFontChanged(QFont)), this, SLOT(changeFont()));
+ connect(ui->viewFontBold, SIGNAL(clicked()), this, SLOT(changeFont()));
+ connect(ui->viewFontSize, SIGNAL(valueChanged(int)), this, SLOT(changeFont()));
+
+ QSettings settings;
+ QString strValue;
+ QSize size;
+ QPoint point;
+ QColor color;
+ QPalette palette;
+ QFont font;
+ QRadioButton *radioBtn;
+
+ //>>>>> 起動と終了
+ // 終了時の確認ダイアログ
+ ui->confirmExit->setChecked(settings.value(IniKey_ConfirmExit, true).toBool());
+ // 起動時のサイズ
+ strValue = settings.value(IniKey_BootSizeSpec, "sizeLast").toString();
+ if (strValue.isEmpty()) {
+ ui->bootSize->setChecked(false);
+ }
+ else {
+ ui->bootSize->setChecked(true);
+ radioBtn = findChild<QRadioButton*>(strValue);
+ if (radioBtn == NULL) {
+ radioBtn = ui->sizeLast;
+ }
+ radioBtn->setChecked(true);
+ }
+ size = settings.value(IniKey_BootSizeAbs, QSize(800, 600)).toSize();
+ ui->absoluteWidth->setValue(size.width());
+ ui->absoluteHeight->setValue(size.height());
+ size = settings.value(IniKey_BootSizeRel, QSize(50, 50)).toSize();
+ ui->relativeWidth->setValue(size.width());
+ ui->relativeHeight->setValue(size.height());
+ // 起動時の位置
+ strValue = settings.value(IniKey_BootPosSpec, "posLast").toString();
+ if (strValue.isEmpty()) {
+ ui->bootPos->setChecked(false);
+ }
+ else {
+ ui->bootPos->setChecked(true);
+ radioBtn = findChild<QRadioButton*>(strValue);
+ if (radioBtn == NULL) {
+ radioBtn = ui->posLast;
+ }
+ radioBtn->setChecked(true);
+ }
+ point = settings.value(IniKey_BootPosAbs, QPoint(0, 0)).toPoint();
+ ui->absoluteLeft->setValue(point.x());
+ ui->absoluteTop->setValue(point.y());
+ point = settings.value(IniKey_BootPosRel, QPoint(0, 0)).toPoint();
+ ui->relativeLeft->setValue(point.x());
+ ui->relativeTop->setValue(point.y());
+ // 起動時の設定削除
+ ui->resetOnBoot->setChecked(settings.value(IniKey_ResetOnBoot, false).toBool());
+
+ //>>>>> 色とフォント
+ //>>>> アドレスボックス
+ palette = QPalette();
+ // 背景色
+ color = settings.value(IniKey_BoxColorBg, QPalette().base().color()).value<QColor>();
+ palette.setColor(QPalette::Background, color);
+ // 文字色
+ color = settings.value(IniKey_BoxColorFg, QPalette().text().color()).value<QColor>();
+ palette.setColor(QPalette::Text, color);
+ // フォント
+ QFont defaultFont = ui->sampleEdit->font();
+ font = settings.value(IniKey_BoxFont, defaultFont).value<QFont>();
+ ui->boxFont->setCurrentText(font.family());
+ ui->boxFontBold->setChecked(font.bold());
+ ui->boxFontSize->setValue(font.pointSize());
+ // サンプル表示
+ ui->sampleEdit->setPalette(palette);
+ ui->sampleEdit->setFont(font);
+ //>>>> ファイルビュー
+ // 背景色
+ color = settings.value(IniKey_ViewColorBgMark, DefaultMarkBgColor).value<QColor>();
+ m_colorMap["clrBgMark"] = color;
+ color = settings.value(IniKey_ViewColorBgNormal, QPalette().base().color()).value<QColor>();
+ m_colorMap["clrBgNormal"] = color;
+ // 文字色
+ color = settings.value(IniKey_ViewColorFgHidden, DefaultHiddenColor).value<QColor>();
+ m_colorMap["clrFgHidden"] = color;
+ color = settings.value(IniKey_ViewColorFgMark, DefaultMarkFgColor).value<QColor>();
+ m_colorMap["clrFgMark"] = color;
+ color = settings.value(IniKey_ViewColorFgNormal, QPalette().text().color()).value<QColor>();
+ m_colorMap["clrFgNormal"] = color;
+ color = settings.value(IniKey_ViewColorFgReadonly, DefaultReadonlyColor).value<QColor>();
+ m_colorMap["clrFgReadonly"] = color;
+ color = settings.value(IniKey_ViewColorFgSystem, DefaultSystemColor).value<QColor>();
+ m_colorMap["clrFgSystem"] = color;
+ // フォント
+ defaultFont = ui->sampleTable->font();
+ font = settings.value(IniKey_ViewFont, defaultFont).value<QFont>();
+ ui->viewFont->setCurrentText(font.family());
+ ui->viewFontBold->setChecked(font.bold());
+ ui->viewFontSize->setValue(font.pointSize());
+ // サンプル表示
+ m_model.setFont(font);
+ m_model.update();
}
PreferenceDialog::~PreferenceDialog()
{
delete ui;
}
+
+void PreferenceDialog::changeFont()
+{
+ QFont font;
+
+ if (sender() == ui->boxFont ||
+ sender() == ui->boxFontBold ||
+ sender() == ui->boxFontSize)
+ {
+ font.setBold(ui->boxFontBold->isChecked());
+ font.setPointSize(ui->boxFontSize->value());
+ font.setFamily(ui->boxFont->currentText());
+ ui->sampleEdit->setFont(font);
+ }
+ else {
+ font.setBold(ui->viewFontBold->isChecked());
+ font.setPointSize(ui->viewFontSize->value());
+ font.setFamily(ui->viewFont->currentText());
+ m_model.setFont(font);
+ m_model.update();
+ }
+}
+
+void PreferenceDialog::setControlsEnabled(bool enabled)
+{
+ if (sender() == ui->bootSize) {
+ ui->sizeAbsolute->setEnabled(enabled);
+ ui->sizeLast->setEnabled(enabled);
+ ui->sizeRelative->setEnabled(enabled);
+ if (enabled) {
+ emit ui->sizeAbsolute->toggled(ui->sizeAbsolute->isChecked());
+ emit ui->sizeRelative->toggled(ui->sizeRelative->isChecked());
+ }
+ else {
+ emit ui->sizeAbsolute->toggled(false);
+ emit ui->sizeRelative->toggled(false);
+ }
+ }
+ else if (sender() == ui->sizeAbsolute) {
+ ui->absoluteHeight->setEnabled(enabled);
+ ui->absoluteWidth->setEnabled(enabled);
+ }
+ else if (sender() == ui->sizeRelative) {
+ ui->relativeHeight->setEnabled(enabled);
+ ui->relativeWidth->setEnabled(enabled);
+ }
+ else if (sender() == ui->bootPos) {
+ ui->posAbsolute->setEnabled(enabled);
+ ui->posCenter->setEnabled(enabled);
+ ui->posLast->setEnabled(enabled);
+ ui->posRelative->setEnabled(enabled);
+ if (enabled) {
+ emit ui->posAbsolute->toggled(ui->posAbsolute->isChecked());
+ emit ui->posRelative->toggled(ui->posRelative->isChecked());
+ }
+ else {
+ emit ui->posAbsolute->toggled(false);
+ emit ui->posRelative->toggled(false);
+ }
+ }
+ else if (sender() == ui->posAbsolute) {
+ ui->absoluteLeft->setEnabled(enabled);
+ ui->absoluteTop->setEnabled(enabled);
+ }
+ else if (sender() == ui->posRelative) {
+ ui->relativeLeft->setEnabled(enabled);
+ ui->relativeTop->setEnabled(enabled);
+ }
+}
+
+void PreferenceDialog::selectBoxColor()
+{
+ QColor color;
+ QPalette palette = ui->sampleEdit->palette();
+ if (sender() == ui->boxClrBg) {
+ color = palette.background().color();
+ }
+ else if (sender() == ui->boxClrFg) {
+ color = palette.text().color();
+ }
+
+ color = QColorDialog::getColor(color, this, tr("色選択"));
+ if (!color.isValid()) {
+ return;
+ }
+
+ if (sender() == ui->boxClrBg) {
+ palette.setColor(QPalette::Base, color);
+ ui->sampleEdit->setPalette(palette);
+ }
+ else if (sender() == ui->boxClrFg) {
+ palette.setColor(QPalette::Text, color);
+ ui->sampleEdit->setPalette(palette);
+ }
+}
+
+void PreferenceDialog::selectViewColor()
+{
+ const QString objName = sender()->objectName();
+ QColor color = m_colorMap[objName];
+
+ color = QColorDialog::getColor(color, this, tr("色選択"));
+ if (!color.isValid()) {
+ return;
+ }
+
+ m_colorMap[objName] = color;
+ m_model.update();
+}
+
+void PreferenceDialog::accept()
+{
+ QSettings settings;
+ QAbstractButton *selected;
+
+ //>>>>> 起動と終了
+ // 終了時の確認ダイアログ
+ settings.setValue(IniKey_ConfirmExit, ui->confirmExit->isChecked());
+ // 起動時のサイズ
+ if (!ui->bootSize->isChecked()) {
+ settings.setValue(IniKey_BootSizeSpec, "");
+ }
+ else {
+ selected = ui->sizeOptions->checkedButton();
+ settings.setValue(IniKey_BootSizeSpec, selected->objectName());
+ QSize size;
+ // 絶対指定
+ size = QSize(ui->absoluteWidth->value(), ui->absoluteHeight->value());
+ settings.setValue(IniKey_BootSizeAbs, size);
+ // 相対指定
+ size = QSize(ui->relativeWidth->value(), ui->relativeHeight->value());
+ settings.setValue(IniKey_BootSizeRel, size);
+ }
+ // 起動時の位置
+ if (!ui->bootPos->isChecked()) {
+ settings.setValue(IniKey_BootPosSpec, "");
+ }
+ else {
+ selected = ui->posOptions->checkedButton();
+ settings.setValue(IniKey_BootPosSpec, selected->objectName());
+ // 絶対指定
+ QPoint pos;
+ pos = QPoint(ui->absoluteLeft->value(), ui->absoluteTop->value());
+ settings.setValue(IniKey_BootPosAbs, pos);
+ // 相対指定
+ pos = QPoint(ui->relativeLeft->value(), ui->relativeTop->value());
+ settings.setValue(IniKey_BootPosRel, pos);
+ }
+ // 起動時の設定削除
+ settings.setValue(IniKey_ResetOnBoot, ui->resetOnBoot->isChecked());
+
+ //>>>>> 色とフォント
+ QFont font = ui->sampleEdit->font();
+ QPalette palette = ui->sampleEdit->palette();
+ settings.setValue(IniKey_BoxColorBg, palette.base().color());
+ settings.setValue(IniKey_BoxColorFg, palette.text().color());
+ settings.setValue(IniKey_BoxFont, font);
+
+ settings.setValue(IniKey_ViewColorBgMark, m_colorMap["clrBgMark"]);
+ settings.setValue(IniKey_ViewColorBgNormal, m_colorMap["clrBgNormal"]);
+ settings.setValue(IniKey_ViewColorFgHidden, m_colorMap["clrFgHidden"]);
+ settings.setValue(IniKey_ViewColorFgMark, m_colorMap["clrFgMark"]);
+ settings.setValue(IniKey_ViewColorFgNormal, m_colorMap["clrFgNormal"]);
+ settings.setValue(IniKey_ViewColorFgReadonly, m_colorMap["clrFgReadonly"]);
+ settings.setValue(IniKey_ViewColorFgSystem, m_colorMap["clrFgSystem"]);
+ settings.setValue(IniKey_ViewFont, m_model.font());
+
+ QDialog::accept();
+}
#ifndef PREFERENCEDIALOG_H
#define PREFERENCEDIALOG_H
+#include "colorsamplemodel.h"
+
#include <QDialog>
+#include <QAbstractTableModel>
namespace Ui {
class PreferenceDialog;
private:
Ui::PreferenceDialog *ui;
+ ColorSampleModel m_model;
+ ColorMap m_colorMap;
+
+private slots:
+ void changeFont();
+ void setControlsEnabled(bool enabled);
+ void selectBoxColor();
+ void selectViewColor();
+
+ // QDialog interface
+public slots:
+ void accept();
};
#endif // PREFERENCEDIALOG_H
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <author/>
- <comment/>
- <exportmacro/>
<class>PreferenceDialog</class>
<widget class="QDialog" name="PreferenceDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>687</width>
+ <height>531</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle">
<string>Dialog</string>
</property>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="geometry">
- <rect>
- <x>30</x>
- <y>240</y>
- <width>341</width>
- <height>32</height>
- </rect>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_7">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tabBoot_Exit">
+ <attribute name="title">
+ <string>Tab 1</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="confirmExit">
+ <property name="text">
+ <string>終了時に確認ダイアログを表示する</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="bootSize">
+ <property name="text">
+ <string>起動時のウィンドウサイズを指定する</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="spacing">
+ <number>-1</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="sizeAbsolute">
+ <property name="text">
+ <string>絶対指定</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">sizeOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>幅</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="absoluteWidth">
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>px</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>高さ</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="absoluteHeight">
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>px</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_10">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="sizeRelative">
+ <property name="text">
+ <string>相対指定</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">sizeOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>幅</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="relativeWidth">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>高さ</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="relativeHeight">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_8">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="sizeLast">
+ <property name="text">
+ <string>前回終了時のサイズ</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">sizeOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="bootPos">
+ <property name="text">
+ <string>起動時のウィンドウ位置を指定する</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <property name="spacing">
+ <number>-1</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="posAbsolute">
+ <property name="text">
+ <string>絶対指定</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">posOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_13">
+ <item>
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="absoluteLeft">
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>px</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_14">
+ <item>
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="absoluteTop">
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>px</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_11">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="posRelative">
+ <property name="text">
+ <string>相対指定</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">posOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_10">
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="relativeLeft">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <item>
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="relativeTop">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_9">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_15">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="posCenter">
+ <property name="text">
+ <string>画面中央</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">posOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_8">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="posLast">
+ <property name="text">
+ <string>前回終了時の位置</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">posOptions</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="resetOnBoot">
+ <property name="text">
+ <string>次回起動時に設定ファイルをクリアする</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabAppearance">
+ <attribute name="title">
+ <string>Tab 2</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>アドレスボックス</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_16">
+ <item>
+ <widget class="QLabel" name="label_17">
+ <property name="text">
+ <string>フォント</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFontComboBox" name="boxFont">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="boxFontSize">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_18">
+ <property name="text">
+ <string>pt</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="boxFontBold">
+ <property name="text">
+ <string>太字</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_13">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_17">
+ <item>
+ <widget class="QPushButton" name="boxClrFg">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>文字色</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="boxClrBg">
+ <property name="text">
+ <string>背景色</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="sampleEdit">
+ <property name="text">
+ <string>サンプルテキスト</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>ファイルビュー</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_21">
+ <item>
+ <widget class="QLabel" name="label_23">
+ <property name="text">
+ <string>フォント</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFontComboBox" name="viewFont"/>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="viewFontSize">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_24">
+ <property name="text">
+ <string>pt</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="viewFontBold">
+ <property name="text">
+ <string>太字</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_12">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_23">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_22">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>文字色</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_19">
+ <item>
+ <widget class="QPushButton" name="clrFgNormal">
+ <property name="text">
+ <string>通常</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clrFgMark">
+ <property name="text">
+ <string>マーク</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_20">
+ <item>
+ <widget class="QPushButton" name="clrFgSystem">
+ <property name="text">
+ <string>システム</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clrFgHidden">
+ <property name="text">
+ <string>隠し属性</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clrFgReadonly">
+ <property name="text">
+ <string>読取専用</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="title">
+ <string>背景色</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_18">
+ <item>
+ <widget class="QPushButton" name="clrBgNormal">
+ <property name="text">
+ <string>通常</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clrBgMark">
+ <property name="text">
+ <string>マーク</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTableView" name="sampleTable"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>3</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
- <pixmapfunction/>
+ <tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>confirmExit</tabstop>
+ <tabstop>bootSize</tabstop>
+ <tabstop>sizeAbsolute</tabstop>
+ <tabstop>absoluteWidth</tabstop>
+ <tabstop>absoluteHeight</tabstop>
+ <tabstop>sizeRelative</tabstop>
+ <tabstop>relativeWidth</tabstop>
+ <tabstop>relativeHeight</tabstop>
+ <tabstop>sizeLast</tabstop>
+ <tabstop>bootPos</tabstop>
+ <tabstop>posAbsolute</tabstop>
+ <tabstop>absoluteLeft</tabstop>
+ <tabstop>absoluteTop</tabstop>
+ <tabstop>posRelative</tabstop>
+ <tabstop>relativeLeft</tabstop>
+ <tabstop>relativeTop</tabstop>
+ <tabstop>posCenter</tabstop>
+ <tabstop>posLast</tabstop>
+ <tabstop>boxFont</tabstop>
+ <tabstop>boxFontSize</tabstop>
+ <tabstop>boxFontBold</tabstop>
+ <tabstop>viewFont</tabstop>
+ <tabstop>viewFontSize</tabstop>
+ <tabstop>viewFontBold</tabstop>
+ </tabstops>
<resources/>
<connections>
<connection>
</hints>
</connection>
</connections>
+ <buttongroups>
+ <buttongroup name="posOptions"/>
+ <buttongroup name="sizeOptions"/>
+ </buttongroups>
</ui>