Хранилища Subversion OpenInventory

Сравнить редакции

Не учитывать пробелы Редакция 87 → Редакция 88

/trunk/DBViewer/mainwindow.cpp
Новый файл
0,0 → 1,33
#include "mainwindow.h"
#include "ui_mainwindow.h"
 
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
rootItem1 = new QTreeWidgetItem(ui->treeWidget);
rootItem1->setText(0, tr("Óðîâåíü 1"));
rootItem2 = new QTreeWidgetItem(rootItem1);
rootItem2->setText(0, tr("óðîâåíü 2"));
rootItem1->setCheckState(0,Qt::Checked);
rootItem2->setCheckState(0,Qt::Checked);
 
}
 
MainWindow::~MainWindow()
{
delete ui;
}
 
void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
/trunk/DBViewer/mainwindow.h
Новый файл
0,0 → 1,32
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
 
#include <QMainWindow>
#include <QStandardItemModel>
#include <QStandardItem>
#include <QTreeWidgetItem>
#include <QTextCodec>
 
namespace Ui {
class MainWindow;
}
 
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
 
protected:
void changeEvent(QEvent *e);
 
private:
Ui::MainWindow *ui;
 
QStandardItemModel *model;
QStandardItem *item;
QTreeWidgetItem *rootItem1, *rootItem2;
 
};
 
#endif // MAINWINDOW_H
/trunk/DBViewer/main.cpp
Новый файл
0,0 → 1,14
#include <QtGui/QApplication>
#include "mainwindow.h"
 
int main(int argc, char *argv[])
{
 
QTextCodec *codec = QTextCodec::codecForName("cp1251");
QTextCodec *codecUTF = QTextCodec::codecForName("utf8");
QTextCodec::setCodecForTr(codec);
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
/trunk/DBViewer/DBViewer.pro
Новый файл
0,0 → 1,18
#-------------------------------------------------
#
# Project created by QtCreator 2010-09-10T12:38:15
#
#-------------------------------------------------
 
QT += network opengl sql xml
 
TARGET = DBViewer
TEMPLATE = app
 
 
SOURCES += main.cpp\
mainwindow.cpp
 
HEADERS += mainwindow.h
 
FORMS += mainwindow.ui
/trunk/DBViewer/mainwindow.ui
Новый файл
0,0 → 1,79
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>617</width>
<height>633</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>601</width>
<height>571</height>
</rect>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<widget class="QTreeWidget" name="treeWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>256</width>
<height>511</height>
</rect>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</widget>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>617</width>
<height>27</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>