Search Results

Search found 15 results on 1 pages for 'onurozcelik'.

Page 1/1 | 1 

  • MySQL unstable behavior with external stroge

    - by onurozcelik
    In our project we are using MySQL 5.0.90(InnoDB engine) server with an external storage. We store MySQL data files in an external storage. When the external storage down for a reason we have unstable behaviours. So we made some tests. In Windows Server 2008 We closed external storage physically. MySQL service stoped and we could not reach the server. Then we opened the storage unit and we could not start service until we reconfigured MySQL. We made storage unit offline from operating system. After 3-4 minutes and some insert trials(some insert trials succeded) MySQL service stoped and we could not reach the server. Then we made storage unit online and we could start the service(not automatically). In Windows Server 2003 We made storage unit offline. After 3-4 minutes and some insert trials(some insert trials succeded) MySQL service stoped and we could not reach the server. Then we made storage unit online we could not start the service until we reinstalled MySQL. Before reinstall we tried to reconfigure but it did not work. We closed external storage physically. MySQL service stoped and we could not reach the server. After that we opened the storage unit and we could start service(not automatically) We expect service to autostart after storage unit is online/open. But these tests show unstable behaviors. Is there any solutions to this.

    Read the article

  • General advice about scaling on QGraphicsView/QGraphicsScene

    - by onurozcelik
    Hi, In my project I am using QGraphicsView/QGraphicsScene stuff. On my scene there will be regions that contains 2D graphics. Region count will be limited(Lets say 20) Users can choose to display one or more regions. If user choose to display one region I am going to show one region on scene If user choose to display n regions I am going to show n regions on scene I need a scaling logic to fit n regions on same scene. How can I achieve this?

    Read the article

  • Programming user interface advice?

    - by onurozcelik
    Hi, In my project I going to generate a user interface through programming. Scalability of this UI is very important requirement. So far I am using two dimensional graphics for generating the UI. I think there may be different solutions but for the moment I know only two. First one is supplying X,Y coordinates of each two dimensional graphic on my UI.(I do not prefer this solution because I do not want to calculate X,Y coordinates of each graphic. For the moment I don't have a logic for doing this easily) Second one(which is currently I am using now) is using layouts which organizes its contents according to size of item. In this solution I don't have to calculate X,Y coordinates of each item.(Layout is doing this for me) But this approach may have its own pitfalls. I am very new to user interface programming. Can you give me advice about this issue?

    Read the article

  • Context Menu on QGraphicsWidget

    - by onurozcelik
    Hi, In my application I have two object type. One is field item, other is composite item. Composite items may contain two or more field items. Here is my composite item implementation. #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~CompositeItem() { } QRectF CompositeItem::boundingRect() const { //Not carefully thinked about it return QRectF(QPointF(-50,-150),QSizeF(250,250)); } void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) { FieldItem *child; foreach(child,children) { child->paint(painter,option,widget); } } QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { QSizeF itsSize(0,0); FieldItem *child; foreach(child,children) { // if its size empty set first child size to itsSize if(itsSize.isEmpty()) itsSize = child->sizeHint(Qt::PreferredSize); else { QSizeF childSize = child->sizeHint(Qt::PreferredSize); if(itsSize.width() < childSize.width()) itsSize.setWidth(childSize.width()); itsSize.setHeight(itsSize.height() + childSize.height()); } } return itsSize; } void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { qDebug()<<"Test"; } My first question is how I can propagate context menu event to specific child. Picture on the above demonstrates one of my possible composite item. If you look on the code above you will see that I print "Test" when context menu event occurs. When I right click on the line symbol I see that "Test" message is printed. But when I right click on the signal symbol "Test" is not printed and I want it to be printed. My second question what cause this behaviour. How do I overcome this.

    Read the article

  • Subclassing QGraphicsItemGroup

    - by onurozcelik
    Hi everyone I have system that has classes derived from QGraphicsWidget. I manage derived class objects in layouts on QGraphicsScene. Now I need a compound item that contain two or more QGraphicsWidget in it and also I need to put that item inside my layout. So I choose QGraphicsItemGroup and write I class like this. class CompositeItem : public QGraphicsItemGroup,public QGraphicsLayoutItem { ... }; I only implemented sizeHint function again. When add CompositeItem instance to layout it does not shown. What may cause this? Where I made wrong?

    Read the article

  • Events with QGraphicsItemGroup

    - by onurozcelik
    In my application I want to use QGraphicsItemGroup for grouping items into one item. I played with it a little and not sure using it because when I want to catch events, events are merged together but I want to handle specific event with specific child. How can I achieve this?

    Read the article

  • Container item implementation

    - by onurozcelik
    Hi, I am working in Train Traffic Controller software project. My responsibility in this project is to develop the visual railroad GUI. We are implementing the project with Qt. By now I am using QGraphicsLinearLayout to hold my items. I am using the layout because I do not want to calculate coordinates of each item. So far I wrote item classes to add the layout. For instance SwitchItem class symbolizes railroad switch in real world. Each item class is responsible for its own painting and events. So far so good. Now I need a composite item that can contain two or more item. This class is going to be responsible for painting the items contained in it. I need this class because I have to put two or more items inside same layout cell. If I don' t put them in same cell I can' t use layout. See the image below. BlockSegmentItem and SignalItem inside same cell. Here is my compositeitem implementation. #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~CompositeItem() { } QRectF CompositeItem::boundingRect() const { FieldItem *child; QRectF rect(0,0,0,0); foreach(child,children) { rect = rect.united(child->boundingRect()); } return rect; } void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) { FieldItem *child; foreach(child,children) { child->paint(painter,option,widget); } } QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { QSizeF itsSize(0,0); FieldItem *child; foreach(child,children) { // if its size empty set first child size to itsSize if(itsSize.isEmpty()) itsSize = child->sizeHint(Qt::PreferredSize); else { QSizeF childSize = child->sizeHint(Qt::PreferredSize); if(itsSize.width() < childSize.width()) itsSize.setWidth(childSize.width()); itsSize.setHeight(itsSize.height() + childSize.height()); } } return itsSize; } void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { qDebug()<<"Test"; } This code works good with painting but when it comes to item events it is problematic. QGraphicsScene treats the composite item like a single item which is right for layout but not for events. Because each item has its own event implementation.(e.g. SignalItem has its special context menu event.) I have to handle item events seperately. Also I need a composite item implementation for the layout. How can I overcome this dilemma?

    Read the article

  • QGraphicsItem repaint

    - by onurozcelik
    I want to change text color inside a rectangle periyodically Here is my trial: TrainIdBox::TrainIdBox() { boxRect = QRectF(0,0,40,15); testPen = QPen(Qt:red); i=0; startTimer(500); } QRectF TrainIdBox::boundingRect() const { return boxRect; } void TrainIdBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(widget); Q_UNUSED(option); painter->setPen(QPen(drawingColor,2)); painter->drawRect(boxRect); painter->setPen(testPen); painter->drawText(boxRect,Qt::AlignCenter,"TEST"); } void TrainIdBox::timerEvent(QTimerEvent *te) { testPen = i % 2 == 0 ? QPen(Qt::green) : QPen(Qt::yellow); i++; update(boxRect); } This code does not working properly. What is wrong?

    Read the article

  • Get updated size of QGraphicsView

    - by onurozcelik
    Hi, In my Qt Application I am dynamically creating QGraphicsView(s) and adding them inside a QGridLayout. When I add first view inside grid, the view covers all the available space inside grid. Then I add second view and there are now two equally sized views inside grid. Then I add third view and there are now three equally sized views inside grid. And so on. How can I get updated size of first view? Below is my trial but I think this is not working. //Definition of viewsPerRow static const int viewsPerRow = 3; void window::newViewRequested() { QGraphicsView *view = new QGraphicsView; view->setVisible(true); viewVector.push_back(view); for(int i = viewGrid->count(); i < viewVector.count(); i++) { viewGrid->addWidget(view,i / viewsPerRow ,i % viewsPerRow); } qDebug()<<viewGrid->cellRect(0,0); }

    Read the article

  • QGraphicsView ensureVisible() and centerOn()

    - by onurozcelik
    Hi, I am going to do pan/scale stuff on QGraphicsView. So I read the documentation of QGraphicsView and see some utility functions like ensureVisible() and centerOn(). I think I understand what the documentation says but I can' t manage to write a working example. Could you please write/suggest me an example code to understand the issue.

    Read the article

  • Context Menu event with QGraphicsWidget

    - by onurozcelik
    In my application I subclass QGraphicsWidget In paint I am drawing a line with pen width 4. I reimplemented boundingRect() and shape(). But I can't catch context menu event every time I click right mouse button. What is the problem.(Pen Width ? ) //Sample code for boundingRect() and shape() QRectF boundingRect() const { qreal rectLeft = x1 < x2 ? x1 : x2; qreal rectTop = y1 < y2 ? y1 : y2; qreal rectWidth = (x1 - x2) != 0 ? abs(x1-x2) : 4; qreal rectHeight = (y1 - y2) != 0 ? abs(y1 -y2) : 4; return QRectF(rectLeft,rectTop,rectWidth,rectHeigt); } QPainterPath shape() { QPainterPath path; path.addRect(boundingRect()); return path; }

    Read the article

1